[FIX] tss key creation - use gcm#4097
Conversation
9c16037 to
07ce4f6
Compare
kajoseph
left a comment
There was a problem hiding this comment.
What's the purpose of adding the coin to the TssKeyGen class? I had originally thought about coin != chain, but in practice I decided it's actually extraneous and isn't needed (as far as I could tell). The TssKeyGen simply generates a key which can then be used to create credentials and keep delegation of duties separate. In other words, it's my intention that TssKeyGen should not be used in the general case. It should only be used to create a key which is then used to create credentials. That way we don't need to worry about including various future edge cases with credential creation in the TssKeyGen class.
For example, ETH, ARB, OP, BASE, and MATIC will use the same key. Thus, we can do (in very simple pseudocode):
if (tss) {
key = new TssKeyGen();
} else {
key = new Key();
}
credentialsETH = key.createCredentials('ETH');
credentialsARB = key.createCredentials('ARB');
...
07ce4f6 to
05d9c2e
Compare
05d9c2e to
34ce380
Compare
I’m currently running into an |
Description
Updates encryption to AES-GCM
and fixes TSS credential creation whencoin !== chain.Changelog
ExposeTssKeyandTssKeyGenAdd propercoinhandling inTssKeyGencredentialsAdd unit test for Arbitrum (coin !== chain)Checklist
BWCif modifying the bitcore-wallet-client package,CLIif modifying the bitcore-cli package, etc.)