<p>This is very probably due to a fact that the serialization library that Nami uses to construct transactions keeps a different order of witnesses as <code>cardano-cli</code> does, therefore if you sign a <code>cli</code> transaction with Nami, you get the <code>InvalidWitnessesUTXOW</code> error.</p>
<p>See the blog post entitled <a href="https://srdjanstankovic.com/2021/12/24/how-to-sign-and-submit-cardano-cli-transaction-using-nami-wallet.html" rel="nofollow noreferrer">How to sign and submit cardano-cli transaction using Nami Wallet</a> how to re-assemble the signing keys.</p>

CC BY-SA 4.0
2023-01-27T07:31:05.160Z
2023-01-27T07:31:05.160Z
Marek Mahut - StakeNuts
<p>I built transaction at nodejs by using cardano-cli.</p>
<pre><code>cardano-cli transaction build \
--alonzo-era \
--testnet-magic 1 \
--tx-in dbf7f56f844cc4b85daccb62bedf4eeff0a84cb060f0f79b206c7f087b3f0ba1#0 \
--tx-in dbf7f56f844cc4b85daccb62bedf4eeff0a84cb060f0f79b206c7f087b3f0ba1#1  \
--tx-in 61b88efd41ccbb0e71c48aca2cbe63728078ec7fb20ec9c27acfe33d0647248d#0 \
--tx-in-script-file /cardano/plutus/direct-sale.plutus \
--tx-in-datum-file /cardano/temp/testnet/datums/list.json \
--tx-in-redeemer-file /cardano/temp/testnet/redeemers/buy.json \
--required-signer-hash 2be4a303e36f628e2a06d977e16f77ce2b9046b8c56576bb5286d1be \
--tx-in-collateral dbf7f56f844cc4b85daccb62bedf4eeff0a84cb060f0f79b206c7f087b3f0ba1#1 \

... some txout ...

--change-address addr_test1qq47fgcrudhk9r32qmvh0ct0wl8zhyzxhrzk2a4m22rdr0sqcga2xfzv6crryyt0sfphksfr947jjddy3t4u0qwfmmfq2h0pj8 \
--protocol-params-file /cardano/testnet/protocol-parameters.json \
--mint &quot;2 20edea925974af2102c63adddbb6a6e789f8d3a16500b15bd1e1c32b.4143544956495459&quot; \
--mint-script-file /cardano/plutus/activity-minter.plutus \
--mint-redeemer-file /cardano/redeemers/mint.json \
--invalid-before 19059345 \
--invalid-hereafter 19059495 \
--out-file ./tx.raw
</code></pre>
<p>After run this command, I got cborHex and I used this at frontend.
When I sign by using name wallet, I got some error.</p>
<pre><code>&quot;transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (FromAlonzoUtxowFail (WrappedShelleyEraFailure (InvalidWitnessesUTXOW [VKey (VerKeyEd25519DSIGN \&quot;cf949f966b426f25db11b6062edc31312001e3cd0ced4c6c7db3da7b5ac9766b\&quot;)])))])&quot;
</code></pre>
<p>But when I sign with payment.skey at nodejs, it was worked.
I was discuss <strong>Alexd1985</strong> at cardano forum.</p>
<p><a href="https://forum.cardano.org/t/how-to-resolve-shelleytxvalidationerror-shelleybasederababbage-applytxerror-utxowfailure-fromalonzoutxowfail-wrappedshelleyerafailure-invalidwitnessesutxow-error/113555/4" rel="nofollow noreferrer">https://forum.cardano.org/t/how-to-resolve-shelleytxvalidationerror-shelleybasederababbage-applytxerror-utxowfailure-fromalonzoutxowfail-wrappedshelleyerafailure-invalidwitnessesutxow-error/113555/4</a></p>
<p>What is solution for this problem?</p>

<cardano-cli><cardano-address>
What is different nami wallet signing and payment.skey signing?
# What is different nami wallet signing and payment.skey signing?

(Asked by: username_0 on 2023-01-27)

I built transaction at nodejs by using cardano-cli.
cardano-cli transaction build \
--alonzo-era \
--testnet-magic 1 \
--tx-in dbf7f56f844cc4b85daccb62bedf4eeff0a84cb060f0f79b206c7f087b3f0ba1#0 \
--tx-in dbf7f56f844cc4b85daccb62bedf4eeff0a84cb060f0f79b206c7f087b3f0ba1#1  \
--tx-in 61b88efd41ccbb0e71c48aca2cbe63728078ec7fb20ec9c27acfe33d0647248d#0 \
--tx-in-script-file /cardano/plutus/direct-sale.plutus \
--tx-in-datum-file /cardano/temp/testnet/datums/list.json \
--tx-in-redeemer-file /cardano/temp/testnet/redeemers/buy.json \
--required-signer-hash 2be4a303e36f628e2a06d977e16f77ce2b9046b8c56576bb5286d1be \
--tx-in-collateral dbf7f56f844cc4b85daccb62bedf4eeff0a84cb060f0f79b206c7f087b3f0ba1#1 \

... some txout ...

--change-address addr_test1qq47fgcrudhk9r32qmvh0ct0wl8zhyzxhrzk2a4m22rdr0sqcga2xfzv6crryyt0sfphksfr947jjddy3t4u0qwfmmfq2h0pj8 \
--protocol-params-file /cardano/testnet/protocol-parameters.json \
--mint "2 20edea925974af2102c63adddbb6a6e789f8d3a16500b15bd1e1c32b.4143544956495459" \
--mint-script-file /cardano/plutus/activity-minter.plutus \
--mint-redeemer-file /cardano/redeemers/mint.json \
--invalid-before 19059345 \
--invalid-hereafter 19059495 \
--out-file ./tx.raw

After run this command, I got cborHex and I used this at frontend.
When I sign by using name wallet, I got some error.
"transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (FromAlonzoUtxowFail (WrappedShelleyEraFailure (InvalidWitnessesUTXOW [VKey (VerKeyEd25519DSIGN \"cf949f966b426f25db11b6062edc31312001e3cd0ced4c6c7db3da7b5ac9766b\")])))])"

But when I sign with payment.skey at nodejs, it was worked.
I was discuss Alexd1985 at cardano forum.
https://forum.cardano.org/t/how-to-resolve-shelleytxvalidationerror-shelleybasederababbage-applytxerror-utxowfailure-fromalonzoutxowfail-wrappedshelleyerafailure-invalidwitnessesutxow-error/113555/4
What is solution for this problem?

**Tags:** cardano-cli, cardano-address

---

## 1 answers

### Answer by username_1 on 2023-01-27. Score: 0

This is very probably due to a fact that the serialization library that Nami uses to construct transactions keeps a different order of witnesses as `cardano-cli` does, therefore if you sign a `cli` transaction with Nami, you get the `InvalidWitnessesUTXOW` error.

See the blog post entitled [How to sign and submit cardano-cli transaction using Nami Wallet](https://srdjanstankovic.com/2021/12/24/how-to-sign-and-submit-cardano-cli-transaction-using-nami-wallet.html) how to re-assemble the signing keys.


---

