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”5InvalidArgsLayout6UnsupportedVersion7UnsupportedFlags8MissingRegistryCellDep9InvalidRegistryData10RegistryNotSorted11BlacklistedLockArgs12BlacklistedTypeArgs13MissingInnerLockCellDep14InvalidInnerLockScript15InnerLockRejected16OutputScriptParseFailed- 17 AmbiguousRegistryCellDep
Blacklist registry
Section titled “Blacklist registry”- 20 InvalidTypeArgsLayout
- 21 InvalidRegistryCellTopology
- 22 InvalidRegistryPayload
- 23 UnsupportedRegistryVersion
- 24 InvalidGovernanceWitness
- 25 UnauthorizedGovernanceLock
- 26 UnauthorizedSigners
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.