mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
68 lines
2.6 KiB
JSON
68 lines
2.6 KiB
JSON
{
|
|
"$schema": "../rpc-schema-draft.json",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"added": "v23.02",
|
|
"rpc": "preapproveinvoice",
|
|
"title": "Ask the HSM to preapprove an invoice (low-level)",
|
|
"description": [
|
|
"The **preapproveinvoice** RPC command submits the *bolt11* invoice to the HSM to check that it is approved for payment.",
|
|
"",
|
|
"Generally the **preapproveinvoice** request does not need to be made explicitly, it is automatically generated as part of a **pay** request.",
|
|
"",
|
|
"By default, the HSM will approve all **preapproveinvoice** requests.",
|
|
"",
|
|
"If a remote signer is being used it might decline an **preapproveinvoice** request because it would exceed velocity controls, is not covered by allowlist controls, was declined manually, or other reasons.",
|
|
"",
|
|
"If a remote signer declines a **preapproveinvoice** request a subsequent attempt to pay the invoice anyway will fail; the signer will refuse to sign the commitment."
|
|
],
|
|
"request": {
|
|
"required": [
|
|
"bolt11"
|
|
],
|
|
"properties": {
|
|
"bolt11": {
|
|
"type": "string",
|
|
"description": [
|
|
"Bolt11 invoice to submit to the HSM to check."
|
|
],
|
|
"added": "v23.02"
|
|
}
|
|
}
|
|
},
|
|
"response": {
|
|
"properties": {}
|
|
},
|
|
"author": [
|
|
"Ken Sedgwick <<ken@bonsai.com>> is mainly responsible."
|
|
],
|
|
"see_also": [
|
|
"lightning-pay(7)"
|
|
],
|
|
"resources": [
|
|
"Main web site: <https://github.com/ElementsProject/lightning>"
|
|
],
|
|
"examples": [
|
|
{
|
|
"request": {
|
|
"id": "example:preapproveinvoice#1",
|
|
"method": "preapproveinvoice",
|
|
"params": {
|
|
"bolt11": "lnbcrt1230n1pn2s38psp5jf2zk7py4wmutyq4pdr6783egft24nkyhfrxegrzzqnef2matw2qpp5rf5zgqyexdt7q5ean83cvcjuc3jafn8etm3c0za6xldwcyllvffqdqlv3jhxcmjd9c8g6t0dcsxjmnktakrydqcqp9rzjqdwjkyvjm7apxnssu4qgwhfkd67ghs6n6k48v6uqczgt88p6tky96qqq0vqqqqgqqyqqqqqpqqqqqzsqqc9qxpqysgq8nn5qkcp9xl5u7dlqamdys6e6yc0ngyqe676cqajnwax6657verj7at5gvdqu6nk3l0wcagq4muyhqqms4t0t9sfvyazpga5eywj6uqpyc409e"
|
|
}
|
|
},
|
|
"response": {}
|
|
},
|
|
{
|
|
"request": {
|
|
"id": "example:preapproveinvoice#2",
|
|
"method": "preapproveinvoice",
|
|
"params": [
|
|
"lnbcrt1240n1pn2s38psp5ufjqj6kuxlvl65xue9p06ulyvwf9sm0utxlch59d0ynl05778vwspp5qlacxkrdmc2p50yl8lsl75pwmlhve2ret2yd2f34z7jfs7yffwvqdqlv3jhxcmjd9c8g6t0dcsxjmnktakrydgcqp9rzjqdwjkyvjm7apxnssu4qgwhfkd67ghs6n6k48v6uqczgt88p6tky96qqq0vqqqqgqqyqqqqqpqqqqqzsqqc9qxpqysgqkml60qaytvnd08p57w7enuna95s7cqej8cfuvsgjzpeq9u83s0hqh60667nrp40qkqxkdu36z8wqtmac5z3208rwyn0q2pv56sgz5dcp9mn5hc"
|
|
]
|
|
},
|
|
"response": {}
|
|
}
|
|
]
|
|
}
|