I am @emurgo/cardano-serialization-lib-nodejs
to submit transaction in cardano.
I am getting following error.
Transaction 5c98317bc6caf027b91e807ed1cdd78571b8f9a791202b5feff5b32fa5f71f1f rejected,
message: "transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage
(ApplyTxError [UtxowFailure (FromAlonzoUtxowFail (WrappedShelleyEraFailure
(MissingVKeyWitnessesUTXOW (WitHashes (fromList [KeyHash
\"7afb7e3bfc4a25c9b5387657e8f71ae0c2d5f3b26142b51592785972\"])))))])"
I checked https://forum.cardano.org/t/blockfrostservererror-transaction-submit-error-shelleytxvalidationerror-shelleybasederababbage-applytxerror-utxowfailure-fromalonzoutxowfail-wrappedshelleyerafailure-missingvkeywitnessesutxow-withashes-fromlist-keyhash-b5cfe7a19bd626bd0d26657e/114662 and I am using utxoKey as signKey, but I am still getting above error.
How can I fix it?
Following is my code snippet to get signKey and address.
const accountKey = bipPrvKey
.derive(harden(44)) // purpose
.derive(harden(1815)) // coin type
.derive(harden(0)); // account #
const utxoKey = accountKey
.derive(0) // external
.derive(0);
const utxoPubKey = utxoKey.to_public();
const byronAddr = CardanoWasm.ByronAddress.icarus_from_key(
utxoPubKey,
CardanoWasm.NetworkInfo.mainnet().protocol_magic()
);
const address = byronAddr.to_base58();
return { signKey: utxoKey.to_raw_key(), address: address };