1

I'm trying to use ConseilJS to make a transfer to a contract from a webpage.

I'm using a keystore object based on my tezos-client wallet.

 const keystore = {
            publicKey: 'edpkvAsDWNg3ygZ11NDjsMFDgdQ3z9mmGAzfnYrc4Ch8NNTezyWy8o',
            privateKey: 'edsk4KYzU19Hj7wuZX9it5L6pyRwz9zss2wk627kkvuGJB7vXHcwB8',
            publicKeyHash: 'tz1bwT9XB9tpzTKKw7UtTSzS9dfXjAzqXzoi',
            seed: '',
            storeType: conseiljs.StoreType.Mnemonic
        };

I get the following JS error:

TypeError: invalid privateKey length

Indeed, my private key on zeronet doesn't have the same length as the one provided on the ConseilJS tutorial.

I get the same error if I try to reconstruct a keystore using restoreIdentityWithSecretyKey.

 const keystore = await conseiljs.TezosWalletUtil.restoreIdentityWithSecretKey('edsk4KYzU19Hj7wuZX9it5L6pyRwz9zss2wk627kkvuGJB7vXHcwB8')
1

Please retry creating the keys from the faucet mnemonic, it sounds like you missed a few characters when copying the secret key.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.