0

I want to query an Eclair node for properties of a channel which I'm not a party of. Obviously, this information is in the local view of the network graph and is used for routing. However, the API provides only the following relevant methods:

AllChannels: Returns non detailed information about all public channels in the network. Example output:

[
  {
    "shortChannelId": "508856x657x0",
    "a": "0206c7b60457550f512d80ecdd9fb6eb798ce7e91bf6ec08ad9c53d72e94ef620d",
    "b": "02f6725f9c1c40333b67faea92fd211c183050f28df32cac3f9d69685fe9665432"
  },
  {
    "shortChannelId": "512733x303x0",
    "a": "024bd94f0425590434538fd21d4e58982f7e9cfd8f339205a73deb9c0e0341f5bd",
    "b": "02eae56f155bae8a8eaab82ddc6fef04d5a79a6b0b0d7bcdd0b60d52f3015af031"
  }
]

Channels: Returns the list of local channels, optionally filtered by remote node. Example output: see docs, too long to paste here.

How can I get more information about remote channels, for example, their capacities?

1

While Eclair itself doesn't provide the information, you can use the information from Eclair to look up the capacity using some other block information provider.

The capacity of channels is not part of the gossip information broadcast over the Lightning Network. The capacities are looked up on the blockchain from the shortChannelId, which fortunately is returned by AllChannels.

The shortChannelID is a triplet consisting of a block height, the index of a transaction within the block, and the index of the output in that transaction. This is the funding transaction outpoint and the amount in the txOut it refers to is the capacity of the channel. Eg,508856x657x0 is this txOutPoint which has a capacity of 0.004BTC.

Perhaps of interest, Blockstream's explorer recognizes the standard shortChannelId encoding <height>x<txIndex>x<outIndex> for searching and will take you directly to the information. I'm not aware of any other block information providers which also do.

Eclair's API doesn't provide you the funding public keys to verify this transaction yourself, but you can probably assume that Eclair has performed the validation else it would not have been accepted into its database.

0

As of 2019-12-12, it's not possible.

Source - Eclair's Gitter:

we didn't have any scenario where that was needed yet

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.