BNB Smart Chain
BNB Smart Chain (chain id 56) is Altana's default network.
The keystore and the account contracts are deployed there (see Networks & Addresses), and the SDK ships a ready-made BNB config.
Install
npm install @altananetwork/sdk viemCreate a wallet on BNB
import { createClient, BNB, signerFromPrivateKey } from "@altananetwork/sdk";
const client = createClient({ chains: [BNB] });
const signer = signerFromPrivateKey(process.env.PRIVATE_KEY as `0x${string}`);
const wallet = await client.createWallet({ signer });
console.log(wallet.address);Fund wallet.address with BNB before step 2. Send BNB from any exchange or wallet to the printed address.
Multi-chain
createClient accepts multiple wallet execution chains. Add Ethereum alongside BNB and pass chainId per call:
import { createClient, BNB, ETHEREUM } from "@altananetwork/sdk";
const client = createClient({ chains: [BNB, ETHEREUM], defaultChainId: 56 });
await client.grantSession({ /* ... */, chainId: 1 }); // operate on EthereumThe SDK also exports BASE for the L2 Keystore cache used by cross-chain verification.
What's next
- Networks & Addresses. Chain ids, RPCs, and contract addresses.
- Grant a session. Scoped, time-bounded keys for AI agents.