Implement Clone
for LightsparkClient
and Requester
to Leverage Actix Web Data
Extractor
#25
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.
Hi, team... I'm blown away by your pace and so excited about what you're up too. I'm curious if there has been a decision against implementing
Clone
forLightsparkClient
andRequester
, to avoid a global client instance.If
Clone
is implemented for these two structs thanLightsparkClient
can be injected as a Data Extractor in the Web Actix framework, preventing the need to initialize per request.I've been pondering security considerations that would warrant this idea dumb, but the implementations of
OperationSignKey
are alsoClone
, which I believe should cover not only signing ops that recover keys from Lightspark but, manually loaded and remote signing operations as well... so I wanted to raise it.My
lightspark-rs
fork commit is here which enables something like this:I would greatly appreciate your thoughts!
P.S.
I'm an active candidate for your Backend Engineer role, building a lot of personal momentum within the Bitcoin tech stack, and would be over the moon to contribute to your mission.