@callcium/sdk 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +101 -88
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +105 -72
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/bytes.ts +8 -25
- package/src/calldata-reader.ts +3 -3
- package/src/constants.ts +5 -1
- package/src/constraint.ts +40 -22
- package/src/descriptor-coder.ts +14 -23
- package/src/descriptor.ts +18 -19
- package/src/errors.ts +14 -17
- package/src/index.ts +2 -3
- package/src/operators.ts +65 -35
- package/src/path.ts +1 -2
- package/src/policy-builder.ts +15 -20
- package/src/policy-coder.ts +20 -29
- package/src/policy-enforcer.ts +24 -23
- package/src/policy-validator.ts +51 -44
- package/src/signature.ts +6 -6
- package/src/type-desc.ts +6 -6
- package/src/types.ts +11 -16
package/dist/index.d.ts
CHANGED
|
@@ -9,9 +9,8 @@ type Span = {
|
|
|
9
9
|
end: number;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
* Execution context for context-scoped rules.
|
|
13
|
-
*
|
|
14
|
-
* Only the properties referenced by the policy need to be supplied.
|
|
12
|
+
* Execution context for context-scoped rules. Each property maps to a well-known EVM execution environment value. Only
|
|
13
|
+
* the properties referenced by the policy need to be supplied.
|
|
15
14
|
*/
|
|
16
15
|
type Context = {
|
|
17
16
|
msgSender?: Address;
|
|
@@ -44,8 +43,8 @@ type SelectorMismatchViolation = {
|
|
|
44
43
|
resolvedValue: Hex;
|
|
45
44
|
};
|
|
46
45
|
/**
|
|
47
|
-
* A rule referenced a context property not supplied in the execution context — a context-scoped
|
|
48
|
-
*
|
|
46
|
+
* A rule referenced a context property not supplied in the execution context — a context-scoped subject, or a context
|
|
47
|
+
* reference operand on either scope.
|
|
49
48
|
*/
|
|
50
49
|
type MissingContextViolation = {
|
|
51
50
|
code: "MISSING_CONTEXT";
|
|
@@ -64,10 +63,8 @@ type MissingContextViolation = {
|
|
|
64
63
|
* - `resolvedValue` present, `elementIndex` absent — scalar leaf or context value that failed the operator.
|
|
65
64
|
* - `resolvedValue` present, `elementIndex` present — universal-quantifier per-element failure.
|
|
66
65
|
* - `resolvedValue` absent, `elementIndex` absent — existential-aggregate failure (no element satisfied).
|
|
67
|
-
* - `resolvedValue` absent, `elementIndex` present — per-element failure where the leaf could not be loaded.
|
|
68
66
|
*
|
|
69
|
-
* For length
|
|
70
|
-
* rather than a 32-byte ABI word.
|
|
67
|
+
* For length operators, `resolvedValue` is the length as a 32-byte word.
|
|
71
68
|
*/
|
|
72
69
|
type ValueMismatchViolation = {
|
|
73
70
|
code: "VALUE_MISMATCH";
|
|
@@ -80,8 +77,8 @@ type ValueMismatchViolation = {
|
|
|
80
77
|
typeCode: number;
|
|
81
78
|
resolvedValue?: Hex;
|
|
82
79
|
/**
|
|
83
|
-
* Resolved runtime value of a reference operand as a 32-byte word; present when the
|
|
84
|
-
*
|
|
80
|
+
* Resolved runtime value of a reference operand as a 32-byte word; present when the operator's operand names a
|
|
81
|
+
* reference resolved at enforcement, not a literal.
|
|
85
82
|
*/
|
|
86
83
|
resolvedOperand?: Hex;
|
|
87
84
|
elementIndex?: number;
|
|
@@ -104,8 +101,8 @@ type CalldataNavigationVariant<C extends NavigationViolationCode> = {
|
|
|
104
101
|
/**
|
|
105
102
|
* Calldata structure prevented the rule from being evaluated.
|
|
106
103
|
*
|
|
107
|
-
* The operator was never applied; `opCode`, `operandData`, `typeCode`, and `elementIndex`
|
|
108
|
-
*
|
|
104
|
+
* The operator was never applied; `opCode`, `operandData`, `typeCode`, and `elementIndex` are diagnostic context
|
|
105
|
+
* describing the failing site, not a constraint claim.
|
|
109
106
|
*
|
|
110
107
|
* A union of per-code variants, narrowable with `Extract<Violation, { code: "..." }>`.
|
|
111
108
|
*/
|
|
@@ -147,8 +144,7 @@ type QuantifierEmptyArrayViolation = {
|
|
|
147
144
|
/**
|
|
148
145
|
* Structured details of a single rule failure during enforcement.
|
|
149
146
|
*
|
|
150
|
-
* Carries semantic data only; no message strings.
|
|
151
|
-
* Discriminate on `code` to narrow to the matching variant.
|
|
147
|
+
* Carries semantic data only; no message strings. Discriminate on `code` to narrow to the matching variant.
|
|
152
148
|
*/
|
|
153
149
|
type Violation = MissingSelectorViolation | SelectorMismatchViolation | MissingContextViolation | ValueMismatchViolation | CalldataNavigationViolation | NonCanonicalValueViolation | QuantifierLimitExceededViolation | QuantifierEmptyArrayViolation;
|
|
154
150
|
/** Machine-readable reason code for an enforcement violation. Derived from `Violation` to prevent drift. */
|
|
@@ -229,8 +225,7 @@ type IssueCategory = "typeMismatch" | "contradiction" | "redundancy" | "vacuity"
|
|
|
229
225
|
/**
|
|
230
226
|
* Machine-readable code for a policy validation issue.
|
|
231
227
|
*
|
|
232
|
-
* Each code names one finding of the semantic validator
|
|
233
|
-
* name in the Solidity `IssueCode` library.
|
|
228
|
+
* Each code names one finding of the semantic validator, matching the same-named Solidity `IssueCode` constant.
|
|
234
229
|
*/
|
|
235
230
|
type IssueCode = "VALUE_OP_ON_DYNAMIC" | "VALUE_OP_ON_COMPOSITE" | "NUMERIC_OP_ON_NON_NUMERIC" | "BITMASK_ON_INVALID" | "IN_ON_BOOL" | "LENGTH_ON_STATIC" | "CONTEXT_TYPE_MISMATCH" | "UNKNOWN_OPERATOR" | "NON_CANONICAL_OPERAND" | "UNNAVIGABLE_PATH" | "NESTED_QUANTIFIER" | "HINT_MISMATCH" | "EQ_NEQ_CONTRADICTION" | "CONFLICTING_EQUALITY" | "OUT_OF_PHYSICAL_BOUNDS" | "IMPOSSIBLE_GT" | "IMPOSSIBLE_LT" | "BOUNDS_EXCLUDE_EQUALITY" | "IMPOSSIBLE_RANGE" | "SET_EXCLUDES_EQUALITY" | "EMPTY_SET_INTERSECTION" | "SET_FULLY_EXCLUDED" | "LENGTH_EQ_NEQ_CONTRADICTION" | "CONFLICTING_LENGTH" | "BOUNDS_EXCLUDE_LENGTH" | "IMPOSSIBLE_LENGTH_RANGE" | "OUT_OF_PHYSICAL_LENGTH_BOUNDS" | "IMPOSSIBLE_LENGTH_GT" | "IMPOSSIBLE_LENGTH_LT" | "BITMASK_CONTRADICTION" | "BITMASK_ANY_IMPOSSIBLE" | "UNSORTED_IN_SET" | "EMPTY_GROUP" | "DOMINATED_BOUND" | "REDUNDANT_BOUND" | "SET_REDUCTION" | "SET_REDUNDANCY" | "SET_PARTIALLY_EXCLUDED" | "DOMINATED_LENGTH_BOUND" | "REDUNDANT_LENGTH_BOUND" | "REDUNDANT_BITMASK" | "DUPLICATE_CONSTRAINT" | "FUSIBLE_RANGE" | "FUSIBLE_LENGTH_RANGE" | "VACUOUS_GTE" | "VACUOUS_LTE" | "VACUOUS_LENGTH_GTE" | "VACUOUS_LENGTH_LTE" | "VACUOUS_NEGATED_RANGE" | "VACUOUS_NEGATED_LENGTH_RANGE" | "PATH_DEPTH_EXCEEDED" | "QUANTIFIER_OVER_STATIC_LIMIT" | "UNKNOWN_CONTEXT_PROPERTY" | "NEGATION_UNDER_ANY";
|
|
236
231
|
/** A single validation issue found during policy analysis. */
|
|
@@ -263,28 +258,25 @@ declare class PolicyBuilder {
|
|
|
263
258
|
/**
|
|
264
259
|
* Add a constraint to the current group.
|
|
265
260
|
* @param constraint - A `Constraint` object or a `ConstraintBuilder` instance.
|
|
266
|
-
* @throws {CallciumError} With code `OUT_OF_PHYSICAL_BOUNDS` when a numeric operand lies outside
|
|
267
|
-
*
|
|
268
|
-
*
|
|
261
|
+
* @throws {CallciumError} With code `OUT_OF_PHYSICAL_BOUNDS` when a numeric operand lies outside the target type's
|
|
262
|
+
* range and encodes as a value inside it. Operands are read as written, so a `Constraint` carrying encoded operator
|
|
263
|
+
* bytes is left to {@link validate}.
|
|
269
264
|
*/
|
|
270
265
|
add(constraint: Constraint): this;
|
|
271
266
|
/** Start a new constraint group (OR branch). */
|
|
272
267
|
or(): this;
|
|
273
268
|
/**
|
|
274
|
-
* Build the policy into an encoded binary blob with strict validation.
|
|
275
|
-
*
|
|
276
|
-
* inspect issues, or {@link buildUnsafe} to encode without validation.
|
|
269
|
+
* Build the policy into an encoded binary blob with strict validation. Throws on any issue, regardless of severity.
|
|
270
|
+
* Use {@link validate} to inspect issues, or {@link buildUnsafe} to encode without validation.
|
|
277
271
|
* @returns The policy as a 0x-prefixed hex string.
|
|
278
272
|
* @throws {CallciumError} If any group is empty.
|
|
279
273
|
* @throws {ValidationError} If validation finds any issue.
|
|
280
|
-
* @throws {CallciumError} With code `RULE_SIZE_OVERFLOW` when a rule's encoded bytes exceed the
|
|
281
|
-
* width of the rule size field.
|
|
274
|
+
* @throws {CallciumError} With code `RULE_SIZE_OVERFLOW` when a rule's encoded bytes exceed the rule size field.
|
|
282
275
|
*/
|
|
283
276
|
build(): Hex;
|
|
284
277
|
/**
|
|
285
|
-
* Build the policy into an encoded binary blob without validation.
|
|
286
|
-
*
|
|
287
|
-
* only to knowingly bypass a reported issue.
|
|
278
|
+
* Build the policy into an encoded binary blob without validation. The resulting policy may be invalid. Prefer {@link
|
|
279
|
+
* build}; use this only to knowingly bypass a reported issue.
|
|
288
280
|
* @returns The policy as a 0x-prefixed hex string.
|
|
289
281
|
* @throws {CallciumError} If any group is empty.
|
|
290
282
|
*/
|
|
@@ -310,7 +302,7 @@ declare function encode(data: PolicyData): Hex;
|
|
|
310
302
|
/**
|
|
311
303
|
* Decode a binary policy blob into a PolicyData structure.
|
|
312
304
|
* @param blob - Binary policy as 0x-prefixed hex string.
|
|
313
|
-
* @returns The decoded policy data with constraints grouped by scope and
|
|
305
|
+
* @returns The decoded policy data with constraints grouped by scope, path, and hint.
|
|
314
306
|
* @throws {CallciumError} If the blob is structurally malformed.
|
|
315
307
|
*/
|
|
316
308
|
declare function decode(blob: Hex): PolicyData;
|
|
@@ -367,8 +359,8 @@ type TypeInfo = {
|
|
|
367
359
|
*/
|
|
368
360
|
declare function nodeLength(desc: Uint8Array, offset: number): number;
|
|
369
361
|
/**
|
|
370
|
-
* Return the byte offset of the `fieldIndex`-th field inside a tuple node.
|
|
371
|
-
*
|
|
362
|
+
* Return the byte offset of the `fieldIndex`-th field inside a tuple node. Starts at the first field and skips
|
|
363
|
+
* `fieldIndex` nodes using `nodeLength`.
|
|
372
364
|
*/
|
|
373
365
|
declare function tupleFieldOffset(desc: Uint8Array, tupleOffset: number, fieldIndex: number): number;
|
|
374
366
|
/**
|
|
@@ -389,24 +381,24 @@ declare function inspect(desc: Uint8Array, offset: number): TypeInfo;
|
|
|
389
381
|
/**
|
|
390
382
|
* Resolve the type at a calldata path (array of step indices).
|
|
391
383
|
*
|
|
392
|
-
* The first step selects a top-level param. Each subsequent step descends
|
|
393
|
-
*
|
|
394
|
-
* advances to the element descriptor.
|
|
384
|
+
* The first step selects a top-level param. Each subsequent step descends into the current node: for tuples it selects
|
|
385
|
+
* a field, for arrays it advances to the element descriptor.
|
|
395
386
|
*
|
|
396
387
|
* @param desc - Raw descriptor bytes.
|
|
397
388
|
* @param steps - Path steps, length >= 1.
|
|
398
389
|
* @returns TypeInfo for the node at the resolved path.
|
|
399
|
-
* @throws {CallciumError} On empty steps, out-of-bounds param or array index, or descent
|
|
390
|
+
* @throws {CallciumError} On empty steps, an out-of-bounds param index, tuple field or static array index, or descent
|
|
391
|
+
* into an elementary type.
|
|
400
392
|
*/
|
|
401
393
|
declare function typeAt(desc: Uint8Array, steps: number[]): TypeInfo;
|
|
402
394
|
/**
|
|
403
|
-
* Resolve the type at the path and the declared length of the static array a
|
|
404
|
-
*
|
|
405
|
-
* over a static array).
|
|
395
|
+
* Resolve the type at the path and the declared length of the static array a quantifier step descends into (zero when
|
|
396
|
+
* the path holds no quantifier step over a static array).
|
|
406
397
|
* @param desc - Raw descriptor bytes.
|
|
407
398
|
* @param steps - Path steps, length >= 1.
|
|
408
399
|
* @returns TypeInfo at the resolved path and the quantified static array length.
|
|
409
|
-
* @throws {CallciumError} On empty steps, out-of-bounds param or array index, or descent
|
|
400
|
+
* @throws {CallciumError} On empty steps, an out-of-bounds param index, tuple field or static array index, or descent
|
|
401
|
+
* into an elementary type.
|
|
410
402
|
*/
|
|
411
403
|
declare function walkPath(desc: Uint8Array, steps: number[]): {
|
|
412
404
|
typeInfo: TypeInfo;
|
|
@@ -435,8 +427,8 @@ declare function arrayElementOffset(offset: number): number;
|
|
|
435
427
|
* @param desc - Raw descriptor bytes.
|
|
436
428
|
* @param steps - Path steps, length >= 1.
|
|
437
429
|
* @returns The hint block bytes.
|
|
438
|
-
* @throws {CallciumError} When a step leaves the structure the descriptor declares, quantifies over
|
|
439
|
-
*
|
|
430
|
+
* @throws {CallciumError} When a step leaves the structure the descriptor declares, quantifies over a non-array node,
|
|
431
|
+
* or repeats a quantifier.
|
|
440
432
|
*/
|
|
441
433
|
declare function compileHint(desc: Uint8Array, steps: number[]): Uint8Array;
|
|
442
434
|
/** Inspect and navigate raw descriptor bytes. */
|
|
@@ -456,19 +448,18 @@ declare const Descriptor: {
|
|
|
456
448
|
//#endregion
|
|
457
449
|
//#region src/policy-validator.d.ts
|
|
458
450
|
/**
|
|
459
|
-
* True if operator `opCode` is allowed on a target with the given type info.
|
|
460
|
-
*
|
|
451
|
+
* True if operator `opCode` is a defined operator allowed on a target with the given type info. Tolerates the NOT flag
|
|
452
|
+
* on `opCode`.
|
|
461
453
|
*/
|
|
462
454
|
declare function isOpAllowed(opCode: number, typeInfo: TypeInfo): boolean;
|
|
463
455
|
/**
|
|
464
456
|
* Validate a policy for type mismatches, contradictions, redundancies, and vacuities.
|
|
465
457
|
* @param data - The canonical policy data to validate.
|
|
466
458
|
* @returns All validation issues found, ordered by group and constraint index.
|
|
467
|
-
* @throws {CallciumError} If the descriptor is
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
* is defined over canonical data, so these reject the input rather than report an issue on it.
|
|
459
|
+
* @throws {CallciumError} If the descriptor is malformed; semantic validation is defined only over a well-formed one.
|
|
460
|
+
* @throws {CallciumError} With `EMPTY_PATH` or `MALFORMED_PATH` for a path that is empty or not whole steps, and
|
|
461
|
+
* `INVALID_HEX` or `INVALID_OPERATOR_BYTES` for an unreadable path or operator. Analysis is defined over canonical
|
|
462
|
+
* data, so these reject the input rather than report an issue.
|
|
472
463
|
*/
|
|
473
464
|
declare function validate(data: PolicyData): Issue[];
|
|
474
465
|
/** Semantic validation for policies. */
|
|
@@ -480,33 +471,33 @@ declare const PolicyValidator: {
|
|
|
480
471
|
/** Accepted scalar value types for operator arguments. */
|
|
481
472
|
type ScalarValue = bigint | boolean | string;
|
|
482
473
|
/**
|
|
483
|
-
* Extremes of the numeric operands a builder's
|
|
484
|
-
* a negative operand onto its unsigned alias, so the sign survives nowhere else.
|
|
474
|
+
* Extremes of the numeric operands a builder's equality, comparison and set operators received, as written. Encoding
|
|
475
|
+
* folds a negative operand onto its unsigned alias, so the sign survives nowhere else.
|
|
485
476
|
*/
|
|
486
477
|
type OperandExtremes = {
|
|
487
478
|
/** Most negative operand written, or zero when none was negative. */leastNegative: bigint; /** Greatest operand written, or zero when none exceeded it. */
|
|
488
479
|
greatest: bigint;
|
|
489
480
|
};
|
|
490
481
|
/**
|
|
491
|
-
* Mutable builder that accumulates operators targeting a single path.
|
|
492
|
-
*
|
|
482
|
+
* Mutable builder that accumulates operators targeting a single path. Implements the `Constraint` interface so it can
|
|
483
|
+
* be passed directly to policy builders.
|
|
493
484
|
*/
|
|
494
485
|
declare class ConstraintBuilder<Operand extends ScalarValue = ScalarValue> implements Constraint {
|
|
495
486
|
readonly scope: number;
|
|
496
487
|
readonly path: Hex;
|
|
497
488
|
readonly operators: Hex[];
|
|
498
489
|
/**
|
|
499
|
-
* Extremes of the numeric operands the value operators received, as written. Only the extremes
|
|
500
|
-
*
|
|
501
|
-
*
|
|
490
|
+
* Extremes of the numeric operands the value operators received, as written. Only the extremes can offend: an operand
|
|
491
|
+
* folds into a target's range from below it or from above it, and whichever reaches furthest arrives first. Read it
|
|
492
|
+
* through {@link readOperandExtremes}.
|
|
502
493
|
* @internal
|
|
503
494
|
*/
|
|
504
495
|
readonly operandExtremes: OperandExtremes;
|
|
505
496
|
/** @internal */
|
|
506
497
|
constructor(scope: number, path: Hex);
|
|
507
498
|
/**
|
|
508
|
-
* Push a pre-encoded operator hex string and return this for chaining.
|
|
509
|
-
*
|
|
499
|
+
* Push a pre-encoded operator hex string and return this for chaining. `values` are the operands as written; the
|
|
500
|
+
* numeric ones join the record.
|
|
510
501
|
*/
|
|
511
502
|
private push;
|
|
512
503
|
/** Assert the value equals `value`. */
|
|
@@ -517,6 +508,14 @@ declare class ConstraintBuilder<Operand extends ScalarValue = ScalarValue> imple
|
|
|
517
508
|
eqCtx(contextPropertyId: number): this;
|
|
518
509
|
/** Assert the value does not equal the context property `contextPropertyId`. */
|
|
519
510
|
neqCtx(contextPropertyId: number): this;
|
|
511
|
+
/** Assert the value is greater than the context property `contextPropertyId`. */
|
|
512
|
+
gtCtx(contextPropertyId: number): this;
|
|
513
|
+
/** Assert the value is less than the context property `contextPropertyId`. */
|
|
514
|
+
ltCtx(contextPropertyId: number): this;
|
|
515
|
+
/** Assert the value is greater than or equal to the context property `contextPropertyId`. */
|
|
516
|
+
gteCtx(contextPropertyId: number): this;
|
|
517
|
+
/** Assert the value is less than or equal to the context property `contextPropertyId`. */
|
|
518
|
+
lteCtx(contextPropertyId: number): this;
|
|
520
519
|
/** Assert the value is greater than `bound`. */
|
|
521
520
|
gt(bound: bigint): this;
|
|
522
521
|
/** Assert the value is less than `bound`. */
|
|
@@ -531,14 +530,15 @@ declare class ConstraintBuilder<Operand extends ScalarValue = ScalarValue> imple
|
|
|
531
530
|
*/
|
|
532
531
|
between(min: bigint, max: bigint): this;
|
|
533
532
|
/**
|
|
534
|
-
* Assert the value is a member of the set.
|
|
535
|
-
*
|
|
536
|
-
*
|
|
533
|
+
* Assert the value is a member of the set. Values are sorted and deduplicated before encoding.
|
|
534
|
+
* @throws {CallciumError} If the set is empty, has more than MAX_SET_MEMBERS distinct values, or a value is not
|
|
535
|
+
* encodable as an operand word.
|
|
537
536
|
*/
|
|
538
537
|
isIn(values: readonly Operand[]): this;
|
|
539
538
|
/**
|
|
540
539
|
* Assert the value is not a member of the set.
|
|
541
|
-
* @throws {CallciumError} If the set is empty
|
|
540
|
+
* @throws {CallciumError} If the set is empty, has more than MAX_SET_MEMBERS distinct values, or a value is not
|
|
541
|
+
* encodable as an operand word.
|
|
542
542
|
*/
|
|
543
543
|
notIn(values: readonly Operand[]): this;
|
|
544
544
|
/** Assert all bits in `mask` are set. */
|
|
@@ -564,8 +564,7 @@ declare class ConstraintBuilder<Operand extends ScalarValue = ScalarValue> imple
|
|
|
564
564
|
lengthBetween(min: bigint, max: bigint): this;
|
|
565
565
|
}
|
|
566
566
|
/**
|
|
567
|
-
* Target a calldata argument by path.
|
|
568
|
-
* Each argument is a big-endian uint16 step; multiple steps navigate into nested types.
|
|
567
|
+
* Target a calldata argument by path. Each argument is a big-endian uint16 step; further steps navigate nested types.
|
|
569
568
|
*/
|
|
570
569
|
declare function arg(p0: number, ...rest: number[]): ConstraintBuilder;
|
|
571
570
|
/** Target the `msg.sender` context property. */
|
|
@@ -592,8 +591,8 @@ declare function gasPrice(): ConstraintBuilder<bigint>;
|
|
|
592
591
|
* @param callData - ABI-encoded call data as 0x-prefixed hex string.
|
|
593
592
|
* @param context - Optional execution context for context-scoped rules.
|
|
594
593
|
* @returns Pass with matched group index, or fail with one violation per evaluated failing group.
|
|
595
|
-
* @throws {CallciumError} If the policy blob is structurally malformed,
|
|
596
|
-
* reads is not an address or an integer a 32-byte word represents.
|
|
594
|
+
* @throws {CallciumError} If the policy blob is structurally malformed, the call data is not valid hex, or a context
|
|
595
|
+
* value a rule reads is not an address or an integer a 32-byte word represents.
|
|
597
596
|
*/
|
|
598
597
|
declare function check(policy: Hex, callData: Hex, context?: Context): EnforceResult;
|
|
599
598
|
/**
|
|
@@ -602,8 +601,8 @@ declare function check(policy: Hex, callData: Hex, context?: Context): EnforceRe
|
|
|
602
601
|
* @param callData - ABI-encoded call data as 0x-prefixed hex string.
|
|
603
602
|
* @param context - Optional execution context for context-scoped rules.
|
|
604
603
|
* @throws {PolicyViolationError} If the policy rejects the call data.
|
|
605
|
-
* @throws {CallciumError} If the policy blob is structurally malformed,
|
|
606
|
-
* reads is not an address or an integer a 32-byte word represents.
|
|
604
|
+
* @throws {CallciumError} If the policy blob is structurally malformed, the call data is not valid hex, or a context
|
|
605
|
+
* value a rule reads is not an address or an integer a 32-byte word represents.
|
|
607
606
|
*/
|
|
608
607
|
declare function enforce(policy: Hex, callData: Hex, context?: Context): void;
|
|
609
608
|
/** Check and enforce policies against ABI-encoded call data. */
|
|
@@ -617,8 +616,6 @@ declare const PolicyEnforcer: {
|
|
|
617
616
|
declare function hexToBytes(hex: string): Uint8Array;
|
|
618
617
|
/** Convert a byte array to a 0x-prefixed lowercase hex string. */
|
|
619
618
|
declare function bytesToHex(bytes: Uint8Array): Hex;
|
|
620
|
-
/** Validate and brand a hex string as an address. Throws if the runtime length is not exactly 20 bytes. */
|
|
621
|
-
declare function toAddress(hex: string): Address;
|
|
622
619
|
//#endregion
|
|
623
620
|
//#region src/descriptor-coder.d.ts
|
|
624
621
|
/**
|
|
@@ -803,8 +800,6 @@ declare const ContextProperty: CodeMap<readonly [{
|
|
|
803
800
|
readonly contextKey: "gasPrice";
|
|
804
801
|
readonly typeCode: 32;
|
|
805
802
|
}]>;
|
|
806
|
-
/** Maximum valid context property ID. */
|
|
807
|
-
declare const MAX_CONTEXT_PROPERTY_ID: number;
|
|
808
803
|
/** Display metadata for a context property code. */
|
|
809
804
|
type ContextPropertyInfo = {
|
|
810
805
|
label: string;
|
|
@@ -867,6 +862,26 @@ declare const OP_TABLE: readonly [{
|
|
|
867
862
|
readonly code: 8;
|
|
868
863
|
readonly label: "== ctx";
|
|
869
864
|
readonly operands: "single";
|
|
865
|
+
}, {
|
|
866
|
+
readonly key: "GT_CTX";
|
|
867
|
+
readonly code: 9;
|
|
868
|
+
readonly label: "> ctx";
|
|
869
|
+
readonly operands: "single";
|
|
870
|
+
}, {
|
|
871
|
+
readonly key: "LT_CTX";
|
|
872
|
+
readonly code: 10;
|
|
873
|
+
readonly label: "< ctx";
|
|
874
|
+
readonly operands: "single";
|
|
875
|
+
}, {
|
|
876
|
+
readonly key: "GTE_CTX";
|
|
877
|
+
readonly code: 11;
|
|
878
|
+
readonly label: ">= ctx";
|
|
879
|
+
readonly operands: "single";
|
|
880
|
+
}, {
|
|
881
|
+
readonly key: "LTE_CTX";
|
|
882
|
+
readonly code: 12;
|
|
883
|
+
readonly label: "<= ctx";
|
|
884
|
+
readonly operands: "single";
|
|
870
885
|
}, {
|
|
871
886
|
readonly key: "BITMASK_ALL";
|
|
872
887
|
readonly code: 16;
|
|
@@ -933,6 +948,8 @@ declare function lookupOp(code: number): OpInfo;
|
|
|
933
948
|
//#region src/operators.d.ts
|
|
934
949
|
/** Return true when the operator code (with or without NOT flag) is a LENGTH_* variant. */
|
|
935
950
|
declare function isLengthOp(opCode: number): boolean;
|
|
951
|
+
/** Return true when the operator code (with or without NOT flag) is a *_CTX variant. */
|
|
952
|
+
declare function isContextOp(opCode: number): boolean;
|
|
936
953
|
/** Structural category for a descriptor type code. */
|
|
937
954
|
type TypeClass = "elementary" | "tuple" | "staticArray" | "dynamicArray";
|
|
938
955
|
/** Structural classification without label. */
|
|
@@ -947,7 +964,7 @@ type TypeCodeInfo = TypeClassInfo & {
|
|
|
947
964
|
/**
|
|
948
965
|
* Map a raw type code byte to its ABI type label, structural category, and dynamism.
|
|
949
966
|
* @param code - A single-byte descriptor type code.
|
|
950
|
-
* @returns Label, type class, and whether the
|
|
967
|
+
* @returns Label, type class, and whether the code alone implies ABI dynamism (false for tuples and static arrays).
|
|
951
968
|
* @throws {CallciumError} If the code is not a recognised type code.
|
|
952
969
|
*/
|
|
953
970
|
declare function lookupTypeCode(code: number): TypeCodeInfo;
|
|
@@ -956,16 +973,14 @@ declare function lookupTypeCode(code: number): TypeCodeInfo;
|
|
|
956
973
|
/**
|
|
957
974
|
* Machine-readable error code for structural decoding and validation failures.
|
|
958
975
|
*
|
|
959
|
-
* Each code names one invariant. Where Solidity detects the same invariant, the code is its error
|
|
960
|
-
*
|
|
961
|
-
*
|
|
962
|
-
* `
|
|
963
|
-
* `PolicyBuilder.OutOfPhysicalBounds` and as an issue code, so the name is shared with `IssueCode`.
|
|
976
|
+
* Each code names one invariant. Where Solidity detects the same invariant, the code is its error name transliterated
|
|
977
|
+
* from `PascalCase` to `SCREAMING_SNAKE_CASE`. The codes under "Inputs and validation" have no counterpart: they name
|
|
978
|
+
* input a Solidity signature cannot express. `OUT_OF_PHYSICAL_BOUNDS` names an invariant Solidity carries twice, as the
|
|
979
|
+
* error `PolicyBuilder.OutOfPhysicalBounds` and as an issue code, so the name is shared with `IssueCode`.
|
|
964
980
|
*/
|
|
965
|
-
type CallciumErrorCode = "UNSUPPORTED_VERSION" | "MALFORMED_HEADER" | "UNEXPECTED_END" | "TRAILING_BYTES" | "EMPTY_POLICY" | "EMPTY_GROUP" | "GROUP_TOO_SMALL" | "GROUP_SIZE_MISMATCH" | "GROUP_OVERFLOW" | "RULE_TOO_SMALL" | "RULE_SIZE_MISMATCH" | "RULE_FIELD_OUT_OF_BOUNDS" | "RULE_OVERFLOW" | "EMPTY_PATH" | "MALFORMED_PATH" | "PATH_TOO_DEEP" | "PARAM_INDEX_OUT_OF_BOUNDS" | "TUPLE_FIELD_OUT_OF_BOUNDS" | "STATIC_ARRAY_INDEX_OUT_OF_BOUNDS" | "NOT_COMPOSITE" | "UNCOMPILABLE_PATH" | "QUANTIFIER_ON_NON_ARRAY" | "NESTED_QUANTIFIER" | "INVALID_SCOPE" | "INVALID_CONTEXT_PATH" | "UNKNOWN_CONTEXT_PROPERTY" | "UNKNOWN_OPERATOR" | "INVALID_OPERATOR_BYTES" | "OPERATOR_TARGET_MISMATCH" | "UNSORTED_IN_SET" | "MALFORMED_HINT" | "NO_CONSTRAINT_OPERATORS" | "DUPLICATE_PATH_IN_GROUP" | "EMPTY_SET" | "SET_TOO_LARGE" | "INVALID_RANGE" | "OUT_OF_PHYSICAL_BOUNDS" | "UNKNOWN_TYPE_CODE" | "NODE_LENGTH_TOO_SMALL" | "NODE_LENGTH_TOO_LARGE" | "NODE_OVERFLOW" | "NESTING_TOO_DEEP" | "INVALID_ARRAY_LENGTH" | "INVALID_TUPLE_FIELD_COUNT" | "STATIC_WORDS_TOO_LARGE" | "PARAM_COUNT_MISMATCH" | "TOO_MANY_PARAMS" | "MALFORMED_TYPE_STRING" | "UNKNOWN_TYPE" | "MALFORMED_SIGNATURE" | "SIGNATURE_CONTAINS_WHITESPACE" | "INVALID_FUNCTION_NAME" | "GROUP_COUNT_OVERFLOW" | "RULE_COUNT_OVERFLOW" | "RULE_SIZE_OVERFLOW" | "DESC_LENGTH_OVERFLOW" | "UNKNOWN_QUANTIFIER" | "INVALID_HEX" | "MALFORMED_SELECTOR" | "PATH_STEP_OVERFLOW" | "OPERAND_OVERFLOW" | "CONTEXT_VALUE_OVERFLOW"
|
|
981
|
+
type CallciumErrorCode = "UNSUPPORTED_VERSION" | "MALFORMED_HEADER" | "UNEXPECTED_END" | "TRAILING_BYTES" | "EMPTY_POLICY" | "EMPTY_GROUP" | "GROUP_TOO_SMALL" | "GROUP_SIZE_MISMATCH" | "GROUP_OVERFLOW" | "RULE_TOO_SMALL" | "RULE_SIZE_MISMATCH" | "RULE_FIELD_OUT_OF_BOUNDS" | "RULE_OVERFLOW" | "EMPTY_PATH" | "MALFORMED_PATH" | "PATH_TOO_DEEP" | "PARAM_INDEX_OUT_OF_BOUNDS" | "TUPLE_FIELD_OUT_OF_BOUNDS" | "STATIC_ARRAY_INDEX_OUT_OF_BOUNDS" | "NOT_COMPOSITE" | "UNCOMPILABLE_PATH" | "QUANTIFIER_ON_NON_ARRAY" | "NESTED_QUANTIFIER" | "INVALID_SCOPE" | "INVALID_CONTEXT_PATH" | "UNKNOWN_CONTEXT_PROPERTY" | "UNKNOWN_OPERATOR" | "INVALID_OPERATOR_BYTES" | "OPERATOR_TARGET_MISMATCH" | "UNSORTED_IN_SET" | "MALFORMED_HINT" | "NO_CONSTRAINT_OPERATORS" | "DUPLICATE_PATH_IN_GROUP" | "EMPTY_SET" | "SET_TOO_LARGE" | "INVALID_RANGE" | "OUT_OF_PHYSICAL_BOUNDS" | "UNKNOWN_TYPE_CODE" | "NODE_LENGTH_TOO_SMALL" | "NODE_LENGTH_TOO_LARGE" | "NODE_OVERFLOW" | "NESTING_TOO_DEEP" | "INVALID_ARRAY_LENGTH" | "INVALID_TUPLE_FIELD_COUNT" | "STATIC_WORDS_TOO_LARGE" | "PARAM_COUNT_MISMATCH" | "TOO_MANY_PARAMS" | "MALFORMED_TYPE_STRING" | "UNKNOWN_TYPE" | "MALFORMED_SIGNATURE" | "SIGNATURE_CONTAINS_WHITESPACE" | "INVALID_FUNCTION_NAME" | "GROUP_COUNT_OVERFLOW" | "RULE_COUNT_OVERFLOW" | "RULE_SIZE_OVERFLOW" | "DESC_LENGTH_OVERFLOW" | "VALIDATION_ERROR" | "UNKNOWN_QUANTIFIER" | "INVALID_HEX" | "MALFORMED_SELECTOR" | "PATH_STEP_OVERFLOW" | "OPERAND_OVERFLOW" | "CONTEXT_VALUE_OVERFLOW";
|
|
966
982
|
/**
|
|
967
|
-
* Thrown
|
|
968
|
-
* The optional `offset` indicates the byte position in the source blob where the error was detected.
|
|
983
|
+
* Thrown on malformed or inadmissible SDK input. `offset`, when set, is the error's byte position in the source blob.
|
|
969
984
|
*/
|
|
970
985
|
declare class CallciumError extends Error {
|
|
971
986
|
readonly code: CallciumErrorCode;
|
|
@@ -976,21 +991,19 @@ declare class CallciumError extends Error {
|
|
|
976
991
|
/**
|
|
977
992
|
* Thrown by `PolicyBuilder.build` when validation reports any issue.
|
|
978
993
|
*
|
|
979
|
-
* Carries every issue the validator found. The `Error.message` is the first issue's
|
|
980
|
-
*
|
|
981
|
-
* issues to users should iterate `issues` directly.
|
|
994
|
+
* Carries every issue the validator found. The `Error.message` is the first issue's message — a diagnostic summary, not
|
|
995
|
+
* a presentation contract. Consumers rendering issues to users should iterate `issues` directly.
|
|
982
996
|
*/
|
|
983
997
|
declare class ValidationError extends CallciumError {
|
|
984
998
|
readonly issues: Issue[];
|
|
985
999
|
constructor(issues: Issue[]);
|
|
986
1000
|
}
|
|
987
1001
|
/**
|
|
988
|
-
* Thrown by `PolicyEnforcer.enforce` when calldata fails policy enforcement.
|
|
989
|
-
*
|
|
1002
|
+
* Thrown by `PolicyEnforcer.enforce` when calldata fails policy enforcement. Distinct from `ValidationError`, which
|
|
1003
|
+
* signals static issues in the policy itself.
|
|
990
1004
|
*
|
|
991
|
-
* Carries the full list of structured violations (one per failed group). The
|
|
992
|
-
*
|
|
993
|
-
* first violation's structured fields — not a presentation contract. Consumers
|
|
1005
|
+
* Carries the full list of structured violations (one per failed group). The `Error.message` is a minimal non-lossy
|
|
1006
|
+
* diagnostic summary built from the first violation's structured fields — not a presentation contract. Consumers
|
|
994
1007
|
* rendering violations to users should iterate `violations` directly.
|
|
995
1008
|
*/
|
|
996
1009
|
declare class PolicyViolationError extends Error {
|
|
@@ -998,5 +1011,5 @@ declare class PolicyViolationError extends Error {
|
|
|
998
1011
|
constructor(violations: Violation[]);
|
|
999
1012
|
}
|
|
1000
1013
|
//#endregion
|
|
1001
|
-
export { type Address, CallciumError, type CallciumErrorCode, type CalldataNavigationViolation, type Constraint, type ConstraintBuilder, type Context, ContextProperty, type ContextPropertyInfo, type DecodedGroup, type DecodedParam, type DecodedPolicy, type DecodedRule, Descriptor, DescriptorCoder, type EnforceResult, type Field, type Hex, type Issue, type IssueCategory, type IssueCode, type IssueSeverity,
|
|
1014
|
+
export { type Address, CallciumError, type CallciumErrorCode, type CalldataNavigationViolation, type Constraint, type ConstraintBuilder, type Context, ContextProperty, type ContextPropertyInfo, type DecodedGroup, type DecodedParam, type DecodedPolicy, type DecodedRule, Descriptor, DescriptorCoder, type EnforceResult, type Field, type Hex, type Issue, type IssueCategory, type IssueCode, type IssueSeverity, type MissingContextViolation, type MissingSelectorViolation, type NavigationViolationCode, type NonCanonicalValueViolation, Op, type OpInfo, type Operands, PolicyBuilder, PolicyCoder, type PolicyData, PolicyEnforcer, PolicyFormat, PolicyValidator, PolicyViolationError, Quantifier, type QuantifierEmptyArrayViolation, type QuantifierInfo, type QuantifierLimitExceededViolation, type ScalarValue, Scope, type ScopeInfo, type SelectorMismatchViolation, type Span, type TypeClass, type TypeClassInfo, TypeCode, type TypeCodeInfo, type TypeInfo, ValidationError, type ValueMismatchViolation, type Violation, type ViolationCode, arg, baseFee, blockNumber, blockTimestamp, bytesToHex, chainId, findContextProperty, gasPrice, hexToBytes, isContextOp, isLengthOp, isOpAllowed, isQuantifier, lookupContextProperty, lookupOp, lookupQuantifier, lookupScope, lookupTypeCode, msgSender, msgValue, parsePathSteps, txOrigin };
|
|
1002
1015
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/policy-builder.ts","../src/policy-coder.ts","../src/path.ts","../src/descriptor.ts","../src/policy-validator.ts","../src/constraint.ts","../src/policy-enforcer.ts","../src/bytes.ts","../src/descriptor-coder.ts","../src/constants.ts","../src/operators.ts","../src/errors.ts"],"mappings":";;KAKY,GAAA;;KAGA,OAAA;;KAGA,IAAA;EAAS,KAAA;EAAe,GAAA;AAAA;;;AAApC
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/policy-builder.ts","../src/policy-coder.ts","../src/path.ts","../src/descriptor.ts","../src/policy-validator.ts","../src/constraint.ts","../src/policy-enforcer.ts","../src/bytes.ts","../src/descriptor-coder.ts","../src/constants.ts","../src/operators.ts","../src/errors.ts"],"mappings":";;KAKY,GAAA;;KAGA,OAAA;;KAGA,IAAA;EAAS,KAAA;EAAe,GAAA;AAAA;;;AAApC;;KAUY,OAAA;EACV,SAAA,GAAY,OAAA;EACZ,QA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