bolt12: update to latest spec.

Main changes are:
1. Uses point32 instead of pubkey32.
2. Uses issuer instead of vendor.
3. Uses byte instead of u8.
4. blinded_path num_hops is now a byte, not u16 (we don't use that yet!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-EXPERIMENTAL: bolt12: `vendor` is deprecated: the field is now called `issuer`.
This commit is contained in:
Rusty Russell 2021-10-08 11:22:34 +10:30 committed by Christian Decker
parent 8f582e770c
commit 45bf7a3974
12 changed files with 131 additions and 171 deletions

View File

@ -330,14 +330,14 @@ int main(int argc, char *argv[])
fieldwires[1] = tlv(8, "\x03\xe8", 2);
/* description: 10USD every day */
fieldwires[2] = tlv(10, "10USD every day", strlen("10USD every day"));
/* vendor: rusty.ozlabs.org */
/* issuer: rusty.ozlabs.org */
fieldwires[3] = tlv(20, "rusty.ozlabs.org", strlen("rusty.ozlabs.org"));
/* recurrence: time_unit = 1, period = 1 */
fieldwires[4] = tlv(26, "\x01\x01", 2);
/* node_id: 4b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605 */
fieldwires[5] = tlv(30, "\x4b\x9a\x1f\xa8\xe0\x06\xf1\xe3\x93\x7f\x65\xf6\x6c\x40\x8e\x6d\xa8\xe1\xca\x72\x8e\xa4\x32\x22\xa7\x38\x1d\xf1\xcc\x44\x96\x05", 32);
json_out("{\"comment\": \"offer test, currency = USD, amount = 1000, description = 10USD every day, vendor = rusty.ozlabs.org, recurrence = time_unit = 1, period = 1, node_id = 4b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605\",");
json_out("{\"comment\": \"offer test, currency = USD, amount = 1000, description = 10USD every day, issuer = rusty.ozlabs.org, recurrence = time_unit = 1, period = 1, node_id = 4b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605\",");
json_out("\"tlv\": \"offer\",");
all = concat(fieldwires[0], fieldwires[1], fieldwires[2],
@ -364,7 +364,7 @@ int main(int argc, char *argv[])
json_out("{ \"desc\": \"1: currency+nonce and amount+nonce\", \"H(`LnBranch`,%s)\": \"%s\" },",
tal_hex(tmpctx, ordered(leaf[0], leaf[1])),
tal_hex(tmpctx, H(LnBranch, ordered(leaf[0], leaf[1]))));
json_out("{ \"desc\": \"2: description+nonce and vendor+nonce\", \"H(`LnBranch`,%s)\": \"%s\"},",
json_out("{ \"desc\": \"2: description+nonce and issuer+nonce\", \"H(`LnBranch`,%s)\": \"%s\"},",
tal_hex(tmpctx, ordered(leaf[2], leaf[3])),
tal_hex(tmpctx, H(LnBranch, ordered(leaf[2], leaf[3]))));
struct sha256 *b12 = H(LnBranch,

View File

@ -139,9 +139,9 @@ static void print_description(const char *description)
(int)tal_bytelen(description), description);
}
static void print_vendor(const char *vendor)
static void print_issuer(const char *issuer)
{
printf("vendor: %.*s\n", (int)tal_bytelen(vendor), vendor);
printf("issuer: %.*s\n", (int)tal_bytelen(issuer), issuer);
}
static void print_node_id(const struct point32 *node_id)
@ -499,8 +499,8 @@ int main(int argc, char *argv[])
*offer->amount);
if (must_have(offer, description))
print_description(offer->description);
if (offer->vendor)
print_vendor(offer->vendor);
if (offer->issuer)
print_issuer(offer->issuer);
if (must_have(offer, node_id))
print_node_id(offer->node_id);
if (offer->quantity_min)
@ -589,8 +589,8 @@ int main(int argc, char *argv[])
invoice->blindedpay);
} else
must_not_have(invoice, blindedpay);
if (invoice->vendor)
print_vendor(invoice->vendor);
if (invoice->issuer)
print_issuer(invoice->issuer);
if (must_have(invoice, node_id))
print_node_id(invoice->node_id);
if (invoice->quantity)

View File

@ -6,7 +6,7 @@ SYNOPSIS
**(WARNING: experimental-offers only)**
**offer** *amount* *description* \[*vendor*\] \[*label*\] \[*quantity_min*\] \[*quantity_max*\] \[*absolute_expiry*\] \[*recurrence*\] \[*recurrence_base*\] \[*recurrence_paywindow*\] \[*recurrence_limit*\] \[*single_use*\]
**offer** *amount* *description* \[*issuer*\] \[*label*\] \[*quantity_min*\] \[*quantity_max*\] \[*absolute_expiry*\] \[*recurrence*\] \[*recurrence_base*\] \[*recurrence_paywindow*\] \[*recurrence_limit*\] \[*single_use*\]
DESCRIPTION
-----------
@ -37,7 +37,7 @@ e.g. *coffee*. This value is encoded into the resulting offer and is
viewable by anyone you expose this offer to. It must be UTF-8, and
cannot use *\\u* JSON escape codes.
The *vendor* is another (optional) field exposed in the offer, and
The *issuer* is another (optional) field exposed in the offer, and
reflects who is issuing this offer (i.e. you) if appropriate.
The *label* field is an internal-use name for the offer, which can

View File

@ -7,7 +7,7 @@ SYNOPSIS
**(WARNING: experimental-offers only)**
**offerout** *amount* *description* \[*vendor*\] \[*label*\] \[*absolute_expiry*\] \[*refund_for*\]
**offerout** *amount* *description* \[*issuer*\] \[*label*\] \[*absolute_expiry*\] \[*refund_for*\]
DESCRIPTION
-----------
@ -34,7 +34,7 @@ e.g. *withdrawl from ATM*. This value is encoded into the resulting offer and is
viewable by anyone you expose this offer to. It must be UTF-8, and
cannot use *\\u* JSON escape codes.
The *vendor* is another (optional) field exposed in the offer, and
The *issuer* is another (optional) field exposed in the offer, and
reflects who is issuing this offer (i.e. you) if appropriate.
The *label* field is an internal-use name for the offer, which can

View File

@ -329,18 +329,18 @@ static struct command_result *handle_invreq_response(struct command *cmd,
}
/* BOLT-offers #12:
* - SHOULD confirm authorization if `vendor` does not exactly
* - SHOULD confirm authorization if `issuer` does not exactly
* match the `offer`
*/
if (field_diff(sent->offer, inv, vendor)) {
if (!inv->vendor)
json_add_stringn(out, "vendor_removed",
sent->offer->vendor,
tal_bytelen(sent->offer->vendor));
if (field_diff(sent->offer, inv, issuer)) {
if (!inv->issuer)
json_add_stringn(out, "issuer_removed",
sent->offer->issuer,
tal_bytelen(sent->offer->issuer));
else
json_add_stringn(out, "vendor",
inv->vendor,
tal_bytelen(inv->vendor));
json_add_stringn(out, "issuer",
inv->issuer,
tal_bytelen(inv->issuer));
}
/* BOLT-offers #12:
* - SHOULD confirm authorization if `msat` is not within the amount

View File

@ -425,9 +425,14 @@ static void json_add_offer(struct json_stream *js, const struct tlv_offer *offer
valid = false;
}
if (offer->vendor)
json_add_stringn(js, "vendor", offer->vendor,
tal_bytelen(offer->vendor));
if (offer->issuer) {
json_add_stringn(js, "issuer", offer->issuer,
tal_bytelen(offer->issuer));
if (deprecated_apis) {
json_add_stringn(js, "vendor", offer->issuer,
tal_bytelen(offer->issuer));
}
}
if (offer->features)
json_add_hex_talarr(js, "features", offer->features);
if (offer->absolute_expiry)
@ -587,9 +592,14 @@ static void json_add_b12_invoice(struct json_stream *js,
valid = false;
}
if (invoice->vendor)
json_add_stringn(js, "vendor", invoice->vendor,
tal_bytelen(invoice->vendor));
if (invoice->issuer) {
json_add_stringn(js, "issuer", invoice->issuer,
tal_bytelen(invoice->issuer));
if (deprecated_apis) {
json_add_stringn(js, "vendor", invoice->issuer,
tal_bytelen(invoice->issuer));
}
}
if (invoice->features)
json_add_hex_talarr(js, "features", invoice->features);
if (invoice->paths) {
@ -858,14 +868,14 @@ static const struct plugin_command commands[] = {
"offer",
"payment",
"Create an offer to accept money",
"Create an offer for invoices of {amount} with {description}, optional {vendor}, internal {label}, {quantity_min}, {quantity_max}, {absolute_expiry}, {recurrence}, {recurrence_base}, {recurrence_paywindow}, {recurrence_limit} and {single_use}",
"Create an offer for invoices of {amount} with {description}, optional {issuer}, internal {label}, {quantity_min}, {quantity_max}, {absolute_expiry}, {recurrence}, {recurrence_base}, {recurrence_paywindow}, {recurrence_limit} and {single_use}",
json_offer
},
{
"offerout",
"payment",
"Create an offer to send money",
"Create an offer to pay invoices of {amount} with {description}, optional {vendor}, internal {label}, {absolute_expiry} and {refund_for}",
"Create an offer to pay invoices of {amount} with {description}, optional {issuer}, internal {label}, {absolute_expiry} and {refund_for}",
json_offerout
},
{

View File

@ -774,7 +774,7 @@ static struct command_result *listoffers_done(struct command *cmd,
->bits[BOLT11_FEATURE]);
/* FIXME: Insert paths and payinfo */
ir->inv->vendor = tal_dup_talarr(ir->inv, char, ir->offer->vendor);
ir->inv->issuer = tal_dup_talarr(ir->inv, char, ir->offer->issuer);
ir->inv->node_id = tal_dup(ir->inv, struct point32, ir->offer->node_id);
/* BOLT-offers #12:
* - MUST set (or not set) `quantity` exactly as the invoice_request

View File

@ -314,16 +314,46 @@ struct command_result *json_offer(struct command *cmd,
const char *buffer,
const jsmntok_t *params)
{
const char *desc, *vendor;
const char *desc, *issuer;
struct tlv_offer *offer;
struct offer_info *offinfo = tal(cmd, struct offer_info);
offinfo->offer = offer = tlv_offer_new(offinfo);
/* "issuer" used to be called "vendor" */
if (deprecated_apis
&& params
&& params->type == JSMN_OBJECT
&& json_get_member(buffer, params, "vendor")) {
if (!param(cmd, buffer, params,
p_req("amount", param_amount, offer),
p_req("description", param_escaped_string, &desc),
p_opt("vendor", param_escaped_string, &issuer),
p_opt("label", param_escaped_string, &offinfo->label),
p_opt("quantity_min", param_u64, &offer->quantity_min),
p_opt("quantity_max", param_u64, &offer->quantity_max),
p_opt("absolute_expiry", param_u64, &offer->absolute_expiry),
p_opt("recurrence", param_recurrence, &offer->recurrence),
p_opt("recurrence_base",
param_recurrence_base,
&offer->recurrence_base),
p_opt("recurrence_paywindow",
param_recurrence_paywindow,
&offer->recurrence_paywindow),
p_opt("recurrence_limit",
param_number,
&offer->recurrence_limit),
p_opt_def("single_use", param_bool,
&offinfo->single_use, false),
NULL))
return command_param_failed();
goto after_params;
}
if (!param(cmd, buffer, params,
p_req("amount", param_amount, offer),
p_req("description", param_escaped_string, &desc),
p_opt("vendor", param_escaped_string, &vendor),
p_opt("issuer", param_escaped_string, &issuer),
p_opt("label", param_escaped_string, &offinfo->label),
p_opt("quantity_min", param_u64, &offer->quantity_min),
p_opt("quantity_max", param_u64, &offer->quantity_max),
@ -344,6 +374,7 @@ struct command_result *json_offer(struct command *cmd,
NULL))
return command_param_failed();
after_params:
if (!offers_enabled)
return command_fail(cmd, LIGHTNINGD,
"experimental-offers not enabled");
@ -398,9 +429,9 @@ struct command_result *json_offer(struct command *cmd,
}
offer->description = tal_dup_arr(offer, char, desc, strlen(desc), 0);
if (vendor) {
offer->vendor
= tal_dup_arr(offer, char, vendor, strlen(vendor), 0);
if (issuer) {
offer->issuer
= tal_dup_arr(offer, char, issuer, strlen(issuer), 0);
}
offer->node_id = tal_dup(offer, struct point32, &id);
@ -427,16 +458,34 @@ struct command_result *json_offerout(struct command *cmd,
const char *buffer,
const jsmntok_t *params)
{
const char *desc, *vendor, *label;
const char *desc, *issuer, *label;
struct tlv_offer *offer;
struct out_req *req;
offer = tlv_offer_new(cmd);
/* "issuer" used to be called "vendor" */
if (deprecated_apis
&& params
&& params->type == JSMN_OBJECT
&& json_get_member(buffer, params, "vendor")) {
if (!param(cmd, buffer, params,
p_req("amount", param_msat_or_any, offer),
p_req("description", param_escaped_string, &desc),
p_opt("vendor", param_escaped_string, &issuer),
p_opt("label", param_escaped_string, &label),
p_opt("absolute_expiry", param_u64, &offer->absolute_expiry),
p_opt("refund_for", param_invoice_payment_hash, &offer->refund_for),
/* FIXME: hints support! */
NULL))
return command_param_failed();
goto after_params;
}
if (!param(cmd, buffer, params,
p_req("amount", param_msat_or_any, offer),
p_req("description", param_escaped_string, &desc),
p_opt("vendor", param_escaped_string, &vendor),
p_opt("issuer", param_escaped_string, &issuer),
p_opt("label", param_escaped_string, &label),
p_opt("absolute_expiry", param_u64, &offer->absolute_expiry),
p_opt("refund_for", param_invoice_payment_hash, &offer->refund_for),
@ -444,6 +493,7 @@ struct command_result *json_offerout(struct command *cmd,
NULL))
return command_param_failed();
after_params:
if (!offers_enabled)
return command_fail(cmd, LIGHTNINGD,
"experimental-offers not enabled");
@ -463,9 +513,9 @@ struct command_result *json_offerout(struct command *cmd,
}
offer->description = tal_dup_arr(offer, char, desc, strlen(desc), 0);
if (vendor)
offer->vendor = tal_dup_arr(offer, char,
vendor, strlen(vendor), 0);
if (issuer)
offer->issuer = tal_dup_arr(offer, char,
issuer, strlen(issuer), 0);
offer->node_id = tal_dup(offer, struct point32, &id);

View File

@ -3984,16 +3984,16 @@ def test_offer(node_factory, bitcoind):
offer['bolt12']]).decode('UTF-8')
assert 'description: ' + weird_desc in output
# Test vendor
weird_vendor = 'description \\ " \t \n ナンセンス 1杯'
# Test issuer
weird_issuer = 'description \\ " \t \n ナンセンス 1杯'
ret = l1.rpc.call('offer', {'amount': '100000sat',
'description': 'vendor test',
'vendor': weird_vendor})
'description': 'issuer test',
'issuer': weird_issuer})
offer = only_one(l1.rpc.call('listoffers', [ret['offer_id']])['offers'])
output = subprocess.check_output([bolt12tool, 'decode',
offer['bolt12']]).decode('UTF-8')
assert 'vendor: ' + weird_vendor in output
assert 'issuer: ' + weird_issuer in output
# Test quantity min/max
ret = l1.rpc.call('offer', {'amount': '100000sat',
@ -4508,16 +4508,16 @@ def do_test_sendinvoice(node_factory, bitcoind, disable):
'label': 'test sendinvoice refund'})
wait_for(lambda: only_one(l2.rpc.call('listoffers', [refund['offer_id']])['offers'])['used'] is True)
# Offer with vendor: we must not copy vendor into our invoice!
# Offer with issuer: we must not copy issuer into our invoice!
offer = l1.rpc.call('offerout', {'amount': '10000sat',
'description': 'simple test',
'vendor': "clightning test suite"})
'issuer': "clightning test suite"})
out = l2.rpc.call('sendinvoice', {'offer': offer['bolt12'],
'label': 'test sendinvoice 3'})
assert out['label'] == 'test sendinvoice 3'
assert out['description'] == 'simple test'
assert 'vendor' not in out
assert 'issuer' not in out
assert 'bolt12' in out
assert 'payment_hash' in out
assert out['status'] == 'paid'

View File

@ -12,8 +12,8 @@ tlvtype,offer,absolute_expiry,14
tlvdata,offer,absolute_expiry,seconds_from_epoch,tu64,
tlvtype,offer,paths,16
tlvdata,offer,paths,paths,blinded_path,...
tlvtype,offer,vendor,20
tlvdata,offer,vendor,vendor,utf8,...
tlvtype,offer,issuer,20
tlvdata,offer,issuer,issuer,utf8,...
tlvtype,offer,quantity_min,22
tlvdata,offer,quantity_min,min,tu64,
tlvtype,offer,quantity_max,24
@ -31,15 +31,16 @@ tlvtype,offer,recurrence_base,28
tlvdata,offer,recurrence_base,start_any_period,byte,
tlvdata,offer,recurrence_base,basetime,tu64,
tlvtype,offer,node_id,30
tlvdata,offer,node_id,node_id,pubkey32,
tlvdata,offer,node_id,node_id,point32,
tlvtype,offer,send_invoice,54
tlvtype,offer,refund_for,34
tlvdata,offer,refund_for,refunded_payment_hash,sha256,
tlvtype,offer,signature,240
tlvdata,offer,signature,sig,bip340sig,
subtype,blinded_path
subtypedata,blinded_path,first_node_id,point,
subtypedata,blinded_path,blinding,point,
subtypedata,blinded_path,num_hops,u16,
subtypedata,blinded_path,num_hops,byte,
subtypedata,blinded_path,path,onionmsg_path,num_hops
tlvtype,invoice_request,chains,2
tlvdata,invoice_request,chains,chains,chain_hash,...
@ -56,7 +57,7 @@ tlvdata,invoice_request,recurrence_counter,counter,tu32,
tlvtype,invoice_request,recurrence_start,68
tlvdata,invoice_request,recurrence_start,period_offset,tu32,
tlvtype,invoice_request,payer_key,38
tlvdata,invoice_request,payer_key,key,pubkey32,
tlvdata,invoice_request,payer_key,key,point32,
tlvtype,invoice_request,payer_note,39
tlvdata,invoice_request,payer_note,note,utf8,...
tlvtype,invoice_request,payer_info,50
@ -81,10 +82,10 @@ tlvtype,invoice,blindedpay,18
tlvdata,invoice,blindedpay,payinfo,blinded_payinfo,...
tlvtype,invoice,blinded_capacities,19
tlvdata,invoice,blinded_capacities,incoming_msat,u64,...
tlvtype,invoice,vendor,20
tlvdata,invoice,vendor,vendor,utf8,...
tlvtype,invoice,issuer,20
tlvdata,invoice,issuer,issuer,utf8,...
tlvtype,invoice,node_id,30
tlvdata,invoice,node_id,node_id,pubkey32,
tlvdata,invoice,node_id,node_id,point32,
tlvtype,invoice,quantity,32
tlvdata,invoice,quantity,quantity,tu64,
tlvtype,invoice,refund_for,34
@ -97,7 +98,7 @@ tlvdata,invoice,recurrence_start,period_offset,tu32,
tlvtype,invoice,recurrence_basetime,64
tlvdata,invoice,recurrence_basetime,basetime,tu64,
tlvtype,invoice,payer_key,38
tlvdata,invoice,payer_key,key,pubkey32,
tlvdata,invoice,payer_key,key,point32,
tlvtype,invoice,payer_note,39
tlvdata,invoice,payer_note,note,utf8,...
tlvtype,invoice,payer_info,50
@ -111,7 +112,7 @@ tlvdata,invoice,relative_expiry,seconds_from_creation,tu32,
tlvtype,invoice,cltv,46
tlvdata,invoice,cltv,min_final_cltv_expiry,tu32,
tlvtype,invoice,fallbacks,48
tlvdata,invoice,fallbacks,num,u8,
tlvdata,invoice,fallbacks,num,byte,
tlvdata,invoice,fallbacks,fallbacks,fallback_address,num
tlvtype,invoice,refund_signature,52
tlvdata,invoice,refund_signature,payer_signature,bip340sig,

1 tlvtype,offer,chains,2
12 tlvdata,offer,absolute_expiry,seconds_from_epoch,tu64,
13 tlvtype,offer,paths,16
14 tlvdata,offer,paths,paths,blinded_path,...
15 tlvtype,offer,vendor,20 tlvtype,offer,issuer,20
16 tlvdata,offer,vendor,vendor,utf8,... tlvdata,offer,issuer,issuer,utf8,...
17 tlvtype,offer,quantity_min,22
18 tlvdata,offer,quantity_min,min,tu64,
19 tlvtype,offer,quantity_max,24
31 tlvdata,offer,recurrence_base,start_any_period,byte,
32 tlvdata,offer,recurrence_base,basetime,tu64,
33 tlvtype,offer,node_id,30
34 tlvdata,offer,node_id,node_id,pubkey32, tlvdata,offer,node_id,node_id,point32,
35 tlvtype,offer,send_invoice,54
36 tlvtype,offer,refund_for,34
37 tlvdata,offer,refund_for,refunded_payment_hash,sha256,
38 tlvtype,offer,signature,240
39 tlvdata,offer,signature,sig,bip340sig,
40 subtype,blinded_path
41 subtypedata,blinded_path,first_node_id,point,
42 subtypedata,blinded_path,blinding,point,
43 subtypedata,blinded_path,num_hops,u16, subtypedata,blinded_path,num_hops,byte,
44 subtypedata,blinded_path,path,onionmsg_path,num_hops
45 tlvtype,invoice_request,chains,2
46 tlvdata,invoice_request,chains,chains,chain_hash,...
57 tlvtype,invoice_request,recurrence_start,68
58 tlvdata,invoice_request,recurrence_start,period_offset,tu32,
59 tlvtype,invoice_request,payer_key,38
60 tlvdata,invoice_request,payer_key,key,pubkey32, tlvdata,invoice_request,payer_key,key,point32,
61 tlvtype,invoice_request,payer_note,39
62 tlvdata,invoice_request,payer_note,note,utf8,...
63 tlvtype,invoice_request,payer_info,50
82 tlvdata,invoice,blindedpay,payinfo,blinded_payinfo,...
83 tlvtype,invoice,blinded_capacities,19
84 tlvdata,invoice,blinded_capacities,incoming_msat,u64,...
85 tlvtype,invoice,vendor,20 tlvtype,invoice,issuer,20
86 tlvdata,invoice,vendor,vendor,utf8,... tlvdata,invoice,issuer,issuer,utf8,...
87 tlvtype,invoice,node_id,30
88 tlvdata,invoice,node_id,node_id,pubkey32, tlvdata,invoice,node_id,node_id,point32,
89 tlvtype,invoice,quantity,32
90 tlvdata,invoice,quantity,quantity,tu64,
91 tlvtype,invoice,refund_for,34
98 tlvtype,invoice,recurrence_basetime,64
99 tlvdata,invoice,recurrence_basetime,basetime,tu64,
100 tlvtype,invoice,payer_key,38
101 tlvdata,invoice,payer_key,key,pubkey32, tlvdata,invoice,payer_key,key,point32,
102 tlvtype,invoice,payer_note,39
103 tlvdata,invoice,payer_note,note,utf8,...
104 tlvtype,invoice,payer_info,50
112 tlvtype,invoice,cltv,46
113 tlvdata,invoice,cltv,min_final_cltv_expiry,tu32,
114 tlvtype,invoice,fallbacks,48
115 tlvdata,invoice,fallbacks,num,u8, tlvdata,invoice,fallbacks,num,byte,
116 tlvdata,invoice,fallbacks,fallbacks,fallback_address,num
117 tlvtype,invoice,refund_signature,52
118 tlvdata,invoice,refund_signature,payer_signature,bip340sig,

View File

@ -12,8 +12,8 @@ tlvtype,offer,absolute_expiry,14
tlvdata,offer,absolute_expiry,seconds_from_epoch,tu64,
tlvtype,offer,paths,16
tlvdata,offer,paths,paths,blinded_path,...
tlvtype,offer,vendor,20
tlvdata,offer,vendor,vendor,utf8,...
tlvtype,offer,issuer,20
tlvdata,offer,issuer,issuer,utf8,...
tlvtype,offer,quantity_min,22
tlvdata,offer,quantity_min,min,tu64,
tlvtype,offer,quantity_max,24
@ -31,15 +31,16 @@ tlvtype,offer,recurrence_base,28
tlvdata,offer,recurrence_base,start_any_period,byte,
tlvdata,offer,recurrence_base,basetime,tu64,
tlvtype,offer,node_id,30
tlvdata,offer,node_id,node_id,pubkey32,
tlvdata,offer,node_id,node_id,point32,
tlvtype,offer,send_invoice,54
tlvtype,offer,refund_for,34
tlvdata,offer,refund_for,refunded_payment_hash,sha256,
tlvtype,offer,signature,240
tlvdata,offer,signature,sig,bip340sig,
subtype,blinded_path
subtypedata,blinded_path,first_node_id,point,
subtypedata,blinded_path,blinding,point,
subtypedata,blinded_path,num_hops,u16,
subtypedata,blinded_path,num_hops,byte,
subtypedata,blinded_path,path,onionmsg_path,num_hops
tlvtype,invoice_request,chains,2
tlvdata,invoice_request,chains,chains,chain_hash,...
@ -56,7 +57,7 @@ tlvdata,invoice_request,recurrence_counter,counter,tu32,
tlvtype,invoice_request,recurrence_start,68
tlvdata,invoice_request,recurrence_start,period_offset,tu32,
tlvtype,invoice_request,payer_key,38
tlvdata,invoice_request,payer_key,key,pubkey32,
tlvdata,invoice_request,payer_key,key,point32,
tlvtype,invoice_request,payer_note,39
tlvdata,invoice_request,payer_note,note,utf8,...
tlvtype,invoice_request,payer_info,50
@ -81,10 +82,10 @@ tlvtype,invoice,blindedpay,18
tlvdata,invoice,blindedpay,payinfo,blinded_payinfo,...
tlvtype,invoice,blinded_capacities,19
tlvdata,invoice,blinded_capacities,incoming_msat,u64,...
tlvtype,invoice,vendor,20
tlvdata,invoice,vendor,vendor,utf8,...
tlvtype,invoice,issuer,20
tlvdata,invoice,issuer,issuer,utf8,...
tlvtype,invoice,node_id,30
tlvdata,invoice,node_id,node_id,pubkey32,
tlvdata,invoice,node_id,node_id,point32,
tlvtype,invoice,quantity,32
tlvdata,invoice,quantity,quantity,tu64,
tlvtype,invoice,refund_for,34
@ -97,7 +98,7 @@ tlvdata,invoice,recurrence_start,period_offset,tu32,
tlvtype,invoice,recurrence_basetime,64
tlvdata,invoice,recurrence_basetime,basetime,tu64,
tlvtype,invoice,payer_key,38
tlvdata,invoice,payer_key,key,pubkey32,
tlvdata,invoice,payer_key,key,point32,
tlvtype,invoice,payer_note,39
tlvdata,invoice,payer_note,note,utf8,...
tlvtype,invoice,payer_info,50
@ -111,7 +112,7 @@ tlvdata,invoice,relative_expiry,seconds_from_creation,tu32,
tlvtype,invoice,cltv,46
tlvdata,invoice,cltv,min_final_cltv_expiry,tu32,
tlvtype,invoice,fallbacks,48
tlvdata,invoice,fallbacks,num,u8,
tlvdata,invoice,fallbacks,num,byte,
tlvdata,invoice,fallbacks,fallbacks,fallback_address,num
tlvtype,invoice,refund_signature,52
tlvdata,invoice,refund_signature,payer_signature,bip340sig,

1 tlvtype,offer,chains,2
12 tlvdata,offer,absolute_expiry,seconds_from_epoch,tu64,
13 tlvtype,offer,paths,16
14 tlvdata,offer,paths,paths,blinded_path,...
15 tlvtype,offer,vendor,20 tlvtype,offer,issuer,20
16 tlvdata,offer,vendor,vendor,utf8,... tlvdata,offer,issuer,issuer,utf8,...
17 tlvtype,offer,quantity_min,22
18 tlvdata,offer,quantity_min,min,tu64,
19 tlvtype,offer,quantity_max,24
31 tlvdata,offer,recurrence_base,start_any_period,byte,
32 tlvdata,offer,recurrence_base,basetime,tu64,
33 tlvtype,offer,node_id,30
34 tlvdata,offer,node_id,node_id,pubkey32, tlvdata,offer,node_id,node_id,point32,
35 tlvtype,offer,send_invoice,54
36 tlvtype,offer,refund_for,34
37 tlvdata,offer,refund_for,refunded_payment_hash,sha256,
38 tlvtype,offer,signature,240
39 tlvdata,offer,signature,sig,bip340sig,
40 subtype,blinded_path
41 subtypedata,blinded_path,first_node_id,point,
42 subtypedata,blinded_path,blinding,point,
43 subtypedata,blinded_path,num_hops,u16, subtypedata,blinded_path,num_hops,byte,
44 subtypedata,blinded_path,path,onionmsg_path,num_hops
45 tlvtype,invoice_request,chains,2
46 tlvdata,invoice_request,chains,chains,chain_hash,...
57 tlvtype,invoice_request,recurrence_start,68
58 tlvdata,invoice_request,recurrence_start,period_offset,tu32,
59 tlvtype,invoice_request,payer_key,38
60 tlvdata,invoice_request,payer_key,key,pubkey32, tlvdata,invoice_request,payer_key,key,point32,
61 tlvtype,invoice_request,payer_note,39
62 tlvdata,invoice_request,payer_note,note,utf8,...
63 tlvtype,invoice_request,payer_info,50
82 tlvdata,invoice,blindedpay,payinfo,blinded_payinfo,...
83 tlvtype,invoice,blinded_capacities,19
84 tlvdata,invoice,blinded_capacities,incoming_msat,u64,...
85 tlvtype,invoice,vendor,20 tlvtype,invoice,issuer,20
86 tlvdata,invoice,vendor,vendor,utf8,... tlvdata,invoice,issuer,issuer,utf8,...
87 tlvtype,invoice,node_id,30
88 tlvdata,invoice,node_id,node_id,pubkey32, tlvdata,invoice,node_id,node_id,point32,
89 tlvtype,invoice,quantity,32
90 tlvdata,invoice,quantity,quantity,tu64,
91 tlvtype,invoice,refund_for,34
98 tlvtype,invoice,recurrence_basetime,64
99 tlvdata,invoice,recurrence_basetime,basetime,tu64,
100 tlvtype,invoice,payer_key,38
101 tlvdata,invoice,payer_key,key,pubkey32, tlvdata,invoice,payer_key,key,point32,
102 tlvtype,invoice,payer_note,39
103 tlvdata,invoice,payer_note,note,utf8,...
104 tlvtype,invoice,payer_info,50
112 tlvtype,invoice,cltv,46
113 tlvdata,invoice,cltv,min_final_cltv_expiry,tu32,
114 tlvtype,invoice,fallbacks,48
115 tlvdata,invoice,fallbacks,num,u8, tlvdata,invoice,fallbacks,num,byte,
116 tlvdata,invoice,fallbacks,fallbacks,fallback_address,num
117 tlvtype,invoice,refund_signature,52
118 tlvdata,invoice,refund_signature,payer_signature,bip340sig,

View File

@ -1,102 +0,0 @@
tlvtype,offer_tlvs,chains,2
tlvdata,offer_tlvs,chains,chains,chain_hash,...
tlvtype,offer_tlvs,currency,6
tlvdata,offer_tlvs,currency,iso4217,byte,...
tlvtype,offer_tlvs,amount,8
tlvdata,offer_tlvs,amount,amount,tu64,
tlvtype,offer_tlvs,description,10
tlvdata,offer_tlvs,description,description,byte,...
tlvtype,offer_tlvs,features,12
tlvdata,offer_tlvs,features,features,byte,...
tlvtype,offer_tlvs,expiry_timestamp,14
tlvdata,offer_tlvs,expiry_timestamp,expiry_timestamp,tu64,
tlvtype,offer_tlvs,paths,16
tlvdata,offer_tlvs,paths,paths,blinded_path,...
tlvtype,offer_tlvs,vendor,20
tlvdata,offer_tlvs,vendor,vendor,byte,...
tlvtype,offer_tlvs,quantity_min,22
tlvdata,offer_tlvs,quantity_min,min,tu64,
tlvtype,offer_tlvs,quantity_max,24
tlvdata,offer_tlvs,quantity_max,max,tu64,
tlvtype,offer_tlvs,recurrence,26
tlvdata,offer_tlvs,recurrence,time_unit,byte,
tlvdata,offer_tlvs,recurrence,period,u32,
tlvdata,offer_tlvs,recurrence,limit,tu32,
tlvtype,offer_tlvs,recurrence_base,28
tlvdata,offer_tlvs,recurrence_base,basetime,u32,
tlvdata,offer_tlvs,recurrence_base,paywindow,tu32,
tlvtype,offer_tlvs,node_id,30
tlvdata,offer_tlvs,node_id,node_id,pubkey32,
tlvtype,offer_tlvs,signature,240
tlvdata,offer_tlvs,signature,sig,signature,
subtype,blinded_path
subtypedata,blinded_path,blinding,point,
tlvtype,invoice_request_tlvs,chains,2
tlvdata,invoice_request_tlvs,chains,chains,chain_hash,...
tlvtype,invoice_request_tlvs,offer_id,4
tlvdata,invoice_request_tlvs,offer_id,offer_id,sha256,
tlvtype,invoice_request_tlvs,amount,8
tlvdata,invoice_request_tlvs,amount,amount,tu64,
tlvtype,invoice_request_tlvs,description,10
tlvdata,invoice_request_tlvs,description,description,byte,...
tlvtype,invoice_request_tlvs,features,12
tlvdata,invoice_request_tlvs,features,features,byte,...
tlvtype,invoice_request_tlvs,paths,16
tlvdata,invoice_request_tlvs,paths,paths,blinded_path,...
tlvtype,invoice_request_tlvs,quantity,32
tlvdata,invoice_request_tlvs,quantity,quantity,tu64,
tlvtype,invoice_request_tlvs,refund_for,34
tlvdata,invoice_request_tlvs,refund_for,refunded_payment_hash,sha256,
tlvtype,invoice_request_tlvs,invoice_request_recurrence,36
tlvdata,invoice_request_tlvs,invoice_request_recurrence,counter,tu64,
tlvtype,invoice_request_tlvs,payer_key,38
tlvdata,invoice_request_tlvs,payer_key,key,pubkey32,
tlvtype,invoice_tlvs,chains,2
tlvdata,invoice_tlvs,chains,chains,chain_hash,...
tlvtype,invoice_tlvs,offer_id,4
tlvdata,invoice_tlvs,offer_id,offer_id,sha256,
tlvtype,invoice_tlvs,amount,8
tlvdata,invoice_tlvs,amount,amount,tu64,
tlvtype,invoice_tlvs,description,10
tlvdata,invoice_tlvs,description,description,byte,...
tlvtype,invoice_tlvs,features,12
tlvdata,invoice_tlvs,features,features,byte,...
tlvtype,invoice_tlvs,paths,16
tlvdata,invoice_tlvs,paths,paths,blinded_path,...
tlvtype,invoice_tlvs,blindedpay,18
tlvdata,invoice_tlvs,blindedpay,payinfo,blinded_payinfo,...
tlvtype,invoice_tlvs,vendor,20
tlvdata,invoice_tlvs,vendor,vendor,byte,...
tlvtype,invoice_tlvs,node_id,30
tlvdata,invoice_tlvs,node_id,node_id,pubkey32,
tlvtype,invoice_tlvs,quantity,32
tlvdata,invoice_tlvs,quantity,quantity,tu64,
tlvtype,invoice_tlvs,refund_for,34
tlvdata,invoice_tlvs,refund_for,refunded_payment_hash,sha256,
tlvtype,invoice_tlvs,payer_key,38
tlvdata,invoice_tlvs,payer_key,key,pubkey32,
tlvtype,invoice_tlvs,timestamp,40
tlvdata,invoice_tlvs,timestamp,timestamp,tu32,
tlvtype,invoice_tlvs,payment_hash,42
tlvdata,invoice_tlvs,payment_hash,payment_hash,sha256,
tlvtype,invoice_tlvs,expiry,44
tlvdata,invoice_tlvs,expiry,expiry_seconds,tu32,
tlvtype,invoice_tlvs,cltv,46
tlvdata,invoice_tlvs,cltv,min_final_cltv_expiry,tu32,
tlvtype,invoice_tlvs,fallbacks,48
tlvdata,invoice_tlvs,fallbacks,num,u8,
tlvdata,invoice_tlvs,fallbacks,fallbacks,fallback_address,num
tlvtype,invoice_tlvs,refund_signature,52
tlvdata,invoice_tlvs,refund_signature,payer_signature,signature,
tlvtype,invoice_tlvs,signature,240
tlvdata,invoice_tlvs,signature,sig,signature,
subtype,blinded_payinfo
subtypedata,blinded_payinfo,fee_base_msat,u32,
subtypedata,blinded_payinfo,fee_proportional_millionths,u32,
subtypedata,blinded_payinfo,cltv_expiry_delta,u16,
subtypedata,blinded_payinfo,flen,u16,
subtypedata,blinded_payinfo,features,byte,flen
subtype,fallback_address
subtypedata,fallback_address,type,byte,
subtypedata,fallback_address,len,u16,
subtypedata,fallback_address,address,byte,len