core-lightning/doc/schemas/listsendpays.schema.json
Rusty Russell 40fe893172 doc/schemas: fix old deprecations.
`"deprecated": true` is obsolete; we don't document them anyway.

Where it would have otherwise changed the GRPC wrappers, I actually put the
version number in.

We allow "listchannels" to have "satoshis" since we have some tests
that run in deprecated-api mode.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-01-30 15:15:41 -06:00

198 lines
5.6 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"required": [
"payments"
],
"properties": {
"payments": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true,
"required": [
"id",
"payment_hash",
"status",
"groupid",
"created_at",
"amount_sent_msat"
],
"properties": {
"id": {
"type": "u64",
"description": "unique ID for this payment attempt"
},
"groupid": {
"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"
},
"status": {
"type": "string",
"enum": [
"pending",
"failed",
"complete"
],
"description": "status of the payment"
},
"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"
},
"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 pay supplied one)"
},
"description": {
"type": "string",
"description": "the description matching the bolt11 description hash (if pay supplied one)"
},
"bolt12": {
"type": "string",
"description": "the bolt12 string (if supplied for pay: **experimental-offers** only)."
}
},
"allOf": [
{
"if": {
"properties": {
"status": {
"type": "string",
"enum": [
"complete"
]
}
}
},
"then": {
"additionalProperties": false,
"required": [
"payment_preimage"
],
"properties": {
"id": {},
"partid": {},
"groupid": {},
"payment_hash": {},
"status": {},
"msatoshi": {},
"amount_msat": {},
"destination": {},
"created_at": {},
"completed_at": {},
"msatoshi_sent": {},
"amount_sent_msat": {},
"label": {},
"bolt11": {},
"description": {},
"bolt12": {},
"payment_preimage": {
"type": "secret",
"description": "the proof of payment: SHA256 of this **payment_hash**"
}
}
}
},
{
"if": {
"properties": {
"status": {
"type": "string",
"enum": [
"failed"
]
}
}
},
"then": {
"additionalProperties": false,
"required": [],
"properties": {
"id": {},
"partid": {},
"groupid": {},
"payment_hash": {},
"status": {},
"msatoshi": {},
"amount_msat": {},
"destination": {},
"created_at": {},
"completed_at": {},
"msatoshi_sent": {},
"amount_sent_msat": {},
"label": {},
"bolt11": {},
"description": {},
"bolt12": {},
"erroronion": {
"type": "hex",
"description": "the onion message returned"
}
}
}
},
{
"if": {
"properties": {
"status": {
"type": "string",
"enum": [
"pending"
]
}
}
},
"then": {
"additionalProperties": false,
"required": [],
"properties": {
"id": {},
"partid": {},
"groupid": {},
"payment_hash": {},
"status": {},
"msatoshi": {},
"amount_msat": {},
"destination": {},
"created_at": {},
"msatoshi_sent": {},
"amount_sent_msat": {},
"label": {},
"bolt11": {},
"description": {},
"bolt12": {}
}
}
}
]
}
}
}
}