{"id":48621289,"url":"https://github.com/citadel-tech/coinswap-ffi","last_synced_at":"2026-04-09T03:36:29.605Z","repository":{"id":320910286,"uuid":"1072027201","full_name":"citadel-tech/coinswap-ffi","owner":"citadel-tech","description":"FFI layer for the coinswap client","archived":false,"fork":false,"pushed_at":"2026-03-28T20:27:47.000Z","size":24003,"stargazers_count":2,"open_issues_count":6,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T22:26:28.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/citadel-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-08T06:49:28.000Z","updated_at":"2026-03-28T20:27:51.000Z","dependencies_parsed_at":"2025-10-26T18:30:29.186Z","dependency_job_id":null,"html_url":"https://github.com/citadel-tech/coinswap-ffi","commit_stats":null,"previous_names":["citadel-tech/coinswap-ffi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/citadel-tech/coinswap-ffi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citadel-tech%2Fcoinswap-ffi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citadel-tech%2Fcoinswap-ffi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citadel-tech%2Fcoinswap-ffi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citadel-tech%2Fcoinswap-ffi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/citadel-tech","download_url":"https://codeload.github.com/citadel-tech/coinswap-ffi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citadel-tech%2Fcoinswap-ffi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31584809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-09T03:36:29.535Z","updated_at":"2026-04-09T03:36:29.599Z","avatar_url":"https://github.com/citadel-tech.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Coinswap FFI\n\nLanguage bindings for the Coinswap protocol\n\n\u003c/div\u003e\n\n## Overview\n\nCoinswap FFI packages the Coinswap taker API for JavaScript, Kotlin, Swift, Python, and Ruby. All bindings are backed by the same Rust implementation, so each language follows the same operational model: initialize a taker, sync wallet state and the offer book, inspect balances and UTXOs, execute swaps, and recover or back up state.\n\n## Repository Layout\n\n| Package | Purpose | Supported platforms | Build entry point |\n| --- | --- | --- | --- |\n| [coinswap-js](./coinswap-js) | Node.js and TypeScript binding via N-API | Linux x64/arm64, macOS x64/arm64, Windows x64/arm64, FreeBSD x64, Android arm64 | `yarn build` |\n| [coinswap-kotlin](./coinswap-kotlin) | Kotlin binding for Android and JVM consumers | Android `arm64-v8a`, `armeabi-v7a`, `x86_64`; JVM/Desktop | `build-scripts/` |\n| [coinswap-swift](./coinswap-swift) | Swift Package and XCFramework for Apple platforms | iOS arm64, iOS simulator arm64/x86_64, macOS arm64/x86_64 | `build-xcframework*.sh` |\n| [coinswap-python](./coinswap-python) | Python package generated with UniFFI | Linux x86_64/aarch64, macOS x86_64/arm64, Windows amd64 | `build-scripts/` plus `python -m build` |\n| [coinswap-ruby](./coinswap-ruby) | Ruby FFI binding generated with UniFFI | Linux x86_64/aarch64, macOS x86_64/arm64 | `build-scripts/` |\n| [ffi-commons](./ffi-commons) | Shared Rust crate and UniFFI generation core | Rust build targets used by the bindings above | Consumed by package-local scripts |\n\n## Build Workflow\n\nBuild each package from its own directory. The package-local scripts are now the supported entry points for generating bindings and assembling distributable artifacts.\n\n### JavaScript\n\n```bash\ncd coinswap-js\nyarn install\nyarn build\n```\n\n### Kotlin\n\nUse the host-specific scripts in `coinswap-kotlin/build-scripts/`, then package with Gradle.\n\n### Swift\n\n```bash\ncd coinswap-swift\nbash ./build-xcframework.sh\nswift build\n```\n\n### Python\n\nRun the appropriate script under `coinswap-python/build-scripts/`, then build the wheel or sdist with `python -m build`.\n\n### Ruby\n\nRun the appropriate script under `coinswap-ruby/build-scripts/` to regenerate `coinswap.rb` and the native library for the target platform.\n\nSee the language-specific READMEs for the exact host and target combinations:\n- [coinswap-js](./coinswap-js/README.md)\n- [coinswap-kotlin](./coinswap-kotlin/README.md)\n- [coinswap-swift](./coinswap-swift/README.md)\n- [coinswap-python](./coinswap-python/README.md)\n- [coinswap-ruby](./coinswap-ruby/README.md)\n- [ffi-commons](./ffi-commons/README.md)\n\n## Use Cases\n\n- Desktop wallets built with Node.js, Electron, Tauri, Python, or Ruby.\n- Native mobile integrations for Android and Apple platforms.\n- Internal tooling and automation around wallet state, balances, and swap execution.\n\n## Reference Implementation\n\nThe [taker-app](https://github.com/citadel-tech/taker-app) is the primary desktop reference implementation for the Node.js binding and is a useful integration reference for the unified taker workflow.\n\n## Requirements\n\n### Common\n\n- Rust 1.75.0 or newer.\n- Bitcoin Core with RPC access, fully synced, non-pruned, and `-txindex` enabled.\n- Tor daemon for maker discovery and privacy-preserving network access.\n\n### Package-specific\n\n- Node.js 18+ for `coinswap-js`.\n- Android SDK / NDK and JDK for `coinswap-kotlin`.\n- Xcode 14+ and Swift 5.7+ for `coinswap-swift`.\n- Python 3.8+ for `coinswap-python`.\n- Ruby 2.7+ for `coinswap-ruby`.\n\n## Documentation\n\n- [Coinswap Protocol Specification](https://github.com/citadel-tech/Coinswap-Protocol-Specification)\n- [Core Coinswap Library](https://github.com/citadel-tech/coinswap)\n- [UniFFI Documentation](https://mozilla.github.io/uniffi-rs/)\n\n## Development Status\n\nBeta software. These bindings remain under active development and should be treated as experimental. Mainnet deployment is not recommended.\n\n## Contributing\n\nContributions are welcome. See the [main Coinswap repository](https://github.com/citadel-tech/coinswap) for contribution guidelines and protocol-level discussions.\n\n## Acknowledgments\n\n- [Chris Belcher's Coinswap Design](https://gist.github.com/chris-belcher/9144bd57a91c194e332fb5ca371d0964)\n- [NAPI-RS](https://napi.rs)\n- [UniFFI](https://mozilla.github.io/uniffi-rs/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitadel-tech%2Fcoinswap-ffi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcitadel-tech%2Fcoinswap-ffi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitadel-tech%2Fcoinswap-ffi/lists"}