provider.listChannels
OptionalList the channels visible to the provider and expose normalized balance and state information.
Signature
function listChannels(): Promise<ListChannelsResult>PERMISSION
Requires enable(). No additional confirmation in the reference providers.
Parameters
This method accepts no parameters.
Response
NameTypeDescription
channelsrequiredChannelInfo[]Normalized channel records.
channelIdrequiredstringFiber channel identifier.
staterequiredstringCurrent channel lifecycle state.
localBalance / remoteBalancerequiredHexChannel-side balances in the funded asset.
Example
if (fiber.listChannels) {
const { channels } = await fiber.listChannels();
const ready = channels.filter(channel => channel.state === "ChannelReady");
}Provider behavior
W
WASM node
Normalizes the result of fiber-js listChannels({}).
R
Remote fnn
Normalizes fnn list_channels output into the same ChannelInfo shape.