<p>If you have the <strong>Tx file</strong>, you can use <code>$ cardano-cli transaction view --tx-body-file tx.raw</code> to view the witness set. But, if you specifically want to extract from a given Tx ID, you can extract the <strong>witnesses' information</strong> through their input UTxO. The UTxO contains an address that is made up of a <strong>hashed public key</strong>, and from there you can list the <strong>public key hash</strong> needed for this transaction, also known as the <strong>witnesses</strong> required</p>
<p>Edit:
According to this <a href="https://cardano.stackexchange.com/questions/3888/are-transaction-witnesses-stored-on-the-blockchain?rq=1">thread</a> the witness information is actually in the blockchain, <strong>but not currently possible to extract it using db-sync</strong>. Reference to <a href="https://github.com/input-output-hk/cardano-ledger/blob/master/eras/babbage/test-suite/cddl-files/babbage.cddl" rel="nofollow noreferrer">this specification</a> for proof that the blockchain indeed stored the witnesses' key</p>

CC BY-SA 4.0
2022-08-29T13:30:22.643Z
2022-09-02T23:46:59.863Z
2022-09-02T23:46:59.863Z
Dani Ihza Farrosi
<p>Is there a tool or method to get the set of witnesses (public keys) of a transaction given the transaction ID?</p>

<transaction><public-key><signing-key-file>
Retrieve Witness Set from Transaction ID
# Retrieve Witness Set from Transaction ID

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

Is there a tool or method to get the set of witnesses (public keys) of a transaction given the transaction ID?

**Tags:** transaction, public-key, signing-key-file

---

## 1 answers

### Answer by username_1 on 2022-08-29. Score: -1

If you have the **Tx file**, you can use `$ cardano-cli transaction view --tx-body-file tx.raw` to view the witness set. But, if you specifically want to extract from a given Tx ID, you can extract the **witnesses' information** through their input UTxO. The UTxO contains an address that is made up of a **hashed public key**, and from there you can list the **public key hash** needed for this transaction, also known as the **witnesses** required

Edit:
According to this [thread](https://cardano.stackexchange.com/questions/3888/are-transaction-witnesses-stored-on-the-blockchain?rq=1) the witness information is actually in the blockchain, **but not currently possible to extract it using db-sync**. Reference to [this specification](https://github.com/input-output-hk/cardano-ledger/blob/master/eras/babbage/test-suite/cddl-files/babbage.cddl) for proof that the blockchain indeed stored the witnesses' key


---

