ConnectWalletResult

sealed class ConnectWalletResult

Result of a wallet connection operation.

connectWallet and connectWithCredentials return one of two arms:

  • Connected: a single contract was resolved for the credential. The connection state has been set on the kit and the session has been saved.

  • Ambiguous: the indexer reported multiple contracts for the credential (the passkey is registered as a signer on more than one contract). The connection state has NOT been set; the caller must let the user pick a contract and re-call connectWallet (or connectWithAddress in the demo) with the chosen contractId.

Ambiguous is by-construction unreachable when an explicit contractId is supplied (the cascade is bypassed). The session-restore path inside connectWallet therefore always sees Connected.

Inheritors

Types

Link copied to clipboard
data class Ambiguous(val credentialId: String, val candidates: List<String>) : ConnectWalletResult

The indexer returned more than one contract for the credential.

Link copied to clipboard
data class Connected(val credentialId: String, val contractId: String, val restoredFromSession: Boolean) : ConnectWalletResult

A single contract was resolved for the credential.

Properties

Link copied to clipboard
abstract val credentialId: String

The credential ID (Base64URL-encoded, no padding).