Running cardano-cli query ledger-state --mainnet --out-file out
produces a binary file.
What format is it in?
How can I decode it?
I cannot use the command without --out-file out
because of memory limitations.
UPDATE
I tried:
pip install cbor2
cat ledger-state.cbor | python -m cbor2.tool --pretty > ledger-state.json
which gave me:
[
320,
{
"\u0000\u0000\u00006\\xd5\u0015\\xe1.\u0018\\xcd<\\x88\\xc7O\t\\xa6y\\x84\\xc2\\xc2y\\xa5)j\\xa9n\\xfe\\x89": 58,
"\u0000\u0000\u0000\\xf6n(\\xb0\\xf1\\x8a\\xef U_LIT#N2p\\xdc\\xc1?T\\xe7\\x99": 57,
[...]
}
]
which does not seem to be decoded properly.