# Altana > Noncustodial authorization infrastructure for agentic workflows. Give agents provable, revocable authority to act onchain, scoped by policy you control and verifiable by anyone. ## Docs - [Acknowledgments](/acknowledgments): The Altana SDK builds on [Porto](https://porto.sh) (MIT), extended for Keystore compatibility. Credit to the Porto team for that work. - [Changelog](/changelog): These docs describe **`@altananetwork/sdk` 0.7.1** and **`@altananetwork/mcp` 0.7.1**, the current releases on npm. - [Why Altana](/why-altana): Altana enables a **global registry of permissions onchain, accessible by any agent**. - [Private key: give an agent a wallet and a policy](/use-cases/1-agent-wallet-policy): You own the wallet. The agent gets a scoped key: it can only call the contracts you allow, only up to the spend cap you set, and it expires automatically. You can cut access with one transaction at any time. - [Passkey: give an agent a wallet and a policy](/use-cases/1b-passkey-delegates-to-agent): You hold the admin key inside your device's secure hardware, backed by Face ID or Touch ID. The agent holds a separate, scoped session key with a spend cap, an expiry, and a contract allowlist. You can revoke it in one transaction. - [Let an agent trade on a DEX, capped](/use-cases/2-agent-trades-dex): The example below uses **PancakeSwap** on BNB. Swap in any DEX router address to use a different exchange; the pattern is identical. The flow is three steps: connect to the chain, grant a session scoped to the DEX, then let the agent trade within it. - [Run a portfolio with multiple agents](/use-cases/3-portfolio-multiple-agents): Two agents share one wallet, each with its own scoped session. You grant them separately, they can verify each other, and you can revoke either one without touching the other. - [Verify an agent's authority from anywhere](/use-cases/4-verify-agent-authority): Anyone can run this. It is a plain read against the public Keystore, so it needs no admin key, no session, and nothing from Altana. - [Authorize across chains](/use-cases/5-cross-chain-authorization): Sessions are granted on L1 (Ethereum, the Keystore source of truth). An L2 cache on Base can verify that same session via a storage proof against L1 state, without any bridge message or re-granting. - [Agent Pays for an API with x402](/use-cases/6-agent-pays-api-x402): An agent needs to call a paid API — data, inference, a service — priced per request via the **x402** HTTP standard. With an Altana session key it pays autonomously, capped and revocable, no human in the loop per call. - [Overview](/use-cases): The at-a-glance map. Find your goal, then follow the path. - [Skills Registry](/skills): A session gives your agent authority. A skill gives it competence. - [Submit a skill](/skills/submit): Put your protocol in every agent. - [Audit reports](/security/audits): The Altana Keystore contracts were audited by [CertiK](https://www.certik.com), completed 15 July 2026. The full report, the finding-by-finding detail and the current status of every item are published on [CertiK Skynet](https://skynet.certik.com/projects/altana). - [approveTokenForPermit2](/sdk/approve-permit2): The permit2 [x402](/sdk/x402) rail moves tokens through the canonical Permit2 contract, which must hold an ERC-20 allowance from the wallet. This sets that allowance once (default: max). - [approveSignatureChecker](/sdk/approve-signature-checker): A session key's [ERC-1271](/concepts/off-chain-signatures) `isValidSignature` only returns the magic value when the **caller** (`msg.sender`) is an approved checker for that key. This authorizes that caller. Run it once per session, per rail. - [balances](/sdk/balances): Read a wallet's on-chain balances. This is a plain read: no signer, no userOp, no relay. It works for any address (a `Wallet` you created or a bare `0x…` address), including counterfactual wallets that haven't been deployed yet. - [BNB Testnet](/sdk/bnb-testnet): BNB Smart Chain Testnet (chain id **97**) is Altana's full-stack testnet — the keystore, account contracts, and the Altana testnet relay are all deployed there (see [Testnet](/concepts/networks/testnet)), and the SDK ships a ready-made `BNB_TESTNET` config. - [BNB Smart Chain](/sdk/bnb): BNB Smart Chain (chain id **56**) is Altana's default network. - [createPasskeyWallet](/sdk/create-passkey-wallet): `client.createPasskeyWallet` creates a smart-account wallet whose admin authority is a passkey (Face ID, Touch ID, Windows Hello, hardware security key). The private key never leaves the device's secure hardware. - [createWallet](/sdk/create-wallet): `client.createWallet` creates a smart-account wallet for a signer. The signer's key lives wherever you keep it (env var, OS keychain, hardware wallet). Altana never sees it. - [ERC-8183: hire BNB agents](/sdk/erc8183): BNB Agent Studio's agent economy runs on two rails — selling via ERC-8183 job escrow in $U, buying via x402. The SDK supports both sides: **any agent using an Altana wallet can hire and pay any BNB agent** (this page), and any agent built with Altana can charge them (see [Sell over x402](/sdk/x402-server)). - [Errors](/sdk/errors): Two different things can go wrong, and they surface differently. - [execute](/sdk/execute): Submit one or more calls from a wallet. `client.execute` accepts either an admin pair (`wallet` + `signer`) or a `session`, plus the `calls` to run. - [grantSession](/sdk/grant-session): Grant a scoped session key for a wallet. The admin signer authorizes the session onchain; from that point forward the session can act on the wallet within its permissions, enforced onchain. - [SDK Reference](/sdk): 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. - [recoverFromPasskey](/sdk/recover-from-passkey): Recover a passkey-backed wallet using onchain state and the OS keychain. **Browser only.** - [revokeSession](/sdk/revoke-session): Revoke a session key from a wallet onchain. After confirmation, the session's next execute attempt reverts at validation. On the chain where the key is registered the effect is immediate, and no off-chain coordination is required. - [signOrder](/sdk/sign-order): Produce an [ERC-1271](/concepts/off-chain-signatures) signature over an application digest, wrapped in the account's nested envelope so the wallet's `isValidSignature` accepts it. Offline and chain-independent — used for x402 payments, Permit2, EIP-3009, and intent-DEX orders. - [ensureKeyCached](/sdk/sync-to-l2): A session you granted on Ethereum via [`grantSession`](/sdk/grant-session) is registered in the [Keystore](/concepts/keystore) on L1. For another chain to honor that session, the registry state has to be mirrored to an L2 cache on that chain. `ensureKeyCached` does that. - [Sell over x402](/sdk/x402-server): `@altananetwork/x402-server` is the seller side of x402/B402: put one guard in front of any HTTP route and it becomes a paid capability with instant on-chain settlement. It is payable out of the box by **BNB Agent Studio agents** (`bag x402 trust` → `bag x402 buy`), **Altana wallets** ([`fetchWithX402`](/sdk/x402) / the MCP `x402_request` tool), and anything else speaking the B402 v2 wire. - [x402 payments](/sdk/x402): `x402` is an HTTP 402 flow: a server answers `402` with payment requirements, the client signs an authorization, base64-encodes it into an `X-PAYMENT` header, and retries. A facilitator settles the authorization on-chain. `fetchWithX402` does this transparently from a session key — the agent just calls a URL. - [MCP Server](/mcp): `@altananetwork/mcp` exposes the SDK as an MCP server. AI hosts like Claude Code, Cursor, and Continue can use it to create wallets, grant sessions, and execute transactions through tools or slash commands. - [Install](/mcp/install): [Bun](https://bun.sh) 1.1 or later. `@altananetwork/mcp` ships as TypeScript and runs under Bun, which is why every command below uses `bunx`. Substituting `npx` fails with a TypeScript syntax error rather than a useful message. - [Claude Skill](/mcp/skill): Altana ships a [Claude Code skill](https://docs.anthropic.com/en/docs/claude-code/skills) so any Claude-powered agent can build with `@altananetwork/sdk` correctly out of the box. - [Tools](/mcp/tools): The Altana MCP server exposes 17 tools. AI hosts call them by name. Eleven of them also have a slash command for users to invoke directly (e.g. `/altana-agentic-wallet:create-wallet`); the rest are host-callable only. See [Slash command equivalents](#slash-command-equivalents). - [Connect an AI tool](/getting-started/build-with-claude): The docs publish `llms-full.txt`: a single machine-readable file any AI can read cleanly. - [Create an agentic wallet](/getting-started/create-agentic-wallet): An agentic wallet gives any authorized agent permissioned access to your onchain assets through Altana's global [Keystore](/concepts/keystore): a public onchain registry of authorized keys. - [Create a passkey wallet](/getting-started/passkey): For consumer apps — wallets secured by Face ID, Touch ID, or Windows Hello. The user sees one biometric prompt; no seed phrase, no browser extension. The private key is generated and stored on the device's secure hardware and never leaves it. - [Create a private-key wallet](/getting-started/private-key): For AI agents, backend scripts, and CLI tools — anywhere a biometric prompt doesn't make sense. You supply a private key; Altana creates and manages a smart account around it. No custody, no Altana API key, no off-chain service involved. - [How Altana is Different](/concepts/comparison): There are plenty of "agentic wallet" products. Most of them solve the same surface problem (letting an AI act on a user's wallet) but they all store the authorization state in places only their own stack can read. - [Keystore](/concepts/keystore): **Keystore is a public onchain registry.** For every Altana wallet, it stores which keys are currently authorized to act on it. Anyone (any app, any agent, any chain that bridges to it) can read this state and verify authority without a vendor in the middle. - [Off-chain signatures (ERC-1271)](/concepts/off-chain-signatures): Most agent actions are live transactions. But some protocols — **x402 HTTP payments**, Permit2, EIP-3009, intent DEXes (CoW, 1inch, Seaport) — need an **off-chain signed authorization** that a third party submits later. An Altana wallet is a smart account, so it can't produce a plain EOA signature; it authorizes via **ERC-1271** `isValidSignature`, and a session key can drive that. Two things make it work. - [Sessions](/concepts/sessions): A **session** is a scoped, time-bounded delegation from a wallet's admin key to another key. The session key can act on the wallet, but only within the granted permissions, and only until the expiry. - [Networks & Addresses](/concepts/networks): Altana is multi-chain. The SDK ships a config per network, importable from `@altananetwork/sdk`. **BNB Smart Chain is the default**; Ethereum is supported for wallet execution and L1 cross-chain proofs; Base is supported as the L2 Keystore cache for cross-chain verification. - [Testnet](/concepts/networks/testnet): Altana's testnet runs on **BNB Smart Chain Testnet (chain 97)** — the full stack (keystore, account contracts, and the Altana testnet relay) is deployed there, so you can create wallets and execute end-to-end. The SDK ships a ready-made `BNB_TESTNET` config, importable from `@altananetwork/sdk`.