Loading...
Loading...
sBTC token operations on Stacks L2 — check balances, transfer sBTC, get deposit info, check peg statistics, deposit BTC to receive sBTC, and track deposit status. Transfer and deposit operations require an unlocked wallet.
npx skill4agent add aibtcdev/skills sbtcbun run wallet/wallet.ts unlockbun run sbtc/sbtc.ts <subcommand> [options]bun run sbtc/sbtc.ts get-balance [--address <addr>]--address{
"address": "SP2...",
"network": "mainnet",
"balance": {
"sats": "100000",
"btc": "0.001 sBTC"
}
}--amountbun run sbtc/sbtc.ts transfer --recipient <addr> --amount <sats> [--memo <text>] [--fee low|medium|high|<microStx>] [--sponsored]--recipient--amount--memo--fee--sponsored{
"success": true,
"txid": "abc123...",
"from": "SP2...",
"recipient": "SP3...",
"amount": "0 sBTC",
"amountSats": "100000",
"network": "mainnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet"
}bun run sbtc/sbtc.ts get-deposit-info{
"network": "mainnet",
"depositAddress": "bc1p...",
"maxSignerFee": "80000 satoshis",
"reclaimLockTime": "950 blocks",
"stacksAddress": "SP2...",
"instructions": [...]
}{
"network": "mainnet",
"depositAddress": "bc1p...",
"minDeposit": "...",
"maxDeposit": "...",
"instructions": [...]
}bun run sbtc/sbtc.ts get-peg-info{
"network": "mainnet",
"totalSupply": {
"sats": "1000000000",
"btc": "10 sBTC"
},
"pegRatio": "1.000000"
}bun run sbtc/sbtc.ts deposit --amount <sats> [--fee-rate fast|medium|slow|<number>] [--max-signer-fee <sats>] [--reclaim-lock-time <blocks>] [--include-ordinals]--amount--fee-ratefastmediumslowmedium--max-signer-fee--reclaim-lock-time--include-ordinals{
"success": true,
"txid": "btcTxid123...",
"explorerUrl": "https://mempool.space/tx/btcTxid123...",
"deposit": {
"amount": "0.001 BTC",
"amountSats": 100000,
"recipient": "SP2...",
"bitcoinAddress": "bc1q...",
"taprootAddress": "bc1p...",
"maxSignerFee": "80000 sats",
"reclaimLockTime": "950 blocks",
"feeRate": "5 sat/vB"
},
"network": "mainnet",
"note": "sBTC tokens will be minted to your Stacks address after Bitcoin transaction confirms."
}bun run sbtc/sbtc.ts deposit-status --txid <btcTxid> [--vout <index>]--txid--vout{
"txid": "btcTxid123...",
"vout": 0,
"status": "pending",
"explorerUrl": "https://mempool.space/tx/btcTxid123...",
"network": "mainnet"
}deposit