doc: fix listsendpays man page.

We actually had a partid allowed (in the oneOf clauses), but didn''t
document it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-01-30 16:39:03 +10:30
committed by Alex Myers
parent d6f46e2373
commit 83c690fe5f
7 changed files with 12 additions and 1 deletions

View File

@@ -819,6 +819,7 @@
"ListSendPays.payments[].groupid": 2,
"ListSendPays.payments[].id": 1,
"ListSendPays.payments[].label": 9,
"ListSendPays.payments[].partid": 15,
"ListSendPays.payments[].payment_hash": 3,
"ListSendPays.payments[].payment_preimage": 12,
"ListSendPays.payments[].status": 4

View File

@@ -719,6 +719,7 @@ message ListsendpaysPayments {
}
uint64 id = 1;
uint64 groupid = 2;
optional uint64 partid = 15;
bytes payment_hash = 3;
ListsendpaysPaymentsStatus status = 4;
optional Amount amount_msat = 5;

View File

@@ -574,6 +574,7 @@ impl From<responses::ListsendpaysPayments> for pb::ListsendpaysPayments {
Self {
id: c.id, // Rule #2 for type u64
groupid: c.groupid, // Rule #2 for type u64
partid: c.partid, // Rule #2 for type u64?
payment_hash: c.payment_hash.to_vec(), // Rule #2 for type hash
status: c.status as i32,
amount_msat: c.amount_msat.map(|f| f.into()), // Rule #2 for type msat?

2
cln-rpc/src/model.rs generated
View File

@@ -2473,6 +2473,8 @@ pub mod responses {
pub struct ListsendpaysPayments {
pub id: u64,
pub groupid: u64,
#[serde(skip_serializing_if = "Option::is_none")]
pub partid: Option<u64>,
pub payment_hash: Sha256,
// Path `ListSendPays.payments[].status`
pub status: ListsendpaysPaymentsStatus,

View File

@@ -465,6 +465,7 @@ def listsendpays_payments2py(m):
return remove_default({
"id": m.id, # PrimitiveField in generate_composite
"groupid": m.groupid, # PrimitiveField in generate_composite
"partid": m.partid, # PrimitiveField in generate_composite
"payment_hash": hexlify(m.payment_hash), # PrimitiveField in generate_composite
"status": str(m.status), # EnumField in generate_composite
"amount_msat": amount2msat(m.amount_msat), # PrimitiveField in generate_composite

View File

@@ -31,6 +31,7 @@ On success, an object containing **payments** is returned. It is an array of ob
- **status** (string): status of the payment (one of "pending", "failed", "complete")
- **created\_at** (u64): the UNIX timestamp showing when this payment was initiated
- **amount\_sent\_msat** (msat): The amount sent
- **partid** (u64, optional): Part number (for multiple parts to a single payment)
- **amount\_msat** (msat, optional): The amount delivered to destination (if known)
- **destination** (pubkey, optional): the final destination of the payment if known
- **label** (string, optional): the label, if given to sendpay
@@ -64,4 +65,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:c7a067147e3275afa7f0cad68a6e1d9c0a10fad038a7b95b9c173edf523aee23)
[comment]: # ( SHA256STAMP:a6dcb3708d706650f74fcdd4d05614a813ac5a69c13c4c579d45c01b106545e2)

View File

@@ -28,6 +28,10 @@
"type": "u64",
"description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash"
},
"partid": {
"type": "u64",
"description": "Part number (for multiple parts to a single payment)"
},
"payment_hash": {
"type": "hash",
"description": "the hash of the *payment_preimage* which will prove payment",