-
Notifications
You must be signed in to change notification settings - Fork 895
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lightningd: Add
signinvoice
to sign a BOLT11 invoice.
Though there's already a `createinvoice` command, there are usecases where a user may want to sign an invoice that they don't yet have the preimage to. For example, they may have an htlc_accepted plugin that pays to obtain the preimage from someone else and returns a `{ "result": "resolve", ... }`. This RPC command addresses this usecase without overly complicating the semantics of the existing `createinvoice` command. Changlog-Added: JSON-RPC: `signinvoice` new command to sign BOLT11 invoices.
- Loading branch information
1 parent
4998e70
commit e15aec5
Showing
5 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
lightning-signinvoice -- Low-level invoice signing | ||
===================================================== | ||
|
||
SYNOPSIS | ||
-------- | ||
|
||
**signinvoice** *invstring* | ||
|
||
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. | ||
|
||
The *invstring* parameter is of bolt11 form, but the final signature | ||
is ignored. Minimal sanity checks are done. | ||
|
||
RETURN VALUE | ||
------------ | ||
|
||
[comment]: # (GENERATE-FROM-SCHEMA-START) | ||
[comment]: # (GENERATE-FROM-SCHEMA-END) | ||
|
||
On failure, an error is returned. | ||
|
||
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> | ||
|
||
[comment]: # ( SHA256STAMP:9fc2c7cb6e5980774a768dd9ddfe81e254c084554c159e6b07e92e703dc10595) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"invstring" | ||
], | ||
"properties": { | ||
"invstring": { | ||
"type": "string", | ||
"description": "" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"bolt11" | ||
], | ||
"properties": { | ||
"bolt11": { | ||
"type": "string", | ||
"description": "the bolt11 string" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters