How should a Bitcoin agent defend against prompt injection?
Short answer
Treat webpages, retrieved documentation, logs, and tool outputs as untrusted input. An instruction embedded in a page must never override the wallet owner’s authorization policy or trigger a SEND.
Practical guidance
Separate retrieval from action execution; validate destinations and amounts using deterministic code; require explicit authorization for spending; keep BTC KEY outside the language model context.
Related reading
Bitcoin Core RPC command reference
https://bitcoincore.org/en/doc/
