@nucypher/taco 0.7.0-alpha.6 → 0.7.0-alpha.8
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/cjs/conditions/context/context.js +25 -2
- package/dist/cjs/conditions/context/context.js.map +1 -1
- package/dist/cjs/conditions/schemas/context-variable.d.ts +15 -15
- package/dist/cjs/conditions/schemas/contract.d.ts +31 -31
- package/dist/cjs/conditions/schemas/json-api.d.ts +15 -15
- package/dist/cjs/conditions/schemas/json-rpc.d.ts +19 -19
- package/dist/cjs/conditions/schemas/json.d.ts +14 -14
- package/dist/cjs/conditions/schemas/return-value-test.d.ts +22 -22
- package/dist/cjs/conditions/schemas/rpc.d.ts +17 -17
- package/dist/cjs/conditions/schemas/sequential.d.ts +2 -0
- package/dist/cjs/conditions/schemas/sequential.js +9 -8
- package/dist/cjs/conditions/schemas/sequential.js.map +1 -1
- package/dist/cjs/conditions/schemas/time.d.ts +16 -16
- package/dist/cjs/conditions/schemas/utils.js +2 -0
- package/dist/cjs/conditions/schemas/utils.js.map +1 -1
- package/dist/cjs/conditions/schemas/variable-operation.d.ts +15 -15
- package/dist/cjs/conditions/schemas/variable-operation.js +16 -0
- package/dist/cjs/conditions/schemas/variable-operation.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/sign.js +15 -10
- package/dist/cjs/sign.js.map +1 -1
- package/dist/es/conditions/context/context.js +25 -2
- package/dist/es/conditions/context/context.js.map +1 -1
- package/dist/es/conditions/schemas/context-variable.d.ts +15 -15
- package/dist/es/conditions/schemas/contract.d.ts +31 -31
- package/dist/es/conditions/schemas/json-api.d.ts +15 -15
- package/dist/es/conditions/schemas/json-rpc.d.ts +19 -19
- package/dist/es/conditions/schemas/json.d.ts +14 -14
- package/dist/es/conditions/schemas/return-value-test.d.ts +22 -22
- package/dist/es/conditions/schemas/rpc.d.ts +17 -17
- package/dist/es/conditions/schemas/sequential.d.ts +2 -0
- package/dist/es/conditions/schemas/sequential.js +2 -2
- package/dist/es/conditions/schemas/sequential.js.map +1 -1
- package/dist/es/conditions/schemas/time.d.ts +16 -16
- package/dist/es/conditions/schemas/utils.js +2 -0
- package/dist/es/conditions/schemas/utils.js.map +1 -1
- package/dist/es/conditions/schemas/variable-operation.d.ts +15 -15
- package/dist/es/conditions/schemas/variable-operation.js +16 -0
- package/dist/es/conditions/schemas/variable-operation.js.map +1 -1
- package/dist/es/index.d.ts +1 -1
- package/dist/es/index.js.map +1 -1
- package/dist/es/sign.js +15 -10
- package/dist/es/sign.js.map +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.es.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -3,25 +3,25 @@ export declare const returnValueTestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3
3
|
index: z.ZodOptional<z.ZodNumber>;
|
|
4
4
|
comparator: z.ZodEnum<["==", ">", "<", ">=", "<=", "!=", "in", "!in"]>;
|
|
5
5
|
operations: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
6
|
-
operation: z.ZodEnum<["+=", "-=", "*=", "/=", "%=", "index", "round", "abs", "avg", "ceil", "ethToWei", "floor", "len", "max", "min", "sum", "weiToEth", "bool", "float", "int", "str"]>;
|
|
6
|
+
operation: z.ZodEnum<["+=", "-=", "*=", "/=", "%=", "index", "round", "abs", "avg", "ceil", "ethToWei", "floor", "len", "max", "min", "sum", "weiToEth", "bool", "float", "int", "str", "fromJson", "toJson", "fromHex", "toHex", "keccak"]>;
|
|
7
7
|
value: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
operation: "float" | "
|
|
9
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
10
10
|
value?: any;
|
|
11
11
|
}, {
|
|
12
|
-
operation: "float" | "
|
|
12
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
13
13
|
value?: any;
|
|
14
14
|
}>, {
|
|
15
|
-
operation: "float" | "
|
|
15
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
16
16
|
value?: any;
|
|
17
17
|
}, {
|
|
18
|
-
operation: "float" | "
|
|
18
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
19
19
|
value?: any;
|
|
20
20
|
}>, {
|
|
21
|
-
operation: "float" | "
|
|
21
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
22
22
|
value?: any;
|
|
23
23
|
}, {
|
|
24
|
-
operation: "float" | "
|
|
24
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
25
25
|
value?: any;
|
|
26
26
|
}>, "many">>;
|
|
27
27
|
} & {
|
|
@@ -31,7 +31,7 @@ export declare const returnValueTestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
31
31
|
value?: any;
|
|
32
32
|
index?: number | undefined;
|
|
33
33
|
operations?: {
|
|
34
|
-
operation: "float" | "
|
|
34
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
35
35
|
value?: any;
|
|
36
36
|
}[] | undefined;
|
|
37
37
|
}, {
|
|
@@ -39,7 +39,7 @@ export declare const returnValueTestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
39
39
|
value?: any;
|
|
40
40
|
index?: number | undefined;
|
|
41
41
|
operations?: {
|
|
42
|
-
operation: "float" | "
|
|
42
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
43
43
|
value?: any;
|
|
44
44
|
}[] | undefined;
|
|
45
45
|
}>, {
|
|
@@ -47,7 +47,7 @@ export declare const returnValueTestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
47
47
|
value?: any;
|
|
48
48
|
index?: number | undefined;
|
|
49
49
|
operations?: {
|
|
50
|
-
operation: "float" | "
|
|
50
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
51
51
|
value?: any;
|
|
52
52
|
}[] | undefined;
|
|
53
53
|
}, {
|
|
@@ -55,7 +55,7 @@ export declare const returnValueTestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
55
55
|
value?: any;
|
|
56
56
|
index?: number | undefined;
|
|
57
57
|
operations?: {
|
|
58
|
-
operation: "float" | "
|
|
58
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
59
59
|
value?: any;
|
|
60
60
|
}[] | undefined;
|
|
61
61
|
}>;
|
|
@@ -63,25 +63,25 @@ export declare const blockchainReturnValueTestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
63
63
|
index: z.ZodOptional<z.ZodNumber>;
|
|
64
64
|
comparator: z.ZodEnum<["==", ">", "<", ">=", "<=", "!=", "in", "!in"]>;
|
|
65
65
|
operations: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
66
|
-
operation: z.ZodEnum<["+=", "-=", "*=", "/=", "%=", "index", "round", "abs", "avg", "ceil", "ethToWei", "floor", "len", "max", "min", "sum", "weiToEth", "bool", "float", "int", "str"]>;
|
|
66
|
+
operation: z.ZodEnum<["+=", "-=", "*=", "/=", "%=", "index", "round", "abs", "avg", "ceil", "ethToWei", "floor", "len", "max", "min", "sum", "weiToEth", "bool", "float", "int", "str", "fromJson", "toJson", "fromHex", "toHex", "keccak"]>;
|
|
67
67
|
value: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
68
68
|
}, "strip", z.ZodTypeAny, {
|
|
69
|
-
operation: "float" | "
|
|
69
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
70
70
|
value?: any;
|
|
71
71
|
}, {
|
|
72
|
-
operation: "float" | "
|
|
72
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
73
73
|
value?: any;
|
|
74
74
|
}>, {
|
|
75
|
-
operation: "float" | "
|
|
75
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
76
76
|
value?: any;
|
|
77
77
|
}, {
|
|
78
|
-
operation: "float" | "
|
|
78
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
79
79
|
value?: any;
|
|
80
80
|
}>, {
|
|
81
|
-
operation: "float" | "
|
|
81
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
82
82
|
value?: any;
|
|
83
83
|
}, {
|
|
84
|
-
operation: "float" | "
|
|
84
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
85
85
|
value?: any;
|
|
86
86
|
}>, "many">>;
|
|
87
87
|
} & {
|
|
@@ -91,7 +91,7 @@ export declare const blockchainReturnValueTestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
91
91
|
value?: any;
|
|
92
92
|
index?: number | undefined;
|
|
93
93
|
operations?: {
|
|
94
|
-
operation: "float" | "
|
|
94
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
95
95
|
value?: any;
|
|
96
96
|
}[] | undefined;
|
|
97
97
|
}, {
|
|
@@ -99,7 +99,7 @@ export declare const blockchainReturnValueTestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
99
99
|
value?: any;
|
|
100
100
|
index?: number | undefined;
|
|
101
101
|
operations?: {
|
|
102
|
-
operation: "float" | "
|
|
102
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
103
103
|
value?: any;
|
|
104
104
|
}[] | undefined;
|
|
105
105
|
}>, {
|
|
@@ -107,7 +107,7 @@ export declare const blockchainReturnValueTestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
107
107
|
value?: any;
|
|
108
108
|
index?: number | undefined;
|
|
109
109
|
operations?: {
|
|
110
|
-
operation: "float" | "
|
|
110
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
111
111
|
value?: any;
|
|
112
112
|
}[] | undefined;
|
|
113
113
|
}, {
|
|
@@ -115,7 +115,7 @@ export declare const blockchainReturnValueTestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
115
115
|
value?: any;
|
|
116
116
|
index?: number | undefined;
|
|
117
117
|
operations?: {
|
|
118
|
-
operation: "float" | "
|
|
118
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
119
119
|
value?: any;
|
|
120
120
|
}[] | undefined;
|
|
121
121
|
}>;
|
|
@@ -9,25 +9,25 @@ export declare const rpcConditionSchema: z.ZodObject<{} & {
|
|
|
9
9
|
index: z.ZodOptional<z.ZodNumber>;
|
|
10
10
|
comparator: z.ZodEnum<["==", ">", "<", ">=", "<=", "!=", "in", "!in"]>;
|
|
11
11
|
operations: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
12
|
-
operation: z.ZodEnum<["+=", "-=", "*=", "/=", "%=", "index", "round", "abs", "avg", "ceil", "ethToWei", "floor", "len", "max", "min", "sum", "weiToEth", "bool", "float", "int", "str"]>;
|
|
12
|
+
operation: z.ZodEnum<["+=", "-=", "*=", "/=", "%=", "index", "round", "abs", "avg", "ceil", "ethToWei", "floor", "len", "max", "min", "sum", "weiToEth", "bool", "float", "int", "str", "fromJson", "toJson", "fromHex", "toHex", "keccak"]>;
|
|
13
13
|
value: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
operation: "float" | "
|
|
15
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
16
16
|
value?: any;
|
|
17
17
|
}, {
|
|
18
|
-
operation: "float" | "
|
|
18
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
19
19
|
value?: any;
|
|
20
20
|
}>, {
|
|
21
|
-
operation: "float" | "
|
|
21
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
22
22
|
value?: any;
|
|
23
23
|
}, {
|
|
24
|
-
operation: "float" | "
|
|
24
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
25
25
|
value?: any;
|
|
26
26
|
}>, {
|
|
27
|
-
operation: "float" | "
|
|
27
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
28
28
|
value?: any;
|
|
29
29
|
}, {
|
|
30
|
-
operation: "float" | "
|
|
30
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
31
31
|
value?: any;
|
|
32
32
|
}>, "many">>;
|
|
33
33
|
} & {
|
|
@@ -37,7 +37,7 @@ export declare const rpcConditionSchema: z.ZodObject<{} & {
|
|
|
37
37
|
value?: any;
|
|
38
38
|
index?: number | undefined;
|
|
39
39
|
operations?: {
|
|
40
|
-
operation: "float" | "
|
|
40
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
41
41
|
value?: any;
|
|
42
42
|
}[] | undefined;
|
|
43
43
|
}, {
|
|
@@ -45,7 +45,7 @@ export declare const rpcConditionSchema: z.ZodObject<{} & {
|
|
|
45
45
|
value?: any;
|
|
46
46
|
index?: number | undefined;
|
|
47
47
|
operations?: {
|
|
48
|
-
operation: "float" | "
|
|
48
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
49
49
|
value?: any;
|
|
50
50
|
}[] | undefined;
|
|
51
51
|
}>, {
|
|
@@ -53,7 +53,7 @@ export declare const rpcConditionSchema: z.ZodObject<{} & {
|
|
|
53
53
|
value?: any;
|
|
54
54
|
index?: number | undefined;
|
|
55
55
|
operations?: {
|
|
56
|
-
operation: "float" | "
|
|
56
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
57
57
|
value?: any;
|
|
58
58
|
}[] | undefined;
|
|
59
59
|
}, {
|
|
@@ -61,37 +61,37 @@ export declare const rpcConditionSchema: z.ZodObject<{} & {
|
|
|
61
61
|
value?: any;
|
|
62
62
|
index?: number | undefined;
|
|
63
63
|
operations?: {
|
|
64
|
-
operation: "float" | "
|
|
64
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
65
65
|
value?: any;
|
|
66
66
|
}[] | undefined;
|
|
67
67
|
}>;
|
|
68
68
|
}, "strip", z.ZodTypeAny, {
|
|
69
69
|
conditionType: "rpc";
|
|
70
|
+
chain: number;
|
|
71
|
+
method: "eth_getBalance";
|
|
72
|
+
parameters: [string, string | number] | [string];
|
|
70
73
|
returnValueTest: {
|
|
71
74
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
72
75
|
value?: any;
|
|
73
76
|
index?: number | undefined;
|
|
74
77
|
operations?: {
|
|
75
|
-
operation: "float" | "
|
|
78
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
76
79
|
value?: any;
|
|
77
80
|
}[] | undefined;
|
|
78
81
|
};
|
|
82
|
+
}, {
|
|
79
83
|
chain: number;
|
|
80
84
|
method: "eth_getBalance";
|
|
81
85
|
parameters: [string, string | number] | [string];
|
|
82
|
-
}, {
|
|
83
86
|
returnValueTest: {
|
|
84
87
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
85
88
|
value?: any;
|
|
86
89
|
index?: number | undefined;
|
|
87
90
|
operations?: {
|
|
88
|
-
operation: "float" | "
|
|
91
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
89
92
|
value?: any;
|
|
90
93
|
}[] | undefined;
|
|
91
94
|
};
|
|
92
|
-
chain: number;
|
|
93
|
-
method: "eth_getBalance";
|
|
94
|
-
parameters: [string, string | number] | [string];
|
|
95
95
|
conditionType?: "rpc" | undefined;
|
|
96
96
|
}>;
|
|
97
97
|
export type RpcConditionProps = z.infer<typeof rpcConditionSchema>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { ConditionProps } from '../condition';
|
|
3
|
+
export declare const getAllNestedConditionVariableNames: (condition: ConditionProps) => string[];
|
|
2
4
|
export declare const SequentialConditionType = "sequential";
|
|
3
5
|
export declare const conditionVariableSchema: z.ZodSchema;
|
|
4
6
|
export type ConditionVariableProps = z.infer<typeof conditionVariableSchema>;
|
|
@@ -5,7 +5,7 @@ import { CompoundConditionType } from './compound';
|
|
|
5
5
|
import { IfThenElseConditionType } from './if-then-else';
|
|
6
6
|
import { anyConditionSchema } from './utils';
|
|
7
7
|
import { variableOperationsArraySchema } from './variable-operation';
|
|
8
|
-
const getAllNestedConditionVariableNames = (condition) => {
|
|
8
|
+
export const getAllNestedConditionVariableNames = (condition) => {
|
|
9
9
|
const conditionVariables = [];
|
|
10
10
|
if (condition.conditionType === SequentialConditionType) {
|
|
11
11
|
for (const variable of condition.conditionVariables) {
|
|
@@ -45,7 +45,7 @@ export const sequentialConditionSchema = baseConditionSchema
|
|
|
45
45
|
conditionType: z
|
|
46
46
|
.literal(SequentialConditionType)
|
|
47
47
|
.default(SequentialConditionType),
|
|
48
|
-
conditionVariables: z.array(conditionVariableSchema).min(2).max(
|
|
48
|
+
conditionVariables: z.array(conditionVariableSchema).min(2).max(10),
|
|
49
49
|
})
|
|
50
50
|
.refine((condition) => maxNestedDepth(2)(condition), {
|
|
51
51
|
message: 'Exceeded max nested depth of 2 for multi-condition type',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequential.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/sequential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAErE,MAAM,kCAAkC,GAAG,
|
|
1
|
+
{"version":3,"file":"sequential.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/sequential.ts"],"names":[],"mappings":"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"}
|
|
@@ -9,25 +9,25 @@ export declare const timeConditionSchema: z.ZodObject<{
|
|
|
9
9
|
index: z.ZodOptional<z.ZodNumber>;
|
|
10
10
|
comparator: z.ZodEnum<["==", ">", "<", ">=", "<=", "!=", "in", "!in"]>;
|
|
11
11
|
operations: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
12
|
-
operation: z.ZodEnum<["+=", "-=", "*=", "/=", "%=", "index", "round", "abs", "avg", "ceil", "ethToWei", "floor", "len", "max", "min", "sum", "weiToEth", "bool", "float", "int", "str"]>;
|
|
12
|
+
operation: z.ZodEnum<["+=", "-=", "*=", "/=", "%=", "index", "round", "abs", "avg", "ceil", "ethToWei", "floor", "len", "max", "min", "sum", "weiToEth", "bool", "float", "int", "str", "fromJson", "toJson", "fromHex", "toHex", "keccak"]>;
|
|
13
13
|
value: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
operation: "float" | "
|
|
15
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
16
16
|
value?: any;
|
|
17
17
|
}, {
|
|
18
|
-
operation: "float" | "
|
|
18
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
19
19
|
value?: any;
|
|
20
20
|
}>, {
|
|
21
|
-
operation: "float" | "
|
|
21
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
22
22
|
value?: any;
|
|
23
23
|
}, {
|
|
24
|
-
operation: "float" | "
|
|
24
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
25
25
|
value?: any;
|
|
26
26
|
}>, {
|
|
27
|
-
operation: "float" | "
|
|
27
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
28
28
|
value?: any;
|
|
29
29
|
}, {
|
|
30
|
-
operation: "float" | "
|
|
30
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
31
31
|
value?: any;
|
|
32
32
|
}>, "many">>;
|
|
33
33
|
} & {
|
|
@@ -37,7 +37,7 @@ export declare const timeConditionSchema: z.ZodObject<{
|
|
|
37
37
|
value?: any;
|
|
38
38
|
index?: number | undefined;
|
|
39
39
|
operations?: {
|
|
40
|
-
operation: "float" | "
|
|
40
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
41
41
|
value?: any;
|
|
42
42
|
}[] | undefined;
|
|
43
43
|
}, {
|
|
@@ -45,7 +45,7 @@ export declare const timeConditionSchema: z.ZodObject<{
|
|
|
45
45
|
value?: any;
|
|
46
46
|
index?: number | undefined;
|
|
47
47
|
operations?: {
|
|
48
|
-
operation: "float" | "
|
|
48
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
49
49
|
value?: any;
|
|
50
50
|
}[] | undefined;
|
|
51
51
|
}>, {
|
|
@@ -53,7 +53,7 @@ export declare const timeConditionSchema: z.ZodObject<{
|
|
|
53
53
|
value?: any;
|
|
54
54
|
index?: number | undefined;
|
|
55
55
|
operations?: {
|
|
56
|
-
operation: "float" | "
|
|
56
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
57
57
|
value?: any;
|
|
58
58
|
}[] | undefined;
|
|
59
59
|
}, {
|
|
@@ -61,34 +61,34 @@ export declare const timeConditionSchema: z.ZodObject<{
|
|
|
61
61
|
value?: any;
|
|
62
62
|
index?: number | undefined;
|
|
63
63
|
operations?: {
|
|
64
|
-
operation: "float" | "
|
|
64
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
65
65
|
value?: any;
|
|
66
66
|
}[] | undefined;
|
|
67
67
|
}>;
|
|
68
68
|
}, "strip", z.ZodTypeAny, {
|
|
69
69
|
conditionType: "time";
|
|
70
|
+
chain: number;
|
|
71
|
+
method: "blocktime";
|
|
70
72
|
returnValueTest: {
|
|
71
73
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
72
74
|
value?: any;
|
|
73
75
|
index?: number | undefined;
|
|
74
76
|
operations?: {
|
|
75
|
-
operation: "float" | "
|
|
77
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
76
78
|
value?: any;
|
|
77
79
|
}[] | undefined;
|
|
78
80
|
};
|
|
79
|
-
chain: number;
|
|
80
|
-
method: "blocktime";
|
|
81
81
|
}, {
|
|
82
|
+
chain: number;
|
|
82
83
|
returnValueTest: {
|
|
83
84
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
84
85
|
value?: any;
|
|
85
86
|
index?: number | undefined;
|
|
86
87
|
operations?: {
|
|
87
|
-
operation: "float" | "
|
|
88
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
88
89
|
value?: any;
|
|
89
90
|
}[] | undefined;
|
|
90
91
|
};
|
|
91
|
-
chain: number;
|
|
92
92
|
conditionType?: "time" | undefined;
|
|
93
93
|
method?: "blocktime" | undefined;
|
|
94
94
|
}>;
|
|
@@ -4,6 +4,7 @@ import { contextVariableConditionSchema } from './context-variable';
|
|
|
4
4
|
import { contractConditionSchema } from './contract';
|
|
5
5
|
import { ecdsaConditionSchema } from './ecdsa';
|
|
6
6
|
import { ifThenElseConditionSchema } from './if-then-else';
|
|
7
|
+
import { jsonConditionSchema } from './json';
|
|
7
8
|
import { jsonApiConditionSchema } from './json-api';
|
|
8
9
|
import { jsonRpcConditionSchema } from './json-rpc';
|
|
9
10
|
import { jwtConditionSchema } from './jwt';
|
|
@@ -17,6 +18,7 @@ export const anyConditionSchema = z.lazy(() => z.union([
|
|
|
17
18
|
contextVariableConditionSchema,
|
|
18
19
|
contractConditionSchema,
|
|
19
20
|
ecdsaConditionSchema,
|
|
21
|
+
jsonConditionSchema,
|
|
20
22
|
jsonApiConditionSchema,
|
|
21
23
|
jsonRpcConditionSchema,
|
|
22
24
|
jwtConditionSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EACL,wCAAwC,EACxC,qCAAqC,GACtC,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAE7C,MAAM,CAAC,MAAM,kBAAkB,GAAgB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACzD,CAAC,CAAC,KAAK,CAAC;IACN,kBAAkB;IAClB,mBAAmB;IACnB,8BAA8B;IAC9B,uBAAuB;IACvB,oBAAoB;IACpB,sBAAsB;IACtB,sBAAsB;IACtB,kBAAkB;IAClB,qCAAqC;IACrC,wCAAwC;IACxC,uBAAuB;IACvB,yBAAyB;IACzB,yBAAyB;CAC1B,CAAC,CACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EACL,wCAAwC,EACxC,qCAAqC,GACtC,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAE7C,MAAM,CAAC,MAAM,kBAAkB,GAAgB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACzD,CAAC,CAAC,KAAK,CAAC;IACN,kBAAkB;IAClB,mBAAmB;IACnB,8BAA8B;IAC9B,uBAAuB;IACvB,oBAAoB;IACpB,mBAAmB;IACnB,sBAAsB;IACtB,sBAAsB;IACtB,kBAAkB;IAClB,qCAAqC;IACrC,wCAAwC;IACxC,uBAAuB;IACvB,yBAAyB;IACzB,yBAAyB;CAC1B,CAAC,CACH,CAAC"}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const OPERATOR_FUNCTIONS: readonly ["+=", "-=", "*=", "/=", "%=", "index", "round", "abs", "avg", "ceil", "ethToWei", "floor", "len", "max", "min", "sum", "weiToEth", "bool", "float", "int", "str"];
|
|
2
|
+
export declare const OPERATOR_FUNCTIONS: readonly ["+=", "-=", "*=", "/=", "%=", "index", "round", "abs", "avg", "ceil", "ethToWei", "floor", "len", "max", "min", "sum", "weiToEth", "bool", "float", "int", "str", "fromJson", "toJson", "fromHex", "toHex", "keccak"];
|
|
3
3
|
export declare const UNARY_OPERATOR_FUNCTIONS: string[];
|
|
4
4
|
export declare const variableOperationSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
5
|
-
operation: z.ZodEnum<["+=", "-=", "*=", "/=", "%=", "index", "round", "abs", "avg", "ceil", "ethToWei", "floor", "len", "max", "min", "sum", "weiToEth", "bool", "float", "int", "str"]>;
|
|
5
|
+
operation: z.ZodEnum<["+=", "-=", "*=", "/=", "%=", "index", "round", "abs", "avg", "ceil", "ethToWei", "floor", "len", "max", "min", "sum", "weiToEth", "bool", "float", "int", "str", "fromJson", "toJson", "fromHex", "toHex", "keccak"]>;
|
|
6
6
|
value: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
operation: "float" | "
|
|
8
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
9
9
|
value?: any;
|
|
10
10
|
}, {
|
|
11
|
-
operation: "float" | "
|
|
11
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
12
12
|
value?: any;
|
|
13
13
|
}>, {
|
|
14
|
-
operation: "float" | "
|
|
14
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
15
15
|
value?: any;
|
|
16
16
|
}, {
|
|
17
|
-
operation: "float" | "
|
|
17
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
18
18
|
value?: any;
|
|
19
19
|
}>, {
|
|
20
|
-
operation: "float" | "
|
|
20
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
21
21
|
value?: any;
|
|
22
22
|
}, {
|
|
23
|
-
operation: "float" | "
|
|
23
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
24
24
|
value?: any;
|
|
25
25
|
}>;
|
|
26
26
|
export declare const MAX_VARIABLE_OPERATIONS = 5;
|
|
27
27
|
export declare const variableOperationsArraySchema: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
28
|
-
operation: z.ZodEnum<["+=", "-=", "*=", "/=", "%=", "index", "round", "abs", "avg", "ceil", "ethToWei", "floor", "len", "max", "min", "sum", "weiToEth", "bool", "float", "int", "str"]>;
|
|
28
|
+
operation: z.ZodEnum<["+=", "-=", "*=", "/=", "%=", "index", "round", "abs", "avg", "ceil", "ethToWei", "floor", "len", "max", "min", "sum", "weiToEth", "bool", "float", "int", "str", "fromJson", "toJson", "fromHex", "toHex", "keccak"]>;
|
|
29
29
|
value: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
30
30
|
}, "strip", z.ZodTypeAny, {
|
|
31
|
-
operation: "float" | "
|
|
31
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
32
32
|
value?: any;
|
|
33
33
|
}, {
|
|
34
|
-
operation: "float" | "
|
|
34
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
35
35
|
value?: any;
|
|
36
36
|
}>, {
|
|
37
|
-
operation: "float" | "
|
|
37
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
38
38
|
value?: any;
|
|
39
39
|
}, {
|
|
40
|
-
operation: "float" | "
|
|
40
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
41
41
|
value?: any;
|
|
42
42
|
}>, {
|
|
43
|
-
operation: "float" | "
|
|
43
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
44
44
|
value?: any;
|
|
45
45
|
}, {
|
|
46
|
-
operation: "float" | "
|
|
46
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str" | "fromJson" | "toJson" | "fromHex" | "toHex" | "keccak";
|
|
47
47
|
value?: any;
|
|
48
48
|
}>, "many">>;
|
|
@@ -24,6 +24,14 @@ export const OPERATOR_FUNCTIONS = [
|
|
|
24
24
|
'float',
|
|
25
25
|
'int',
|
|
26
26
|
'str',
|
|
27
|
+
// JSON conversion
|
|
28
|
+
'fromJson',
|
|
29
|
+
'toJson',
|
|
30
|
+
// hex conversion
|
|
31
|
+
'fromHex',
|
|
32
|
+
'toHex',
|
|
33
|
+
// hashing
|
|
34
|
+
'keccak',
|
|
27
35
|
];
|
|
28
36
|
export const UNARY_OPERATOR_FUNCTIONS = [
|
|
29
37
|
'abs',
|
|
@@ -41,6 +49,14 @@ export const UNARY_OPERATOR_FUNCTIONS = [
|
|
|
41
49
|
'float',
|
|
42
50
|
'int',
|
|
43
51
|
'str',
|
|
52
|
+
// JSON conversion
|
|
53
|
+
'fromJson',
|
|
54
|
+
'toJson',
|
|
55
|
+
// hex conversion
|
|
56
|
+
'fromHex',
|
|
57
|
+
'toHex',
|
|
58
|
+
// hashing
|
|
59
|
+
'keccak',
|
|
44
60
|
];
|
|
45
61
|
export const variableOperationSchema = z
|
|
46
62
|
.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variable-operation.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/variable-operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAEtD,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,OAAO;IACP,0CAA0C;IAC1C,KAAK;IACL,KAAK;IACL,MAAM;IACN,UAAU;IACV,OAAO;IACP,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,UAAU;IACV,UAAU;IACV,MAAM;IACN,OAAO;IACP,KAAK;IACL,KAAK;
|
|
1
|
+
{"version":3,"file":"variable-operation.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/variable-operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAEtD,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,OAAO;IACP,0CAA0C;IAC1C,KAAK;IACL,KAAK;IACL,MAAM;IACN,UAAU;IACV,OAAO;IACP,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,UAAU;IACV,UAAU;IACV,MAAM;IACN,OAAO;IACP,KAAK;IACL,KAAK;IACL,kBAAkB;IAClB,UAAU;IACV,QAAQ;IACR,iBAAiB;IACjB,SAAS;IACT,OAAO;IACP,UAAU;IACV,QAAQ;CACA,CAAC;AAEX,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,KAAK;IACL,KAAK;IACL,MAAM;IACN,UAAU;IACV,OAAO;IACP,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,UAAU;IACV,UAAU;IACV,MAAM;IACN,OAAO;IACP,KAAK;IACL,KAAK;IACL,kBAAkB;IAClB,UAAU;IACV,QAAQ;IACR,iBAAiB;IACjB,SAAS;IACT,OAAO;IACP,UAAU;IACV,QAAQ;CACT,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;IACrC,KAAK,EAAE,yBAAyB,CAAC,QAAQ,EAAE;CAC5C,CAAC;KACD,MAAM,CACL,CAAC,IAAI,EAAE,EAAE;IACP,IACE,wBAAwB,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;QACjD,IAAI,CAAC,KAAK,KAAK,SAAS,EACxB,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,EACD;IACE,OAAO,EAAE,sCAAsC;IAC/C,IAAI,EAAE,CAAC,OAAO,CAAC;CAChB,CACF;KACA,MAAM,CACL,CAAC,IAAI,EAAE,EAAE;IACP,IACE,CAAC,wBAAwB,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;QAClD,IAAI,CAAC,KAAK,KAAK,SAAS,EACxB,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,EACD;IACE,OAAO,EAAE,qCAAqC;IAC9C,IAAI,EAAE,CAAC,OAAO,CAAC;CAChB,CACF;KACA,QAAQ,CAAC,2DAA2D,CAAC,CAAC;AAEzE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAEzC,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC;KAC3C,KAAK,CAAC,uBAAuB,CAAC;KAC9B,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,uBAAuB,CAAC;KAC5B,QAAQ,EAAE;KACV,QAAQ,CAAC,uDAAuD,CAAC,CAAC"}
|
package/dist/es/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { DkgPublicKey, ThresholdMessageKit } from '@nucypher/nucypher-core';
|
|
2
|
-
export { Domain, domains, fromBytes, getPorterUris, initialize, toBytes, toHexString, } from '@nucypher/shared';
|
|
2
|
+
export { Domain, PackedUserOperationToSign, UserOperationToSign, domains, fromBytes, getPorterUris, initialize, toBytes, toHexString, } from '@nucypher/shared';
|
|
3
3
|
export * as conditions from './conditions';
|
|
4
4
|
export { SignResult, TacoSignature, setSigningCohortConditions, signUserOp, } from './sign';
|
|
5
5
|
export { decrypt, encrypt, encryptWithPublicKey } from './taco';
|