lightning-bkpr-inspect

lightning-bkpr-inspect -- Command to show onchain footprint of a channel

SYNOPSIS

bkpr-inspect account

DESCRIPTION

The bkpr-inspect RPC command lists all known on-chain transactions and associated events for the provided account. Useful for inspecting unilateral closes for a given channel account. Only valid for channel accounts.

  • account (string): Channel account to inspect.

RETURN VALUE

On success, an object containing txs is returned. It is an array of objects, where each object contains:

  • txid (txid): Transaction id.
  • fees_paid_msat (msat): Amount paid in sats for this tx.
  • outputs (array of objects):
    • account (string): Account this output affected.
    • outnum (u32): Index of output.
    • output_value_msat (msat): Value of the output.
    • currency (string): Human-readable bech32 part for this coin type.
    • credit_msat (msat, optional): Amount credited to account.
    • debit_msat (msat, optional): Amount debited from account.
    • originating_account (string, optional): Account this output originated from.
    • output_tag (string, optional): Description of output creation event.
    • spend_tag (string, optional): Description of output spend event.
    • spending_txid (txid, optional): Transaction this output was spent in.
    • payment_id (hex, optional): Lightning payment identifier. For an htlc, this will be the preimage.
  • blockheight (u32, optional): Blockheight of transaction.

AUTHOR

Lisa Neigut <[email protected]> is mainly responsible.

SEE ALSO

lightning-listbalances(7), lightning-listfunds(7), lightning-listpeers(7)

RESOURCES

Main web site: https://github.com/ElementsProject/lightning

EXAMPLES

Example 1:

Request:

lightning-cli bkpr-inspect -k "account"="a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2"
{
  "id": "example:bkpr-inspect#1",
  "method": "bkpr-inspect",
  "params": {
    "account": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2"
  }
}

Response:

{
  "txs": [
    {
      "txid": "cd23f0517eefc27194981253eb07b19b055246df77033e052c66eaf2bbb00483",
      "blockheight": 111,
      "fees_paid_msat": 4927000,
      "outputs": [
        {
          "account": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2",
          "outnum": 0,
          "output_tag": "channel_open",
          "output_value_msat": 1000000000,
          "credit_msat": 1000000000,
          "currency": "bcrt",
          "spend_tag": "channel_close",
          "spending_txid": "70e0466dc2e74f25afe38df6a85d5e8857079873a6d5eda4732806a7ac427305",
          "debit_msat": 489818898
        }
      ]
    },
    {
      "txid": "70e0466dc2e74f25afe38df6a85d5e8857079873a6d5eda4732806a7ac427305",
      "blockheight": 121,
      "fees_paid_msat": 2895898,
      "outputs": [
        {
          "account": "wallet",
          "outnum": 0,
          "output_tag": "deposit",
          "output_value_msat": 486923000,
          "credit_msat": 486923000,
          "currency": "bcrt"
        },
        {
          "account": "external",
          "outnum": 1,
          "output_tag": "to_them",
          "output_value_msat": 510181000,
          "credit_msat": 510181000,
          "currency": "bcrt",
          "originating_account": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2"
        }
      ]
    }
  ]
}

Core Lightning (previously c-lightning) is a lightweight, highly customizable and standard compliant implementation of the Lightning Network protocol.

© 2023 Core Lightning
All rights reserved.

Discussion Forum

The official Core Lightning forum is hosted at discuss.corelightning.org

BuildonL2 Community

The official BuildOnL2 community lives at community.corelightning.org. Join us and build the future of bitcoin on lightning.

Mailing List

For general discussions about CLN implementation, use [email protected]. For the Lightning Network, use [email protected]

Telegram

Community-driven telegram group where most of the node operators hang out. Go to https://t.me/lightningd to join.

Discord

Community-driven discord server where the devs flock together. Go to https://discord.gg/w27fMFESMN to join.

Internet Relay Chat

Don't hesitate to reach out to us on IRC at #lightning-dev @ libera.chat, #c-lightning @ libera.chat.