Import
Constructor
Sub-Manager Properties
After construction, the following sub-managers are available as properties:| Property | Type | Description |
|---|---|---|
kit.signers | SignerManager | Add/remove signers on context rules |
kit.rules | ContextRuleManager | CRUD for context rules |
kit.policies | PolicyManager | Attach/detach policies |
kit.credentials | CredentialManager | Local credential lifecycle |
kit.multiSigners | MultiSignerManager | Multi-signer transaction flows |
kit.externalSigners | ExternalSignerManager | G-address / wallet signers |
kit.indexer | IndexerClient | null | Contract discovery |
kit.relayer | RelayerClient | null | Fee-sponsored submission |
kit.events | SmartAccountEventEmitter | Event subscriptions |
kit.wallet | WalletClient | null | Raw contract client (after connect) |
Wallet Lifecycle
createWallet()
Create a new smart account secured by a WebAuthn passkey.
| Option | Type | Default | Description |
|---|---|---|---|
autoSubmit | boolean | false | Deploy the wallet immediately |
autoFund | boolean | false | Fund via Friendbot (testnet only) |
nativeTokenContract | string | - | Required when autoFund is true |
connectWallet()
Restore a session or prompt for passkey selection.
| Option | Type | Description |
|---|---|---|
prompt | boolean | Show passkey selection UI |
fresh | boolean | Ignore session, always prompt |
credentialId | string | Connect with a specific credential |
contractId | string | Connect with a specific contract |
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 askit.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.
kit.wallet directly.