Commit 6f0dbbb
committed
bolt12: allow to inject payer_metadata
Payer metadata is a field that controls the payer ID
provided during the fetchinvoice process.
There are use cases where this is highly useful, such as
proving that the payer has paid for the correct item.
Imagine visiting a merchant's website to pay for multiple offers, where
one of these offers is a default offer (with no description and no set amount).
In this scenario, the merchant could claim not to have received
payment for a specific item. Since the same offer may be used to
fetch invoices for different products, there needs to be a way to
identify which product the invoice corresponds to.
With this commit, it will be possible to inject payer metadata,
which helps solve the issue described above.
For example, possible payer metadata could be `to_hex(b"{payer_node_id}.{product_id}.{created_at}")`.
Changelog-Added: JSON-RPC: `fetchinvoice` allows setting invreq_metadata via `payer_metadata` parameter.
Signed-off-by: Vincenzo Palazzo <[email protected]>1 parent d27aa98 commit 6f0dbbb
File tree
9 files changed
+569
-534
lines changed- cln-grpc
- proto
- src
- cln-rpc/src
- contrib
- msggen/msggen
- pyln-grpc-proto/pyln/grpc
- doc/schemas
- lightningd
- plugins
9 files changed
+569
-534
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1248 | 1248 | | |
1249 | 1249 | | |
1250 | 1250 | | |
| 1251 | + | |
1251 | 1252 | | |
1252 | 1253 | | |
1253 | 1254 | | |
| |||
5609 | 5610 | | |
5610 | 5611 | | |
5611 | 5612 | | |
| 5613 | + | |
| 5614 | + | |
| 5615 | + | |
| 5616 | + | |
5612 | 5617 | | |
5613 | 5618 | | |
5614 | 5619 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13425 | 13425 | | |
13426 | 13426 | | |
13427 | 13427 | | |
| 13428 | + | |
| 13429 | + | |
| 13430 | + | |
| 13431 | + | |
| 13432 | + | |
| 13433 | + | |
| 13434 | + | |
13428 | 13435 | | |
13429 | 13436 | | |
13430 | 13437 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
819 | 819 | | |
820 | 820 | | |
821 | 821 | | |
| 822 | + | |
822 | 823 | | |
823 | 824 | | |
824 | 825 | | |
| |||
835 | 836 | | |
836 | 837 | | |
837 | 838 | | |
| 839 | + | |
838 | 840 | | |
839 | 841 | | |
840 | 842 | | |
| |||
938 | 940 | | |
939 | 941 | | |
940 | 942 | | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
941 | 947 | | |
942 | 948 | | |
943 | 949 | | |
| |||
998 | 1004 | | |
999 | 1005 | | |
1000 | 1006 | | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
1008 | 1019 | | |
1009 | 1020 | | |
1010 | 1021 | | |
| |||
1044 | 1055 | | |
1045 | 1056 | | |
1046 | 1057 | | |
1047 | | - | |
1048 | 1058 | | |
1049 | 1059 | | |
1050 | 1060 | | |
| |||
0 commit comments