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

PolicyBuilder

Fluent builder for Callcium policies.

PolicyBuilder

Fluent builder for constructing Callcium policies.

Git Source

Methods

create

Create a builder from a function signature.

Git Source

function create(signature: string): PolicyBuilder;

Parameters

NameTypeDescription
signaturestringABI function signature, e.g. "transfer(address,uint256)".

Returns

PolicyBuilder

createRaw

Create a selectorless builder from a raw type string.

Git Source

function createRaw(typesCsv: string): PolicyBuilder;

Parameters

NameTypeDescription
typesCsvstringComma-separated ABI type strings, e.g. "address,uint256".

Returns

PolicyBuilder

add

Add a constraint to the current group.

Git Source

function add(constraint: Constraint | ConstraintBuilder): this;

Parameters

NameTypeDescription
constraint`ConstraintConstraintBuilder`

Returns

this

or

Start a new constraint group (OR branch).

Git Source

function or(): this;

Returns

this

build

Build the policy into an encoded binary blob.

Git Source

function build(): templateLiteral;

Returns

templateLiteral — The policy as a 0x-prefixed hex string.

validate

Validate the policy without encoding.

Git Source

function validate(): Issue[];

Returns

Issue[] — All validation issues found.

On this page