-
Notifications
You must be signed in to change notification settings - Fork 62
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
ADP-2574 feat/crypto library interface and key management refactor #589
ADP-2574 feat/crypto library interface and key management refactor #589
Conversation
1f11838
to
839183e
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.
Please highlight changes to the interface in e1a6b10 commit message (new required 'cryptoProvider' property in some types)
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'd like to see us avoid overloading the provider term, since it has a specific meaning of establishing query or command access to the blockchain. How about we use the term 'lib' here as a substitute?
I thought the use of the provider term was because we are implementing the strategy design pattern there 😅, I will then rename the interface to:
And the concrete implementations to:
Following both this feedback and the one from @mkazlauskas here #589 (comment) Is this acceptable? |
c969a3d
to
c831ca1
Compare
Let's drop
|
c831ca1
to
a7381a6
Compare
done here 2c334df |
e21e667
to
00f3e8c
Compare
from core package to utils package.
3d7784d
to
0c405e0
Compare
0c405e0
to
4929194
Compare
4929194
to
8d8472d
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.
Nice work! 🚀
BREAKING CHANGE: - Bip32PublicKey removed from core and replaced by the Bip32PublicKeyHex type from the crypto package. - Bip32PrivateKey removed from core and replaced by the Bip32PrivateKeyHex type from the crypto package. - Ed25519PublicKey removed from core and replaced by the Ed25519PublicKeyHex type from the crypto package. - Ed25519PrivateKey removed from core and replaced by the Ed25519PrivateKeyHex type from the crypto package. - Ed25519KeyHash removed from core and replaced by the Ed25519KeyHashHex type from the the crypto package. - Ed25519Signature removed from core and replaced by the Ed25519SignatureHex type from the crypto package. - Hash32ByteBase16 removed from core and replaced by the Hash32ByteBase16 type from the crypto package. - Hash28ByteBase16 removed from core and replaced by the Hash28ByteBase16 type from the crypto package. - The KeyAgent interface now has a new field bip32Ed25519. - The KeyAgentBase class and all its derived classes (InMemoryKeyAgent, LedgerKeyAgent and TrezorKeyAgent) must now be provided with a Bip32Ed25519 implementation on their constructors. - Bip32Path type was removed from the key-management package and replaced by the Bip32Path from the crypto package.
BREAKING CHANGE: Remove hardening from the definition of CIP-36 indices Purpose (1694) and CoinType (1815)
b4e18c0
to
9b16323
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.
Awesome work here @AngelCastilloB 🤩
It was missing since this PR landed: #589
It was missing since this PR landed: #589
Context
We must add an abstraction for the crypto operations for the key management package to depend on, so we can do comparison tests between implementations.
Proposed Solution
Add an interface and extension point around the cryptographic operations in the SDK.
Important Changes Introduced