OZSmart Account Config
Configuration for OpenZeppelin Smart Account operations.
This configuration data class defines all parameters required to interact with OpenZeppelin smart accounts on Stellar/Soroban. It includes network connectivity settings, contract addresses, and operational parameters.
Example usage:
val config = OZSmartAccountConfig(
rpcUrl = "https://soroban-testnet.stellar.org",
networkPassphrase = "Test SDF Network ; September 2015",
accountWasmHash = "abc123...",
webauthnVerifierAddress = "CBCD1234..."
)
// With custom settings using builder
val customConfig = OZSmartAccountConfig.builder(
rpcUrl = "https://soroban-testnet.stellar.org",
networkPassphrase = "Test SDF Network ; September 2015",
accountWasmHash = "abc123...",
webauthnVerifierAddress = "CBCD1234..."
)
.rpName("My Custom Wallet")
.sessionExpiryMs(86400000L) // 1 day
.relayerUrl("https://relayer.example.com")
.storage(myPersistentStorage)
.externalWallet(freighterAdapter)
.build()| Field | Required | Default |
|---|---|---|
| rpcUrl | Yes | - |
| networkPassphrase | Yes | - |
| accountWasmHash | Yes | - |
| webauthnVerifierAddress | Yes | - |
| deployerKeypair | No | Deterministic deployer |
| rpId | No | Browser default |
| rpName | No | "Smart Account" |
| sessionExpiryMs | No | 604800000 (7 days) |
| signatureExpirationLedgers | No | 720 (~1 hour) |
| timeoutInSeconds | No | 30 |
| relayerUrl | No | null |
| indexerUrl | No | null |
| webauthnProvider | No | null |
| storage | No | InMemoryStorageAdapter |
| externalWallet | No | null |
| maxContextRuleScanId | No | 50 |
Throws
if required parameters are blank or invalid (e.g., accountWasmHash is not a 64-character hex string, or webauthnVerifierAddress is not a valid C-address).
Constructors
Types
Properties
The WASM hash of the smart account contract (64-character hex string).
The keypair used for deploying smart account contracts.
External wallet adapter for signing transactions with an external signer.
Optional indexer endpoint URL for credential-to-contract mapping.
Maximum rule ID to scan when iterating context rules.
The Stellar network passphrase.
Optional relayer endpoint URL for fee sponsoring.
Session expiry time in milliseconds.
Signature expiration in ledgers for auth entries.
Storage adapter for persisting credentials and session data.
Default timeout for operations in seconds.
Optional WebAuthn provider for passkey authentication.
The contract address of the WebAuthn signature verifier (C-address).