Smart Account Builders
Builder utilities for Smart Account Kit.
Type-safe constructors for creating signers, context rule types, and policy parameters. These helpers ensure correct data structures are created for smart account operations.
Includes:
Signer builder functions for delegated, external, WebAuthn, and Ed25519 signers
Policy parameter data classes
Signer parsing (address string to signer)
Signer inspection (type checks, type description, credential/address extraction)
Signer matching (by credential ID, by address, equality)
Signer deduplication
Functions
Collects unique signers from a list, removing duplicates.
Creates a delegated signer (native Stellar account).
Creates an Ed25519 signer (with external verifier).
Creates an external signer (custom verifier contract).
Creates spending limit policy parameters.
Creates simple threshold policy parameters.
Creates a WebAuthn passkey signer.
Creates weighted threshold policy parameters.
Returns a human-readable description of a signer type.
Extracts the credential ID from a WebAuthn signer's key data.
Extracts the credential ID from a WebAuthn signer's key data as a Base64URL-encoded string.
Returns a unique string key for a signer, suitable for Map/Set operations.
Checks if a signer is a delegated signer (native Stellar account).
Checks if a signer is an external signer (verifier contract).
Checks if a signer matches a given Stellar address.
Checks if a signer matches a given credential ID.
Checks if a signer matches a given credential ID string.
Checks if two signers are equal.