Hi fellas, i am following this to create and submit a transaction using this (https://github.com/blockfrost/blockfrost-js/blob/master/examples/simple-transaction/src/index.ts)
But as we can see that this is basically only considering the utxos of the address 0. And it uses Address 0’s private key i guess to submit a transaction.
However there could be a case where utxos might be in some other address of the same account with same mnemonics.
So to use utxos of different addresses, i just looped through all the associated addreses which have utxos and i pushed them here in this utxo array (https://github.com/blockfrost/blockfrost-js/blob/master/examples/simple-transaction/src/index.ts#L45)
But as you can see the signing key that they are using is derived and returned over here (https://github.com/blockfrost/blockfrost-js/blob/fb9a55fee07927f8d7c8b0a5aa9efd2d3daf6c77/examples/simple-transaction/src/helpers/key.ts#L45)
And then using this key to sign transaction over here
So i wanted to know what should i pass as the sign key so that every utxo, which is from any address can be signed. Also what should be its format ?
I am getting this error when i use bipPrvKey.to_raw_key() as the sign key:
transaction submit error ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (MissingVKeyWitnessesUTXOW (WitHashes (fromList [KeyHash “some _hash_here”]))))])"
Also i might not understand anything apart from blockfrost or cardano serialization library.
Open to any kind of help or suggestions .
Thanks in advance