Types
Core TypeScript types exported by the SDK.
Types
Hex
Hex-encoded byte string, 0x-prefixed.
Prop
Type
Address
Ethereum address, 0x-prefixed.
Prop
Type
Span
Byte range in a source blob.
Prop
Type
Field
A decoded value with its byte position in the source blob.
Prop
Type
PolicyData
A policy: its selector, its descriptor and its groups of rules.
Prop
Type
Rule
A rule of a group: a test, a context test or a loop.
Prop
Type
BodyRule
A test or a context test of a loop body, or of a group.
Prop
Type
LoopRule
A loop: its body over each element of the array at path.
Prop
Type
Constraint
A collection of operators targeting a specific value.
Prop
Type
DecodedPolicy
A policy blob, each field with the bytes that contain it.
Prop
Type
DecodedGroup
A group, each field with the bytes that contain it.
Prop
Type
DecodedRule
A rule of a group: a test, a context test or a loop.
Prop
Type
DecodedTest
A test or a context test, each field with the bytes that contain it.
Prop
Type
DecodedLoop
A loop rule, each field with the bytes that contain it.
Prop
Type
DecodedHint
A test hint: its hops, then the target's position, meta word and type code.
Prop
Type
DecodedFrameHint
A frame hint: its hops, then the array's position, declared length and meta word.
Prop
Type
DecodedHop
A hop of a compiled hint: a plain hop enters the node behind an offset word, an element hop selects an element.
Prop
Type
ArrayMeta
An array's meta word.
Prop
Type
DecodedOperator
An operator as a policy stores it: its comparison, its polarity and its operands. Constants are loaded to 32-byte
words of operandType. A context operand names its property.
Prop
Type
DecodedDescriptor
A descriptor: its header fields and one node per parameter.
Prop
Type
DecodedNode
A descriptor node: its type, its head size and the bytes it spans, with its fields or its element.
Prop
Type
Issue
A validation issue: the rule it names, absent for one about the descriptor, and the values that show the defect.
Prop
Type
IssueCode
Machine-readable code of a validation issue.
Prop
Type
IssueSeverity
Severity of a validation issue.
Prop
Type
IssueCategory
Kind of defect a validation issue reports.
Prop
Type
RuleLocation
The rule an issue names: its group, its position in the group and, for a test in a loop body, its position in the body. The location also carries the rule's scope, path and operator as decoded. A path in a body starts at the element.
Prop
Type
Context
Execution context for context-scoped rules. Each property maps to a well-known EVM execution environment value. Only the properties referenced by the policy need to be supplied.
Prop
Type
EnforceResult
Result of enforcing a policy: pass with matched group index, or fail with one violation per failed group.
Prop
Type
Violation
Structured details of a single rule failure during enforcement.
Carries semantic data only, with no message strings. Discriminate on code to narrow to the matching variant.
Prop
Type
ViolationCode
Machine-readable reason code for an enforcement violation. Derived from Violation to prevent drift.
Prop
Type
NavigationViolationCode
Subset of violation codes emitted by reader/navigation primitives.
MissingSelectorViolation
Calldata is shorter than the policy's selector slot.
Prop
Type
SelectorMismatchViolation
Calldata selector does not match the policy's expected selector.
Prop
Type
MissingContextViolation
A test read a context property not supplied in the execution context — a context test's subject, or a context operand on either kind of test.
group and rule locate the root rule. A test in a loop body adds bodyRule and elementIndex.
Prop
Type
ValueMismatchViolation
A test's operator returned false against the loaded value.
resolvedValue is the value the operator compared: a word, or for length operators the length as a 32-byte word.
group and rule locate the root rule. A test in a loop body adds bodyRule and elementIndex.
Prop
Type
CalldataNavigationViolation
Calldata structure prevented a rule from being evaluated.
The operator was never applied. operator, typeCode, bodyRule and elementIndex are diagnostic context
describing the failing site, not a constraint claim. A failure resolving a loop's array carries the loop
rule's scope and array path and no operator. A failure resolving an element adds elementIndex. A failure in a body
test adds the test's fields and bodyRule.
A union of per-code variants, narrowable with Extract<Violation, { code: "..." }>.
NonCanonicalValueViolation
A resolved word is not the canonical encoding of its declared type.
resolvedValue is the raw 32-byte word as it appeared in calldata, before any masking.
Prop
Type
QuantifierLimitExceededViolation
A loop's array exceeded MAX_QUANTIFIED_ARRAY_LENGTH.
Prop
Type
QuantifierNoMatchViolation
No element satisfied an ANY loop's body, the empty array included. No element and no test is to blame.
Prop
Type