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

@@ -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