-
Notifications
You must be signed in to change notification settings - Fork 912
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
libhsmd: Extract the core of hsmd
into a separate library
#4497
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These are currently just shims that replicate the old behavior, but when compiling as a library we can relink the status_* functions to something that makes sense in the context of the user, and not assume we're running as a subdaemon.
Changelog-Added: libhsmd: Extracted the `hsmd` logic into its own library for other projects to use
I wante to hide it inside the library, but it is good to have a single place to verify that the client was permitted to send a message we are handling, so make it officially part of the interface by prefixing it.
rustyrussell
approved these changes
May 4, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack e0065b0
I'm sure I reviewed this before, but obv didn't hit commit. My only comment was on externs, and they are mostly removed by the end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have seen a couple of projects trying to provide alternative
hsmd
implementations for c-lightning, such as remote signers, threshold based signers, etc. They usually have to go and reimplement the entire subdaemon just to make their changes, so I wanted to help by turning the core functionality ofhsmd
into a library that can be used from a couple of other languages such as Rust, Python and Javascript.This is the first part of that, separating the IO handling and details
for handing out client connections from the core logic of the
hsmd
. Language bindings will also follow soon.