-
Notifications
You must be signed in to change notification settings - Fork 127
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
Bip32PrivateKey.from_bip39_entropy() function failing to execute. #714
Comments
hey @B35000 , i do it like: var entropy = Buffer.from(bip39.mnemonicToEntropy(mnemonics),'hex')
var rootKey = CardanoWasm.Bip32PrivateKey.from_bip39_entropy(entropy,''); //generate a ed25519e key from the provided entropy(mnemonics) |
From what im seeing, were looking at the exact same code except for the import statement. In your example you're using Thanks for the response. |
why do you need
? for the password, have your tried it without a second parameter? |
The call requires two parameters, the |
I just pass a EDIT: ah just reading that you have tried it already |
Hi @B35000 could you publish on GH isolated example to reproduce issue on our side ? |
Ive created a basic CRA project that illustrated the issue here |
@B35000 the problem here is that react-scripts doesn’t support wasm files. But in your case you can use craco #installation
npm install @craco/craco --save Package.json changes: "scripts": {
"start": "craco start”,
"build": "craco build”,
"test": "craco test”,
"eject": "react-scripts eject”
}, craco.config.js module.exports = {
webpack: {
configure: (webpackConfig) => {
webpackConfig.experiments = {
...webpackConfig.experiments,
asyncWebAssembly: true,
};
webpackConfig.module.rules.push({
test: /\.wasm$/,
type: "webassembly/async",
});
return webpackConfig;
},
},
}; Aslo if you are gonna to deploy your web app somewhere make sure that your web server is configured to provide wasm files or your bundler inlines it into web app bundle. |
Im trying to use the library to generate a valid cardano wallet address from a valid Bip39 mnemonic in my CRA project but the very first function is failing to execute for some reason. My import statements look like this:
and the code im using:
the expected output was to log an address in the console, but instead im receiving this error:
The library version in my package.json:
"@emurgo/cardano-serialization-lib-browser": "^12.1.1"
NPM version: 9.6.7, Node version: 18.17.1The text was updated successfully, but these errors were encountered: