mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
b327bd30c3
Without this, we have hardly any enforcement. This is why the schema mistake fixed in the previous patches weren't spotted immediately. The hard work was done by: ``` $ for f in lightning-*.json; do grep -v '^ "additionalProperties": false,' $f | bagto $f; done $ for f in lightning-*.json; do sed 's/"properties": {/"additionalProperties": false, "properties": {/' $f | bagto $f; done $ make fmt-schemas ``` Then checking where 'additionalProperties: true' had been turned to false (we deliberately use it in some places where there are if statements in the schema, or occasionally where there can be arbitrary fields). [Including doc/rpc-schema-draft.json update by Shahana] Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
85 lines
3.3 KiB
JSON
85 lines
3.3 KiB
JSON
{
|
|
"$schema": "../rpc-schema-draft.json",
|
|
"type": "object",
|
|
"added": "v23.02",
|
|
"rpc": "signinvoice",
|
|
"title": "Low-level invoice signing",
|
|
"description": [
|
|
"The **signinvoice** RPC command signs an invoice. Unlike **createinvoice** it does not save the invoice into the database and thus does not require the preimage."
|
|
],
|
|
"request": {
|
|
"required": [
|
|
"invstring"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"invstring": {
|
|
"type": "string",
|
|
"description": [
|
|
"Bolt11 form, but the final signature is ignored. Minimal sanity checks are done."
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"response": {
|
|
"required": [
|
|
"bolt11"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"bolt11": {
|
|
"type": "string",
|
|
"description": [
|
|
"The bolt11 string."
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"errors": [
|
|
"The following error codes may occur:",
|
|
"",
|
|
"- -1: Catchall nonspecific error."
|
|
],
|
|
"author": [
|
|
"Carl Dong <<contact@carldong.me>> is mainly responsible."
|
|
],
|
|
"see_also": [
|
|
"lightning-createinvoice(7)",
|
|
"lightning-invoice(7)",
|
|
"lightning-listinvoices(7)",
|
|
"lightning-delinvoice(7)",
|
|
"lightning-getroute(7)",
|
|
"lightning-sendpay(7)",
|
|
"lightning-offer(7)"
|
|
],
|
|
"resources": [
|
|
"Main web site: <https://github.com/ElementsProject/lightning>"
|
|
],
|
|
"examples": [
|
|
{
|
|
"request": {
|
|
"id": "example:signinvoice#1",
|
|
"method": "signinvoice",
|
|
"params": {
|
|
"invstring": "lnbcrt10n1pn2s38psp5qnpucxgdnkrqur47x6vtxdk7xpzy3lf47kjqehm6wnuadj9rt86qpp5qg2ltzlhu2yn08f99t9zz6fjzhfmajg8h4eum43zg3gr0gdeamcsdqlv3jhxcmjd9c8g6t0dcsxjmnktakrzvsxqyjw5qcqp9rzjqgkjyd3q5dv6gllh77kygly9c3kfy0d9xwyjyxsq2nq3c83u5vw4jqqqd5qqqqgqqyqqqqqpqqqqqzsqqc9qxpqysgqg2kj0ma6weclle29pwpsdvnwa4r4yhw38wvly80mtysjf463r5y428k23dkp8ty0fugtzyjpcjsy0w7hhfmyzkwrlve93cr8jnm5sdgqzv7m0x"
|
|
}
|
|
},
|
|
"response": {
|
|
"bolt11": "lnbcrt10n1pn2s38psp5qnpucxgdnkrqur47x6vtxdk7xpzy3lf47kjqehm6wnuadj9rt86qpp5qg2ltzlhu2yn08f99t9zz6fjzhfmajg8h4eum43zg3gr0gdeamcsdqlv3jhxcmjd9c8g6t0dcsxjmnktakrzvsxqyjw5qcqp9rzjqgkjyd3q5dv6gllh77kygly9c3kfy0d9xwyjyxsq2nq3c83u5vw4jqqqd5qqqqgqqyqqqqqpqqqqqzsqqc9qxpqysgqq757xfxhd6hpctdfsq6vr2pltjvdv06t0z200hk0qslcydpf0pthmnzhu404w4qv89d25zv3smtsnyvqsaw6tf6tcl0lles6n29qh9gpyd3ml0"
|
|
}
|
|
},
|
|
{
|
|
"request": {
|
|
"id": "example:signinvoice#2",
|
|
"method": "signinvoice",
|
|
"params": [
|
|
"lnbcrt1250n1pn2s38psp5u22hlvy5mk7keq57m4fatz7aqnmh4whcuk45npdexrw4m5athcvqpp5ps4h5lt8waz5pprvad3skzssnksl2wxng985rcsuedp8teh29rkqdqlv3jhxcmjd9c8g6t0dcsxjmnktakrydscqp9rzjqdwjkyvjm7apxnssu4qgwhfkd67ghs6n6k48v6uqczgt88p6tky96qqq0vqqqqgqqyqqqqqpqqqqqzsqqc9qxpqysgqyljtru0gcvqh7k5l9u8ulcuxw8fwa9qycyd32hl7wwdpjtlefgrpyjch6aprcdah2pthx3pku3y7c6dzluzjjy9c32cs3m5hqq6ww3sp0j4tr8"
|
|
]
|
|
},
|
|
"response": {
|
|
"bolt11": "lnbcrt1250n1pn2s38psp5u22hlvy5mk7keq57m4fatz7aqnmh4whcuk45npdexrw4m5athcvqpp5ps4h5lt8waz5pprvad3skzssnksl2wxng985rcsuedp8teh29rkqdqlv3jhxcmjd9c8g6t0dcsxjmnktakrydscqp9rzjqdwjkyvjm7apxnssu4qgwhfkd67ghs6n6k48v6uqczgt88p6tky96qqq0vqqqqgqqyqqqqqpqqqqqzsqqc9qxpqysgq303kchnu5dvmrjam0m2yapk4d8vyx2uud3z0cpwsxern0d6f5sxqcg4rf05qczp5ncrpq4e6fsth28fxegv5gx9y7kt9f6tfhgw9dfqqckwpfv"
|
|
}
|
|
}
|
|
]
|
|
}
|