@callcium/sdk 0.9.0 → 0.10.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 +54 -44
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +315 -323
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/bytes.ts +9 -9
- package/src/constants.ts +36 -175
- package/src/constraint.ts +7 -32
- package/src/descriptor-coder.ts +18 -20
- package/src/descriptor.ts +12 -11
- package/src/errors.ts +0 -3
- package/src/index.ts +7 -17
- package/src/operators.ts +114 -9
- package/src/path.ts +71 -0
- package/src/policy-builder.ts +17 -16
- package/src/policy-coder.ts +11 -41
- package/src/policy-enforcer.ts +22 -34
- package/src/policy-validator.ts +20 -23
- package/src/type-desc.ts +10 -10
- package/src/types.ts +70 -3
- package/src/validation-issue.ts +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -110,7 +110,7 @@ type CalldataNavigationVariant<C extends NavigationViolationCode> = {
|
|
|
110
110
|
* A union of per-code variants, narrowable with `Extract<Violation, { code: "..." }>`.
|
|
111
111
|
*/
|
|
112
112
|
type CalldataNavigationViolation = CalldataNavigationVariant<"CALLDATA_OUT_OF_BOUNDS"> | CalldataNavigationVariant<"ARRAY_INDEX_OUT_OF_BOUNDS">;
|
|
113
|
-
/** A quantified array exceeded `
|
|
113
|
+
/** A quantified array exceeded `PolicyFormat.MAX_QUANTIFIED_ARRAY_LENGTH`. */
|
|
114
114
|
type QuantifierLimitExceededViolation = {
|
|
115
115
|
code: "QUANTIFIER_LIMIT_EXCEEDED";
|
|
116
116
|
group: number;
|
|
@@ -120,7 +120,7 @@ type QuantifierLimitExceededViolation = {
|
|
|
120
120
|
resolvedValue: Hex;
|
|
121
121
|
};
|
|
122
122
|
/**
|
|
123
|
-
* A resolved word is not the canonical encoding of its declared type
|
|
123
|
+
* A resolved word is not the canonical encoding of its declared type.
|
|
124
124
|
*
|
|
125
125
|
* `resolvedValue` is the raw 32-byte word as it appeared in calldata, before any masking.
|
|
126
126
|
*/
|
|
@@ -226,13 +226,20 @@ type DecodedPolicy = {
|
|
|
226
226
|
type IssueSeverity = "info" | "warning" | "error";
|
|
227
227
|
/** Category of a validation issue. */
|
|
228
228
|
type IssueCategory = "typeMismatch" | "contradiction" | "redundancy" | "vacuity" | "compatibility";
|
|
229
|
+
/**
|
|
230
|
+
* Machine-readable code for a policy validation issue.
|
|
231
|
+
*
|
|
232
|
+
* Each code names one finding of the semantic validator and matches the constant of the same
|
|
233
|
+
* name in the Solidity `IssueCode` library.
|
|
234
|
+
*/
|
|
235
|
+
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";
|
|
229
236
|
/** A single validation issue found during policy analysis. */
|
|
230
237
|
type Issue = {
|
|
231
238
|
severity: IssueSeverity;
|
|
232
239
|
category: IssueCategory;
|
|
233
240
|
groupIndex: number;
|
|
234
241
|
constraintIndex: number;
|
|
235
|
-
code:
|
|
242
|
+
code: IssueCode;
|
|
236
243
|
value1: Hex;
|
|
237
244
|
value2: Hex;
|
|
238
245
|
message: string;
|
|
@@ -380,12 +387,6 @@ declare class PolicyBuilder {
|
|
|
380
387
|
}
|
|
381
388
|
//#endregion
|
|
382
389
|
//#region src/policy-coder.d.ts
|
|
383
|
-
/**
|
|
384
|
-
* Parse a BE16-encoded hex path into an array of step values.
|
|
385
|
-
* @param path - 0x-prefixed hex string containing BE16-encoded path steps.
|
|
386
|
-
* @returns Array of numeric step values.
|
|
387
|
-
*/
|
|
388
|
-
declare function parsePathSteps(path: Hex): number[];
|
|
389
390
|
/**
|
|
390
391
|
* Encode a PolicyData structure into the canonical binary format.
|
|
391
392
|
* @param data - The policy data to encode.
|
|
@@ -413,6 +414,32 @@ declare const PolicyCoder: {
|
|
|
413
414
|
inspect: typeof inspect$1;
|
|
414
415
|
};
|
|
415
416
|
//#endregion
|
|
417
|
+
//#region src/path.d.ts
|
|
418
|
+
/** Reserved path step values that trigger quantified evaluation over array elements. */
|
|
419
|
+
declare const Quantifier: {
|
|
420
|
+
readonly ALL: 65535;
|
|
421
|
+
readonly ANY: 65534;
|
|
422
|
+
};
|
|
423
|
+
/** Display metadata for a quantifier step. */
|
|
424
|
+
type QuantifierInfo = {
|
|
425
|
+
label: string;
|
|
426
|
+
};
|
|
427
|
+
/** Check whether a path step is a quantifier (ALL or ANY). */
|
|
428
|
+
declare function isQuantifier(step: number): boolean;
|
|
429
|
+
/**
|
|
430
|
+
* Map a quantifier path step to its display label.
|
|
431
|
+
* @param code - Quantifier step value.
|
|
432
|
+
* @returns Display metadata for the quantifier.
|
|
433
|
+
* @throws {CallciumError} If the code is not a recognised quantifier.
|
|
434
|
+
*/
|
|
435
|
+
declare function lookupQuantifier(code: number): QuantifierInfo;
|
|
436
|
+
/**
|
|
437
|
+
* Parse a BE16-encoded hex path into an array of step values.
|
|
438
|
+
* @param path - 0x-prefixed hex string containing BE16-encoded path steps.
|
|
439
|
+
* @returns Array of numeric step values.
|
|
440
|
+
*/
|
|
441
|
+
declare function parsePathSteps(path: Hex): number[];
|
|
442
|
+
//#endregion
|
|
416
443
|
//#region src/descriptor.d.ts
|
|
417
444
|
/** Structural type information extracted from a descriptor node. */
|
|
418
445
|
type TypeInfo = {
|
|
@@ -589,7 +616,7 @@ declare const DescriptorCoder: {
|
|
|
589
616
|
};
|
|
590
617
|
//#endregion
|
|
591
618
|
//#region src/constants.d.ts
|
|
592
|
-
/** Binary layout constants for the Callcium policy format. */
|
|
619
|
+
/** Binary layout constants and normative limits for the Callcium policy format. */
|
|
593
620
|
declare const PolicyFormat: {
|
|
594
621
|
readonly VERSION: 2;
|
|
595
622
|
readonly VERSION_MASK: 15;
|
|
@@ -637,6 +664,9 @@ declare const PolicyFormat: {
|
|
|
637
664
|
readonly HINT_META_DYNAMIC_ARRAY: 16384;
|
|
638
665
|
readonly HINT_META_RESERVED_MASK: 12288;
|
|
639
666
|
readonly HINT_META_STRIDE_MASK: 4095;
|
|
667
|
+
readonly MAX_PATH_DEPTH: 32;
|
|
668
|
+
readonly MAX_QUANTIFIED_ARRAY_LENGTH: 256;
|
|
669
|
+
readonly MAX_SET_MEMBERS: number;
|
|
640
670
|
};
|
|
641
671
|
/**
|
|
642
672
|
* Extract a `{ KEY: code }` map from a table with `key` and `code` fields.
|
|
@@ -646,6 +676,7 @@ type CodeMap<T extends readonly {
|
|
|
646
676
|
readonly key: string;
|
|
647
677
|
readonly code: number;
|
|
648
678
|
}[]> = { readonly [E in T[number] as E["key"]]: E["code"] };
|
|
679
|
+
/** Build a plain `{ KEY: code }` object from a table at runtime. */
|
|
649
680
|
/** Rule scope discriminant: context (EVM environment) vs. calldata (ABI payload). */
|
|
650
681
|
declare const Scope: CodeMap<readonly [{
|
|
651
682
|
readonly key: "CONTEXT";
|
|
@@ -689,41 +720,49 @@ declare const ContextProperty: CodeMap<readonly [{
|
|
|
689
720
|
readonly key: "MSG_SENDER";
|
|
690
721
|
readonly code: 0;
|
|
691
722
|
readonly label: "msg.sender";
|
|
723
|
+
readonly contextKey: "msgSender";
|
|
692
724
|
readonly typeCode: 65;
|
|
693
725
|
}, {
|
|
694
726
|
readonly key: "MSG_VALUE";
|
|
695
727
|
readonly code: 1;
|
|
696
728
|
readonly label: "msg.value";
|
|
729
|
+
readonly contextKey: "msgValue";
|
|
697
730
|
readonly typeCode: 32;
|
|
698
731
|
}, {
|
|
699
732
|
readonly key: "BLOCK_TIMESTAMP";
|
|
700
733
|
readonly code: 2;
|
|
701
734
|
readonly label: "block.timestamp";
|
|
735
|
+
readonly contextKey: "blockTimestamp";
|
|
702
736
|
readonly typeCode: 32;
|
|
703
737
|
}, {
|
|
704
738
|
readonly key: "BLOCK_NUMBER";
|
|
705
739
|
readonly code: 3;
|
|
706
740
|
readonly label: "block.number";
|
|
741
|
+
readonly contextKey: "blockNumber";
|
|
707
742
|
readonly typeCode: 32;
|
|
708
743
|
}, {
|
|
709
744
|
readonly key: "CHAIN_ID";
|
|
710
745
|
readonly code: 4;
|
|
711
746
|
readonly label: "block.chainid";
|
|
747
|
+
readonly contextKey: "chainId";
|
|
712
748
|
readonly typeCode: 32;
|
|
713
749
|
}, {
|
|
714
750
|
readonly key: "TX_ORIGIN";
|
|
715
751
|
readonly code: 5;
|
|
716
752
|
readonly label: "tx.origin";
|
|
753
|
+
readonly contextKey: "txOrigin";
|
|
717
754
|
readonly typeCode: 65;
|
|
718
755
|
}, {
|
|
719
756
|
readonly key: "BASE_FEE";
|
|
720
757
|
readonly code: 6;
|
|
721
758
|
readonly label: "block.basefee";
|
|
759
|
+
readonly contextKey: "baseFee";
|
|
722
760
|
readonly typeCode: 32;
|
|
723
761
|
}, {
|
|
724
762
|
readonly key: "GAS_PRICE";
|
|
725
763
|
readonly code: 7;
|
|
726
764
|
readonly label: "tx.gasprice";
|
|
765
|
+
readonly contextKey: "gasPrice";
|
|
727
766
|
readonly typeCode: 32;
|
|
728
767
|
}]>;
|
|
729
768
|
/** Maximum valid context property ID. */
|
|
@@ -741,12 +780,6 @@ type ContextPropertyInfo = {
|
|
|
741
780
|
* @throws {CallciumError} If the code is not a recognised context property.
|
|
742
781
|
*/
|
|
743
782
|
declare function lookupContextProperty(code: number): ContextPropertyInfo;
|
|
744
|
-
/** Protocol-imposed safety limits for path depth and quantifier array size. */
|
|
745
|
-
declare const Limits: {
|
|
746
|
-
readonly MAX_PATH_DEPTH: 32;
|
|
747
|
-
readonly MAX_QUANTIFIED_ARRAY_LENGTH: 256;
|
|
748
|
-
readonly MAX_SET_MEMBERS: number;
|
|
749
|
-
};
|
|
750
783
|
/** Operand count category for operator data validation. */
|
|
751
784
|
type Operands = "single" | "range" | "variadic";
|
|
752
785
|
/** @internal */
|
|
@@ -852,29 +885,10 @@ type OpInfo = {
|
|
|
852
885
|
* @throws {CallciumError} If the base code is not a recognised operator.
|
|
853
886
|
*/
|
|
854
887
|
declare function lookupOp(code: number): OpInfo;
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
readonly label: "all";
|
|
860
|
-
}, {
|
|
861
|
-
readonly key: "ANY";
|
|
862
|
-
readonly code: 65534;
|
|
863
|
-
readonly label: "any";
|
|
864
|
-
}]>;
|
|
865
|
-
/** Display metadata for a quantifier step. */
|
|
866
|
-
type QuantifierInfo = {
|
|
867
|
-
label: string;
|
|
868
|
-
};
|
|
869
|
-
/** Check whether a path step is a quantifier (ALL or ANY). */
|
|
870
|
-
declare function isQuantifier(step: number): boolean;
|
|
871
|
-
/**
|
|
872
|
-
* Map a quantifier path step to its display label.
|
|
873
|
-
* @param code - Quantifier step value.
|
|
874
|
-
* @returns Display metadata for the quantifier.
|
|
875
|
-
* @throws {CallciumError} If the code is not a recognised quantifier.
|
|
876
|
-
*/
|
|
877
|
-
declare function lookupQuantifier(code: number): QuantifierInfo;
|
|
888
|
+
//#endregion
|
|
889
|
+
//#region src/operators.d.ts
|
|
890
|
+
/** Return true when the operator code (with or without NOT flag) is a LENGTH_* variant. */
|
|
891
|
+
declare function isLengthOp(opCode: number): boolean;
|
|
878
892
|
/** Structural category for a descriptor type code. */
|
|
879
893
|
type TypeClass = "elementary" | "tuple" | "staticArray" | "dynamicArray";
|
|
880
894
|
/** Structural classification without label. */
|
|
@@ -894,10 +908,6 @@ type TypeCodeInfo = TypeClassInfo & {
|
|
|
894
908
|
*/
|
|
895
909
|
declare function lookupTypeCode(code: number): TypeCodeInfo;
|
|
896
910
|
//#endregion
|
|
897
|
-
//#region src/operators.d.ts
|
|
898
|
-
/** Return true when the operator code (with or without NOT flag) is a LENGTH_* variant. */
|
|
899
|
-
declare function isLengthOp(opCode: number): boolean;
|
|
900
|
-
//#endregion
|
|
901
911
|
//#region src/errors.d.ts
|
|
902
912
|
/**
|
|
903
913
|
* Machine-readable error code for structural decoding and validation failures.
|
|
@@ -941,5 +951,5 @@ declare class PolicyViolationError extends Error {
|
|
|
941
951
|
constructor(violations: Violation[]);
|
|
942
952
|
}
|
|
943
953
|
//#endregion
|
|
944
|
-
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
|
|
954
|
+
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, MAX_CONTEXT_PROPERTY_ID, 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 };
|
|
945
955
|
//# 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;AA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;EAChB,UAAA,EAAY,KAAA;EACZ,UAAA;IAAc,GAAA,EAAK,GAAA;IAAK,MAAA,EAAQ,KAAA;MAAQ,OAAA;MAAiB,UAAA;IAAA;IAAuB,MAAA,EAAQ,YAAA;IAAgB,IAAA,EAAM,IAAA;EAAA;EAC9G,UAAA,EAAY,KAAA;EACZ,MAAA,EAAQ,YAAA;EACR,IAAA,EAAM,IAAA;EACN,OAAA;EACA,cAAA;AAAA;;KAQU,aAAA;;KAGA,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/path.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,UAhBA;EAkBA,MAAA,WAhBA;EAkBA,WAAA,GAAc,GAAA;AAAA;;AAXhB;;;;;;;;;;;KA0BY,sBAAA;EACV,IAAA;EACA,KAAA;EACA,IAAA;EACA,KAAA;EACA,IAAA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