OZWallet Operations
Operations for creating and connecting smart account wallets.
OZWalletOperations provides high-level wallet lifecycle management:
Wallet creation with WebAuthn passkey generation
Contract deployment with deterministic address derivation
Wallet connection via session restoration or credential lookup
Integration with indexer for credential-to-contract discovery
This class requires a WebAuthnProvider to be set on the kit before use. The provider handles platform-specific WebAuthn operations.
Example usage:
val kit = OZSmartAccountKit.create(config)
val walletOps = kit.walletOperations
// Create a new wallet
val wallet = walletOps.createWallet(userName = "Alice", autoSubmit = true)
println("Created wallet: ${wallet.contractId}")
// Connect to existing wallet (returns null if no session and prompt = false)
val connected = walletOps.connectWallet()
if (connected != null) {
println("Connected: ${connected.contractId}")
} else {
println("No active session found")
}
// Connect with WebAuthn prompt fallback if no session
val prompted = walletOps.connectWallet(ConnectWalletOptions(prompt = true))
println("Connected: ${prompted?.contractId}")Types
Options for connecting to a wallet.
Functions
Authenticates with a passkey without connecting to a wallet.
Connects to an existing smart account wallet.
Creates a new smart account wallet with WebAuthn passkey authentication.
Deploys a wallet from a previously created pending credential.