WIP: generalize multisig wallet config interface#44
WIP: generalize multisig wallet config interface#44bucko13 wants to merge 4 commits intounchained-capital:masterfrom
Conversation
humanumbrella
left a comment
There was a problem hiding this comment.
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
humanumbrella
left a comment
There was a problem hiding this comment.
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.
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.
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.
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