wallet: Load and value completed_at timestamp from DB

This commit is contained in:
Christian Decker
2022-06-09 18:36:00 +02:00
parent daeec66bd7
commit cb3ee0ac2e
20 changed files with 343 additions and 325 deletions

View File

@@ -46,6 +46,7 @@ On success, an object containing **payments** is returned. It is an array of ob
- **partid** (u64, optional): unique ID within this (multi-part) payment
- **destination** (pubkey, optional): the final destination of the payment if known
- **amount\_msat** (msat, optional): the amount the destination received, if known
- **completed\_at** (u64, optional): the UNIX timestamp showing when this payment was completed
- **groupid** (u64, optional): Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash
- **payment\_preimage** (hex, optional): proof of payment (always 64 characters)
- **label** (string, optional): the label, if given to sendpay
@@ -102,4 +103,4 @@ RESOURCES
---------
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:08dbf42e6d4bd63f9b6e7a45112b348c84d6192d3ff3087e5e02b4a4788e5605)
[comment]: # ( SHA256STAMP:1ce2241eeae759ed5566342fb7810e62fa2c618f2465314f17376ebe9b6d24f8)

View File

@@ -23,16 +23,12 @@ On success, an object containing **pays** is returned. It is an array of object
- **status** (string): status of the payment (one of "pending", "failed", "complete")
- **created\_at** (u64): the UNIX timestamp showing when this payment was initiated
- **destination** (pubkey, optional): the final destination of the payment if known
- **completed\_at** (u64, optional): the UNIX timestamp showing when this payment was completed
- **label** (string, optional): the label, if given to sendpay
- **bolt11** (string, optional): the bolt11 string (if pay supplied one)
- **description** (string, optional): the description matching the bolt11 description hash (if pay supplied one)
- **bolt12** (string, optional): the bolt12 string (if supplied for pay: **experimental-offers** only).
If **status** is "pending" or "complete":
- **amount\_sent\_msat** (msat): the amount we actually sent, including fees
- **amount\_msat** (msat, optional): the amount the destination received, if known
If **status** is "complete":
- **preimage** (hex): proof of payment (always 64 characters)
@@ -61,4 +57,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:64fd1d2a8673b2a4189623aa42d44384061ff66ba7c8918af40baf92ac29a889)
[comment]: # ( SHA256STAMP:1175415c0f9398e1087d68dd75266bf894249053a4e57f16b8ee16cf5ffa414f)

View File

@@ -64,4 +64,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:2cd3f5a0d494ea4aaef6eb5ea9ff467da14198c0fa4d9fee6b45e72568a2d481)
[comment]: # ( SHA256STAMP:68af9f1edf2ddc78a7daad1bb72aa773b82c5103b0ba706ef83de36a11cabe26)

View File

@@ -76,6 +76,7 @@ On success, an object is returned, containing:
- **groupid** (u64, optional): Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash
- **amount\_msat** (msat, optional): The amount delivered to destination (if known)
- **destination** (pubkey, optional): the final destination of the payment if known
- **completed\_at** (u64, optional): the UNIX timestamp showing when this payment was completed
- **label** (string, optional): the *label*, if given to sendpay
- **partid** (u64, optional): the *partid*, if given to sendpay
- **bolt11** (string, optional): the bolt11 string (if supplied)
@@ -142,4 +143,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:4878733d02711f919c49740652a3723fbcc78a0cd865b71385db965c878d2b77)
[comment]: # ( SHA256STAMP:c129f537b1af8a5dc767a25a72be419634cb21ebc26a9e6b9bb091db8db7e6ca)

View File

@@ -43,6 +43,7 @@ On success, an object is returned, containing:
- **groupid** (u64, optional): Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash
- **amount\_msat** (msat, optional): The amount delivered to destination (if known)
- **destination** (pubkey, optional): the final destination of the payment if known
- **completed\_at** (number, optional): the UNIX timestamp showing when this payment was completed
- **label** (string, optional): the label, if given to sendpay
- **partid** (u64, optional): the *partid*, if given to sendpay
- **bolt11** (string, optional): the bolt11 string (if pay supplied one)
@@ -103,4 +104,4 @@ RESOURCES
Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:b87ddb42fd2b1182ef11101f0298be2e4de9b942fd3b8b4b169d1bdc849f48a8)
[comment]: # ( SHA256STAMP:f4dbe3ecc88a294f7bb983a2f2b8e9613e440e4564580e51dd30fc83ba218a91)

View File

@@ -64,6 +64,10 @@
"type": "u64",
"description": "the UNIX timestamp showing when this payment was initiated"
},
"completed_at": {
"type": "u64",
"description": "the UNIX timestamp showing when this payment was completed"
},
"groupid": {
"type": "u64",
"description": "Grouping key to disambiguate multiple attempts to pay an invoice or the same payment_hash"

View File

@@ -40,6 +40,10 @@
"type": "u64",
"description": "the UNIX timestamp showing when this payment was initiated"
},
"completed_at": {
"type": "u64",
"description": "the UNIX timestamp showing when this payment was completed"
},
"label": {
"type": "string",
"description": "the label, if given to sendpay"
@@ -58,45 +62,6 @@
}
},
"allOf": [
{
"if": {
"properties": {
"status": {
"type": "string",
"enum": [
"pending",
"complete"
]
}
}
},
"then": {
"additionalProperties": false,
"required": [
"amount_sent_msat"
],
"properties": {
"payment_hash": {},
"status": {},
"destination": {},
"created_at": {},
"label": {},
"bolt11": {},
"description": {},
"bolt12": {},
"preimage": {},
"number_of_parts": {},
"amount_msat": {
"type": "msat",
"description": "the amount the destination received, if known"
},
"amount_sent_msat": {
"type": "msat",
"description": "the amount we actually sent, including fees"
}
}
}
},
{
"if": {
"properties": {
@@ -111,6 +76,7 @@
"then": {
"additionalProperties": false,
"required": [
"amount_sent_msat",
"preimage"
],
"properties": {
@@ -118,6 +84,7 @@
"status": {},
"destination": {},
"created_at": {},
"completed_at": {},
"label": {},
"bolt11": {},
"description": {},
@@ -150,7 +117,9 @@
},
"then": {
"additionalProperties": false,
"required": [],
"required": [
"amount_sent_msat"
],
"properties": {
"payment_hash": {},
"status": {},

View File

@@ -108,6 +108,7 @@
"amount_msat": {},
"destination": {},
"created_at": {},
"completed_at": {},
"msatoshi_sent": {},
"amount_sent_msat": {},
"label": {},
@@ -147,6 +148,7 @@
"amount_msat": {},
"destination": {},
"created_at": {},
"completed_at": {},
"msatoshi_sent": {},
"amount_sent_msat": {},
"label": {},

View File

@@ -47,6 +47,10 @@
"type": "u64",
"description": "the UNIX timestamp showing when this payment was initiated"
},
"completed_at": {
"type": "u64",
"description": "the UNIX timestamp showing when this payment was completed"
},
"msatoshi_sent": {
"deprecated": true
},
@@ -97,6 +101,7 @@
"amount_msat": {},
"destination": {},
"created_at": {},
"completed_at": {},
"msatoshi_sent": {},
"amount_sent_msat": {},
"label": {},
@@ -137,6 +142,7 @@
"amount_msat": {},
"destination": {},
"created_at": {},
"completed_at": {},
"msatoshi_sent": {},
"amount_sent_msat": {},
"label": {},

View File

@@ -46,6 +46,10 @@
"type": "u64",
"description": "the UNIX timestamp showing when this payment was initiated"
},
"completed_at": {
"type": "number",
"description": "the UNIX timestamp showing when this payment was completed"
},
"msatoshi_sent": {
"deprecated": true
},
@@ -96,6 +100,7 @@
"amount_msat": {},
"destination": {},
"created_at": {},
"completed_at": {},
"msatoshi_sent": {},
"amount_sent_msat": {},
"label": {},