mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
149 lines
3.4 KiB
JSON
149 lines
3.4 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"required": [
|
|
"id",
|
|
"payment_hash",
|
|
"status",
|
|
"created_at",
|
|
"amount_sent_msat"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "u64",
|
|
"description": "unique ID for this payment attempt"
|
|
},
|
|
"payment_hash": {
|
|
"type": "hash",
|
|
"description": "the hash of the *payment_preimage* which will prove payment",
|
|
"maxLength": 64,
|
|
"minLength": 64
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"complete"
|
|
],
|
|
"description": "status of the payment (could be complete if already sent previously)"
|
|
},
|
|
"msatoshi": {
|
|
"deprecated": true
|
|
},
|
|
"amount_msat": {
|
|
"type": "msat",
|
|
"description": "The amount delivered to destination (if known)"
|
|
},
|
|
"destination": {
|
|
"type": "pubkey",
|
|
"description": "the final destination of the payment if known"
|
|
},
|
|
"created_at": {
|
|
"type": "u64",
|
|
"description": "the UNIX timestamp showing when this payment was initiated"
|
|
},
|
|
"msatoshi_sent": {
|
|
"deprecated": true
|
|
},
|
|
"amount_sent_msat": {
|
|
"type": "msat",
|
|
"description": "The amount sent"
|
|
},
|
|
"label": {
|
|
"type": "string",
|
|
"description": "the label, if given to sendpay"
|
|
},
|
|
"bolt11": {
|
|
"type": "string",
|
|
"description": "the bolt11 string (if supplied)"
|
|
},
|
|
"bolt12": {
|
|
"type": "string",
|
|
"description": "the bolt12 string (if supplied: **experimental-offers** only)."
|
|
},
|
|
"partid": {
|
|
"type": "u64",
|
|
"description": "the partid (if supplied) to sendonion/sendpay"
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"complete"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"payment_preimage"
|
|
],
|
|
"properties": {
|
|
"id": {},
|
|
"payment_hash": {},
|
|
"status": {},
|
|
"msatoshi": {},
|
|
"amount_msat": {},
|
|
"destination": {},
|
|
"created_at": {},
|
|
"groupid": {},
|
|
"msatoshi_sent": {},
|
|
"amount_sent_msat": {},
|
|
"label": {},
|
|
"bolt11": {},
|
|
"bolt12": {},
|
|
"partid": {},
|
|
"payment_preimage": {
|
|
"type": "secret",
|
|
"description": "the proof of payment: SHA256 of this **payment_hash**",
|
|
"maxLength": 64,
|
|
"minLength": 64
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"additionalProperties": false,
|
|
"required": [],
|
|
"properties": {
|
|
"id": {},
|
|
"payment_hash": {},
|
|
"status": {},
|
|
"msatoshi": {},
|
|
"amount_msat": {},
|
|
"destination": {},
|
|
"created_at": {},
|
|
"groupid": {},
|
|
"msatoshi_sent": {},
|
|
"amount_sent_msat": {},
|
|
"label": {},
|
|
"bolt11": {},
|
|
"bolt12": {},
|
|
"partid": {},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "Monitor status with listpays or waitsendpay"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|