input-output-hk / cardano-js-sdk

JavaScript SDK for interacting with Cardano, providing various key management options, with support for popular hardware wallets
https://input-output-hk.github.io/cardano-js-sdk/
Apache License 2.0
212 stars 57 forks source link

feat: remove async from fromBip39Entropy #1326

Closed jinglescode closed 2 months ago

jinglescode commented 2 months ago

Context

functions like fromBip39Entropy() are essential for them to operate without being async, so upstream functions do not required async.

Proposed Solution

pbkdf2 replace with pbkdf2Sync

Important Changes Introduced

jinglescode commented 2 months ago

Changes looks good! Need to resolve CI errors before merging, currently at

crypto/src/strategies/CmlBip32Ed25519.ts(24,10): error TS2416: Property 'fromBip39Entropy' in type 'CmlBip32Ed25519' is not assignable to the same property in base type 'Bip32Ed25519'.

which is probably asking to update async->sync in CmlBip32Ed25519

https://github.com/input-output-hk/cardano-js-sdk/actions/runs/9448898910/job/26053476806?pr=1326#step:4:178

Yea I saw the build error this morning and wanted to fix this this afternoon. So just pushed, and gonna see if this fixes it.