Core pipeline
xchain-decoder
Reads the blockchain and extracts XChain transactions.
Where it fits
Coin node
Decoder
Indexer
One instance per chain; turns raw blocks into decoded ACTIONs in the decoder database.
What it is
The decoder polls a coin node block by block, finds the XChain data hidden inside ordinary transactions, deobfuscates and decodes it into raw ACTION strings, and writes them to its database. It is the platform's eyes on the chain.
How it fits into the platform
The first stage of the data pipeline: it sits between the coin node and the indexer, turning raw blocks into decoded ACTIONs. One instance runs per chain and network.
What it can do
- Identifies XChain payloads by the XCHN magic prefix
- Deobfuscates each payload (AES-128-CTR keyed by the first input txid)
- Coin-specific parsing: strips Litecoin HogEx and Dogecoin AuxPoW headers
- Detects chain reorganizations and rolls back to the last common ancestor
- Tracks the mempool to power unconfirmed dispenser responses
Under the hood
- Parses with bitcoinjs-lib
- Writes a MariaDB decoder database
- Outbound JSON-RPC to the coin node; no inbound API
- One instance per chain/network