mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
d25a8ca0fd
If you miss a wait event, you can catch up by doing listinvoices and getting the max of these fields. It's also a good debugging clue. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
110 lines
2.7 KiB
JSON
110 lines
2.7 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"required": [
|
|
"label",
|
|
"description",
|
|
"payment_hash",
|
|
"status",
|
|
"created_index",
|
|
"expires_at"
|
|
],
|
|
"properties": {
|
|
"label": {
|
|
"type": "string",
|
|
"description": "unique label supplied at invoice creation"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"description": "description used in the invoice"
|
|
},
|
|
"payment_hash": {
|
|
"type": "hash",
|
|
"description": "the hash of the *payment_preimage* which will prove payment"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"unpaid",
|
|
"paid",
|
|
"expired"
|
|
],
|
|
"description": "Whether it's paid, unpaid or unpayable"
|
|
},
|
|
"expires_at": {
|
|
"type": "u64",
|
|
"description": "UNIX timestamp of when it will become / became unpayable"
|
|
},
|
|
"amount_msat": {
|
|
"type": "msat",
|
|
"description": "the amount required to pay this invoice"
|
|
},
|
|
"bolt12": {
|
|
"type": "string",
|
|
"description": "the BOLT12 string"
|
|
},
|
|
"created_index": {
|
|
"type": "u64",
|
|
"added": "v23.08",
|
|
"description": "1-based index indicating order this invoice was created in"
|
|
},
|
|
"updated_index": {
|
|
"type": "u64",
|
|
"added": "v23.08",
|
|
"description": "1-based index indicating order this invoice was changed (only present if it has changed since creation)"
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"paid"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"pay_index",
|
|
"amount_received_msat",
|
|
"paid_at",
|
|
"payment_preimage"
|
|
],
|
|
"properties": {
|
|
"label": {},
|
|
"description": {},
|
|
"payment_hash": {},
|
|
"status": {},
|
|
"msatoshi": {},
|
|
"amount_msat": {},
|
|
"bolt12": {},
|
|
"expires_at": {},
|
|
"created_index": {},
|
|
"updated_index": {},
|
|
"pay_index": {
|
|
"type": "u64",
|
|
"description": "Unique incrementing index for this payment"
|
|
},
|
|
"amount_received_msat": {
|
|
"type": "msat",
|
|
"description": "the amount actually received (could be slightly greater than *amount_msat*, since clients may overpay)"
|
|
},
|
|
"paid_at": {
|
|
"type": "u64",
|
|
"description": "UNIX timestamp of when it was paid"
|
|
},
|
|
"payment_preimage": {
|
|
"type": "secret",
|
|
"description": "proof of payment"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|