Skip to content

Parse CBOR filter

The ParseCbor filter decodes raw CBOR into structured records, so downstream stages get something far easier to work with than a hex blob. It’s a prerequisite for most real processing — notably the Select filter. The records follow the UTxORPC schema.

It adapts to whatever it receives:

  • a CborBlock is decoded into a structured Block.
  • a CborTx is decoded into a structured Tx. This requires the SplitBlock filter earlier in the chain to produce the CborTx records.
  • anything else is passed through untouched.

Configuration

daemon.toml
[[filters]]
type = "ParseCbor"

This filter takes no additional options.

Examples

From a CborBlock, the next stage receives a structured block:

{
"event": "apply",
"point": {
"slot": 0,
"hash": ""
},
"record": {
"header": {},
"body": {}
}
}

From a CborTx (when SplitBlock ran first), it receives one structured transaction per event:

{
"event": "apply",
"point": {
"slot": 0,
"hash": ""
},
"record": {
"inputs": [],
"outputs": [],
...
}
}