Hi all,
Does anyone know and able to explain to me how the ScriptDataBytes value is encoded as part of a query of an address as part of a cardano-cli call return?
i.e. ReferenceTxInsScriptsInlineDatumsInBabbageEra is returned with the datum encoded.
but there are elements such as \NUL and \ETB.
What I’m failing to understand how these related to the CBOR/CDDL structures?
i.e. is there a mapping standard if this is for human readable values? or is this following a standard encode/decode specification I’m not aware of?
If I get the datum from dbsync, all is well. I’m just wondering if the datum should be decodable from cardano-cli?
Thanks and kind regards
Carl (Vegas pool)
P.S. maybe an example would help:
TxHash TxIx Amount
--------------------------------------------------------------------------------------
921c4884dc46e155a2b5e8ce4c24656e49b29a4661d1e42a5f2f35c611935635 0 3749700 lovelace + 1 279f842c33eed9054b9e3c70cd6a3b32298259c24b78b895cb41d91a.6c6f72642074756e61 + TxOutDatumInline ReferenceTxInsScriptsInlineDatumsInBabbageEra (ScriptDataConstructor 0 [ScriptDataNumber 4635,ScriptDataBytes "\NUL\NUL\NUL\148\206\239r\145\147\165\199\137\EMe\153&\EMA\189\171\f9\150\&1\211k\245\DC4G\173\ETB\166",ScriptDataNumber 6,ScriptDataNumber 65532,ScriptDataNumber 21159000,ScriptDataNumber 1693303667000,ScriptDataBytes "AlL HaIl tUnA",ScriptDataList [ScriptDataBytes "\NUL\NUL\NUL\"\219\249TB`\129\&0\227or\252\180\255\190\200iW\143\&4\251\217\235\240\225\214<\223\214",ScriptDataBytes "\NUL\NUL\NUL\"\219\249TB`\129\&0\227or\252\180\255\190\200iW\143\&4\251\217\235\240\225\214<\223\214",ScriptDataBytes "\NUL\NUL\NUL\SO\236+}n\179\213\255O\223\ni\255?\STX\ETB\EM\180\202<\240\187J\227\130\GSty\153",ScriptDataBytes "\NUL\NUL\NUL\SO\236+}n\179\213\255O\223\ni\255?\STX\ETB\EM\180\202<\240\187J\227\130\GSty\153",ScriptDataBytes "\NUL\NUL\NUL\a\154\174\DC3\173,T\ENQ\221\174mL\130\228\STX\246\FSpr\222\186\135 \140Z\141A\209\239",ScriptDataBytes "\NUL\NUL\NUL\NUL\132o|R\185c\241\225\233\204L\184\&1\237E`\195\207?\237\a\176\181\144\ACKw\188\133",ScriptDataBytes "\NUL\NUL\NUL\NUL\132o|R\185c\241\225\233\204L\184\&1\237E`\195\207?\237\a\176\181\144\ACKw\188\133",ScriptDataBytes "\NUL\NUL\NUL\NUL\132o|R\185c\241\225\233\204L\184\&1\237E`\195\207?\237\a\176\181\144\ACKw\188\133",ScriptDataBytes "\NUL\NUL\NUL\NUL\"\200\132BkTW\178!\229\FS\FS\141\157e\NAK\v\215\166\216\NAK\\\250G\244y\231\135",ScriptDataBytes "\NUL\NUL\NUL\NUL\"\200\132BkTW\178!\229\FS\FS\141\157e\NAK\v\215\166\216\NAK\\\250G\244y\231\135",ScriptDataBytes "\NUL\NUL\NUL\NUL\ETXC\USbf\227\254'H\222\150\224K\147\203\224vf\138\DC2\248BSQ\131b\253b",ScriptDataBytes "\NUL\NUL\NUL\NUL\ETXC\USbf\227\254'H\222\150\224K\147\203\224vf\138\DC2\248BSQ\131b\253b",ScriptDataBytes "\NUL\NUL\NUL\NUL\ETXC\USbf\227\254'H\222\150\224K\147\203\224vf\138\DC2\248BSQ\131b\253b",ScriptDataBytes "\NUL\NUL\NUL\NUL\ETXC\USbf\227\254'H\222\150\224K\147\203\224vf\138\DC2\248BSQ\131b\253b",ScriptDataBytes "\NUL\NUL\NUL\NUL\ETXC\USbf\227\254'H\222\150\224K\147\203\224vf\138\DC2\248BSQ\131b\253b",ScriptDataBytes "\NUL\NUL\NUL\NUL\ETXC\USbf\227\254'H\222\150\224K\147\203\224vf\138\DC2\248BSQ\131b\253b"]])
Looking at the fortuna datum as a good example. From this, I know ScriptDataBytes of
> Blockquote
""\NUL\NUL\NUL\148\206\239r\145\147\165\199\137\EMe\153&\EMA\189\171\f9\150\&1\211k\245\DC4G\173\ETB\166""
is actually:
0000006E802627BFFD40C348833778923813FDE7341214DBE986EDCA80A545B3
and should map to CBOR/CDDL of:
> Blockquote
b"\u0000\u0000\u0000n\x80&'\xBF\xFD@\xC3H\x837x\x928\u0013\xFD\xE74\u0012\u0014\xDB\xE9\x86\xEDʀ\xA5E\xB3"
However, I don’t get how cardano-cli is encoding this?!