<p>A good tool for manually analyzing CBOR is <a href="https://cbor.nemo157.com/" rel="nofollow noreferrer">https://cbor.nemo157.com/</a></p>
<p>What they probably meant by &quot;JSON strings are represented as CBOR strings&quot; is that typical JSON objects can be represented in tx-metadata using CBOR</p>

CC BY-SA 4.0
2022-12-02T07:31:52.080Z
I am trying to figure out how a value like this one, in the object, is a value that decodes to a wallet address:

BAED3AE13D7EEB93BB4B4F44E10AFF9F1FC052869F4A1CD1501BE928
RelevantData
CC BY-SA 4.0
2022-12-02T12:18:39.733Z
I don't think there are any easy-to-use online tools for converting the hex of, I'm assuming, a pubkeyhash into a bech32 encoded address. You would have to use a library. Eg. with Javascript and [Helios](https://www.hyperion-bt.org/Helios-Book/api/reference/address.html#frompubkeyhash): `let isTestnet=true;helios.Address.fromPubKeyHash(isTestnet, helios.PubKeyHash.fromHex(" BAED3AE13D7EEB93BB4B4F44E10AFF9F1FC052869F4A1CD1501BE928")).toBech32()` which results in `addr_test1vzaw6whp84lwhyamfd85fcg2l703lszjs60558x32qd7j2qnwhmq3`
Christian Schmitz
CC BY-SA 4.0
2022-11-26T02:08:22.937Z
2022-11-26T02:08:22.937Z
Christian Schmitz
<p>In the document:</p>
<p><a href="https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/tx-metadata.md" rel="nofollow noreferrer">https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/tx-metadata.md</a></p>
<p>We are told: &quot;JSON strings are represented as CBOR strings&quot;
How can I interpret these?</p>
<p>The source of th eformat of those appears to be here:
<a href="https://www.rfc-editor.org/rfc/rfc7049" rel="nofollow noreferrer">https://www.rfc-editor.org/rfc/rfc7049</a></p>
<p>Here is an example of one from a transaction in the tx_metadata table of cardano-db-sync</p>
<blockquote>
<p>d8799f581c25fa506339b24dc4e1a643637325e700ae498e646746a5426739f2</p>
</blockquote>
<p><a href="https://i.sstatic.net/5Z3sP.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/5Z3sP.png" alt="enter image description here" /></a></p>
<p>...there is this:
<a href="https://github.com/CardanoSharp/CBOR" rel="nofollow noreferrer">https://github.com/CardanoSharp/CBOR</a></p>
<p>...and this:
<a href="https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/tx-metadata.md" rel="nofollow noreferrer">https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/tx-metadata.md</a></p>
<p>...and this:
<a href="https://input-output-hk.github.io/cardano-wallet/user-guide/common-use-cases/TxMetadata" rel="nofollow noreferrer">https://input-output-hk.github.io/cardano-wallet/user-guide/common-use-cases/TxMetadata</a></p>

<cardano-node><cardano-db-sync>
tx_metadata: How to interpret a CBOR string
# tx_metadata: How to interpret a CBOR string

(Asked by: username_0 on 2022-11-25)

In the document:

<https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/tx-metadata.md>

We are told: "JSON strings are represented as CBOR strings"
How can I interpret these?

The source of th eformat of those appears to be here:
<https://www.rfc-editor.org/rfc/rfc7049>

Here is an example of one from a transaction in the tx\_metadata table of cardano-db-sync

> d8799f581c25fa506339b24dc4e1a643637325e700ae498e646746a5426739f2

[![enter image description here](https://i.sstatic.net/5Z3sP.png)](https://i.sstatic.net/5Z3sP.png)

...there is this:
<https://github.com/CardanoSharp/CBOR>

...and this:
<https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/tx-metadata.md>

...and this:
<https://input-output-hk.github.io/cardano-wallet/user-guide/common-use-cases/TxMetadata>

**Tags:** cardano-node, cardano-db-sync

---

## 1 answers

### Answer by username_1 on 2022-11-26. Score: 2

A good tool for manually analyzing CBOR is <https://cbor.nemo157.com/>

What they probably meant by "JSON strings are represented as CBOR strings" is that typical JSON objects can be represented in tx-metadata using CBOR

> **Comments:**
> **username_0**: I am trying to figure out how a value like this one, in the object, is a value that decodes to a wallet address:  BAED3AE13D7EEB93BB4B4F44E10AFF9F1FC052869F4A1CD1501BE928  
> **username_1**: I don't think there are any easy-to-use online tools for converting the hex of, I'm assuming, a pubkeyhash into a bech32 encoded address. You would have to use a library. Eg. with Javascript and [Helios](https://www.hyperion-bt.org/Helios-Book/api/reference/address.html#frompubkeyhash): `let isTestnet=true;helios.Address.fromPubKeyHash(isTestnet, helios.PubKeyHash.fromHex(" BAED3AE13D7EEB93BB4B4F44E10AFF9F1FC052869F4A1CD1501BE928")).toBech32()` which results in `addr_test1vzaw6whp84lwhyamfd85fcg2l703lszjs60558x32qd7j2qnwhmq3`  

---

