-
Notifications
You must be signed in to change notification settings - Fork 14
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
Provide import from other ChannelGraph formats (lnd, ldk, eclaire) #5
Comments
Does eclair provide any API call similar to describe graph in LND (#22) which can be used for providing support to eclair formats? It doesn't seem to have a single API call that provides all the information we need.
However, the channel capacity (which is one of the main data that we need) doesn't seem to be provided in any of these api calls in eclair. We can get the channel capacity from the funding transaction using the short channel ID BLOCKHEIGHT_ENDPOINT = "https://blockstream.info/api/block-height/"
TXID_ENDPOINT = "https://blockstream.info/api/block/"
TX_ENDPOINT = "https://blockstream.info/api/tx/"
def capacity_from_short_channel_id(sid):
block_height, tx, out = sid.split('x')
block_hash = requests.get(BLOCKHEIGHT_ENDPOINT + block_height)
txid = requests.get(TXID_ENDPOINT + block_hash.text + '/txid/' + tx)
txinfo = requests.get(TX_ENDPOINT + txid.text)
return json.loads(txinfo.text)['vout'][int(out)]['value'] But it involves 3 API requests to blockstream for every channel to find its channel capacity (while it can be reduced to 2, it still seems like a lot of requests for a regular channel graph with many channels) Is there a better way to do this? |
bu komutları nereye ekleyeceğim |
I got the following reply from @t-bast:
I guess unless eclair provides a solution we can't support data import from eclair then? |
I am not sure this is the place to ask where those commands are beeing added. You will need a running c-lightnig node and then you can call |
but i don't know anything about this can you help me
28 May 2022 Cmt 09:15 tarihinde Rene Pickhardt ***@***.***>
şunu yazdı:
… bu komutları nereye ekleyeceğim
I am not sure this is the place to ask where those commands are beeing
added. You will need a running c-lightnig node and then you can call lightning-cli
listchannels in your command line. The resulting json is being added to
the constructor of the ChannelGraph class as provided in the example at:
https://github.com/renepickhardt/pickhardtpayments/blob/main/examples/basicexample.py
—
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AS65OVXGLG7DGGK3KXHUAZ3VMG2WLANCNFSM5VHLZEUQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Currently the
Channel
class internally just stores thejson
blog fromc-lightning
'slistchannels
command and accesses this. Obviously it would be nice to have wrappers that allow other implementations to load the channel graph into this libraryThe text was updated successfully, but these errors were encountered: