Skip to content

Commit 6311a54

Browse files
committed
doc: fix injectpaymentonion schema.
I used an unknown arg and it didn't complain. injectpaymentonion's schema predated the sweep which fixed up use of "additionalProperties". Indeed, we were missing some properties! Signed-off-by: Rusty Russell <[email protected]>
1 parent 597a414 commit 6311a54

File tree

8 files changed

+62
-37
lines changed

8 files changed

+62
-37
lines changed

.msggen.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1820,7 +1820,8 @@
18201820
"InjectpaymentonionResponse": {
18211821
"InjectPaymentOnion.completed_at": 2,
18221822
"InjectPaymentOnion.created_at": 1,
1823-
"InjectPaymentOnion.created_index": 3
1823+
"InjectPaymentOnion.created_index": 3,
1824+
"InjectPaymentOnion.payment_preimage": 4
18241825
},
18251826
"InvoiceRequest": {
18261827
"Invoice.amount_msat": 10,
@@ -7575,6 +7576,10 @@
75757576
"added": "v24.11",
75767577
"deprecated": null
75777578
},
7579+
"InjectPaymentOnion.payment_preimage": {
7580+
"added": "v24.11",
7581+
"deprecated": null
7582+
},
75787583
"Invoice": {
75797584
"added": "pre-v0.10.1",
75807585
"deprecated": null

cln-grpc/proto/node.proto

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cln-grpc/src/convert.rs

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cln-rpc/src/model.rs

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/msggen/msggen/schema.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16143,14 +16143,14 @@
1614316143
"lightning-injectpaymentonion.json": {
1614416144
"$schema": "../rpc-schema-draft.json",
1614516145
"type": "object",
16146-
"additionalProperties": false,
1614716146
"rpc": "injectpaymentonion",
1614816147
"title": "Send a payment with a custom onion packet",
1614916148
"description": [
1615016149
"The **injectpaymentonion** RPC command causes the node to receive a payment attempt similar to the way it would receive one from a peer. The onion packet is unwrapped, then handled normally: either as a local payment, or forwarded to the next peer.",
1615116150
"Compared to lightning-sendonion(7): the handling of blinded paths and self-payments is trivial, and the interface blocks until the payment succeeds or fails. The call also fails if this payment_hash has already been successfully paid."
1615216151
],
1615316152
"request": {
16153+
"additionalProperties": false,
1615416154
"required": [
1615516155
"onion",
1615616156
"payment_hash",
@@ -16217,6 +16217,7 @@
1621716217
}
1621816218
},
1621916219
"response": {
16220+
"additionalProperties": false,
1622016221
"required": [
1622116222
"created_index",
1622216223
"created_at",
@@ -16241,6 +16242,13 @@
1624116242
"description": [
1624216243
"1-based index indicating order this payment was created in."
1624316244
]
16245+
},
16246+
"payment_preimage": {
16247+
"added": "v24.11",
16248+
"type": "secret",
16249+
"description": [
16250+
"The proof of payment: SHA256 of this is the invoice's **payment_hash**."
16251+
]
1624416252
}
1624516253
}
1624616254
},

contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py

Lines changed: 34 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/pyln-testing/pyln/testing/grpc2py.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3218,6 +3218,7 @@ def injectpaymentonion2py(m):
32183218
"completed_at": m.completed_at, # PrimitiveField in generate_composite
32193219
"created_at": m.created_at, # PrimitiveField in generate_composite
32203220
"created_index": m.created_index, # PrimitiveField in generate_composite
3221+
"payment_preimage": hexlify(m.payment_preimage), # PrimitiveField in generate_composite
32213222
})
32223223

32233224

doc/schemas/lightning-injectpaymentonion.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"$schema": "../rpc-schema-draft.json",
33
"type": "object",
4-
"additionalProperties": false,
54
"rpc": "injectpaymentonion",
65
"title": "Send a payment with a custom onion packet",
76
"description": [
87
"The **injectpaymentonion** RPC command causes the node to receive a payment attempt similar to the way it would receive one from a peer. The onion packet is unwrapped, then handled normally: either as a local payment, or forwarded to the next peer.",
98
"Compared to lightning-sendonion(7): the handling of blinded paths and self-payments is trivial, and the interface blocks until the payment succeeds or fails. The call also fails if this payment_hash has already been successfully paid."
109
],
1110
"request": {
11+
"additionalProperties": false,
1212
"required": [
1313
"onion",
1414
"payment_hash",
@@ -75,6 +75,7 @@
7575
}
7676
},
7777
"response": {
78+
"additionalProperties": false,
7879
"required": [
7980
"created_index",
8081
"created_at",
@@ -99,6 +100,13 @@
99100
"description": [
100101
"1-based index indicating order this payment was created in."
101102
]
103+
},
104+
"payment_preimage": {
105+
"added": "v24.11",
106+
"type": "secret",
107+
"description": [
108+
"The proof of payment: SHA256 of this is the invoice's **payment_hash**."
109+
]
102110
}
103111
}
104112
},

0 commit comments

Comments
 (0)