Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: show pending balance on channels api #1770

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

bonomat
Copy link
Contributor

@bonomat bonomat commented Dec 21, 2023

With this we see if there are any pending/stuck HTLCs on an channels.

E.g. response looks like this for a channel with a pending HTLC

{
  "channel_id": "cecff04ded3279da7638d82b5abeac2e4a878ed775f60525f9e21e910c6ca7e2",
  "counterparty": "02ab77e8a40feef78116c4f6afbe5586e7e5954cf9d9425514fe757955c2c8537a",
  "funding_txo": "e2a76c0c911ee2f92505f675d78e874a2eacbe5a2bd83876da7932ed4df0cfce:0",
  "original_funding_txo": null,
  "channel_type": "StaticRemoteKey: required, AnchorsNonzeroFeeHtlcTx: not supported, AnchorsZeroFeeHtlcTx: not supported, Taproot: not supported, SCIDPrivacy: not supported, ZeroConf: not supported, unknown flags: none",
  "channel_value_satoshis": 200000,
  "unspendable_punishment_reserve": 2000,
  "user_channel_id": 1.2457119903510981e+38,
  "feerate_sat_per_1000_weight": 253,
  "balance_msat": 98879000,
  "outbound_capacity_msat": 96879000,
  "next_outbound_htlc_limit_msat": 96253000,
  "inbound_capacity_msat": 88000000,
  "confirmations_required": 0,
  "force_close_spend_delay": 144,
  "is_outbound": true,
  "is_channel_ready": true,
  "is_usable": true,
  "is_public": false,
  "inbound_htlc_minimum_msat": 1,
  "inbound_htlc_maximum_msat": 196000000,
  "config": {
    "forwarding_fee_proportional_millionths": 50,
    "forwarding_fee_base_msat": 0,
    "cltv_expiry_delta": 42,
    "max_dust_htlc_exposure_msat": {
      "FeeRateMultiplier": 5000
    },
    "force_close_avoidance_max_fee_satoshis": 1000
  },
  "scid": 205608674459648,
  "user_email": "",
  "channel_balances": [
    {
      "MaybeTimeoutClaimableHTLC": {
        "amount_satoshis": 11121,
        "claimable_height": 273,
        "payment_hash": "9cc07d10a6ea59fbafb5a4762eb1f6c1a3435bdcf4504d017a93b4919f3e2dee"
      }
    },
    {
      "NotYetClosedClaimableOnChannelClose": {
        "amount_satoshis": 98653
      }
    }
  ]
}

With this we see if there are any pending/stuck HTLCs on an channels.

Signed-off-by: Philipp Hoenisch <[email protected]>
Copy link
Contributor

@holzeis holzeis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@bonomat bonomat added this pull request to the merge queue Dec 21, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 21, 2023
@holzeis holzeis added this pull request to the merge queue Dec 21, 2023
Merged via the queue into get10101:main with commit 9226c37 Dec 21, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants