π€AI Agents & Bots
5-Minute Quickstart
npm install bitbadgesjs-sdkimport { BitBadgesSigningClient, GenericCosmosAdapter, MsgTransferTokens } from 'bitbadgesjs-sdk';
// 1. Create adapter from mnemonic (server-side)
const adapter = await GenericCosmosAdapter.fromMnemonic(
'your twelve word mnemonic phrase here ...',
'bitbadges-2' // testnet chain ID
);
// 2. Create signing client (testnet)
const client = new BitBadgesSigningClient({
adapter,
network: 'testnet'
});
// 3. Get testnet tokens
await fetch('https://api.bitbadges.io/testnet/api/v0/faucet', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ address: client.address })
});
// 4. Broadcast your first transaction
const result = await client.signAndBroadcast([
MsgTransferTokens.create({
creator: client.address,
collectionId: '1',
transfers: [/* ... */]
})
]);
console.log('TX Hash:', result.txHash);Integration Paths
Path
Best For
Setup
Network Configuration
Network
API URL
Node LCD
Cosmos Chain ID
EVM Chain ID
Section Contents
Page
Description
BB-402: Token-Gated API Access
Further Reading
Last updated