Loading...
Loading...
Stacks L2 STX token operations — check balances, transfer STX, broadcast pre-signed transactions, call Clarity contracts, deploy contracts, and check transaction status. Transfer and contract operations require an unlocked wallet.
npx skill4agent add aibtcdev/skills stxbun run wallet/wallet.ts unlockbun run stx/stx.ts <subcommand> [options]bun run stx/stx.ts get-balance [--address <addr>]--address{
"address": "SP2...",
"network": "mainnet",
"balance": {
"microStx": "1000000",
"stx": "1 STX"
},
"locked": {
"microStx": "0",
"stx": "0 STX"
},
"explorerUrl": "https://explorer.hiro.so/address/SP2...?chain=mainnet"
}--amountbun run stx/stx.ts transfer --recipient <addr> --amount <microStx> [--memo <text>] [--fee low|medium|high|<microStx>]--recipient--amount--memo--fee{
"success": true,
"txid": "abc123...",
"from": "SP2...",
"recipient": "SP3...",
"amount": "2 STX",
"amountMicroStx": "2000000",
"network": "mainnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet"
}bun run stx/stx.ts broadcast-transaction --signed-tx <hex>--signed-tx{
"success": true,
"txid": "abc123...",
"network": "mainnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet"
}bun run stx/stx.ts call-contract --contract-address <addr> --contract-name <name> --function-name <fn> [--args <json>] [--post-condition-mode allow|deny] [--post-conditions <json>] [--fee low|medium|high|<microStx>]--contract-address--contract-name--function-name--args[{"type":"uint","value":100}]--post-condition-modedenyallow--post-conditions--fee{"type":"stx","principal":"SP...","conditionCode":"eq","amount":"1000000"}{"type":"ft","principal":"SP...","asset":"SP...contract","assetName":"token-name","conditionCode":"eq","amount":"1000"}{"type":"nft","principal":"SP...","asset":"SP...contract","assetName":"nft-name","tokenId":"1"}{
"success": true,
"txid": "abc123...",
"contract": "SP2....my-token",
"function": "transfer",
"network": "mainnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet"
}bun run stx/stx.ts deploy-contract --contract-name <name> --code-body <clarity-source> [--fee low|medium|high|<microStx>]--contract-name--code-body--fee{
"success": true,
"txid": "abc123...",
"contractId": "SP2....my-contract",
"network": "mainnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet"
}bun run stx/stx.ts get-transaction-status --txid <txid>--txid{
"txid": "abc123...",
"status": "success",
"block_height": 150000,
"network": "mainnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=mainnet"
}bun run wallet/wallet.ts unlock--feedenyallow