End-to-end Python walkthrough of an atomic swap. Demonstrates:
- Asset & fee discovery
- Order creation (with auto-generated secret + hash-lock)
- Source-chain HTLC lock (
StubWallet) - Destination-chain HTLC lock
- Secret reveal + claim
- Counterparty finalisation
pip install chainbridge
python main.py --dry-runAgainst a live API:
export CHAINBRIDGE_API_KEY=cb_...
export CHAINBRIDGE_SENDER=GA...
python main.pyThe example uses StubWallet for both legs so it runs without any
real chain access. Swap StubWallet for a concrete adapter (Stellar
Soroban, bitcoinjs, etc.) to drive an actual swap.