-
Notifications
You must be signed in to change notification settings - Fork 9
[r2r] Lightning docs #31
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments for the more info needed for DevComment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for bearing with me in this very long review :)
I guess these are the last review comments since I checked all the remaining methods (rest of channels, nodes and payments) and objects. I will probably do a last check of everything after the below comments are resolved.
If I missed any placeholders that you wanted me to provide info about, please point me to them and I will check them.
"status": "Open", | ||
"details": { | ||
"uuid": "2b50e274-c173-4fa1-95f3-97f9f82ace92", | ||
"channel_id": "4a869115dfd260d0925a1266f544a6ab36666448d4bbc0e2a028d8426b2b6d4e", | ||
"counterparty_node_id": "038863cf8ab91046230f561cd5b386cbff8309fa02e3f0c3ed161a3aeb64a643b9", | ||
"funding_tx": "4e6d2b6b42d828a0e2c0bbd448646636aba644f566125a92d060d2df1591864a", | ||
"funding_tx_output_index": 0, | ||
"funding_tx_value_sats": 959722, | ||
"is_outbound": true, | ||
"balance_msat": 959722000, | ||
"outbound_capacity_msat": 950125000, | ||
"inbound_capacity_msat": 0, | ||
"current_confirmations": 0, | ||
"required_confirmations": 3, | ||
"is_ready": false, | ||
"is_usable": false, | ||
"is_public": false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if "status": "Closed"
the details fields will differ, you can add a closed channel details response example too if you think it's a good idea. The fields inside details will be
{
"uuid": "<Uuid>",
"channel_id": "<String>",
"counterparty_node_id": "<String>",
"funding_tx": "<String or null>",
"funding_value": "<Number or null>",
"closing_tx": "<String or null>",
"closure_reason": "<String or null>",
"claiming_tx": "<String or null>",
"claimed_balance": "<Number or null>",
"funding_generated_in_block": "<Number or null>",
"is_outbound": <true or false>,
"is_public": <true or false>,
"is_closed": <true or false>,
"created_at": <Number>,
"closed_at": "<Number or null>"
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
original response has funding_tx_value_sats
but your comment has funding_value
. Has this key been updated or does it vary depending on the status?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For open channels the funding value is shown in sats since it's can be used on layer 2 only after the transaction is broadcasted and the channel is usable, sats is a good denomination for the funding value in this context, that's why decided to use funding_tx_value_sats
.
For closed channels, the unspent funds is back on chain and it's good to show this in BTC along other balances such as claimed_balance
to compare it and to know how much of the funds was used in layer 2, that's why I used funding_value
, please note that I used value
keyword not balance
since this is the value that the channel was opened with and not what the user gets back on chain which is claimed_balance
.
I missed this conversion in the code btw, both funding_value
and claimed_balance
are currently shown in sats, so I should fix this bug too, this documentation review turned out to be a good lightning bug hunting sprint :)
@shamardy I noticed that these docs lack tables for response param descriptions which ideally should be available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for documenting this undocumentable feature 🚀
Closes #17