You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coconut 🥥 is a Cashu Wallet and Mint implementation in Zig.
Test
zig build test --summary all
Build
zig build -Doptimize=ReleaseFast
CLI Usage
The Coconut wallet provides a command-line interface for various operations. Here's how to use it:
General Help
To see the general help and available commands, run:
$ coconut --help
Version: 0.1.0
Author: Coconut Contributors
USAGE:
coconut [OPTIONS]
COMMANDS:
info Display information about the Coconut wallet
OPTIONS:
-h, --help Show this help output.
--color <VALUE> When to use colors (*auto*, never, always).
Info Command
The info command displays information about the Coconut wallet. Here's its specific help:
$ coconut info --help
USAGE:
coconut info [OPTIONS]
OPTIONS:
-m, --mint Fetch mint information
-n, --mnemonic Show your mnemonic
-h, --help Show this help output.
Example Usage
Here's an example of using the info command with the --mnemonic option:
This 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.
Note: Be cautious when using the --mnemonic option, as it displays sensitive information. Make sure you're in a secure environment when viewing your mnemonic.
Benchmarks
This project includes performance benchmarks for each step of the BDHKE process, as well as the end-to-end flow.
Running Benchmarks Locally
To run the benchmarks on your local machine:
zig build bench -Doptimize=ReleaseFast
The benchmarks will be compiled with the ReleaseFast optimization level.
Benchmark Results
Current results:
Operation
Time us
Time ns
hashToCurve
7.182 us
7181.94 ns
step1Alice
23.608 us
23608.43 ns
step2Bob
28.003 us
28002.82 ns
step3Alice
25.102 us
25101.80 ns
verify
29.020 us
29020.39 ns
e2e
112.626 us
112626.12 ns
This run was performed on a MacBook Pro with an M1 chip.
Machine Info:
Model: MacBook Pro
CPU: Apple M1 Max
Cores: 10 (Physical), 10 (Logical)
Memory: 64 GB
macOS Version: 14.5
Zig Version: 0.14.0-dev.850+ddcb7b1c1