input-output-hk / js-cardano-wasm

various cardano javascript using wasm bindings
MIT License
31 stars 21 forks source link

Add to_hex methods #55

Closed SebastienGllmt closed 5 years ago

SebastienGllmt commented 5 years ago

For Yoroi we need to store Bip44AccountPublic and the encrypted version of Bip44RootPrivateKey in localstorage for non-hardware wallets so I needed to add to_hex functions. I added it to Bip44AccountPrivate also just because it'd be strange if one of the account structs didn't have to_hex randomly.

I also added code to the test to show how to encrypt/decrypt the mnemonic.