Callcium
API

Types

Core TypeScript types exported by the SDK.

Types

Hex

Hex-encoded byte string, 0x-prefixed.

Git Source

Prop

Type

Address

Ethereum address, 0x-prefixed.

Git Source

Prop

Type

Span

Byte range in a source blob.

Git Source

Prop

Type

Field

A decoded value with its byte position in the source blob.

Git Source

Prop

Type

PolicyData

A policy: its selector, its descriptor and its groups of rules.

Git Source

Prop

Type

Rule

A rule of a group: a test, a context test or a loop.

Git Source

Prop

Type

BodyRule

A test or a context test of a loop body, or of a group.

Git Source

Prop

Type

LoopRule

A loop: its body over each element of the array at path.

Git Source

Prop

Type

Constraint

A collection of operators targeting a specific value.

Git Source

Prop

Type

DecodedPolicy

A policy blob, each field with the bytes that contain it.

Git Source

Prop

Type

DecodedGroup

A group, each field with the bytes that contain it.

Git Source

Prop

Type

DecodedRule

A rule of a group: a test, a context test or a loop.

Git Source

Prop

Type

DecodedTest

A test or a context test, each field with the bytes that contain it.

Git Source

Prop

Type

DecodedLoop

A loop rule, each field with the bytes that contain it.

Git Source

Prop

Type

DecodedHint

A test hint: its hops, then the target's position, meta word and type code.

Git Source

Prop

Type

DecodedFrameHint

A frame hint: its hops, then the array's position, declared length and meta word.

Git Source

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.

Git Source

Prop

Type

ArrayMeta

An array's meta word.

Git Source

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.

Git Source

Prop

Type

DecodedDescriptor

A descriptor: its header fields and one node per parameter.

Git Source

Prop

Type

DecodedNode

A descriptor node: its type, its head size and the bytes it spans, with its fields or its element.

Git Source

Prop

Type

Issue

A validation issue: the rule it names, absent for one about the descriptor, and the values that show the defect.

Git Source

Prop

Type

IssueCode

Machine-readable code of a validation issue.

Git Source

Prop

Type

IssueSeverity

Severity of a validation issue.

Git Source

Prop

Type

IssueCategory

Kind of defect a validation issue reports.

Git Source

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.

Git Source

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.

Git Source

Prop

Type

EnforceResult

Result of enforcing a policy: pass with matched group index, or fail with one violation per failed group.

Git Source

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.

Git Source

Prop

Type

ViolationCode

Machine-readable reason code for an enforcement violation. Derived from Violation to prevent drift.

Git Source

Prop

Type

Subset of violation codes emitted by reader/navigation primitives.

Git Source

Prop

Type

MissingSelectorViolation

Calldata is shorter than the policy's selector slot.

Git Source

Prop

Type

SelectorMismatchViolation

Calldata selector does not match the policy's expected selector.

Git Source

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.

Git Source

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.

Git Source

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: "..." }>.

Git Source

Prop

Type

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.

Git Source

Prop

Type

QuantifierLimitExceededViolation

A loop's array exceeded MAX_QUANTIFIED_ARRAY_LENGTH.

Git Source

Prop

Type

QuantifierNoMatchViolation

No element satisfied an ANY loop's body, the empty array included. No element and no test is to blame.

Git Source

Prop

Type

On this page