Skip to content

Commit

Permalink
bolt12: use spec field names, update decode API.
Browse files Browse the repository at this point in the history
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell authored and cdecker committed Nov 9, 2022
1 parent fdb3d91 commit ef2f4a0
Show file tree
Hide file tree
Showing 18 changed files with 1,407 additions and 853 deletions.
3 changes: 3 additions & 0 deletions .msggen.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@
"CreateInvoice.bolt12": 3,
"CreateInvoice.description": 7,
"CreateInvoice.expires_at": 8,
"CreateInvoice.invreq_payer_note": 15,
"CreateInvoice.label": 1,
"CreateInvoice.local_offer_id": 13,
"CreateInvoice.paid_at": 11,
Expand Down Expand Up @@ -336,6 +337,7 @@
"DelInvoice.bolt12": 3,
"DelInvoice.description": 5,
"DelInvoice.expires_at": 8,
"DelInvoice.invreq_payer_note": 11,
"DelInvoice.label": 1,
"DelInvoice.local_offer_id": 9,
"DelInvoice.payer_note": 10,
Expand Down Expand Up @@ -630,6 +632,7 @@
"ListInvoices.invoices[].bolt12": 8,
"ListInvoices.invoices[].description": 2,
"ListInvoices.invoices[].expires_at": 5,
"ListInvoices.invoices[].invreq_payer_note": 15,
"ListInvoices.invoices[].label": 1,
"ListInvoices.invoices[].local_offer_id": 9,
"ListInvoices.invoices[].paid_at": 13,
Expand Down
6 changes: 3 additions & 3 deletions cln-grpc/proto/node.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions cln-grpc/src/convert.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions cln-rpc/src/model.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions contrib/pyln-testing/pyln/testing/grpc2py.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def createinvoice2py(m):
"paid_at": m.paid_at, # PrimitiveField in generate_composite
"payment_preimage": hexlify(m.payment_preimage), # PrimitiveField in generate_composite
"local_offer_id": hexlify(m.local_offer_id), # PrimitiveField in generate_composite
"payer_note": m.payer_note, # PrimitiveField in generate_composite
"invreq_payer_note": m.invreq_payer_note, # PrimitiveField in generate_composite
})


Expand Down Expand Up @@ -384,7 +384,7 @@ def delinvoice2py(m):
"status": str(m.status), # EnumField in generate_composite
"expires_at": m.expires_at, # PrimitiveField in generate_composite
"local_offer_id": hexlify(m.local_offer_id), # PrimitiveField in generate_composite
"payer_note": m.payer_note, # PrimitiveField in generate_composite
"invreq_payer_note": m.invreq_payer_note, # PrimitiveField in generate_composite
})


Expand Down Expand Up @@ -428,7 +428,7 @@ def listinvoices_invoices2py(m):
"bolt11": m.bolt11, # PrimitiveField in generate_composite
"bolt12": m.bolt12, # PrimitiveField in generate_composite
"local_offer_id": hexlify(m.local_offer_id), # PrimitiveField in generate_composite
"payer_note": m.payer_note, # PrimitiveField in generate_composite
"invreq_payer_note": m.invreq_payer_note, # PrimitiveField in generate_composite
"pay_index": m.pay_index, # PrimitiveField in generate_composite
"amount_received_msat": amount2msat(m.amount_received_msat), # PrimitiveField in generate_composite
"paid_at": m.paid_at, # PrimitiveField in generate_composite
Expand Down
468 changes: 234 additions & 234 deletions contrib/pyln-testing/pyln/testing/node_pb2.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/lightning-createinvoice.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ On success, an object is returned, containing:
- **paid\_at** (u64, optional): UNIX timestamp of when invoice was paid (**status** *paid* only)
- **payment\_preimage** (secret, optional): the proof of payment: SHA256 of this **payment_hash** (always 64 characters)
- **local\_offer\_id** (hex, optional): the *id* of our offer which created this invoice (**experimental-offers** only). (always 64 characters)
- **payer\_note** (string, optional): the optional *payer_note* from invoice_request which created this invoice (**experimental-offers** only).
- **invreq\_payer\_note** (string, optional): the optional *invreq_payer_note* from invoice_request which created this invoice (**experimental-offers** only).

[comment]: # (GENERATE-FROM-SCHEMA-END)

Expand Down Expand Up @@ -75,4 +75,4 @@ RESOURCES

Main web site: <https://github.com/ElementsProject/lightning>

[comment]: # ( SHA256STAMP:9fc2c7cb6e5980774a768dd9ddfe81e254c084554c159e6b07e92e703dc10595)
[comment]: # ( SHA256STAMP:3acf2924a8670605f70a7976cf4909b60addf4b1aeebc9b9a104151cffa2c984)
Loading

0 comments on commit ef2f4a0

Please sign in to comment.