Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

SDK Reference

The Altana SDK is a TypeScript library for creating noncustodial agentic wallets, granting scoped sessions, and executing transactions onchain. It runs anywhere JavaScript runs, including servers, browsers, and agent runtimes, with no API key and no hosted backend.

npm install @altananetwork/sdk viem

New to the SDK? Start with Setup: BNB Smart Chain, Altana's default network, then follow Create an agentic wallet for the full walkthrough.

Wallets

FunctionWhat it does
createWalletCreate a wallet from a private key signer and register it in the Keystore.
createPasskeyWalletCreate a wallet whose admin key is a passkey (Face ID, Touch ID, Windows Hello).
recoverFromPasskeyReconnect to an existing passkey wallet from a new device or session.

Sessions & Execution

FunctionWhat it does
grantSessionAuthorize an agent key with scoped permissions: spend caps, allowed contracts, expiry.
executeSend calls from the wallet, signed by the admin key or a session key.
revokeSessionRevoke a session key. One transaction; immediate and global.

Reads & Chains

FunctionWhat it does
balancesRead native and token balances for a wallet.
ensureKeyCachedProve a key from the L1 Keystore into an L2 cache to authorize across chains.

Payments & Signing

FunctionWhat it does
fetchWithX402Pay for an HTTP resource from a session key (x402), via Permit2 or EIP-3009.
signOrderSign an off-chain authorization with a session key (ERC-1271 wrapped signature).
approveSignatureCheckerAuthorize which contract may verify a session's signatures on-chain.
approveTokenForPermit2One-time ERC-20 approval of Permit2 for the permit2 payment rail.

Chain setup

PageWhat it covers
Setup: BNB Smart ChainInstall, createClient, and configuration for multiple chains. Deployed contract addresses live in Networks & Addresses.