LIGHTNING-BKPR-LISTBALANCES(7)

πŸ“¦
version 26.06.9 Β· 2 versions
, in nixpkgs unstable

πŸ’– LIGHTNING-BKPR-LISTBALANCES(7) πŸ’–

okay bestie, so this is a page from the lightning-bkpr-listbalances manual β€” section 7, the big book of bookkeeping. pull up a chair, we're doing money math ✨


🌸 NAME 🌸

bkpr-listbalances β€” the command that lists your current channel + wallet balances, no cap 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

bkpr-listbalances

πŸŽ€ DESCRIPTION πŸŽ€

so the bkpr-listbalances RPC command is literally a whole list of all your current and historical account balances. and what's an account? it's either the on-chain wallet, or a channel balance. that's the whole vibe.

⚠️ heads up bestie: any funds you sent to an external account will not be accounted for here. like, not at all. don't come for this command when your external sends don't show up πŸ’€

also note: any channel that was recorded will be listed. every single one. and closed channel balances will be 0msat. zero. nada. iconic but empty 🌈


⭐ RETURN VALUE ⭐

on success, you get an object containing accounts. it's an array of objects, and each object contains:

  • account (string): the account name. if the account is a channel, it's the channel_id.
  • balances (array of objects):
    • balance_msat (msat): the current account balance πŸ’°
    • coin_type (string): coin type, same as the HRP for bech32.

if peer_id is present:

  • peer_id (pubkey): node id for the peer this account is with.
  • we_opened (boolean): did we initiate this account open (open the channel). main character energy or not πŸ‘‘
  • account_closed (boolean):

and then, continuing on:

  • account_resolved (boolean): has this channel been closed and all outputs resolved?
  • resolved_at_block (u32, optional): blockheight account resolved on chain.

πŸ’… AUTHOR πŸ’…

Lisa Neigut niftynei@gmail.com is mainly responsible. shoutout to her, fr fr 🫢


πŸ”₯ SEE ALSO πŸ”₯

lightning-bkpr-listincome(7), lightning-listfunds(7), lightning-bkpr-listaccountevents(7), lightning-bkpr-channelsapy(7), lightning-listpeers(7)


🌈 RESOURCES 🌈

main web site: https://github.com/ElementsProject/lightning β€” go peek, it's giving home base 🧚


✨ EXAMPLES ✨

Example 1:

request:

$ lightning-cli bkpr-listbalances
{
  "id": "example:bkpr-listbalances#1",
  "method": "bkpr-listbalances",
  "params": {}
}

response:

{
  "accounts": [
    {
      "account": "wallet",
      "balances": [
        {
          "balance_msat": 202050000000,
          "coin_type": "bcrt"
        }
      ]
    },
    {
      "account": "channelid0230000230000230000230000230000230000230000230000230000",
      "peer_id": "nodeid020202020202020202020202020202020202020202020202020202020202",
      "we_opened": false,
      "account_closed": true,
      "account_resolved": true,
      "resolved_at_block": 121,
      "balances": [
        {
          "balance_msat": 0,
          "coin_type": "bcrt"
        }
      ]
    },
    {
      "account": "channelid0340000340000340000340000340000340000340000340000340000",
      "peer_id": "nodeid040404040404040404040404040404040404040404040404040404040404",
      "we_opened": true,
      "account_closed": true,
      "account_resolved": false,
      "balances": [
        {
          "balance_msat": 0,
          "coin_type": "bcrt"
        }
      ]
    },
    {
      "account": "channelid0230200230200230200230200230200230200230200230200230200",
      "peer_id": "nodeid020202020202020202020202020202020202020202020202020202020202",
      "we_opened": false,
      "account_closed": false,
      "account_resolved": false,
      "balances": [
        {
          "balance_msat": 0,
          "coin_type": "bcrt"
        }
      ]
    },
    {
      "account": "channelid0340200340200340200340200340200340200340200340200340200",
      "peer_id": "nodeid040404040404040404040404040404040404040404040404040404040404",
      "we_opened": true,
      "account_closed": false,
      "account_resolved": false,
      "balances": [
        {
          "balance_msat": 1000000000,
          "coin_type": "bcrt"
        }
      ]
    }
  ]
}

and that's the whole page bestie!! this lil masterpiece is from Core Lightning v26.06.9, and it's the LIGHTNING-BKPR-LISTBALANCES(7) manual β€” read it, love it, balance your books πŸ’œπŸŽ€πŸ’–

πŸ“¦ where this page comes from