Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix listnodes schema, doc. #4750

Merged
merged 2 commits into from
Sep 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions doc/lightning-listnodes.7

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions doc/lightning-listnodes.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,25 @@ RETURN VALUE
[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **nodes** is returned. It is an array of objects, where each object contains:
- **nodeid** (pubkey): the public key of the node
- **last_update** (u32, optional): A node_announcement has been received for this node (UNIX timestamp)
- **last_timestamp** (u32, optional): A node_announcement has been received for this node (UNIX timestamp)

If **last_update** is present:
If **last_timestamp** is present:
- **alias** (string): The fun alias this node advertized (up to 32 characters)
- **color** (hex): The favorite RGB color this node advertized (always 6 characters)
- **features** (hex): BOLT #9 features bitmap this node advertized
- **addresses** (array of objects): The addresses this node advertized:
- **type** (string): Type of connection (one of "ipv4", "ipv6", "torv2", "torv3")
- **address** (string): address in expected format for *type*
- **port** (u16): port number

If **option_will_fund** is present:
- **option_will_fund** (object):
- **lease_fee_base_msat** (msat): the fixed fee for a lease (whole number of satoshis)
- **lease_fee_basis** (u32): the proportional fee in basis points (parts per 10,000) for a lease
- **funding_weight** (u32): the onchain weight you'll have to pay for a lease
- **channel_fee_max_base_msat** (msat): the maximum base routing fee this node will charge during the lease
- **channel_fee_max_proportional_thousandths** (u32): the maximum proportional routing fee this node will charge during the lease (in thousandths, not millionths like channel_update)
- **compact_lease** (hex): the lease as represented in the node_announcement
[comment]: # (GENERATE-FROM-SCHEMA-END)

On failure, one of the following error codes may be returned:
Expand Down Expand Up @@ -83,4 +92,4 @@ RESOURCES
---------

Main web site: <https://github.com/ElementsProject/lightning>
[comment]: # ( SHA256STAMP:2f644d55512f5c03e3894341fb039fc1b7d2ebc5f210547fdb324d2f23689b37)
[comment]: # ( SHA256STAMP:0674630a9770ef2da2820e83bc19c1c4a3653955edc7a42cb14fa17299713cfe)
2 changes: 0 additions & 2 deletions doc/lightning-multiwithdraw.7

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions doc/lightningd-config.5
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ What log level to print out: options are io, debug, info, unusual,
broken\. If \fISUBSYSTEM\fR is supplied, this sets the logging level
for any subsystem containing that string\. Subsystems include:


.RS
.IP \[bu]
\fIlightningd\fR: The main lightning daemon
Expand All @@ -171,7 +170,6 @@ for any subsystem containing that string\. Subsystems include:
The following subsystems exist for each channel, where N is an incrementing
internal integer id assigned for the lifetime of the channel:


.RS
.IP \[bu]
\fIopeningd-chan#N\fR: Each opening / idling daemon
Expand Down
63 changes: 59 additions & 4 deletions doc/schemas/listnodes.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,23 @@
"type": "pubkey",
"description": "the public key of the node"
},
"last_update": {
"last_timestamp": {
"type": "u32",
"description": "A node_announcement has been received for this node (UNIX timestamp)"
}
},
"allOf": [
{
"if": {
"required": [ "last_update" ]
"required": [ "last_timestamp" ]
},
"then": {
"additionalProperties": false,
"required": [ "last_update", "alias", "color", "features", "addresses" ],
"required": [ "nodeid", "last_timestamp", "alias", "color", "features", "addresses" ],
"properties": {
"last_update": { },
"nodeid": { },
"last_timestamp": { },
"option_will_fund": { },
"alias": {
"type": "string",
"description": "The fun alias this node advertized",
Expand Down Expand Up @@ -70,6 +72,59 @@
}
}
}
},
"else": {
"additionalProperties": false,
"properties": {
"nodeid": { }
}
}
},
{
"if": {
"required": [ "option_will_fund" ]
},
"then": {
"additionalProperties": true,
"required": [ "option_will_fund" ],
"properties": {
"option_will_fund": {
"type": "object",
"additionalProperties": false,
"required": [ "lease_fee_base_msat",
"lease_fee_basis",
"funding_weight",
"channel_fee_max_base_msat",
"channel_fee_max_proportional_thousandths",
"compact_lease" ],
"properties": {
"lease_fee_base_msat": {
"type": "msat",
"description": "the fixed fee for a lease (whole number of satoshis)"
},
"lease_fee_basis": {
"type": "u32",
"description": "the proportional fee in basis points (parts per 10,000) for a lease"
},
"funding_weight": {
"type": "u32",
"description": "the onchain weight you'll have to pay for a lease"
},
"channel_fee_max_base_msat": {
"type": "msat",
"description": "the maximum base routing fee this node will charge during the lease"
},
"channel_fee_max_proportional_thousandths": {
"type": "u32",
"description": "the maximum proportional routing fee this node will charge during the lease (in thousandths, not millionths like channel_update)"
},
"compact_lease": {
"type": "hex",
"description": "the lease as represented in the node_announcement"
}
}
}
}
}
}
]
Expand Down