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

Custom keys manager #196

Merged
merged 7 commits into from
Jan 4, 2024
Merged

Custom keys manager #196

merged 7 commits into from
Jan 4, 2024

Conversation

Jasonvdb
Copy link
Collaborator

@Jasonvdb Jasonvdb commented Dec 14, 2023

Outputs from channel closes now get spent directly to on chain wallet.

  • Extends the default LDK keys manager so we can provide our own signer provider and overrides functions that return destination script and shutdown script pubkey.
  • Existing sweeping logic is kept for channels opened prior to this update. Going forward as a new channel is opened the channel ID is appended to a file so when it comes time to sweep outputs from a channel close it will skip this sweeping step if the channel ID is found as the channel was opened with new adapted keys manager.
  • getAddress() in JS needs to be adapted to return witness program and program version. Example app shows how.

@Jasonvdb Jasonvdb marked this pull request as ready for review January 3, 2024 12:05
@Jasonvdb Jasonvdb requested a review from coreyphillips January 3, 2024 12:05
@Jasonvdb Jasonvdb force-pushed the custom-keys-manager branch from 29aeb0c to 9a2222c Compare January 3, 2024 12:07
Remove witnessProgram types from IAddress.
@coreyphillips
Copy link
Collaborator

coreyphillips commented Jan 3, 2024

Created PR here to move the witness program logic to lightning-manager.ts so future devs implementing the library don't need to worry about performing that logic in getAddress. Also checks for taproot addresses to set the witnessProgramVersion accordingly.

coreyphillips
coreyphillips previously approved these changes Jan 4, 2024
@Jasonvdb Jasonvdb merged commit 06b2692 into master Jan 4, 2024
4 of 6 checks passed
@Jasonvdb Jasonvdb deleted the custom-keys-manager branch January 4, 2024 14:45
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.

3 participants