[go: nahoru, domu]

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

hsmtool: implement new derivetoremote method #7344

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

whitslack
Copy link
Collaborator

This method has a similar purpose as guesstoremote but is for use when the channel's database ID is known. It produces the private key that can spend the to_remote output of the peer's commitment transaction. It assumes the channel was negotiated with option_static_remotekey unless the optional per-commitment point argument is provided.

Changelog-Added: hsmtool has a new derivetoremote method.


Motivation: I implemented this method so that I could import my funds from remote unilateral closures into other wallets. While guesstoremote could mostly get the job done, it's needlessly slow when we already know the database ID of the channel, and it doesn't work at all for channels that were negotiated without option_static_remotekey.

This method has a similar purpose as "guesstoremote" but is for use when
the channel's database ID is known. It produces the private key that can
spend the to_remote output of the peer's commitment transaction. It
assumes the channel was negotiated with option_static_remotekey unless
the optional per-commitment point argument is provided.

Changelog-Added: hsmtool has a new `derivetoremote` method.
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.

None yet

1 participant