ContractChallengeValidationError
public enum ContractChallengeValidationError : Error, Sendable
Errors that occur during contract challenge validation for SEP-45 Web Authentication for Contracts. These errors represent validation failures when processing challenge authorization entries.
-
The contract address in the authorization entry does not match the expected WEB_AUTH_CONTRACT_ID.
Declaration
Swift
case invalidContractAddress(expected: String, received: String) -
The function name in the authorization entry is not “web_auth_verify”.
Declaration
Swift
case invalidFunctionName(expected: String, received: String) -
An authorization entry contains sub-invocations, which are not allowed in SEP-45 challenges.
Declaration
Swift
case subInvocationsFound -
The home_domain argument does not match the expected value.
Declaration
Swift
case invalidHomeDomain(expected: String, received: String) -
The web_auth_domain argument does not match the authentication server’s domain.
Declaration
Swift
case invalidWebAuthDomain(expected: String, received: String) -
The account argument does not match the expected client account.
Declaration
Swift
case invalidAccount(expected: String, received: String) -
The nonce value is invalid, missing, or inconsistent across authorization entries.
Declaration
Swift
case invalidNonce(message: String) -
The server’s signature on the authorization entry is invalid or could not be verified.
Declaration
Swift
case invalidServerSignature -
No authorization entry exists for the server account. At least one server entry is required.
Declaration
Swift
case missingServerEntry -
No authorization entry exists for the client account. At least one client entry is required.
Declaration
Swift
case missingClientEntry -
The arguments in the contract function call are invalid, malformed, or missing required fields.
Declaration
Swift
case invalidArgs(message: String) -
The network passphrase does not match the expected network.
Declaration
Swift
case invalidNetworkPassphrase(expected: String, received: String) -
The client domain account does not match the expected value.
Declaration
Swift
case invalidClientDomainAccount(expected: String, received: String)
View on GitHub
Install in Dash