Loading...
Loading...
SIP-010 fungible token operations on Stacks L2 — check balances, transfer tokens, get token metadata, list all tokens owned by an address, and get top token holders. Supports well-known tokens by symbol (sBTC, USDCx, ALEX, DIKO) or full contract ID.
npx skill4agent add aibtcdev/skills tokensbun run wallet/wallet.ts unlocksBTCUSDCxALEXDIKOSP2...address.contract-namebun run tokens/tokens.ts <subcommand> [options]bun run tokens/tokens.ts get-balance --token <symbol-or-id> [--address <addr>]--tokenUSDCxsBTC--address{
"address": "SP2...",
"network": "mainnet",
"token": {
"contractId": "SP2...address.usdc-token",
"symbol": "USDCx",
"name": "USD Coin",
"decimals": 6
},
"balance": {
"raw": "1000000",
"formatted": "1 USDCx"
}
}bun run tokens/tokens.ts transfer --token <symbol-or-id> --recipient <addr> --amount <amount> [--memo <text>] [--fee low|medium|high|<microStx>]--token--recipient--amount--memo--fee{
"success": true,
"txid": "abc123...",
"from": "SP2...",
"recipient": "SP3...",
"token": "USDCx",
"amount": "1000000",
"network": "mainnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet"
}bun run tokens/tokens.ts get-info --token <symbol-or-id>--token{
"network": "mainnet",
"contractId": "SP2...address.usdc-token",
"name": "USD Coin",
"symbol": "USDCx",
"decimals": 6,
"totalSupply": "1000000000000",
"tokenUri": "https://..."
}bun run tokens/tokens.ts list-user-tokens [--address <addr>]--address{
"address": "SP2...",
"network": "mainnet",
"tokenCount": 2,
"tokens": [
{ "contractId": "SP2....usdc-token::usdcx", "balance": "1000000" },
{ "contractId": "SP3....alex-token::alex", "balance": "500000000" }
]
}bun run tokens/tokens.ts get-holders --token <symbol-or-id> [--limit <n>] [--offset <n>]--token--limit--offset{
"token": "USDCx",
"network": "mainnet",
"total": 1234,
"holders": [
{ "address": "SP2...", "balance": "50000000000" },
{ "address": "SP3...", "balance": "25000000000" }
]
}sBTCUSDCxALEXDIKOdecimals