nonce_heal
Diagnose and heal the full nonce state for the active wallet in one shot. Handles 90% of stuck-tx cases automatically: 1. Fetches current nonce state from Hiro API (gaps, mempool) 2. In dryRun mode: shows what would happen without broadcasting 3. In execute mode (dryRun=false): - Fills every gap ...
This record as markdown: /tools/io-github-aibtcdev-mcp-server/nonce-heal.md
What nonce_heal does on Aibtc
AI agents invoke nonce_heal to trigger actions in Aibtc. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
Why nonce_heal is rated High
This tool executes blockchain transactions whose effects depend on the dryRun parameter and wallet state. While it appears designed to resolve stuck transactions beneficially, it actively broadcasts transactions and modifies mempool state, making it an Execute-category tool.
From the tool's definition Tool description states it 'Diagnose and heal the full nonce state' by filling gaps with self-transfers and RBF-bumping transactions. In execute mode (dryRun=false), it 'rebroadcast[s]' transactions and performs 'self-transfer[s] to the PoX burn address'.
Risk signalsBulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs nonce_heal safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Aibtc, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For nonce_heal, this is the rule to start with:
nonce_heal stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Aibtc, apply this rule, and every nonce_heal call is checked against it from then on.
Questions about nonce_heal
Diagnose and heal the full nonce state for the active wallet in one shot. Handles 90% of stuck-tx cases automatically: 1. Fetches current nonce state from Hiro API (gaps, mempool) 2. In dryRun mode: shows what would happen without broadcasting 3. In execute mode (dryRun=false): - Fills every gap with a 1 uSTX self-transfer to the PoX burn address - Optionally RBF-bumps the chain head (lowest non-gap pending tx) to kick off processing RBF bump behavior: - Token-transfer txs: rebuilt at same nonce with fee * feeMultiplier and rebroadcast - Sponsored txs: skipped with explanation (sender cannot RBF without sponsor key) - Contract-call txs: skipped with manual RBF instructions Always run nonce_health first to understand the current state. Requires wallet to be unlocked for execute mode (dryRun=false). Returns: - address, dryRun flag, confirmedNonce - gapsFound: list of missing nonces - actions: per-action detail (fill_gap or bump_head) with txids, fees, status - warnings: informational notes - summary: human-readable description of what happened. It is categorised as a Execute tool in the Aibtc MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
Register the Aibtc MCP server in PolicyLayer and add a rule for nonce_heal: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Aibtc. Nothing to install.
nonce_heal is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the nonce_heal rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for nonce_heal. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
nonce_heal is provided by the Aibtc MCP server (aibtcdev/aibtc-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Aibtc, and thousands of servers like it.
Across the catalogue