Commit Graph

4 Commits

Author SHA1 Message Date
Oliver Gugger
044e1e692f
zpay32: add distinct hrp to invoice
The Core devs decided to us the same bech32 HRP for Signet as is used
for the current Testnet3. This might be okay for on-chain addresses
since they are compatible in theory. But for invoices we want to use a
distinct HRP to distinguish testnet from signet.
Also see spec PR
https://github.com/lightningnetwork/lightning-rfc/pull/844 for more
information about the reasoning.
2021-05-18 13:06:03 +02:00
Yaacov Akiba Slama
af01571fc6 Let invoice.Encode receive a function which hashes itself the message
Modify the SignCompact function passed to invoice.Encode to receive the
message before it's hashed and hash it itself.
With this modification, the SignMessage rpc function from the signrpc
subserver can be used and an invoice can be encoded outside of lnd.
2020-07-29 21:18:24 +03:00
Conner Fromknecht
73256e6d0e
zpay32: fix linter errors in encode/decode 2020-07-24 13:13:39 -07:00
Conner Fromknecht
49c601e62a
zpay32: split off encoding/decoding into own files
As a preliminary step to isolating zpay32 in migrations 01-11, we'll
split out the encoding and decoding logic into separate files. Migration
11 only requires invoice decoding, so this prevents us from needing to
copy in the encoding logic that would otherwise be unused.
2020-07-24 13:13:29 -07:00