0

Is there any Javascript code out there or examples on how to sign a transaction by using the extended-private-key?

What I am essentially looking for is code that will help derive the private key, that I can then use to sign an individual UTXO with.

Thanks in advance!

0

For anyone that might be interested in this, there is a great BIP32 library from the same people who created the bitcoinjs-lib and it has the tools to derive your private keys from the extended master-private-key.

const t = bip32.fromBase58(extPrivateKey, zenCashNetwork);

const derivedIndex = `${utxo.AddrType}/${utxo.AddrIndex}`;

const wifKey = t.derivePath(derivedIndex).toWIF();

In our case, we needed this to sign a ZenCash transaction

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.