core-lightning/doc/schemas/pay.request.json
Rusty Russell d7cc1e4a17 doc: Updated parameter descriptions for *.request.json
Added descriptions for rpc command parameters

This also performs the following fixes:
1. delforward parameters are compulsory (required).
2. disableinvoicerequest request added `added` field.
3. invoice request order fixed (label then description, not vice-versa!).
4. listpeers log levels are a proper enum
5. description parameter documented for sendonion requests.
6. deprecatred amount_msat removed from sendpay request.
7. sendpay request partid type fixed to u64 (was u16!)
8. sendpay request localinvreqid type tightened to hash (was hex)
9. sendpay request payment_metadata and description fields documented.
10. sendpsbt request reserve type fixed to u32 (was boolean)
11. utxopsbt request satoshi type fixed to msat_or_all (was msat)
12. withdraw request parameter satoshi is compulsory (required)
13. fundchannel_start request amount is sat, not msat_or_all.
14. openchannel_init request amount is sat, not msat
15. openchannel_init close_to is a string, not hex.
16: invoice labels can be strings OR numbers.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-03-19 14:58:59 +10:30

68 lines
3.3 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"required": [
"bolt11"
],
"properties": {
"bolt11": {
"type": "string",
"description": "bolt11 invoice, if **experimental-offers** is enabled, it can actually be a bolt12 invoice, such as one received from lightningd-fetchinvoice(7). If it does not contain an amount, *amount_msat* is required, otherwise if it is specified it must be *null*"
},
"amount_msat": {
"type": "msat",
"description": "*amount_msat* is in millisatoshi precision; it can be a whole number, or a whole number with suffix *msat* or *sat*, or a three decimal point number with suffix *sat*, or an 1 to 11 decimal point number suffixed by *btc*"
},
"label": {
"type": "string",
"description": "it is used to attach a label to payments, and is returned in lightning-listpays(7) and lightning-listsendpays(7)"
},
"riskfactor": {
"type": "number",
"description": "the *riskfactor* is described in detail in lightning-getroute(7), and defaults to 10"
},
"maxfeepercent": {
"type": "number",
"description": "percentage of the amount that is to be paid. Defaults to 0.5"
},
"retry_for": {
"type": "u16",
"description": "until *retry_for* seconds passes, the command will keep finding routes and retrying the payment. Defaults to 60 seconds"
},
"maxdelay": {
"type": "u16",
"description": "a payment may be delayed for up to `maxdelay` blocks by another node; clients should be prepared for this worst case"
},
"exemptfee": {
"type": "msat",
"description": "this option can be used for tiny payments which would be dominated by the fee leveraged by forwarding nodes. Setting `exemptfee` allows the `maxfeepercent` check to be skipped on fees that are smaller than `exemptfee`. Defaults to 5000 millisatoshi"
},
"localinvreqid": {
"type": "hex",
"description": "`localinvreqid` is used by offers to link a payment attempt to a local `invoice_request` offer created by lightningd-invoicerequest(7). This ensures that we only make a single payment for an offer, and that the offer is marked `used` once paid"
},
"exclude": {
"type": "array",
"description": "*exclude* is a JSON array of short-channel-id/direction (e.g. [ '564334x877x1/0', '564195x1292x0/1' ]) or pubkey which should be excluded from consideration for routing. The default is not to exclude any channels or nodes",
"items": {
"oneOf": [
{
"type": "short_channel_id_dir"
},
{
"type": "pubkey"
}
]
}
},
"maxfee": {
"type": "msat",
"description": "*maxfee* overrides both *maxfeepercent* and *exemptfee* defaults (and if you specify *maxfee* you cannot specify either of those), and creates an absolute limit on what fee we will pay. This allows you to implement your own heuristics rather than the primitive ones used here"
},
"description": {
"type": "string",
"description": "it is only required for bolt11 invoices which do not contain a description themselves, but contain a description hash: in this case *description* is required. *description* is then checked against the hash inside the invoice before it will be paid"
}
}
}