C-Otto / lnd-manageJ

MIT License
52 stars 11 forks source link

Feature Request: support channel aliases etc. #71

Open C-Otto opened 2 years ago

C-Otto commented 2 years ago

Is your feature request related to a problem? Please describe. With zero-conf channels / channel aliases it is possible to have channels with channel ID sthat do not represent actual confirmed transactions. This is similar to #18 but also poses additonal problems: some code might assumes that the channel ID encodes the block height, other code might assume that the ID (as long) is a positive number.

Describe the solution you'd like Channels with a "fake" ID don't confuse lnd-manageJ. Features continue working as expected, height/age information is derived via other means.

Additional context Example:

{
    "active": false,
    "remote_pubkey": "03ec54855663fec338e007e05734821189850f375c720a093bfce7cc611e03a220",
    "channel_point": "2b85b72fb445e694534f1a13386b14dcf9ef9ce6a268bd80f8a388d6d189a49d:0",
    "chan_id": "17592186044416000004",
    "capacity": "50000",
    "local_balance": "7388",
    "remote_balance": "40000",
    "commit_fee": "1952",
    "commit_weight": "1116",
    "fee_per_kw": "1737",
    "unsettled_balance": "0",
    "total_satoshis_sent": "40000",
    "total_satoshis_received": "0",
    "num_updates": "2",
    "pending_htlcs": [],
    "csv_delay": 144,
    "private": true,
    "initiator": true,
    "chan_status_flags": "ChanStatusDefault",
    "local_chan_reserve_sat": "500",
    "remote_chan_reserve_sat": "500",
    "static_remote_key": false,
    "commitment_type": "ANCHORS",
    "lifetime": "195597",
    "uptime": "2276",
    "close_address": "",
    "push_amount_sat": "0",
    "thaw_height": 0,
    "local_constraints": {
        "csv_delay": 144,
        "chan_reserve_sat": "500",
        "dust_limit_sat": "354",
        "max_pending_amt_msat": "49500000",
        "min_htlc_msat": "1",
        "max_accepted_htlcs": 483
    },
    "remote_constraints": {
        "csv_delay": 144,
        "chan_reserve_sat": "500",
        "dust_limit_sat": "354",
        "max_pending_amt_msat": "49500000",
        "min_htlc_msat": "1",
        "max_accepted_htlcs": 483
    },
    "alias_scids": [
        "17592186044416000004"
    ],
    "zero_conf": true,
    "zero_conf_confirmed_scid": "829025170330353664"
}