OZIndexer Client
class OZIndexerClient(indexerUrl: String, timeoutMs: Long = OZConstants.DEFAULT_INDEXER_TIMEOUT_MS, injectedClient: HttpClient? = null) : AutoCloseable
Client for interacting with the OpenZeppelin Smart Account indexer service.
The indexer maps WebAuthn credential IDs and signer addresses to deployed smart account contract addresses, enabling "Connect Wallet" discovery and contract exploration.
Example usage:
val client = OZIndexerClient(indexerUrl = "https://indexer.example.com")
// Look up contracts by credential ID
val credentialResponse = client.lookupByCredentialId("abc123...")
println("Found ${credentialResponse.count} contracts")
// Look up contracts by signer address
val addressResponse = client.lookupByAddress("GABC123...")
println("Signer is registered in ${addressResponse.count} contracts")
// Get full contract details
val contractDetails = client.getContract("CABC123...")
println("Contract has ${contractDetails.contextRules.size} context rules")Content copied to clipboard
Parameters
indexer Url
The indexer endpoint URL (trailing slashes are stripped)
timeout Ms
Request timeout in milliseconds
injected Client
Optional custom HTTP client for testing
Throws
if the URL is blank or does not use HTTPS (http://localhost is permitted for development).
Functions
Link copied to clipboard
Gets detailed information about a smart account contract.
Link copied to clipboard
Gets statistics from the indexer.
Link copied to clipboard
Looks up smart account contracts by signer address.
Link copied to clipboard
Looks up smart account contracts by WebAuthn credential ID.