mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-11 10:04:28 +01:00
spec: import latest onionmessage spec, based on routeblinding.
This is from 6e99c5feaf60cb797507d181fe583224309318e9 We renamed the enctlv field to encrypted_recipient_data in the spec, and the new onion_message is message 513. We don't handle it until the next patch. Two renames: 1. blinding_seed -> blinding_point. 2. enctlv -> encrypted_recipient_data. We don't do a compat cycle for our JSON APIs for these experimental features only used by our own plugins, we just rename. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -269,11 +269,11 @@ int main(int argc, char **argv)
|
||||
|
||||
/* Look for enctlv */
|
||||
if (!outer->enctlv)
|
||||
errx(1, "No enctlv field");
|
||||
errx(1, "No encrypted_recipient_data field");
|
||||
|
||||
if (tal_bytelen(outer->enctlv)
|
||||
< crypto_aead_chacha20poly1305_ietf_ABYTES)
|
||||
errx(1, "enctlv field too short");
|
||||
errx(1, "encrypted_recipient_data field too short");
|
||||
|
||||
dec = tal_arr(tmpctx, u8,
|
||||
tal_bytelen(outer->enctlv)
|
||||
@@ -286,7 +286,7 @@ int main(int argc, char **argv)
|
||||
npub,
|
||||
rho.data);
|
||||
if (ret != 0)
|
||||
errx(1, "Failed to decrypt enctlv field");
|
||||
errx(1, "Failed to decrypt encrypted_recipient_data field");
|
||||
|
||||
printf("Contents: %s\n", tal_hex(tmpctx, dec));
|
||||
|
||||
|
||||
@@ -270,7 +270,7 @@ static bool print_blindedpaths(struct blinded_path **paths,
|
||||
printf(" %s:%s",
|
||||
type_to_string(tmpctx, struct pubkey,
|
||||
&p[j]->node_id),
|
||||
tal_hex(tmpctx, p[j]->enctlv));
|
||||
tal_hex(tmpctx, p[j]->encrypted_recipient_data));
|
||||
if (blindedpay) {
|
||||
if (bp_idx < tal_count(blindedpay))
|
||||
printf("fee=%u/%u,cltv=%u,features=%s",
|
||||
|
||||
Reference in New Issue
Block a user