-
Notifications
You must be signed in to change notification settings - Fork 339
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
How to use DirectSecp256k1HdWallet.generate() #925
Comments
In case it helps, here is a link to the code: https://github.com/rook-network/rook/blob/39d5e265f2c32f8c047173097ab72f7ea1eff206/web/apps/game/src/components/provider/game.ts#L36 |
The code helps indeed. Try changing -import { Registry, DirectSecp256k1HdWallet } from '@cosmjs/stargate/node_modules/@cosmjs/proto-signing'
+import { Registry, DirectSecp256k1HdWallet } from '@cosmjs/proto-signing' |
Thanks for the fast response. I made the change and rebuilt the node_modules but am still getting the same error. |
Hmm, I don't really understand the eror message. Could you write down the steps to reproduce to allow for loca debugging? |
Sure. The following should work but let me know if it doesn't:
Then in another process for the web server:
When you open the page it will try generate the private key and so you should see the error straight away. |
I managed to work this out. My understanding is |
Ah, yeah. The problem is deep down in dependencies here: https://github.com/crypto-browserify/cipher-base/blob/v1.0.4/index.js#L7 We has to use this Webpack config when switching from Webpack 4 to Webpack 5:
|
See also bitcoinjs/bip39#170 |
Hi, I would like to generate a private key client-side. A snippet of the code is as follows:
However, I'm coming across the following error when running
generate
:I have a feeling it's to do with some way that I'm configuring things but I have no idea. Any suggestions?
The text was updated successfully, but these errors were encountered: