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

libhsmd: Extract the core of hsmd into a separate library #4497

Merged
merged 29 commits into from
May 4, 2021

Conversation

cdecker
Copy link
Member

@cdecker cdecker commented Apr 29, 2021

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 of hsmd 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.

cdecker added 26 commits April 29, 2021 17:35
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.
cdecker added 2 commits May 3, 2021 11:35
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.
Copy link
Contributor

@rustyrussell rustyrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack e0065b0

@rustyrussell
Copy link
Contributor

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.

@rustyrussell rustyrussell merged commit 96acafc into ElementsProject:master May 4, 2021
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.

2 participants