Loading...
Loading...
STX stacking operations on Stacks — query PoX cycle info, check stacking status, lock STX to earn BTC rewards (stack-stx), and extend an existing stacking lock period. Write operations require an unlocked wallet.
npx skill4agent add aibtcdev/skills stackingbun run stacking/stacking.ts <subcommand> [options]bun run stacking/stacking.ts get-pox-info{
"network": "testnet",
"currentCycle": {
"id": 88,
"min_threshold_ustx": 50000000000,
"stacked_ustx": 1200000000000,
"is_pox_active": true
},
"nextCycle": {
"id": 89,
"min_threshold_ustx": 50000000000,
"min_increment_ustx": 5000000000,
"stacked_ustx": 0,
"prepare_phase_start_block_height": 3450,
"blocks_until_prepare_phase": 25,
"reward_phase_start_block_height": 3500,
"blocks_until_reward_phase": 75,
"ustx_until_pox_rejection": 0
},
"minAmountUstx": 50000000000,
"rewardCycleLength": 2100,
"prepareCycleLength": 100,
"currentBurnchainBlockHeight": 3425,
"totalLiquidSupplyUstx": 1400000000000000
}bun run stacking/stacking.ts get-stacking-status [--address <addr>]--address{
"address": "SP2...",
"network": "testnet",
"stacked": true,
"amountMicroStx": "100000000000",
"amountStx": "100000",
"firstRewardCycle": 85,
"lockPeriod": 3,
"unlockHeight": 6300
}014bun run stacking/stacking.ts stack-stx \
--amount <microStx> \
--pox-address-version <version> \
--pox-address-hashbytes <hex> \
--start-burn-height <btcBlockHeight> \
--lock-period <cycles>--amount--pox-address-version01456--pox-address-hashbytes--start-burn-height--lock-period{
"success": true,
"txid": "abc123...",
"stacker": "SP2...",
"amount": "100000000000",
"lockPeriod": 3,
"startBurnHeight": 850000,
"network": "testnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=testnet"
}bun run stacking/stacking.ts extend-stacking \
--extend-count <cycles> \
--pox-address-version <version> \
--pox-address-hashbytes <hex>--extend-count--pox-address-version--pox-address-hashbytes{
"success": true,
"txid": "abc123...",
"stacker": "SP2...",
"extendCount": 2,
"network": "testnet",
"explorerUrl": "https://explorer.hiro.so/txid/abc123...?chain=testnet"
}get-pox-infominAmountUstxstack-stxwalletget-taproot-addresslock-periodstart-burn-heightnextCycle.prepare_phase_start_block_heightget-pox-infobun run wallet/wallet.ts unlock