LIGHTNING-BKPR-E...IPTIONBYPAYMENTID(7)

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

πŸ’… LIGHTNING-BKPR-E...IPTIONBYPAYMENTID(7) β€” okay so the manual name is a whole mouthful, bestie, but we move

a.k.a. bkpr-editdescriptionbypaymentid ✨


🌸 NAME 🌸

bkpr-editdescriptionbypaymentid β€” the command that lets you change the description for events with payment_id after they're already made. yes, retroactive glow-ups are real πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

bkpr-editdescriptionbypaymentid payment_id description

✨ DESCRIPTION ✨

Okay so first thing's first: this command was added in v24.11. iconic behavior, honestly.

The bkpr-editdescriptionbypaymentid RPC command updates all chain and channel events that match the payment_id with the description you provide πŸ’–

  • payment_id (string) β€” the payment hash (payment_id) you wanna update the description for 🫢
  • description (string) β€” the description you're updating to. this is the new lore, bestie ✍️

πŸ‘‘ RETURN VALUE πŸ‘‘

On success, you get back an object containing updated. It's an array of objects, and every single object in there contains:

  • account (string) β€” the account name. If the account is a channel, it's the channel_id.
  • type (string) (one of "chain", "channel") β€” coin movement type.
  • tag (string) β€” description of movement.
  • credit_msat (msat) β€” amount credited.
  • debit_msat (msat) β€” amount debited.
  • currency (string) β€” human-readable bech32 part for this coin type.
  • timestamp (u32) β€” timestamp this event was recorded by the node. For consolidated events such as onchain_fees, the most recent timestamp.
  • description (string) β€” the description of this event.

🧚 If type is "chain":

  • outpoint (string) β€” the txid:outnum for this event.
  • blockheight (u32) β€” for chain events, the blockheight this occured at.
  • origin (string, optional) β€” the account this movement originated from.
  • payment_id (hex, optional) β€” Lightning payment identifier. For an htlc, this will be the preimage.
  • txid (txid, optional) β€” the txid of the transaction that created this event.

🌈 If type is "onchain_fee":

  • txid (txid) β€” the txid of the transaction that created this event.

πŸ’œ If type is "channel":

  • fees_msat (msat, optional) β€” amount paid in fees.
  • is_rebalance (boolean, optional) β€” is this payment part of a rebalance.
  • payment_id (hex, optional) β€” Lightning payment identifier. For an htlc, this will be the preimage.
  • part_id (u32, optional) β€” counter for multi-part payments.

πŸŽ€ AUTHOR πŸŽ€

Lisa Neigut niftynei@gmail.com is mainly responsible. main character energy, we stan 🫑


πŸ“ SEE ALSO πŸ“

iykyk, go read those next πŸ’…


⭐ RESOURCES ⭐

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


πŸ”₯ EXAMPLES πŸ”₯

Example 1:

Request:

$ lightning-cli bkpr-editdescriptionbypaymentid -k "payment_id"="paymentid0000202020202020202020202020202020202020202020202020202" "description"="edited invoice description from description send some sats l2 to l3"

{
  "id": "example:bkpr-editdescriptionbypaymentid#1",
  "method": "bkpr-editdescriptionbypaymentid",
  "params": {
    "payment_id": "paymentid0000202020202020202020202020202020202020202020202020202",
    "description": "edited invoice description from description send some sats l2 to l3"
  }
}

Response:

{
  "updated": [
    {
      "account": "channelid0230000230000230000230000230000230000230000230000230000",
      "type": "channel",
      "tag": "invoice",
      "credit_msat": 500000000,
      "debit_msat": 0,
      "currency": "bcrt",
      "payment_id": "paymentid0000202020202020202020202020202020202020202020202020202",
      "part_id": 0,
      "timestamp": 1738520000,
      "description": "edited invoice description from description send some sats l2 to l3",
      "is_rebalance": false
    }
  ]
}

Example 2:

Request:

$ lightning-cli bkpr-editdescriptionbypaymentid -k "payment_id"="c000010101010101010101010101010101010101010101010101010101010101" "description"="edited invoice description for non existing payment id"

{
  "id": "example:bkpr-editdescriptionbypaymentid#2",
  "method": "bkpr-editdescriptionbypaymentid",
  "params": {
    "payment_id": "c000010101010101010101010101010101010101010101010101010101010101",
    "description": "edited invoice description for non existing payment id"
  }
}

Response:

{
  "updated": []
}
πŸ’€ friendly heads up: example 2 hits a payment id that does not exist, and the response is an empty updated array β€” so don't panic if nothing comes back, that's just what it looks like when there's nothing to match, bestie.

okay and that's the whole page!! this was Core Lightning v26.06.9, written down for you with love 🫢 go forth and edit those descriptions, no cap βœ¨πŸ’–

πŸ“¦ where this page comes from