<p>If you want to load transaction to <code>cardano-serialization-lib</code> generated by <code>cardano-cli</code> you'd first have to sign it with some &quot;dummy&quot; signature keys and then take cbor produced by the <code>cardano-cli</code> and load it:</p>
<pre><code>const txCli = wasm.Transaction.from_bytes(Buffer.from(cliTx, &quot;hex&quot;))
</code></pre>
<p>You can then take tx body from transaction that you've loaded, create new transaction with new witness-set and auxilary data.</p>
<p><strong>EDIT:</strong></p>
<p>I wrote a full <a href="https://srdjanstankovic.com/2021/12/24/how-to-sign-and-submit-cardano-cli-transaction-using-nami-wallet.html" rel="nofollow noreferrer">blog post</a> on how to sign cardano-cli tx using nami wallet. Hope this helps </p>

CC BY-SA 4.0
2022-05-29T17:03:11.973Z
This definitely helps, thanks for sharing it pyropy.
Latheesan
CC BY-SA 4.0
2021-12-09T12:29:33.507Z
2021-12-24T19:20:55.333Z
2021-12-24T19:20:55.333Z
pyropy
<p>the problem is that a raw transaction from the cardano-cli does actually not conform with the specs. Nami uses the serialization-lib in the back and this one can't recognize the cbor from the cli.</p>
<p>A little transformation is needed here. I assume your transaction has an emtpy witness set, which is represented in the cli cbor as empty array ([]). Changing that one to an empty map ({}) shoud resolve the issue.</p>
<p>Any cbor decoding/encoding tool can help here.</p>

CC BY-SA 4.0
2021-11-06T00:32:00.967Z
Thank you so much for your answer Alessandro, but i dont fully underestand I traduced it in a cbor decong and i fount this [{0: [[h'EE5966D3759E82463278640E58C3812A15ECA2AAF8DC1AC3063B5BAA43E41BE3', 0]], 13: [], 1: [[h'00756E62FF9667B187209B6FE1B577061491CF6F93A81E1F91741E2E3ACCB864AE67087F69BBD9AB74F71781D13AE40AAB86E1DE30CA7E2117', 974831815], [h'000E352F0CE47FFD66821DA9F002999E05F26534DA85CAE89559078F77561870240E88583B00FBC330B4DCD54E8DA71E5ED5E8729F01E79AFD', 25000000]], 2: 168185, 14: []}, [], [], [], true, null] there appear a lot of "[]" ? where can i read about Nami specs?
Alicia Basilio
CC BY-SA 4.0
2021-11-06T01:30:10.523Z
Where can i read about Nami Specs? if cardano-cli is not suitable for making Tx compatible with Nami wallet, what tool should i use?
Alicia Basilio
CC BY-SA 4.0
2021-10-30T08:16:33.957Z
2021-10-30T08:16:33.957Z
Alessandro Konrad
<p>FYI, I've raised an bug fix request with IOHK over this, as we've encountered the same problem whilst integrating our smart validators, at Artifct.app.</p>
<p>If you're encountering this problem too, it wouldn't hurt to add your name to the ticket:
<a href="https://github.com/input-output-hk/cardano-node/issues/3370" rel="nofollow noreferrer">https://github.com/input-output-hk/cardano-node/issues/3370</a></p>

CC BY-SA 4.0
2021-11-17T02:40:43.507Z
Thank you so much, but i am not sure it should be called a Bug since Cardano Serialization Lib Says in its documentation something about it. But it would be nice that all our tools would use the same specs.
Alicia Basilio
CC BY-SA 4.0
2021-11-16T11:48:13.960Z
2021-11-16T11:48:13.960Z
Kieran Simkin
<p>Hello I am tryng to sign a Tx using Nami Wallet, but i have not been able to do it.</p>
<p>I did a Tx using cardano-cli , and i've got a JSON file I take the cBORHex:&quot;86a70081825820eef507b798abbb8a1360efbd...&quot;</p>
<p>but when i try to sign the tx in the Nami Wallet:</p>
<pre><code>window.cardano.signTx(&quot;86a70081825820...&quot;)
</code></pre>
<p>i get: {code: -1, info: 'Inputs do not conform to this spec or are otherwise invalid.'}</p>
<p>My question is: is something wrong in the way i am thinking or implementing cardano-cli with Nami? Am I using correctly the Nami endpoint?</p>

<cardano-cli><nami-wallet>
Signing a Tx with Nami wallet
# Signing a Tx with Nami wallet

(Asked by: username_0 on 2021-10-29)

Hello I am tryng to sign a Tx using Nami Wallet, but i have not been able to do it.
I did a Tx using cardano-cli , and i've got a JSON file I take the cBORHex:"86a70081825820eef507b798abbb8a1360efbd..."
but when i try to sign the tx in the Nami Wallet:
window.cardano.signTx("86a70081825820...")

i get: {code: -1, info: 'Inputs do not conform to this spec or are otherwise invalid.'}
My question is: is something wrong in the way i am thinking or implementing cardano-cli with Nami? Am I using correctly the Nami endpoint?

**Tags:** cardano-cli, nami-wallet

---

## 3 answers

### Answer by username_1 on 2021-12-09. Score: 4 | Accepted answer

If you want to load transaction to cardano-serialization-lib generated by cardano-cli you'd first have to sign it with some "dummy" signature keys and then take cbor produced by the cardano-cli and load it:
const txCli = wasm.Transaction.from_bytes(Buffer.from(cliTx, "hex"))

You can then take tx body from transaction that you've loaded, create new transaction with new witness-set and auxilary data.
EDIT:
I wrote a full blog post on how to sign cardano-cli tx using nami wallet. Hope this helps

> **Comments:**
> **username_2**: This definitely helps, thanks for sharing it pyropy.  

---

### Answer by username_3 on 2021-10-30. Score: 5

the problem is that a raw transaction from the cardano-cli does actually not conform with the specs. Nami uses the serialization-lib in the back and this one can't recognize the cbor from the cli.

A little transformation is needed here. I assume your transaction has an emtpy witness set, which is represented in the cli cbor as empty array ([]). Changing that one to an empty map ({}) shoud resolve the issue.

Any cbor decoding/encoding tool can help here.

> **Comments:**
> **username_0**: Thank you so much for your answer Alessandro, but i dont fully underestand I traduced it in a cbor decong and i fount this [{0: [[h'EE5966D3759E82463278640E58C3812A15ECA2AAF8DC1AC3063B5BAA43E41BE3', 0]], 13: [], 1: [[h'00756E62FF9667B187209B6FE1B577061491CF6F93A81E1F91741E2E3ACCB864AE67087F69BBD9AB74F71781D13AE40AAB86E1DE30CA7E2117', 974831815], [h'000E352F0CE47FFD66821DA9F002999E05F26534DA85CAE89559078F77561870240E88583B00FBC330B4DCD54E8DA71E5ED5E8729F01E79AFD', 25000000]], 2: 168185, 14: []}, [], [], [], true, null] there appear a lot of "[]" ? where can i read about Nami specs?  
> **username_0**: Where can i read about Nami Specs? if cardano-cli is not suitable for making Tx compatible with Nami wallet, what tool should i use?  

---

### Answer by username_4 on 2021-11-16. Score: 1

FYI, I've raised an bug fix request with IOHK over this, as we've encountered the same problem whilst integrating our smart validators, at Artifct.app.

If you're encountering this problem too, it wouldn't hurt to add your name to the ticket:
<https://github.com/input-output-hk/cardano-node/issues/3370>

> **Comments:**
> **username_0**: Thank you so much, but i am not sure it should be called a Bug since Cardano Serialization Lib Says in its documentation something about it. But it would be nice that all our tools would use the same specs.  

---

