@callcium/sdk 0.6.0 → 0.8.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/README.md +77 -2
- package/dist/index.d.ts +114 -43
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +838 -1440
- package/dist/index.js.map +1 -1
- package/package.json +7 -3
- package/src/bytes.ts +100 -0
- package/src/calldata-reader.ts +38 -0
- package/src/constants.ts +395 -0
- package/src/constraint.ts +313 -0
- package/src/descriptor-coder.ts +461 -0
- package/src/descriptor.ts +399 -0
- package/src/errors.ts +138 -0
- package/src/index.ts +105 -0
- package/src/operators.ts +204 -0
- package/src/policy-builder.ts +250 -0
- package/src/policy-coder.ts +668 -0
- package/src/policy-enforcer.ts +600 -0
- package/src/policy-validator.ts +1112 -0
- package/src/signature.ts +97 -0
- package/src/type-desc.ts +205 -0
- package/src/types.ts +280 -0
- package/src/validation-issue.ts +569 -0
package/README.md
CHANGED
|
@@ -1,16 +1,91 @@
|
|
|
1
1
|
# @callcium/sdk
|
|
2
2
|
|
|
3
|
-
TypeScript
|
|
3
|
+
TypeScript SDK for the [Callcium](https://callcium.dev) policy engine.
|
|
4
|
+
|
|
5
|
+
Callcium defines type-safe constraints on ABI-encoded data, such as function arguments or a raw payload with no selector, using value ranges, set membership, array quantifiers, and transaction context. This SDK builds policies into canonical policy bytes and validates ABI-encoded data, such as transaction calldata, against a policy offchain, before it is signed.
|
|
4
6
|
|
|
5
7
|
## Install
|
|
6
8
|
|
|
9
|
+
```bash
|
|
10
|
+
npm install @callcium/sdk
|
|
11
|
+
```
|
|
12
|
+
|
|
7
13
|
```bash
|
|
8
14
|
bun add @callcium/sdk
|
|
9
15
|
```
|
|
10
16
|
|
|
17
|
+
## Requirements
|
|
18
|
+
|
|
19
|
+
Node.js >=22.11.0. Ships as ESM, built to ES2024 — any browser or runtime with ES2024 support works; no browser floor is tested or declared.
|
|
20
|
+
|
|
21
|
+
## Quick start
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import { PolicyBuilder, PolicyEnforcer, arg } from "@callcium/sdk";
|
|
25
|
+
|
|
26
|
+
// function approve(address spender, uint256 amount)
|
|
27
|
+
const policy = PolicyBuilder.create("approve(address,uint256)")
|
|
28
|
+
.add(arg(0).isIn(trustedSpenders)) // spender
|
|
29
|
+
.add(arg(1).lte(1_000_000n * 10n ** 6n)) // amount
|
|
30
|
+
.build();
|
|
31
|
+
|
|
32
|
+
// throws on a violation
|
|
33
|
+
PolicyEnforcer.enforce(policy, calldata);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## More examples
|
|
37
|
+
|
|
38
|
+
**Nested structs** — target fields deep inside struct arguments by path.
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
// struct SwapParams { address tokenIn; address tokenOut; uint256 amount; }
|
|
42
|
+
// function swap(SwapParams params)
|
|
43
|
+
const policy = PolicyBuilder.create("swap((address,address,uint256))")
|
|
44
|
+
.add(arg(0, 0).notIn(denied)) // params.tokenIn
|
|
45
|
+
.add(arg(0, 1).notIn(denied)) // params.tokenOut
|
|
46
|
+
.add(arg(0, 2).gt(0n)) // params.amount
|
|
47
|
+
.build();
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Arrays** — `ANY`/`ALL` quantifiers across array elements, with length bounds.
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
// struct Transfer { address to; uint256 value; }
|
|
54
|
+
// function batch(Transfer[] transfers)
|
|
55
|
+
const policy = PolicyBuilder.create("batch((address,uint256)[])")
|
|
56
|
+
.add(arg(0).lengthBetween(1, 50)) // transfers.length
|
|
57
|
+
.add(arg(0, Quantifier.ALL, 0).notIn(denied)) // transfers[*].to
|
|
58
|
+
.add(arg(0, Quantifier.ALL, 1).lte(1n * 10n ** 18n)) // transfers[*].value
|
|
59
|
+
.build();
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Context** — constrain `msg.sender`, `msg.value`, `block.timestamp`, `block.number`, `block.chainid`, `tx.origin`, `block.basefee`, and `tx.gasprice`, not just calldata.
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
// function transfer(address to, uint256 amount)
|
|
66
|
+
const policy = PolicyBuilder.create("transfer(address,uint256)")
|
|
67
|
+
.add(msgSender().isIn(operators)) // msg.sender
|
|
68
|
+
.add(msgValue().eq(0n)) // msg.value
|
|
69
|
+
.add(arg(1).lte(100n * 10n ** 18n)) // amount
|
|
70
|
+
.build();
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**OR groups** — compose alternative rule paths; all constraints hold within a group.
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
// function supply(address asset, uint256 amount)
|
|
77
|
+
const policy = PolicyBuilder.create("supply(address,uint256)")
|
|
78
|
+
.add(msgSender().eq(OPERATOR)) // path A
|
|
79
|
+
.or()
|
|
80
|
+
.add(arg(0).isIn(allowed)) // path B
|
|
81
|
+
.build();
|
|
82
|
+
```
|
|
83
|
+
|
|
11
84
|
## Documentation
|
|
12
85
|
|
|
13
|
-
Full
|
|
86
|
+
Full API reference, guides, and the policy spec: [callcium.dev/docs/sdk](https://callcium.dev/docs/sdk).
|
|
87
|
+
|
|
88
|
+
For onchain policy enforcement in Solidity, see [callcium.dev/docs/solidity](https://callcium.dev/docs/solidity).
|
|
14
89
|
|
|
15
90
|
## License
|
|
16
91
|
|
package/dist/index.d.ts
CHANGED
|
@@ -45,9 +45,7 @@ type SelectorMismatchViolation = {
|
|
|
45
45
|
};
|
|
46
46
|
/**
|
|
47
47
|
* A context-scoped rule referenced a property not supplied in the execution context.
|
|
48
|
-
|
|
49
|
-
* `opCode` and `operandData` may be added in future versions as diagnostic context
|
|
50
|
-
* without breaking the contract; consumers should tolerate their presence.
|
|
48
|
+
|
|
51
49
|
*/
|
|
52
50
|
type MissingContextViolation = {
|
|
53
51
|
code: "MISSING_CONTEXT";
|
|
@@ -102,11 +100,9 @@ type CalldataNavigationVariant<C extends NavigationViolationCode> = {
|
|
|
102
100
|
* Calldata structure prevented the rule from being evaluated.
|
|
103
101
|
*
|
|
104
102
|
* The operator was never applied; `opCode`, `operandData`, `typeCode`, and `elementIndex`
|
|
105
|
-
* are diagnostic context describing the failing site, not a constraint claim.
|
|
106
|
-
* must not summarise these as "constraint violated".
|
|
103
|
+
* are diagnostic context describing the failing site, not a constraint claim.
|
|
107
104
|
*
|
|
108
|
-
*
|
|
109
|
-
* `Extract<Violation, { code: "..." }>`.
|
|
105
|
+
* A union of per-code variants, narrowable with `Extract<Violation, { code: "..." }>`.
|
|
110
106
|
*/
|
|
111
107
|
type CalldataNavigationViolation = CalldataNavigationVariant<"CALLDATA_OUT_OF_BOUNDS"> | CalldataNavigationVariant<"ARRAY_INDEX_OUT_OF_BOUNDS">;
|
|
112
108
|
/** A quantified array exceeded `Limits.MAX_QUANTIFIED_ARRAY_LENGTH`. */
|
|
@@ -135,7 +131,7 @@ type NonCanonicalValueViolation = {
|
|
|
135
131
|
operandData?: Hex;
|
|
136
132
|
elementIndex?: number;
|
|
137
133
|
};
|
|
138
|
-
/**
|
|
134
|
+
/** An `ANY` quantifier was applied to an empty array. */
|
|
139
135
|
type QuantifierEmptyArrayViolation = {
|
|
140
136
|
code: "QUANTIFIER_EMPTY_ARRAY";
|
|
141
137
|
group: number;
|
|
@@ -146,7 +142,7 @@ type QuantifierEmptyArrayViolation = {
|
|
|
146
142
|
/**
|
|
147
143
|
* Structured details of a single rule failure during enforcement.
|
|
148
144
|
*
|
|
149
|
-
* Carries semantic data only
|
|
145
|
+
* Carries semantic data only; no message strings.
|
|
150
146
|
* Discriminate on `code` to narrow to the matching variant.
|
|
151
147
|
*/
|
|
152
148
|
type Violation = MissingSelectorViolation | SelectorMismatchViolation | MissingContextViolation | ValueMismatchViolation | CalldataNavigationViolation | NonCanonicalValueViolation | QuantifierLimitExceededViolation | QuantifierEmptyArrayViolation;
|
|
@@ -164,7 +160,8 @@ type PolicyData = {
|
|
|
164
160
|
type Constraint = {
|
|
165
161
|
scope: number;
|
|
166
162
|
path: Hex;
|
|
167
|
-
operators: Hex[];
|
|
163
|
+
operators: Hex[]; /** Compiled hint block as carried on the wire; absent when the constraint has no encoding. */
|
|
164
|
+
hint?: Hex;
|
|
168
165
|
span?: Span;
|
|
169
166
|
};
|
|
170
167
|
/** A decoded value with its byte position in the source blob. */
|
|
@@ -186,7 +183,8 @@ type DecodedRule = {
|
|
|
186
183
|
ruleSize: Field<number>;
|
|
187
184
|
scope: Field<number>;
|
|
188
185
|
pathDepth: Field<number>;
|
|
189
|
-
path: Field<Hex>;
|
|
186
|
+
path: Field<Hex>; /** Compiled hint block; present for calldata rules only. */
|
|
187
|
+
hint?: Field<Hex>;
|
|
190
188
|
opCode: Field<number>;
|
|
191
189
|
dataLength: Field<number>;
|
|
192
190
|
data: Field<Hex>;
|
|
@@ -349,7 +347,8 @@ declare class PolicyBuilder {
|
|
|
349
347
|
* Throws on any issue, regardless of severity. Use {@link validate} to
|
|
350
348
|
* inspect issues, or {@link buildUnsafe} to encode without validation.
|
|
351
349
|
* @returns The policy as a 0x-prefixed hex string.
|
|
352
|
-
* @throws {CallciumError} If any group is empty
|
|
350
|
+
* @throws {CallciumError} If any group is empty.
|
|
351
|
+
* @throws {ValidationError} If validation finds any issue.
|
|
353
352
|
*/
|
|
354
353
|
build(): Hex;
|
|
355
354
|
/**
|
|
@@ -477,6 +476,16 @@ declare function staticArrayLength(desc: Uint8Array, offset: number): number;
|
|
|
477
476
|
* @param offset - Byte position of the array node (static or dynamic).
|
|
478
477
|
*/
|
|
479
478
|
declare function arrayElementOffset(offset: number): number;
|
|
479
|
+
/**
|
|
480
|
+
* Compile a calldata rule path into its wire hint block.
|
|
481
|
+
*
|
|
482
|
+
* @param desc - Raw descriptor bytes.
|
|
483
|
+
* @param steps - Path steps, length >= 1.
|
|
484
|
+
* @returns The hint block bytes.
|
|
485
|
+
* @throws {CallciumError} When a step leaves the structure the descriptor declares, quantifies over
|
|
486
|
+
* a non-array node, or repeats a quantifier.
|
|
487
|
+
*/
|
|
488
|
+
declare function compileHint(desc: Uint8Array, steps: number[]): Uint8Array;
|
|
480
489
|
/** Inspect and navigate raw descriptor bytes. */
|
|
481
490
|
declare const Descriptor: {
|
|
482
491
|
paramCount: typeof paramCount;
|
|
@@ -489,6 +498,7 @@ declare const Descriptor: {
|
|
|
489
498
|
nodeLength: typeof nodeLength;
|
|
490
499
|
arrayElementOffset: typeof arrayElementOffset;
|
|
491
500
|
walkPath: typeof walkPath;
|
|
501
|
+
compileHint: typeof compileHint;
|
|
492
502
|
};
|
|
493
503
|
//#endregion
|
|
494
504
|
//#region src/policy-validator.d.ts
|
|
@@ -549,7 +559,7 @@ declare function toAddress(hex: string): Address;
|
|
|
549
559
|
*
|
|
550
560
|
* @param typesCsv - Comma-separated ABI type strings, e.g. `"address,uint256,(bool,bytes32)[],string"`.
|
|
551
561
|
* @returns Binary descriptor bytes starting with the version+paramCount header.
|
|
552
|
-
* @throws {CallciumError} With code `
|
|
562
|
+
* @throws {CallciumError} With code `MALFORMED_TYPE_STRING` for malformed input.
|
|
553
563
|
* @throws {CallciumError} With code `UNKNOWN_TYPE` for unrecognised type names.
|
|
554
564
|
*/
|
|
555
565
|
declare function fromTypes(typesCsv: string): Uint8Array;
|
|
@@ -570,6 +580,55 @@ declare const DescriptorCoder: {
|
|
|
570
580
|
};
|
|
571
581
|
//#endregion
|
|
572
582
|
//#region src/constants.d.ts
|
|
583
|
+
/** Binary layout constants for the Callcium policy format. */
|
|
584
|
+
declare const PolicyFormat: {
|
|
585
|
+
readonly VERSION: 2;
|
|
586
|
+
readonly VERSION_MASK: 15;
|
|
587
|
+
readonly FLAG_NO_SELECTOR: 16;
|
|
588
|
+
readonly RESERVED_MASK: 224;
|
|
589
|
+
readonly HEADER_SIZE: 1;
|
|
590
|
+
readonly SELECTOR_OFFSET: 1;
|
|
591
|
+
readonly SELECTOR_SIZE: 4;
|
|
592
|
+
readonly DESC_LENGTH_OFFSET: 5;
|
|
593
|
+
readonly DESC_LENGTH_SIZE: 2;
|
|
594
|
+
readonly DESC_OFFSET: 7;
|
|
595
|
+
readonly GROUP_COUNT_SIZE: 1;
|
|
596
|
+
readonly GROUP_RULECOUNT_SIZE: 2;
|
|
597
|
+
readonly GROUP_SIZE_SIZE: 4;
|
|
598
|
+
readonly GROUP_HEADER_SIZE: 6;
|
|
599
|
+
readonly RULE_SIZE_SIZE: 2;
|
|
600
|
+
readonly RULE_SCOPE_OFFSET: 2;
|
|
601
|
+
readonly RULE_DEPTH_OFFSET: 3;
|
|
602
|
+
readonly RULE_PATH_OFFSET: 4;
|
|
603
|
+
readonly PATH_STEP_SIZE: 2;
|
|
604
|
+
readonly RULE_OPCODE_SIZE: 1;
|
|
605
|
+
readonly RULE_DATALENGTH_SIZE: 2;
|
|
606
|
+
readonly RULE_FIXED_OVERHEAD: 7;
|
|
607
|
+
readonly RULE_MIN_SIZE: 9;
|
|
608
|
+
readonly HINT_HEADER_SIZE: 1;
|
|
609
|
+
readonly HINT_HOP_SIZE: 8;
|
|
610
|
+
readonly HINT_HOP_INDEX_OFFSET: 4;
|
|
611
|
+
readonly HINT_HOP_META_OFFSET: 6;
|
|
612
|
+
readonly HINT_FRAME_PREFIX_SIZE: 8;
|
|
613
|
+
readonly HINT_FRAME_COUNT_OFFSET: 4;
|
|
614
|
+
readonly HINT_FRAME_META_OFFSET: 6;
|
|
615
|
+
readonly HINT_TARGET_SIZE: 7;
|
|
616
|
+
readonly HINT_TARGET_META_OFFSET: 4;
|
|
617
|
+
readonly HINT_TARGET_TYPECODE_OFFSET: 6;
|
|
618
|
+
readonly HINT_KIND_NONE: 0;
|
|
619
|
+
readonly HINT_KIND_ALL: 1;
|
|
620
|
+
readonly HINT_KIND_ANY: 2;
|
|
621
|
+
readonly HINT_KIND_MAX: 2;
|
|
622
|
+
readonly HINT_KIND_SHIFT: 6;
|
|
623
|
+
readonly HINT_HOP_COUNT_MASK: 63;
|
|
624
|
+
readonly HINT_SUFFIX_RESERVED_MASK: 192;
|
|
625
|
+
readonly HINT_NO_INDEX: 65535;
|
|
626
|
+
readonly HINT_INDEX_RESERVED: 65534;
|
|
627
|
+
readonly HINT_META_ELEM_DYNAMIC: 32768;
|
|
628
|
+
readonly HINT_META_DYNAMIC_ARRAY: 16384;
|
|
629
|
+
readonly HINT_META_RESERVED_MASK: 12288;
|
|
630
|
+
readonly HINT_META_STRIDE_MASK: 4095;
|
|
631
|
+
};
|
|
573
632
|
/**
|
|
574
633
|
* Extract a `{ KEY: code }` map from a table with `key` and `code` fields.
|
|
575
634
|
* @internal
|
|
@@ -601,13 +660,13 @@ type ScopeInfo = {
|
|
|
601
660
|
declare function lookupScope(code: number): ScopeInfo;
|
|
602
661
|
/** ABI type code ranges and sentinel values for the descriptor format. */
|
|
603
662
|
declare const TypeCode: {
|
|
604
|
-
readonly UINT_MIN:
|
|
605
|
-
readonly UINT_MAX:
|
|
606
|
-
readonly INT_MIN:
|
|
607
|
-
readonly INT_MAX:
|
|
608
|
-
readonly ADDRESS:
|
|
609
|
-
readonly BOOL:
|
|
610
|
-
readonly FUNCTION:
|
|
663
|
+
readonly UINT_MIN: 1;
|
|
664
|
+
readonly UINT_MAX: 32;
|
|
665
|
+
readonly INT_MIN: 33;
|
|
666
|
+
readonly INT_MAX: 64;
|
|
667
|
+
readonly ADDRESS: 65;
|
|
668
|
+
readonly BOOL: 66;
|
|
669
|
+
readonly FUNCTION: 67;
|
|
611
670
|
readonly FIXED_BYTES_MIN: 80;
|
|
612
671
|
readonly FIXED_BYTES_MAX: 111;
|
|
613
672
|
readonly BYTES: 112;
|
|
@@ -621,42 +680,42 @@ declare const ContextProperty: CodeMap<readonly [{
|
|
|
621
680
|
readonly key: "MSG_SENDER";
|
|
622
681
|
readonly code: 0;
|
|
623
682
|
readonly label: "msg.sender";
|
|
624
|
-
readonly typeCode:
|
|
683
|
+
readonly typeCode: 65;
|
|
625
684
|
}, {
|
|
626
685
|
readonly key: "MSG_VALUE";
|
|
627
686
|
readonly code: 1;
|
|
628
687
|
readonly label: "msg.value";
|
|
629
|
-
readonly typeCode:
|
|
688
|
+
readonly typeCode: 32;
|
|
630
689
|
}, {
|
|
631
690
|
readonly key: "BLOCK_TIMESTAMP";
|
|
632
691
|
readonly code: 2;
|
|
633
692
|
readonly label: "block.timestamp";
|
|
634
|
-
readonly typeCode:
|
|
693
|
+
readonly typeCode: 32;
|
|
635
694
|
}, {
|
|
636
695
|
readonly key: "BLOCK_NUMBER";
|
|
637
696
|
readonly code: 3;
|
|
638
697
|
readonly label: "block.number";
|
|
639
|
-
readonly typeCode:
|
|
698
|
+
readonly typeCode: 32;
|
|
640
699
|
}, {
|
|
641
700
|
readonly key: "CHAIN_ID";
|
|
642
701
|
readonly code: 4;
|
|
643
702
|
readonly label: "block.chainid";
|
|
644
|
-
readonly typeCode:
|
|
703
|
+
readonly typeCode: 32;
|
|
645
704
|
}, {
|
|
646
705
|
readonly key: "TX_ORIGIN";
|
|
647
706
|
readonly code: 5;
|
|
648
707
|
readonly label: "tx.origin";
|
|
649
|
-
readonly typeCode:
|
|
708
|
+
readonly typeCode: 65;
|
|
650
709
|
}, {
|
|
651
710
|
readonly key: "BASE_FEE";
|
|
652
711
|
readonly code: 6;
|
|
653
712
|
readonly label: "block.basefee";
|
|
654
|
-
readonly typeCode:
|
|
713
|
+
readonly typeCode: 32;
|
|
655
714
|
}, {
|
|
656
715
|
readonly key: "GAS_PRICE";
|
|
657
716
|
readonly code: 7;
|
|
658
717
|
readonly label: "tx.gasprice";
|
|
659
|
-
readonly typeCode:
|
|
718
|
+
readonly typeCode: 32;
|
|
660
719
|
}]>;
|
|
661
720
|
/** Display metadata for a context property code. */
|
|
662
721
|
type ContextPropertyInfo = {
|
|
@@ -667,7 +726,7 @@ type ContextPropertyInfo = {
|
|
|
667
726
|
/**
|
|
668
727
|
* Map a context property code to its display label and ABI type code.
|
|
669
728
|
* @param code - Context property ID.
|
|
670
|
-
* @returns Display metadata including the
|
|
729
|
+
* @returns Display metadata including the ABI type code for the property value.
|
|
671
730
|
* @throws {CallciumError} If the code is not a recognised context property.
|
|
672
731
|
*/
|
|
673
732
|
declare function lookupContextProperty(code: number): ContextPropertyInfo;
|
|
@@ -675,6 +734,7 @@ declare function lookupContextProperty(code: number): ContextPropertyInfo;
|
|
|
675
734
|
declare const Limits: {
|
|
676
735
|
readonly MAX_PATH_DEPTH: 32;
|
|
677
736
|
readonly MAX_QUANTIFIED_ARRAY_LENGTH: 256;
|
|
737
|
+
readonly MAX_SET_MEMBERS: number;
|
|
678
738
|
};
|
|
679
739
|
/** Operand count category for operator data validation. */
|
|
680
740
|
type Operands = "single" | "range" | "variadic";
|
|
@@ -778,23 +838,19 @@ type OpInfo = {
|
|
|
778
838
|
declare function lookupOp(code: number): OpInfo;
|
|
779
839
|
/** Reserved path step values that trigger quantified evaluation over array elements. */
|
|
780
840
|
declare const Quantifier: CodeMap<readonly [{
|
|
781
|
-
readonly key: "ALL_OR_EMPTY";
|
|
782
|
-
readonly code: 65535;
|
|
783
|
-
readonly label: "all or empty";
|
|
784
|
-
}, {
|
|
785
841
|
readonly key: "ALL";
|
|
786
|
-
readonly code:
|
|
842
|
+
readonly code: 65535;
|
|
787
843
|
readonly label: "all";
|
|
788
844
|
}, {
|
|
789
845
|
readonly key: "ANY";
|
|
790
|
-
readonly code:
|
|
846
|
+
readonly code: 65534;
|
|
791
847
|
readonly label: "any";
|
|
792
848
|
}]>;
|
|
793
849
|
/** Display metadata for a quantifier step. */
|
|
794
850
|
type QuantifierInfo = {
|
|
795
851
|
label: string;
|
|
796
852
|
};
|
|
797
|
-
/** Check whether a path step is a quantifier (
|
|
853
|
+
/** Check whether a path step is a quantifier (ALL or ANY). */
|
|
798
854
|
declare function isQuantifier(step: number): boolean;
|
|
799
855
|
/**
|
|
800
856
|
* Map a quantifier path step to its display label.
|
|
@@ -805,7 +861,7 @@ declare function isQuantifier(step: number): boolean;
|
|
|
805
861
|
declare function lookupQuantifier(code: number): QuantifierInfo;
|
|
806
862
|
/** Structural category for a descriptor type code. */
|
|
807
863
|
type TypeClass = "elementary" | "tuple" | "staticArray" | "dynamicArray";
|
|
808
|
-
/** Structural classification without label
|
|
864
|
+
/** Structural classification without label. */
|
|
809
865
|
type TypeClassInfo = {
|
|
810
866
|
typeClass: TypeClass;
|
|
811
867
|
isDynamic: boolean;
|
|
@@ -815,7 +871,7 @@ type TypeCodeInfo = TypeClassInfo & {
|
|
|
815
871
|
label: string;
|
|
816
872
|
};
|
|
817
873
|
/**
|
|
818
|
-
* Map a raw type code byte to its
|
|
874
|
+
* Map a raw type code byte to its ABI type label, structural category, and dynamism.
|
|
819
875
|
* @param code - A single-byte descriptor type code.
|
|
820
876
|
* @returns Label, type class, and whether the type is ABI-dynamic.
|
|
821
877
|
* @throws {CallciumError} If the code is not a recognised type code.
|
|
@@ -827,8 +883,13 @@ declare function lookupTypeCode(code: number): TypeCodeInfo;
|
|
|
827
883
|
declare function isLengthOp(opCode: number): boolean;
|
|
828
884
|
//#endregion
|
|
829
885
|
//#region src/errors.d.ts
|
|
830
|
-
/**
|
|
831
|
-
|
|
886
|
+
/**
|
|
887
|
+
* Machine-readable error code for structural decoding and validation failures.
|
|
888
|
+
*
|
|
889
|
+
* Each code names one invariant and matches the Solidity error raised for the same
|
|
890
|
+
* invariant, transliterated from `PascalCase` to `SCREAMING_SNAKE_CASE`.
|
|
891
|
+
*/
|
|
892
|
+
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" | "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" | "VALIDATION_ERROR";
|
|
832
893
|
/**
|
|
833
894
|
* Thrown when a policy or descriptor blob is structurally malformed.
|
|
834
895
|
* The optional `offset` indicates the byte position in the source blob where the error was detected.
|
|
@@ -839,10 +900,20 @@ declare class CallciumError extends Error {
|
|
|
839
900
|
readonly offset?: number;
|
|
840
901
|
constructor(code: CallciumErrorCode, message: string, offset?: number);
|
|
841
902
|
}
|
|
903
|
+
/**
|
|
904
|
+
* Thrown by `PolicyBuilder.build` when validation reports any issue.
|
|
905
|
+
*
|
|
906
|
+
* Carries every issue the validator found. The `Error.message` is the first issue's
|
|
907
|
+
* message — a diagnostic summary, not a presentation contract. Consumers rendering
|
|
908
|
+
* issues to users should iterate `issues` directly.
|
|
909
|
+
*/
|
|
910
|
+
declare class ValidationError extends CallciumError {
|
|
911
|
+
readonly issues: Issue[];
|
|
912
|
+
constructor(issues: Issue[]);
|
|
913
|
+
}
|
|
842
914
|
/**
|
|
843
915
|
* Thrown by `PolicyEnforcer.enforce` when calldata fails policy enforcement.
|
|
844
|
-
* Distinct from `
|
|
845
|
-
* issues in the policy itself.
|
|
916
|
+
* Distinct from `ValidationError`, which signals static issues in the policy itself.
|
|
846
917
|
*
|
|
847
918
|
* Carries the full list of structured violations (one per failed group). The
|
|
848
919
|
* `Error.message` is a minimal non-lossy diagnostic summary built from the
|
|
@@ -854,5 +925,5 @@ declare class PolicyViolationError extends Error {
|
|
|
854
925
|
constructor(violations: Violation[]);
|
|
855
926
|
}
|
|
856
927
|
//#endregion
|
|
857
|
-
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 IssueSeverity, Limits, type MissingContextViolation, type MissingSelectorViolation, type NavigationViolationCode, type NonCanonicalValueViolation, Op, type OpInfo, type Operands, PolicyBuilder, PolicyCoder, type PolicyData, PolicyEnforcer, 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, type ValueMismatchViolation, type Violation, type ViolationCode, arg, baseFee, blockNumber, blockTimestamp, bytesToHex, chainId, gasPrice, hexToBytes, isLengthOp, isOpAllowed, isQuantifier, lookupContextProperty, lookupOp, lookupQuantifier, lookupScope, lookupTypeCode, msgSender, msgValue, parsePathSteps, toAddress, txOrigin };
|
|
928
|
+
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 IssueSeverity, Limits, 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, gasPrice, hexToBytes, isLengthOp, isOpAllowed, isQuantifier, lookupContextProperty, lookupOp, lookupQuantifier, lookupScope, lookupTypeCode, msgSender, msgValue, parsePathSteps, toAddress, txOrigin };
|
|
858
929
|
//# 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/constraint.ts","../src/policy-builder.ts","../src/policy-coder.ts","../src/descriptor.ts","../src/policy-validator.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
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/constraint.ts","../src/policy-builder.ts","../src/policy-coder.ts","../src/descriptor.ts","../src/policy-validator.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;;;KAWY,OAAA;EACV,SAAA,GAAY,OAAA;EACZ,QAAA;EACA,cAAA;EACA,WAAA;EACA,OAAA;EACA,QAAA,GAAW,OAAA;EACX,OAAA;EACA,QAAA;AAAA;;KAIU,aAAA;EAAkB,EAAA;EAAU,YAAA;AAAA;EAA2B,EAAA;EAAW,UAAA,EAAY,SAAA;AAAA;AAA1F;AAAA,KAGY,uBAAA;;KAGA,wBAAA;EACV,IAAA;AAAA;;KAIU,yBAAA;EACV,IAAA,uBAZiG;EAcjG,aAAA,EAAe,GAAA,EAXL;EAaV,aAAA,EAAe,GAAA;AAAA;;;AAVjB;;KAiBY,uBAAA;EACV,IAAA;EACA,KAAA;EACA,IAAA;EACA,KAAA;EACA,IAAA,EAAM,GAAA,EAZY;EAclB,QAAA;EACA,MAAA;EACA,WAAA,GAAc,GAAA;AAAA;;;;AAThB;;;;;;;;;KAwBY,sBAAA;EACV,IAAA;EACA,KAAA;EACA,IAAA;EACA,KAAA;EACA,IAAA,EAAM,GAAA,EApBW;EAsBjB,MAAA,UAPgC;EAShC,WAAA,EAAa,GAAA,EAJP;EAMN,QAAA;EACA,aAAA,GAAgB,GAAA;EAChB,YAAA;AAAA;;;;;KAOG,yBAAA,WAAoC,uBAAA;EACvC,IAAA,EAAM,CAAA;EACN,KAAA;EACA,IAAA;EACA,KAAA;EACA,IAAA,EAAM,GAAA;EACN,MAAA;EACA,WAAA,GAAc,GAAA;EACd,QAAA;EACA,YAAA;AAAA;AAfA;;;;;;;;AAAA,KA0BU,2BAAA,GACR,yBAAA,6BACA,yBAAA;;KAGQ,gCAAA;EACV,IAAA;EACA,KAAA;EACA,IAAA;EACA,KAAA;EACA,IAAA,EAAM,GAAA,EAzBN;EA2BA,aAAA,EAAe,GAAA;AA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