jwt Token
Performs complete SEP-45 authentication flow.
This is the high-level API that handles the entire challenge-response flow:
Validates input parameters
Requests challenge from server
Validates network passphrase (if provided in response)
Decodes and validates authorization entries
Signs entries with provided keypairs
Submits signed entries to server
Returns parsed JWT authentication token
Return
Sep45AuthToken containing JWT token and parsed claims
Parameters
Contract account (C...) to authenticate
List of keypairs to sign the client authorization entry. For contracts that implement __check_auth with signature verification, provide the keypairs with sufficient weight to meet the contract's authentication requirements. Can be empty for contracts whose __check_auth does not require signatures.
Optional home domain for the challenge request. If not provided, defaults to the server home domain from stellar.toml.
Optional client domain for verification
Optional keypair for local client domain signing
Optional delegate for remote client domain signing
Optional expiration ledger for signatures. If null and signers are provided, automatically set to current ledger + 10 (approximately 50-60 seconds).
Throws
If challenge request fails
If challenge validation fails
If token submission fails
If client domain signing parameters are misconfigured
If clientAccountId is not a contract address