I am building a Secret NFT and I'm following this tutorial https://youtu.be/jRuSOos9ig4. I tried to deploy the NFT like this video narrator does around 31:12. I ran a the deploy-nft.js file that failed at this line:
const signingPen = await Secp256k1Pen.fromMnemonic(mnemonic).catch((err) => {
throw new Error(`Could not get signing pen: ${err}`);
});
With this error:
TypeError: Cannot read properties of undefined (reading 'fromMnemonic')
at main (C:\Users\nyusername\path\to\secret-nft-two\contract\deploy-nft.js:40:43)
at Object.<anonymous> (C:\Users\nyusername\path\to\secret-nft-two\contract\deploy-nft.js:94:3)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Module._load (node:internal/modules/cjs/loader:827:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47
I imported Secp256k1Pen at the top of the file like this:
const {
EnigmaUtils,
Secp256k1Pen,
SigningCosmWasmClient,
pubkeyToAddress,
encodeSecp256k1Pubkey,
} = require("secretjs");
So why is it failing with this error?