AtomX-Bitcoin / AtomX
PublicAtomX – Open‑source reference implementation of trustless Bitcoin ↔ Litecoin atomic swaps using HTLCs on native Segwit (P2WSH). TypeScript monorepo with core library, CLI (simulate / walk / relay), and WebSocket GUI. No custodial bridge, no wrapped assets.
AtomX is an open-source educational project that demonstrates how Bitcoin and Litecoin can be swapped directly between two people using smart contracts called Hash Time-Locked Contracts (HTLCs). It provides simulation tools so you can safely experiment with the swap process without touching real money, a command-line interface to run demonstrations, and a web-based coordination app where two people can share swap plans. The project is explicitly designed as a reference implementation to teach how trustless cross-chain swaps work - no custodial bridge, no wrapped tokens, just cryptographic rules that ensure both parties either complete the exchange or get their funds back via timeout refunds.
How It Works
You hear about AtomX - a tool that lets people swap Bitcoin and Litecoin directly without needing a centralized exchange.
You download and set up AtomX on your computer, getting three tools: a core engine, a command-line interface, and a web-based coordination app.
You watch a complete atomic swap unfold in a safe test environment - Alice locks her Bitcoin, Bob locks his Litecoin, Alice claims Bob's coins (revealing a secret), and Bob claims Alice's coins using that secret.
You explore the step-by-step walkthrough that explains how Hash Time-Locked Contracts work - smart contracts that automatically release funds when the right secret is revealed.
Open two browser tabs, connect to the coordination server, share plans with your peer, and exchange lock parameters safely.
Generate swap parameters (addresses, timeouts, secret hash) to study how the coordination would work without actually running it.
You notice built-in protections: if something goes wrong, there's a timeout refund path, and the system ensures one blockchain's refund activates before the other's.
You've learned how two people can exchange different cryptocurrencies directly - no middleman, no wrapped tokens, just cryptographic guarantees that either both succeed or both fail.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.