Pre-release — The API surface may change. Unaudited.
Callcium LogoCallcium
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

Canonical structured representation of a policy.

Git Source

Prop

Type

Constraint

A collection of operators targeting a specific value.

Git Source

Prop

Type

DecodedPolicy

Structural representation of a decoded policy with full byte-level spans.

Git Source

Prop

Type

DecodedGroup

Structural representation of a decoded group with metadata spans.

Git Source

Prop

Type

DecodedRule

Structural representation of a decoded rule with per-field spans.

Git Source

Prop

Type

DecodedParam

Structural representation of a decoded parameter within the descriptor.

Git Source

Prop

Type

Issue

A single validation issue found during policy analysis.

Git Source

Prop

Type

IssueSeverity

Severity of a validation issue.

Git Source

Prop

Type

IssueCategory

Category of a validation issue.

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 — message strings are the consumer's responsibility. 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 context-scoped rule referenced a property not supplied in the execution context.

opCode and operandData may be added in future versions as diagnostic context without breaking the contract; consumers should tolerate their presence.

Git Source

Prop

Type

ValueMismatchViolation

A rule's operator returned false against the loaded value.

Field combinations:

  • resolvedValue present, elementIndex absent — scalar leaf or context value that failed the operator.
  • resolvedValue present, elementIndex present — universal-quantifier per-element failure.
  • resolvedValue absent, elementIndex absent — existential-aggregate failure (no element satisfied).
  • resolvedValue absent, elementIndex present — per-element failure where the leaf could not be loaded.

For length operations (isLengthOp(opCode)), resolvedValue is a hex-encoded count rather than a 32-byte ABI word.

Git Source

Prop

Type

CalldataNavigationViolation

Calldata structure prevented the rule from being evaluated.

The operator was never applied; opCode, operandData, typeCode, and elementIndex are diagnostic context describing the failing site, not a constraint claim. Renderers must not summarise these as "constraint violated".

Encoded as a union of per-code variants so consumers can narrow on a single code via Extract<Violation, { code: "..." }>.

Git Source

Prop

Type

QuantifierLimitExceededViolation

A quantified array exceeded Limits.MAX_QUANTIFIED_ARRAY_LENGTH.

Git Source

Prop

Type

QuantifierEmptyArrayViolation

A quantifier (ANY or ALL) was applied to an empty array.

Git Source

Prop

Type

On this page