Closed tiero closed 4 years ago
https://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md
I don't see any problem with the explanation in BOLT11. 64 bits = 8 bytes.
@junderw I'm sorry, the question was incomplete. I was saying that using the chan_id
printed by lnd is not in the right format.
eg. With 286972534915072
it gives me Routing info short channel id must be 8 bytes
I see here that https://github.com/bitcoinjs/bolt11/blob/master/payreq.js#L261 is supposed to be an hex string, meanwhile for lnd in an uint64
Do you have any hints?
convert from base10 to base16.
If I try to encode the routing info passing the chan id I get with lnd in regtest
In the LND doc
chan_id
is defined asThe first 3 bytes are the block height, the next 3 the index within the block, and the last 2 bytes are the output index for the channel.