forked from Groestlcoin/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lightning-decodepay.7.txt
60 lines (45 loc) · 1.99 KB
/
lightning-decodepay.7.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
LIGHTNING-DECODEPAY(7)
======================
:doctype: manpage
NAME
----
lightning-decodepay - Command for decoding a bolt11 string (low-level)
SYNOPSIS
--------
*decodepay* 'bolt11' ['description']
DESCRIPTION
-----------
The *decodepay* RPC command checks and parses a 'bolt11' string as specified
by the BOLT 11 specification.
RETURN VALUE
------------
On success, an object is returned with the following fields, as specified
by BOLT11:
- 'currency': the BIP173 name for the currency.
- 'timestamp': the UNIX-style timestamp of the invoice.
- 'expiry': the number of seconds this is valid after 'timestamp'.
- 'payee': the public key of the recipient.
- 'payment_hash': the payment hash of the request.
- 'signature': the DER-encoded signature.
- 'description': the description of the purpose of the purchase (see below)
The following fields are optional:
- 'msatoshi': the number of millisatoshi requested (if any).
- 'fallbacks': array of fallback address object containing a 'hex' string, and
both 'type' and 'addr' if it is recognized as one of 'P2PKH', 'P2SH', 'P2WPKH', or 'P2WSH'.
- 'routes': an array of routes. Each route is an arrays of objects, each containing 'pubkey', 'short_channel_id', 'fee_base_msat', 'fee_proportional_millionths' and 'cltv_expiry_delta'.
- 'extra': an array of objects representing unknown fields, each with one-character 'tag' and a 'data' bech32 string.
Technically, the 'description' field is optional if a
'description_hash' field is given, but in this case *decodepay* will
only succeed if the optional 'description' field is passed and matches
the 'description_hash'. In practice, these are currently unused.
//FIXME:Enumerate errors
AUTHOR
------
Rusty Russell <[email protected]> is mainly responsible.
SEE ALSO
--------
lightning-pay(7), lightning-getroute(7), lightning-sendpay(7).
https://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md[BOLT #11].
RESOURCES
---------
Main web site: https://github.com/ElementsProject/lightning