Pre-release — The API surface may change. Unaudited.
Callcium LogoCallcium
API

PolicyEnforcer

Off-chain policy enforcement against ABI-encoded data.

PolicyEnforcer

Check and enforce policies against ABI-encoded call data.

Git Source

Methods

check

Check a policy against ABI-encoded call data without throwing on violations.

function check(policy: templateLiteral, callData: templateLiteral, context?: Context): EnforceResult;

Parameters

NameTypeDescription
policytemplateLiteralBinary policy blob as 0x-prefixed hex string.
callDatatemplateLiteralABI-encoded call data as 0x-prefixed hex string.
contextContextOptional execution context for context-scoped rules.

Returns

EnforceResult — Pass with matched group index, or fail with one violation per failed group.

enforce

Enforce a policy against ABI-encoded call data, throwing on violation.

function enforce(policy: templateLiteral, callData: templateLiteral, context?: Context): void;

Parameters

NameTypeDescription
policytemplateLiteralBinary policy blob as 0x-prefixed hex string.
callDatatemplateLiteralABI-encoded call data as 0x-prefixed hex string.
contextContextOptional execution context for context-scoped rules.

Returns

void

On this page