1

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

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

1 Answer 1

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

2
  • 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 Dec 2, 2022 at 7:31
  • 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: let isTestnet=true;helios.Address.fromPubKeyHash(isTestnet, helios.PubKeyHash.fromHex(" BAED3AE13D7EEB93BB4B4F44E10AFF9F1FC052869F4A1CD1501BE928")).toBech32() which results in addr_test1vzaw6whp84lwhyamfd85fcg2l703lszjs60558x32qd7j2qnwhmq3 Dec 2, 2022 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.