Bitcoin Agent Prompt Injection Defense
Bitcoin Agent Prompt Injection Defense
Design and trust boundary
Treat retrieved text as data, never as payment authority. A deterministic gate accepts only a trusted approval matching the proposed intent. The approval channel must be independent of the model; a string claiming to be an approval is not evidence. This example models that boundary, not a prompt injection detector.
Independent reference implementation
1def authorize(proposal, trusted_approval):
2 return trusted_approval is not None and proposal == trusted_approval
3
4if __name__ == '__main__':
5 intent = ('test', 'destination-A', 1000)
6 assert not authorize(intent, None)
7 assert not authorize(('test', 'destination-B', 1000), intent)
8 assert authorize(intent, intent)Operational boundaries
This offline research example uses synthetic data. It does not execute SEND or modify the wallet birth fee law. A production deployment requires authenticated callers, durable state, tested failure handling and independent security review.
Related research
https://thamer.org/learn/bitcoin-for-ai-agents-open-integration-guide
https://thamer.org/api
