-
Notifications
You must be signed in to change notification settings - Fork 7
JS helper: Wrap multisig support #53
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
Conversation
7714dab
to
69a4867
Compare
69a4867
to
b2aa4e3
Compare
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.
I've left some comments, a lot of them are just style things that I think will make it a bit easier to maintain this.
But overall I think these helpers are doing a little too much, and should just be focused on returning a transaction to the caller. I'd cut out all the code that sends/confirms transactions, and let the caller re-use whatever logic they're using elsewhere in their app.
I might not be completely understanding the expected use case here, but since this is part of a @solana-program
lib I think it likely makes sense for it not to be concerned with things like sending transactions.
b2aa4e3
to
13f7d9a
Compare
@mcintyre94 very helpful review! Implemented your feedback. Think it makes lots of sense. |
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.
This looks good to me! I think this is the right interface now and it all looks good. The only thing I'd suggest is getting rid of the arrow functions, because we don't usually use them in our libraries or the generated clients. And making sure all the functions have a return type.
a740634
to
63fb236
Compare
The javascript companion to the CLI equivalent functionality: #44. This allows for Wraps to be done in a multisig setup.
The chief workflow is:
multisigOfflineSignWrap()
function and pass the result to the final broadcaster. The payer must also execute this function.multisigBroadcastWrap()
where it is validated, combined together, and broadcast to the network.Contains an example that executes these steps.