BLKL Registry Format
BLKL is the registry payload format used by the firewall.
Minimal code path
Section titled “Minimal code path”The TypeScript SDK parses the live registry cell data directly:
import { parseRegistryPayload } from "@ckb-firewall/sdk";
const payload = parseRegistryPayload(liveCell.data);console.log(payload.version);console.log(payload.entries);If you are building or replacing the payload, follow the same byte layout as sdk/cli/src/lib/blkl.ts.
Layout
Section titled “Layout”All multi-byte values are little-endian.
magic- 4 bytes, ASCIIBLKLversion- 1 byte, currently0x01entry_count- 4 bytes,u32entries- repeated records
Each entry is:
identifier_len- 1 byteidentifier- variable-length bytesexpires_at- 8 bytes,u64Unix timestamp,0for permanent
- The payload must begin with
BLKL - The version must be
0x01 - Entries must be sorted deterministically
- The TypeScript parser currently allows equal identifiers, but the Rust parser rejects non-increasing order. Keep entries strictly sorted if you want both SDKs to accept the same cell data.
- Temporary entries expire based on the chain time used by the lock
The SDK and the lock both parse this same payload shape, so docs and fixtures need to stay in sync with the contract behavior.
The checked-in testnet fixture is notes/deployments/testnet.registry.json.