altangent / lightnode-invoice

Lightning Network invoice protocol library
MIT License
12 stars 4 forks source link

Fixes "Invalid network" error for regtest invoices #4

Closed maximilliangeorge closed 5 years ago

maximilliangeorge commented 5 years ago

I was having trouble decoding regtest invoices. I believe the network prefix isn't correct. Changing 'crt' to 'bcrt' solved the issue for me.

bmancini55 commented 5 years ago

Thanks!

LND reference for the how it load the Bech32HRP prefix: https://github.com/btcsuite/btcd/blob/master/chaincfg/params.go#L382.