Skip to content

Commit 74eeaa8

Browse files
committed
doc/schemas: getsharedsecret, help, invoice, listchannels, listforwards
And a new "u8" type. Signed-off-by: Rusty Russell <[email protected]>
1 parent a9f49b5 commit 74eeaa8

16 files changed

+532
-185
lines changed

contrib/pyln-testing/pyln/testing/fixtures.py

+7
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,12 @@ def is_u16(checker, instance):
232232
return False
233233
return instance >= 0 and instance < 2**16
234234

235+
def is_u8(checker, instance):
236+
"""8-bit integer"""
237+
if not checker.is_type(instance, "integer"):
238+
return False
239+
return instance >= 0 and instance < 2**8
240+
235241
def is_short_channel_id(checker, instance):
236242
"""Short channel id"""
237243
if not checker.is_type(instance, "string"):
@@ -307,6 +313,7 @@ def is_txid(checker, instance):
307313
"u64": is_u64,
308314
"u32": is_u32,
309315
"u16": is_u16,
316+
"u8": is_u8,
310317
"pubkey": is_pubkey,
311318
"msat": is_msat,
312319
"txid": is_txid,

doc/lightning-getsharedsecret.7

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/lightning-getsharedsecret.7.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ key DER-encoding of the SECP256K1 point.
1717
RETURN VALUE
1818
------------
1919

20-
On success, **getsharedsecret** returns a field *shared\_secret*,
21-
which is a hexadecimal string of the 256-bit SHA-2 of the
22-
compressed public key DER-encoding of the SECP256K1 point
23-
that is the shared secret generated using the
24-
Elliptic Curve Diffie-Hellman algorithm.
25-
This field is 32 bytes (64 hexadecimal characters in a string).
20+
[comment]: # (GENERATE-FROM-SCHEMA-START)
21+
On success, an object is returned, containing:
22+
- **shared_secret** (hex): the SHA-2 of the compressed encoding of the shared secp256k1 point (always 64 characters)
23+
[comment]: # (GENERATE-FROM-SCHEMA-END)
2624

2725
This command may fail if communications with the HSM has a
2826
problem;
@@ -92,3 +90,4 @@ RESOURCES
9290
* Main web site: <https://github.com/ElementsProject/lightning>
9391

9492

93+
[comment]: # ( SHA256STAMP:23508d8a2af693bf5a6b4de2a3d2c4527b3fb8502fb775f06cfe84bf3a5aedbe)

doc/lightning-help.7

+12-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/lightning-help.7.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ EXAMPLE JSON REQUEST
2828
RETURN VALUE
2929
------------
3030

31-
On success, a object will be return with the following proprieties:
32-
33-
- *command*: A string that represents the stucture of the command.
34-
- *category*: A string that represents the category.
35-
- *description*: A string that represents the description.
36-
- *verbose*: A string that represents the verbode description.
31+
[comment]: # (GENERATE-FROM-SCHEMA-START)
32+
On success, an object is returned, containing:
33+
- **help** (array of objects):
34+
- **command** (string): the command
35+
- **category** (string): the category for this command (useful for grouping)
36+
- **description** (string): a one-line description of the purpose of this command
37+
- **verbose** (string): a full description of this command (including whether it's deprecated)
38+
[comment]: # (GENERATE-FROM-SCHEMA-END)
3739

3840
On failure, one of the following error codes may be returned:
3941

@@ -64,3 +66,4 @@ RESOURCES
6466
---------
6567

6668
Main web site: <https://github.com/ElementsProject/lightning>
69+
[comment]: # ( SHA256STAMP:29119344d1800c7020c96a10ed94bfbf3c57491cc30e9b1f847facbdf0249aba)

doc/lightning-invoice.7

+29-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/lightning-invoice.7.md

+16-14
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,23 @@ Otherwise, it's set to the parameter **cltv-final**.
7171
RETURN VALUE
7272
------------
7373

74-
On success, a hash is returned as *payment\_hash* to be given to the
75-
payer, and the *expiry\_time* as a UNIX timestamp. It also returns a
76-
BOLT11 invoice as *bolt11* to be given to the payer.
74+
[comment]: # (GENERATE-FROM-SCHEMA-START)
75+
On success, an object is returned, containing:
76+
- **bolt11** (string): the bolt11 string
77+
- **payment_hash** (hex): the hash of the *payment_preimage* which will prove payment (always 64 characters)
78+
- **expires_at** (u64): UNIX timestamp of when invoice expires
79+
80+
The following warnings may also be returned:
81+
- **warning_capacity**: even using all possible channels, there's not enough incoming capacity to pay this invoice.
82+
- **warning_offline**: there would be enough incoming capacity, but some channels are offline, so there isn't.
83+
- **warning_deadends**: there would be enough incoming capacity, but some channels are dead-ends (no other public channels from those peers), so there isn't.
84+
- **warning_private_unused**: there would be enough incoming capacity, but some channels are unannounced and *exposeprivatechannels* is *false*, so there isn't.
85+
- **warning_mpp**: there is sufficient capacity, but not in a single channel, so the payer will have to use multi-part payments.
86+
[comment]: # (GENERATE-FROM-SCHEMA-END)
7787

7888
On failure, an error is returned and no invoice is created. If the
7989
lightning process fails before responding, the caller should use
80-
lightning-listinvoice(7) to query whether this invoice was created or
90+
lightning-listinvoices(7) to query whether this invoice was created or
8191
not.
8292

8393
The following error codes may occur:
@@ -86,14 +96,6 @@ The following error codes may occur:
8696
- 901: An invoice with the given *preimage* already exists.
8797
- 902: None of the specified *exposeprivatechannels* were usable.
8898

89-
One of the following warnings may occur (on success):
90-
- *warning_capacity*: even using all possible channels, there's not enough incoming capacity to pay this invoice.
91-
- *warning_offline*: there would be enough incoming capacity, but some channels are offline, so there isn't.
92-
- *warning_deadends*: there would be enough incoming capacity, but some channels are dead-ends (no other public channels from those peers), so there isn't.
93-
- *warning_private_unused*: there would be enough incoming capacity, but some channels are unannounced and *exposeprivatechannels* is *false*, so there isn't.
94-
- *warning_mpp* if there is sufficient capacity, but not in a single channel,
95-
so the payer will have to use multi-part payments.
96-
9799
AUTHOR
98100
------
99101

@@ -102,11 +104,11 @@ Rusty Russell <<[email protected]>> is mainly responsible.
102104
SEE ALSO
103105
--------
104106

105-
lightning-listinvoice(7), lightning-delinvoice(7),
106-
lightning-getroute(7), lightning-sendpay(7).
107+
lightning-listinvoices(7), lightning-delinvoice(7), lightning-pay(7).
107108

108109
RESOURCES
109110
---------
110111

111112
Main web site: <https://github.com/ElementsProject/lightning>
112113

114+
[comment]: # ( SHA256STAMP:71eeaa119c355874d52c511e09816291e296b0709dc6acb6cefd5614bdc20fd2)

doc/lightning-listchannels.7

+16-40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)