BNB Testnet
BNB Smart Chain Testnet (chain id 97) is Functor's default network.
The keystore and the account contracts are deployed there (see Networks & Addresses), and the SDK ships a ready-made BNB_TESTNET config.
Install
npm install @functornetwork/agentic-wallet viemCreate a wallet on BNB testnet
import { createClient, BNB_TESTNET, signerFromPrivateKey } from "@functornetwork/agentic-wallet";
const client = createClient({ chains: [BNB_TESTNET] });
const signer = signerFromPrivateKey(process.env.PRIVATE_KEY as `0x${string}`);
const wallet = await client.createWallet({ signer });
console.log(wallet.address);Fund wallet.address with testnet BNB before step 2: testnet.bnbchain.org/faucet-smart
Multi-chain
createClient accepts multiple wallet execution chains. Add Sepolia alongside BNB and pass chainId per call:
import { createClient, BNB_TESTNET, SEPOLIA } from "@functornetwork/agentic-wallet";
const client = createClient({ chains: [BNB_TESTNET, SEPOLIA], defaultChainId: 97 });
await client.grantSession({ /* ... */, chainId: 11155111 }); // operate on SepoliaThe SDK also exports BASE_SEPOLIA 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.