Open jinglescode opened 2 days ago
Hey @jinglescode, would we require consumer to await it separately/globally then, or do you have some other ideas?
if reference strica and harmonic implementation as reference, and dont use libsodium lib, might be able to remove async await entirely. i cannot be 100% sure, about this, @ashisherc for sense check.
@mkazlauskas The existing approach seems due to the way sodium
functions. To clarify @jinglescode suggestion, he is advocating for a pure JavaScript library that doesn’t rely on async code for derivation. One example of this type of implementation is here: https://github.com/StricaHQ/bip32ed25519. Just sharing this as an example to help illustrate Jingles’ point.
Thanks for the report guys, we will look into this. We should be able to remove the async from these functions
Describe the feature you'd like
To make keys functions non-async.
Rewrite
packages/crypto/src/Bip32/Bip32PrivateKey.ts
andpackages/crypto/src/Bip32/Bip32PublicKey.ts
to remove async whenderive(derivationIndices: number[]): Bip32PublicKey
andtoPublic(): Bip32PublicKey
Describe alternatives you've considered