<p>Found it.</p>
<p>In case you find your self coming here to find the answer, you can create an instance of TransactionWitnessSet, using the witness you got from the wallet api.</p>
<pre><code>const witness  =  C.TransactionWitnessSet.from_bytes(hexToBytes(signature))
</code></pre>
<p>You can then derive the publicKey of the signer, and use the publicKey method <code>verify()</code> to verify against your transaction.</p>
<pre><code>Const validSignature =   witness.vkeys().get(0).vkey().public_key().verify(tx, witness.vkeys().get(0).signature())) 
</code></pre>

CC BY-SA 4.0
2022-12-27T05:23:33.250Z
2022-12-27T09:47:54.827Z
2022-12-27T09:47:54.827Z
Leo
<p>Say I created a multi-sig transaction and I am now gathering signatures using the Cardano-multiplatform-library.</p>
<p>How can I check that the signature is correct for my transaction body, and the signers pub-key ?</p>

<cardano-serialization-lib><lucid><cardano-multiplatform-lib>
Verify Tx Signature
# Verify Tx Signature

(Asked by: username_0 on 2022-12-27)

Say I created a multi-sig transaction and I am now gathering signatures using the Cardano-multiplatform-library.

How can I check that the signature is correct for my transaction body, and the signers pub-key ?

**Tags:** cardano-serialization-lib, lucid, cardano-multiplatform-lib


---

## 1 answers

### Answer by username_0 on 2022-12-27. Score: 0

Found it.

In case you find your self coming here to find the answer, you can create an instance of TransactionWitnessSet, using the witness you got from the wallet api.

```
const witness  =  C.TransactionWitnessSet.from_bytes(hexToBytes(signature))

```

You can then derive the publicKey of the signer, and use the publicKey method `verify()` to verify against your transaction.

```
Const validSignature =   witness.vkeys().get(0).vkey().public_key().verify(tx, witness.vkeys().get(0).signature())) 

```


---

