I think the above script has no problem, but the last command puts following warning and doesn’t generate a witness file of the stake key.
Warning! A superfluous HW signing file specified (2 of 2), the witness was not created.
Warning! A superfluous output file specified (2 of 2), the file was not written to.
${STAKE_HWSFILE} and ${STAKE_VKEY} was created by following command.
The call for creating the stake witness puts warning messages and doesn’t create the witness file.
cardano-hw-cli transaction witness \
--tx-file ${TX_TRANSFORMED} \
--hw-signing-file ${STAKE_HWSFILE} \
—testnet-magic 2 \
--out-file ${STAKE_WITNESS} \
--derivation-type LEDGER
> Warning! A superfluous HW signing file specified (1 of 1), the witness was not created.
> Warning! A superfluous output file specified (1 of 1), the file was not written to.
What is ${INDEX}? The stake key should be 1852H/1815H/0H/2/0, not another index.
That could explain the superfluous HW signing file (and subsequently a missing signature from the real stake key).
Regarding Missing signing file for certificate: What is the content of the ${PAYMENT_HWSFILE} variable? Is it really the correct HW signing file?
Thank you for sharing the scripts.
I can’t run that immediately because of my environment setting.
As far as I checked, There is not much difference with my scripts.
I’ll check my scripts in detail based on the scripts you shared.