Coinswap FFI provides Foreign Function Interface (FFI) bindings for the Coinswap Bitcoin privacy protocol, enabling integration with multiple programming languages and platforms. This repository contains binding implementations for:
- coinswap-js - Node.js bindings via NAPI-RS for JavaScript/TypeScript applications
Generated from ffi-commons - the core UniFFI binding generator:
- coinswap-kotlin - Kotlin bindings for Android and JVM applications
- coinswap-swift - Swift bindings for iOS and macOS applications
- coinswap-python - Python bindings for cross-platform applications
- coinswap-ruby - Ruby bindings for Ruby applications
cd coinswap-napi
yarn install
yarn buildSee coinswap-napi/README.md for detailed usage.
cd coinswap-ffi/ffi-commons
chmod +x create_bindings.sh
./create_bindings.shThis generates bindings for all supported languages. See individual language README files for usage:
- Kotlin README
- Swift README
- Python README
- Ruby README
- UniFFI Core README - Build and binding generation
- Desktop Wallets - Build privacy-focused Bitcoin wallets with Node.js (Electron/Tauri)
- Mobile Applications - Native iOS and Android apps with coinswap support
- Web Applications - Browser-based wallets via WebAssembly
The taker-app demonstrates a production-ready desktop GUI built with the NAPI bindings, showcasing wallet management, swap execution, market analytics, and UTXO control. Use it as a reference for your own applications.
- Rust 1.75.0 or higher
- Bitcoin Core with RPC access (synced, non-pruned,
-txindex) - Tor daemon (for privacy and maker discovery)
- Node.js 18.0.0 or higher
- Build tools:
build-essential,automake,libtool
- Target language SDK (Android SDK, Xcode, Python 3.8+)
- Platform-specific build tools
These bindings are under active development and in an experimental stage. There are known and unknown bugs. Mainnet use is strictly NOT recommended. Use on Custom Signet or Testnet only.
Contributions are welcome! Please see the main Coinswap repository for contribution guidelines.
Built on the excellent work of:
- Chris Belcher's Coinswap Design
- NAPI-RS - Rust bindings for Node.js
- UniFFI - Multi-language bindings generator