73 lines
2.1 KiB
JSON
73 lines
2.1 KiB
JSON
|
{
|
||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||
|
"type": "object",
|
||
|
"additionalProperties": false,
|
||
|
"properties": {
|
||
|
"pays": {
|
||
|
"type": "array",
|
||
|
"items": {
|
||
|
"type": "object",
|
||
|
"additionalProperties": false,
|
||
|
"properties": {
|
||
|
"payment_hash": {
|
||
|
"type": "hex",
|
||
|
"description": "the hash of the *payment_preimage* which will prove payment",
|
||
|
"maxLength": 64,
|
||
|
"minLength": 64
|
||
|
},
|
||
|
"status": {
|
||
|
"type": "string",
|
||
|
"enum": [ "pending", "failed", "complete" ],
|
||
|
"description": "status of the payment"
|
||
|
},
|
||
|
"destination": {
|
||
|
"type": "pubkey",
|
||
|
"description": "the final destination of the payment if known"
|
||
|
},
|
||
|
"amount_msat": {
|
||
|
"type": "msat",
|
||
|
"description": "the amount the destination received, if known (**status** *complete* or *pending*)"
|
||
|
},
|
||
|
"amount_sent_msat": {
|
||
|
"type": "msat",
|
||
|
"description": "the amount we actually sent, including fees (**status** *complete* or *pending*)"
|
||
|
},
|
||
|
"created_at": {
|
||
|
"type": "u64",
|
||
|
"description": "the UNIX timestamp showing when this payment was initiated"
|
||
|
},
|
||
|
"preimage": {
|
||
|
"type": "hex",
|
||
|
"description": "proof of payment, only if (and always if) **status** is *complete*",
|
||
|
"FIXME": "we should enforce the status/payment_preimage relation in the schema!",
|
||
|
"maxLength": 64,
|
||
|
"minLength": 64
|
||
|
},
|
||
|
"label": {
|
||
|
"type": "string",
|
||
|
"description": "the label, if given to sendpay"
|
||
|
},
|
||
|
"bolt11": {
|
||
|
"type": "string",
|
||
|
"description": "the bolt11 string (if pay supplied one)"
|
||
|
},
|
||
|
"bolt12": {
|
||
|
"type": "string",
|
||
|
"description": "the bolt12 string (if supplied for pay: **experimental-offers** only)."
|
||
|
},
|
||
|
"erroronion": {
|
||
|
"type": "hex",
|
||
|
"description": "the error onion returned on failure, if any."
|
||
|
},
|
||
|
"number_of_parts": {
|
||
|
"type": "u64",
|
||
|
"description": "the number of parts for a successful payment (only if more than one, and **status** is *complete*)."
|
||
|
}
|
||
|
},
|
||
|
"required": [ "payment_hash", "status", "created_at" ]
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"required": [ "pays" ]
|
||
|
}
|