Bitcoin Agent Wallet Credential Isolation
Bitcoin Agent Wallet Credential Isolation
Design and trust boundary
Construct model-visible responses using an explicit field allowlist and strict types. Never send BTC KEY, recovery material or raw engine responses to a model. This projection is only one boundary: process isolation, secret injection and log hygiene are separate requirements. The sample does not access actual credentials.
Independent reference implementation
1def public_balance(result):
2 amount = result.get('confirmed_sat')
3 if type(amount) is not int or amount < 0:
4 raise ValueError('invalid balance')
5 return {'confirmed_sat': amount}
6
7if __name__ == '__main__':
8 assert public_balance({'confirmed_sat': 42, 'btc_key': 'dummy'}) == {'confirmed_sat': 42}
9 try:
10 public_balance({'confirmed_sat': True})
11 except ValueError:
12 pass
13 else:
14 raise AssertionError('boolean accepted')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
