I’m trying to create a multisignature transaction on Cardano. For that, I’m following the official Cardano-node docs but it seems the official doc itself is outdated.
I have followed every step of the docs but when I tried to sign the witness with allMultiSigScript script file, as described in the section Step 2 - construct required witnesses, I’m getting the following error
Invalid option `--script-file'
Usage: cardano-cli transaction witness --tx-body-file FILE
--signing-key-file FILE
[--address STRING]
[--mainnet | --testnet-magic NATURAL]
--out-file FILE
It seems cardano-cli transaction witness doesn’t have an option name --script-file anymore. Does anyone have an updated version of how to execute this operation?
1 Like
I think you have to give it to cardano-cli transaction build
(or cardano-cli transaction build-raw
if you must) with the --tx-in-script-file
option and not to cardano-cli transaction witness
anymore.
Also makes more sense, since the script file is not itself a witness, but just defines, which witnesses are needed.
1 Like
Try using the following cli commands to build along with a native script that specifies “sig” for multiple public key hashes:
cardano-cli address build --payment-script-file --testnet-magic 1 --out-file multi-sig-address.addr
cardano-cli transaction build
–alonzo-era
–testnet-magic 1
–witness-override 2
–tx-in $TXIN
–tx-in-script-file <NATIVESCRIPTFILE.SCRIPT>
–tx-out $SENDER+3000000
–change-address $RECEIVE
–out-file multi-sig.tx
EACH WITNESS DOES THIS STEP:
cardano-cli transaction witness
–tx-body-file multi-sig.tx
–signing-key-file payment1.skey
–testnet-magic 1
–out-file multi-sig1.witness
cardano-cli transaction witness
–tx-body-file multi-sig.tx
–signing-key-file payment2.skey
–testnet-magic 1
–out-file multi-sig2.witness
cardano-cli transaction assemble
–tx-body-file multi-sig.tx
–witness-file multi-sig1.witness
–witness-file multi-sig2.witness
…could be additional witnesses here…
–out-file tx.signed
cardano-cli transaction submit
–testnet-magic 1
–tx-file tx.signed
1 Like