Disclaimer: The author is NOT a cryptographer and this work has not been reviewed. This means that there is very likely a fatal flaw somewhere. Cashu is still experimental and not production-ready.
Don't be reckless: This project is in early development, it does however work with real sats! Always use amounts you don't mind losing.
Cashu wallet and mint implementation in Go.
Cashu is a free and open-source Chaumian ecash system built for Bitcoin. You can read more about it here.
Implemented NUTs:
- NUT-00
- NUT-01
- NUT-02
- NUT-03
- NUT-04
- NUT-05
- NUT-06
- NUT-07
- NUT-08 (Wallet only)
- NUT-09
- NUT-10
- NUT-11
- NUT-12
- NUT-13
- NUT-14
- NUT-15
With Go installed, you can run the following command to install the wallet:
git clone https://github.com/elnosh/gonuts
cd gonuts
go install ./cmd/nutw/
To setup a mint for the wallet, create a .env
file at ~/.gonuts/wallet/.env and setup your preferred mint.
nutw balance
nutw mint 100
This will get an invoice from the mint which you can then pay and use to mint new ecash.
invoice: lnbc100n1pja0w9pdqqx...
nutw mint --invoice lnbc100n1pja0w9pdqqx...
nutw send 21
This will generate a Cashu token that looks like this:
cashuAeyJ0b2tlbiI6W3sibW...
This is the ecash that you can then send to anyone.
nutw receive cashuAeyJ0b2tlbiI6W3...
nutw pay lnbc100n1pju35fedqqsp52xt3...
cd cmd/nutw
- create
.env
file and fill in the values go build -v -o nutw nutw.go
-
cd cmd/mint
-
you'll need to setup a lightning regtest environment with something like Polar and fill in the values in the
.env
file -
go build -v -o mint mint.go
-
./mint
All contributions are welcome.
If you want to contribute, please open an Issue or a PR.