Error Codes
The firewall and registry layers use stable error codes for deterministic handling.
Handle them in code
Section titled “Handle them in code”const result = firewall.checkTransaction(tx);
if (!result.ok) { switch (result.code) { case 8: // Missing registry dep break; case 9: // Invalid registry payload break; case 10: // Registry payload order is wrong break; case 11: // Blacklisted lock args break; case 12: // Blacklisted type args break; case 17: // More than one registry dep matched break; }}Firewall lock
Section titled “Firewall lock”5InvalidArgsLayout6UnsupportedVersion7UnsupportedFlags8MissingRegistryCellDep9InvalidRegistryData10RegistryNotSorted11BlacklistedLockArgs12BlacklistedTypeArgs13MissingInnerLockCellDep14InvalidInnerLockScript15InnerLockRejected16OutputScriptParseFailed17AmbiguousRegistryCellDep
Governance lock
Section titled “Governance lock”These codes are returned by governance-lock when a registry update transaction is rejected.
1InvalidArgs— contract args are not 1 byte (version)2InvalidBlkl— registry cell data is not a valid BLKL v2 payload or governance header3InvalidWitness— GOV1 payload is malformed (wrong magic, wrong version, wrong length, or zero hashes)4SigVerificationFailed— a validator vote entry has an invalid secp256k1 signature, a mismatched recovered pubkey, or an invalid validator Merkle proof5ThresholdNotMet— fewer than the required number of valid validator yes-votes6ReviewWindowNotMet— the anchoredPBLKproposal input’ssincefield does not encode a relative median-time-past delay of at leastreview_delay_ms
Blacklist registry
Section titled “Blacklist registry”20InvalidTypeArgsLayout21InvalidRegistryCellTopology22InvalidRegistryPayload23UnsupportedRegistryVersion24InvalidGovernanceWitness25UnauthorizedGovernanceLock27InvalidTypeId28InvalidProposalCell— thePBLKproposal cell data is malformed or does not match the registry transition
Proposal anchor
Section titled “Proposal anchor”These codes are returned by the proposal-anchor type script, which validates PBLK cells during anchor creation, execution, and reclaim.
31InvalidTypeArgs— proposal-anchor type args are malformed32InvalidTopology— transaction input/output structure is invalid for a proposal-anchor operation33InvalidProposalData—PBLKcell data is malformed or has an unsupported version34UnauthorizedTreasuryLock— the input spending the anchor is not locked by the registry treasury lock35InvalidReclaimReturn— reclaim output does not return full capacity to the treasury lock36InvalidReclaimSince— the anchor input’ssincefield does not encode a valid relative timestamp delay for reclaim
SDK mapping
Section titled “SDK mapping”The TypeScript SDK currently exposes the subset of codes relevant to pre-flight validation:
8910111217
Why this matters
Section titled “Why this matters”These codes are stable identifiers shared by the on-chain scripts, the SDKs, and the CLI.
Fix these codes
Section titled “Fix these codes”| Code(s) | Fix |
|---|---|
8 MissingRegistryCellDep | Fix: MissingRegistryCellDep |
9 InvalidRegistryData, 10 RegistryNotSorted | Fix: stale registry cell |
17 AmbiguousRegistryCellDep | Fix: AmbiguousRegistryCellDep |
11 BlacklistedLockArgs, 12 BlacklistedTypeArgs | Pre-flight caught a blacklisted output. Block the transfer. |
| Pre-flight passes but on-chain fails | Fix: pre-flight passes, on-chain fails |
| All codes — symptom not clear | Troubleshooting index |
Related pages
Section titled “Related pages”- TypeScript SDK API —
FirewallSdkErrorand its subclasses - Rust SDK API —
FirewallErrorenum variants - Proposal anchor contract — codes 31–36 in detail