{"id":14990762,"url":"https://github.com/zig-bitcoin/coconut","last_synced_at":"2025-04-12T03:24:37.603Z","repository":{"id":252208245,"uuid":"838931599","full_name":"zig-bitcoin/coconut","owner":"zig-bitcoin","description":"🥥 Cashu wallet and mint implementation in Zig","archived":false,"fork":false,"pushed_at":"2024-10-07T17:08:01.000Z","size":7147,"stargazers_count":25,"open_issues_count":12,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T17:51:05.762Z","etag":null,"topics":["bitcoin","cashu","cashubtc","lightning-network","ziglang"],"latest_commit_sha":null,"homepage":"https://coconut.bitcoinzig.org/","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zig-bitcoin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-08-06T16:11:52.000Z","updated_at":"2025-01-25T19:00:43.000Z","dependencies_parsed_at":"2024-09-13T22:03:06.580Z","dependency_job_id":"e18e0498-a84a-4b06-80ce-447e3c7477c8","html_url":"https://github.com/zig-bitcoin/coconut","commit_stats":{"total_commits":56,"total_committers":4,"mean_commits":14.0,"dds":0.5178571428571428,"last_synced_commit":"7cdb46f8493c819963a19ac6e92fd075ea6e4db6"},"previous_names":["abdelstark/coconut","zig-bitcoin/coconut"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-bitcoin%2Fcoconut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-bitcoin%2Fcoconut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-bitcoin%2Fcoconut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zig-bitcoin%2Fcoconut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zig-bitcoin","download_url":"https://codeload.github.com/zig-bitcoin/coconut/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248511085,"owners_count":21116349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bitcoin","cashu","cashubtc","lightning-network","ziglang"],"created_at":"2024-09-24T14:20:46.858Z","updated_at":"2025-04-12T03:24:37.579Z","avatar_url":"https://github.com/zig-bitcoin.png","language":"Zig","funding_links":[],"categories":["Applications","Currently Unmaintained Projects"],"sub_categories":["Various nutcases"],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"./docs/img/coconut.png\" alt=\"coconut-logo\" height=\"260\"/\u003e\n    \u003ch2\u003eCashu wallet and mint in Zig\u003c/h2\u003e\n\n\u003ca href=\"https://github.com/AbdelStark/coconut/actions/workflows/check.yml\"\u003e\u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/AbdelStark/coconut/check.yml?style=for-the-badge\" height=30\u003e\u003c/a\u003e\n\u003ca href=\"https://ziglang.org/\"\u003e \u003cimg alt=\"Zig\" src=\"https://img.shields.io/badge/zig-%23000000.svg?style=for-the-badge\u0026logo=zig\u0026logoColor=white\" height=30\u003e\u003c/a\u003e\n\u003ca href=\"https://bitcoin.org/\"\u003e \u003cimg alt=\"Bitcoin\" src=\"https://img.shields.io/badge/Bitcoin-000?style=for-the-badge\u0026logo=bitcoin\u0026logoColor=white\" height=30\u003e\u003c/a\u003e\n\u003ca href=\"https://lightning.network/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Ligthning Network-000.svg?\u0026style=for-the-badge\u0026logo=data:image/svg%2bxml;base64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI%2FPg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIEZpcmV3b3JrcyAxMCwgRXhwb3J0IFNWRyBFeHRlbnNpb24gYnkgQWFyb24gQmVhbGwgKGh0dHA6Ly9maXJld29ya3MuYWJlYWxsLmNvbSkgLiBWZXJzaW9uOiAwLjYuMSAgLS0%2BDQo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPg0KPHN2ZyBpZD0iYml0Y29pbl9saWdodG5pbmdfaWNvbi5mdy1QYWdlJTIwMSIgdmlld0JveD0iMCAwIDI4MCAyODAiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgdmVyc2lvbj0iMS4xIg0KCXhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbDpzcGFjZT0icHJlc2VydmUiDQoJeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyODBweCIgaGVpZ2h0PSIyODBweCINCj4NCgk8cGF0aCBpZD0iRWxsaXBzZSIgZD0iTSA3IDE0MC41IEMgNyA2Ni43NjkgNjYuNzY5IDcgMTQwLjUgNyBDIDIxNC4yMzEgNyAyNzQgNjYuNzY5IDI3NCAxNDAuNSBDIDI3NCAyMTQuMjMxIDIxNC4yMzEgMjc0IDE0MC41IDI3NCBDIDY2Ljc2OSAyNzQgNyAyMTQuMjMxIDcgMTQwLjUgWiIgZmlsbD0iI2Y3OTMxYSIvPg0KCTxwYXRoIGQ9Ik0gMTYxLjE5NDMgNTEuNSBDIDE1My4yMzQ5IDcyLjE2MDcgMTQ1LjI3NTYgOTQuNDEwNyAxMzUuNzI0NCAxMTYuNjYwNyBDIDEzNS43MjQ0IDExNi42NjA3IDEzNS43MjQ0IDExOS44MzkzIDEzOC45MDgxIDExOS44MzkzIEwgMjA0LjE3NDcgMTE5LjgzOTMgQyAyMDQuMTc0NyAxMTkuODM5MyAyMDQuMTc0NyAxMjEuNDI4NiAyMDUuNzY2NyAxMjMuMDE3OSBMIDExMC4yNTQ1IDIyOS41IEMgMTA4LjY2MjYgMjI3LjkxMDcgMTA4LjY2MjYgMjI2LjMyMTQgMTA4LjY2MjYgMjI0LjczMjEgTCAxNDIuMDkxOSAxNTMuMjE0MyBMIDE0Mi4wOTE5IDE0Ni44NTcxIEwgNzUuMjMzMyAxNDYuODU3MSBMIDc1LjIzMzMgMTQwLjUgTCAxNTYuNDE4NyA1MS41IEwgMTYxLjE5NDMgNTEuNSBaIiBmaWxsPSIjZmZmZmZmIi8%2BDQo8L3N2Zz4%3D\" alt=\"Bitcoin Lightning\" height=\"30\"\u003e\u003c/a\u003e\n\n\u003c/div\u003e\n\n# About\n\nCoconut 🥥 is a Cashu Wallet and Mint implementation in Zig.\n\n## Test\n```sh\nzig build test --summary all\n```\n\n## Build\n\n```sh\nzig build -Doptimize=ReleaseFast\n```\n\n## CLI Usage\n\nThe Coconut wallet provides a command-line interface for various operations. Here's how to use it:\n\n### General Help\n\nTo see the general help and available commands, run:\n\n```text\n$ coconut --help\nVersion: 0.1.0\nAuthor: Coconut Contributors\nUSAGE:\n  coconut [OPTIONS]\nCOMMANDS:\n  info   Display information about the Coconut wallet\nOPTIONS:\n  -h, --help            Show this help output.\n      --color \u003cVALUE\u003e   When to use colors (*auto*, never, always).\n```\n\n### Info Command\n\nThe `info` command displays information about the Coconut wallet. Here's its specific help:\n\n```text\n$ coconut info --help\nUSAGE:\n  coconut info [OPTIONS]\nOPTIONS:\n  -m, --mint       Fetch mint information\n  -n, --mnemonic   Show your mnemonic\n  -h, --help       Show this help output.\n```\n\n### Example Usage\n\nHere's an example of using the `info` command with the `--mnemonic` option:\n\n```text\n$ coconut info --mnemonic\n\nVersion: 0.1.0\nWallet: coconut\nCashu dir: /Users/abdel/Library/Application Support/coconut\nMints:\n    - URL: https://example.com:3338\n        - Keysets:\n            - ID: example_id  unit: sat  active: True   fee (ppk): 0\nMnemonic:\n - example word1 word2 word3 ...\nNostr:\n    - Public key: npub1example...\n    - Relays: wss://example1.com, wss://example2.com\n```\n\nThis command displays general information about the wallet, including the version, wallet name, Cashu directory, mint information, and Nostr details. The `--mnemonic` option additionally displays the wallet's mnemonic phrase.\n\nNote: Be cautious when using the `--mnemonic` option, as it displays sensitive information. Make sure you're in a secure environment when viewing your mnemonic.\n\n## Benchmarks\n\nThis project includes performance benchmarks for each step of the BDHKE process, as well as the end-to-end flow.\n\n### Running Benchmarks Locally\n\nTo run the benchmarks on your local machine:\n\n```sh\nzig build bench -Doptimize=ReleaseFast\n```\n\nThe benchmarks will be compiled with the ReleaseFast optimization level.\n\n### Benchmark Results\n\nCurrent results:\n\n| Operation   | Time us    | Time ns      |\n| ----------- | ---------- | ------------ |\n| hashToCurve | 7.182 us   | 7181.94 ns   |\n| step1Alice  | 23.608 us  | 23608.43 ns  |\n| step2Bob    | 28.003 us  | 28002.82 ns  |\n| step3Alice  | 25.102 us  | 25101.80 ns  |\n| verify      | 29.020 us  | 29020.39 ns  |\n| e2e         | 112.626 us | 112626.12 ns |\n\nThis run was performed on a MacBook Pro with an M1 chip.\n\n```bash\nMachine Info:\n  Model: MacBook Pro\n  CPU: Apple M1 Max\n  Cores: 10 (Physical), 10 (Logical)\n  Memory: 64 GB\n  macOS Version: 14.5\n  Zig Version: 0.14.0-dev.850+ddcb7b1c1\n```\n\n## Resources\n\n- [Cashu documentation](https://docs.cashu.space/)\n- [Cashu slides by Gandalf](https://lconf.gandlaf.com/)\n- [Nutshell reference implementation](https://github.com/cashubtc/nutshell)\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/AbdelStark\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/45264458?v=4?s=100\" width=\"100px;\" alt=\"A₿del ∞/21M 🐺 - 🐱\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eA₿del ∞/21M 🐺 - 🐱\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/zig-bitcoin/coconut/commits?author=AbdelStark\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#ideas-AbdelStark\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#mentoring-AbdelStark\" title=\"Mentoring\"\u003e🧑‍🏫\u003c/a\u003e \u003ca href=\"#projectManagement-AbdelStark\" title=\"Project Management\"\u003e📆\u003c/a\u003e \u003ca href=\"#research-AbdelStark\" title=\"Research\"\u003e🔬\u003c/a\u003e \u003ca href=\"https://github.com/zig-bitcoin/coconut/pulls?q=is%3Apr+reviewed-by%3AAbdelStark\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/StringNick\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/13052752?v=4?s=100\" width=\"100px;\" alt=\"Nikita Orlov\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eNikita Orlov\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/zig-bitcoin/coconut/commits?author=StringNick\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n  \u003ctfoot\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" size=\"13px\" colspan=\"7\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg\"\u003e\n          \u003ca href=\"https://all-contributors.js.org/docs/en/bot/usage\"\u003eAdd your contributions\u003c/a\u003e\n        \u003c/img\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tfoot\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzig-bitcoin%2Fcoconut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzig-bitcoin%2Fcoconut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzig-bitcoin%2Fcoconut/lists"}