Skip to content

citadel-tech/coinswap-ffi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coinswap FFI

Language bindings for the Coinswap protocol

Overview

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:

JavaScript/TypeScript

  • coinswap-js - Node.js bindings via NAPI-RS for JavaScript/TypeScript applications

Multi-Language Bindings (via UniFFI)

Generated from ffi-commons - the core UniFFI binding generator:

Quick Start

Node.js (NAPI)

cd coinswap-napi
yarn install
yarn build

See coinswap-napi/README.md for detailed usage.

Multi-Language Bindings (Kotlin/Swift/Python/Ruby)

cd coinswap-ffi/ffi-commons
chmod +x create_bindings.sh
./create_bindings.sh

This generates bindings for all supported languages. See individual language README files for usage:

Use Cases

  • 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

Reference Implementation

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.

Requirementss

Common Dependencies

  • Rust 1.75.0 or higher
  • Bitcoin Core with RPC access (synced, non-pruned, -txindex)
  • Tor daemon (for privacy and maker discovery)

Platform-Specific

NAPI (Node.js)

  • Node.js 18.0.0 or higher
  • Build tools: build-essential, automake, libtool

UniFFI (Multi-language)

  • Target language SDK (Android SDK, Xcode, Python 3.8+)
  • Platform-specific build tools

Documentation

Development Status

⚠️ Beta Software - Experimental

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.

Contributing

Contributions are welcome! Please see the main Coinswap repository for contribution guidelines.

Acknowledgments

Built on the excellent work of:

About

FFI layer for the coinswap client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •