Skip to main content

Import

Constructor

See Configuration for all available options.

Sub-Manager Properties

After construction, the following sub-managers are available as properties:

Wallet Lifecycle

createWallet()

Create a new smart account secured by a WebAuthn passkey.
Options:

connectWallet()

Restore a session or prompt for passkey selection.
Options:

disconnect()

Clear the session. The passkey and contract remain on-chain.

authenticatePasskey()

Perform passkey authentication without connecting to a wallet.

Transaction Methods

signAndSubmit()

Sign auth entries for a transaction and submit it. This is the recommended path for smart-account auth flows.

executeAndSubmit()

Build a smart-account mediated contract call, sign it, and submit. Preferred for arbitrary contract calls.

execute()

Build the assembled transaction for a smart-account mediated call without submitting.

sign()

Sign auth entries on a transaction. Use signAndSubmit() unless you need to inspect the signed entries.

signAuthEntry()

Sign a single auth entry.

transfer()

Transfer tokens from the connected smart account.

Contract Discovery

discoverContractsByCredential()

Find smart account contracts associated with a credential ID (via indexer).

discoverContractsByAddress()

Find smart account contracts associated with a Stellar address (via indexer).

getContractDetailsFromIndexer()

Fetch full contract details including rules, signers, and policies.

Utility Methods

fundWallet()

Fund the connected wallet via Friendbot (testnet only).

convertPolicyParams()

Convert policy parameter objects to ScVal for on-chain use.

buildPoliciesScVal()

Build a policies ScVal array for context rule creation.

Raw Wallet Escape Hatch

The generated contract client is accessible as kit.wallet after connecting. Use it directly for contract methods the SDK intentionally does not wrap: upgrade, batch_add_signer, get_signer_id, get_policy_id, and get_context_rules_count.
Rule of thumb: if the SDK adds orchestration, session handling, signer resolution, or submission logic, use the wrapper. If it’s a thin contract call, use kit.wallet directly.