alexbosworth / lightning

Lightning client methods
MIT License
126 stars 32 forks source link

add is_trusted_funding and commitment_type to openChannel method #141

Closed SeverinAlexB closed 1 year ago

SeverinAlexB commented 1 year ago

Usage:

await ln.openChannel({
      lnd: lnd,
      local_tokens:
          localBalanceSat,
      partner_public_key: pubkey,
      is_private: isPrivate,
      is_trusted_funding: true,
      commitment_type: "ANCHORS"
  })

Let me know if you want to have anything changed. See #140 for more info.

alexbosworth commented 1 year ago

Ah yeah I forgot this was only in openChannels not openChannel

I think since only anchors channel is supported that passing commitment type must be superfluous

SeverinAlexB commented 1 year ago

Will change that.

SeverinAlexB commented 1 year ago

Done. Some more PRs might follow as I am looking into supporting JIT channels.

alexbosworth commented 1 year ago

Sounds good, also can look at openChannels for a template here, it also has a note in the documentation about the prerequisite configuration options that enable trusted funding support https://github.com/alexbosworth/lightning/blob/master/lnd_methods/onchain/open_channels.js#L36

SeverinAlexB commented 1 year ago

Tested ANCHORS and 3. Both work. ANCHORS is more clear though 👌