storopoli / cashu-rs-mint

Cashu mint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cashu-rs-mint

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.

WIP

Implemented NUTs:

Development

nix develop

This will launch a nix shell with a regtest bitcoind node as well as two lightning nodes.

In order to use the node first a channel will need to be opened.

  ln1 newaddr
  ln2 newaddr
  btc sendtoaddress <ln1 bitcoin address> 100
  btc sendtoaddress <ln2 bitcoin address> 100
  btc getnewaddress
  btc generatetoaddress 50 <btc address>

Connect ln nodes

  ln2 getinfo
  ln1 connect <pubkey of ln1> 127.0.0.1 15352

Open a channel from ln1 to ln2

  ln1 fundchannel id=<pubkey of ln2> amount=10000000

Open a channel from ln2 to ln1

  ln1 getinfo
  ln2 fundchannel id=<pubkey of ln1> amount=10000000

Generate blocks to confirm channels

  btc getnewaddress
  btc generatetoaddress 50 <btc address>

Start the mint, by default the mint will use ln1

  cargo r

Implemented Lightning Backends

License

Code is under the BSD 3-Clause License

Contribution

All contributions welcome.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.

Contact

I can be contacted for comments or questions on nostr at _@thesimplekid.com (npub1qjgcmlpkeyl8mdkvp4s0xls4ytcux6my606tgfx9xttut907h0zs76lgjw) or via email tsk@thesimplekid.com.

About

Cashu mint

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Rust 62.6%Language:Shell 20.5%Language:Just 8.5%Language:Nix 8.3%