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

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 viem

Create 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 Sepolia

The SDK also exports BASE_SEPOLIA for the L2 Keystore cache used by cross-chain verification.

What's next