user2068: 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?

user4812: 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

user1045: 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 

user2077: 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.

2068: <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>
 4812: <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>
 1045: <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>
 2077: <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>
