-
Notifications
You must be signed in to change notification settings - Fork 32
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
WIP: generalize multisig wallet config interface #44
base: master
Are you sure you want to change the base?
Conversation
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.
missing some ; at the end of lines - not sure if we care.
couple questions and some nits - we can discuss soon
@humanumbrella ready for another review. I tried to catch the semi-colons where I could. That should really be getting handled by the linter... |
Noting some requested changes here:
instead of
instead of
|
@humanumbrella feedback addressed. |
e56da4b
to
658130e
Compare
0b0e1ca
to
38c7409
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.
Just some small notes and changes requested (bringing in the changes from #49 will be important)
* ] | ||
* } | ||
*/ | ||
export function parseColdcardConfig(configString) { |
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 didnt compare line by line but this would be good to compare how they do it vs how you've done it
https://github.com/Coldcard/firmware/blob/master/shared/multisig.py#L523
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.
Ah, good reference. Thanks!
add support for converting from ColdCard Config caravan interfaces refactor coldcard config methods to be functional and other fixes: * updates tests * updates linter * fixes some linting errors
38c7409
to
96e0363
Compare
@@ -394,9 +394,7 @@ export function ConfirmMultisigAddress({keystore, network, bip32Path, multisig, | |||
export function ConfigAdapter({ KEYSTORE, jsonConfig }) { |
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.
ConfigAdapter
-> MultisigWalletConfig
KEYSTORE
-> keystore
XOR coordinator
or something like target
(?)
jsonConfig
-> braids
or braidSet
add options
An initial pass to see what the config interface could look like to be generalized to support multiple different config formats. This still only supports ColdCard but you should be able to see how more formats should be easily added on.
I also split out some of the validation and instantiations. I think this makes the API a little more clear and also the unit testing a little more fine grained (though maybe this isn't desired).
TODO:
Move existing functionality into its own config.js
Update tests for existing functionality
Replace existing functionality from coldcard.js
Add explicit caravan interfaces
Add interface to convert from a ColdCard config
Update jsdoc strings