@nucypher/taco 0.7.0-alpha.2 → 0.7.0-alpha.4
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/base/context-variable.d.ts +10 -0
- package/dist/cjs/conditions/base/context-variable.js +19 -0
- package/dist/cjs/conditions/base/context-variable.js.map +1 -0
- package/dist/cjs/conditions/base/index.d.ts +2 -1
- package/dist/cjs/conditions/base/index.js +3 -2
- package/dist/cjs/conditions/base/index.js.map +1 -1
- package/dist/cjs/conditions/base/json.d.ts +7 -0
- package/dist/cjs/conditions/base/json.js +18 -0
- package/dist/cjs/conditions/base/json.js.map +1 -0
- package/dist/cjs/conditions/condition-factory.js +6 -3
- package/dist/cjs/conditions/condition-factory.js.map +1 -1
- package/dist/cjs/conditions/condition.d.ts +1 -0
- package/dist/cjs/conditions/condition.js +4 -3
- package/dist/cjs/conditions/condition.js.map +1 -1
- package/dist/cjs/conditions/predefined/address-allowlist.d.ts +11 -0
- package/dist/cjs/conditions/predefined/address-allowlist.js +31 -0
- package/dist/cjs/conditions/predefined/address-allowlist.js.map +1 -0
- package/dist/cjs/conditions/predefined/index.d.ts +1 -0
- package/dist/cjs/conditions/predefined/index.js +2 -1
- package/dist/cjs/conditions/predefined/index.js.map +1 -1
- package/dist/cjs/conditions/schemas/address-allowlist.d.ts +1 -14
- package/dist/cjs/conditions/schemas/address-allowlist.js +6 -15
- package/dist/cjs/conditions/schemas/address-allowlist.js.map +1 -1
- package/dist/cjs/conditions/schemas/context-variable.d.ts +91 -0
- package/dist/cjs/conditions/schemas/context-variable.js +17 -0
- package/dist/cjs/conditions/schemas/context-variable.js.map +1 -0
- package/dist/cjs/conditions/schemas/contract.d.ts +66 -12
- package/dist/cjs/conditions/schemas/export-for-zod-doc-gen.d.ts +3 -0
- package/dist/cjs/conditions/schemas/export-for-zod-doc-gen.js +3 -0
- package/dist/cjs/conditions/schemas/export-for-zod-doc-gen.js.map +1 -1
- package/dist/cjs/conditions/schemas/json-api.d.ts +62 -8
- package/dist/cjs/conditions/schemas/json-rpc.d.ts +62 -8
- package/dist/cjs/conditions/schemas/json.d.ts +94 -0
- package/dist/cjs/conditions/schemas/json.js +17 -0
- package/dist/cjs/conditions/schemas/json.js.map +1 -0
- package/dist/cjs/conditions/schemas/return-value-test.d.ts +76 -0
- package/dist/cjs/conditions/schemas/return-value-test.js +4 -1
- package/dist/cjs/conditions/schemas/return-value-test.js.map +1 -1
- package/dist/cjs/conditions/schemas/rpc.d.ts +50 -4
- package/dist/cjs/conditions/schemas/sequential.js +6 -2
- package/dist/cjs/conditions/schemas/sequential.js.map +1 -1
- package/dist/cjs/conditions/schemas/time.d.ts +47 -1
- package/dist/cjs/conditions/schemas/utils.js +2 -2
- package/dist/cjs/conditions/schemas/utils.js.map +1 -1
- package/dist/cjs/conditions/schemas/variable-operation.d.ts +48 -0
- package/dist/cjs/conditions/schemas/variable-operation.js +81 -0
- package/dist/cjs/conditions/schemas/variable-operation.js.map +1 -0
- package/dist/cjs/sign.d.ts +2 -2
- package/dist/cjs/sign.js +73 -38
- package/dist/cjs/sign.js.map +1 -1
- package/dist/cjs/types.d.ts +1 -1
- package/dist/es/conditions/base/context-variable.d.ts +10 -0
- package/dist/es/conditions/base/context-variable.js +15 -0
- package/dist/es/conditions/base/context-variable.js.map +1 -0
- package/dist/es/conditions/base/index.d.ts +2 -1
- package/dist/es/conditions/base/index.js +2 -1
- package/dist/es/conditions/base/index.js.map +1 -1
- package/dist/es/conditions/base/json.d.ts +7 -0
- package/dist/es/conditions/base/json.js +12 -0
- package/dist/es/conditions/base/json.js.map +1 -0
- package/dist/es/conditions/condition-factory.js +6 -3
- package/dist/es/conditions/condition-factory.js.map +1 -1
- package/dist/es/conditions/condition.d.ts +1 -0
- package/dist/es/conditions/condition.js +1 -1
- package/dist/es/conditions/condition.js.map +1 -1
- package/dist/es/conditions/predefined/address-allowlist.d.ts +11 -0
- package/dist/es/conditions/predefined/address-allowlist.js +27 -0
- package/dist/es/conditions/predefined/address-allowlist.js.map +1 -0
- package/dist/es/conditions/predefined/index.d.ts +1 -0
- package/dist/es/conditions/predefined/index.js +1 -0
- package/dist/es/conditions/predefined/index.js.map +1 -1
- package/dist/es/conditions/schemas/address-allowlist.d.ts +1 -14
- package/dist/es/conditions/schemas/address-allowlist.js +5 -14
- package/dist/es/conditions/schemas/address-allowlist.js.map +1 -1
- package/dist/es/conditions/schemas/context-variable.d.ts +91 -0
- package/dist/es/conditions/schemas/context-variable.js +14 -0
- package/dist/es/conditions/schemas/context-variable.js.map +1 -0
- package/dist/es/conditions/schemas/contract.d.ts +66 -12
- package/dist/es/conditions/schemas/export-for-zod-doc-gen.d.ts +3 -0
- package/dist/es/conditions/schemas/export-for-zod-doc-gen.js +3 -0
- package/dist/es/conditions/schemas/export-for-zod-doc-gen.js.map +1 -1
- package/dist/es/conditions/schemas/json-api.d.ts +62 -8
- package/dist/es/conditions/schemas/json-rpc.d.ts +62 -8
- package/dist/es/conditions/schemas/json.d.ts +94 -0
- package/dist/es/conditions/schemas/json.js +14 -0
- package/dist/es/conditions/schemas/json.js.map +1 -0
- package/dist/es/conditions/schemas/return-value-test.d.ts +76 -0
- package/dist/es/conditions/schemas/return-value-test.js +4 -1
- package/dist/es/conditions/schemas/return-value-test.js.map +1 -1
- package/dist/es/conditions/schemas/rpc.d.ts +50 -4
- package/dist/es/conditions/schemas/sequential.js +6 -2
- package/dist/es/conditions/schemas/sequential.js.map +1 -1
- package/dist/es/conditions/schemas/time.d.ts +47 -1
- package/dist/es/conditions/schemas/utils.js +2 -2
- package/dist/es/conditions/schemas/utils.js.map +1 -1
- package/dist/es/conditions/schemas/variable-operation.d.ts +48 -0
- package/dist/es/conditions/schemas/variable-operation.js +78 -0
- package/dist/es/conditions/schemas/variable-operation.js.map +1 -0
- package/dist/es/sign.d.ts +2 -2
- package/dist/es/sign.js +74 -39
- package/dist/es/sign.js.map +1 -1
- package/dist/es/types.d.ts +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.es.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/dist/cjs/conditions/base/address-allowlist.d.ts +0 -10
- package/dist/cjs/conditions/base/address-allowlist.js +0 -19
- package/dist/cjs/conditions/base/address-allowlist.js.map +0 -1
- package/dist/cjs/conditions/zod.d.ts +0 -3
- package/dist/cjs/conditions/zod.js +0 -19
- package/dist/cjs/conditions/zod.js.map +0 -1
- package/dist/es/conditions/base/address-allowlist.d.ts +0 -10
- package/dist/es/conditions/base/address-allowlist.js +0 -15
- package/dist/es/conditions/base/address-allowlist.js.map +0 -1
- package/dist/es/conditions/zod.d.ts +0 -3
- package/dist/es/conditions/zod.js +0 -17
- package/dist/es/conditions/zod.js.map +0 -1
|
@@ -8,44 +8,90 @@ export declare const rpcConditionSchema: z.ZodObject<{} & {
|
|
|
8
8
|
returnValueTest: z.ZodEffects<z.ZodObject<{
|
|
9
9
|
index: z.ZodOptional<z.ZodNumber>;
|
|
10
10
|
comparator: z.ZodEnum<["==", ">", "<", ">=", "<=", "!=", "in", "!in"]>;
|
|
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"]>;
|
|
13
|
+
value: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
16
|
+
value?: any;
|
|
17
|
+
}, {
|
|
18
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
19
|
+
value?: any;
|
|
20
|
+
}>, {
|
|
21
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
22
|
+
value?: any;
|
|
23
|
+
}, {
|
|
24
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
25
|
+
value?: any;
|
|
26
|
+
}>, {
|
|
27
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
28
|
+
value?: any;
|
|
29
|
+
}, {
|
|
30
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
31
|
+
value?: any;
|
|
32
|
+
}>, "many">>;
|
|
11
33
|
} & {
|
|
12
34
|
value: z.ZodType<any, z.ZodTypeDef, any>;
|
|
13
35
|
}, "strip", z.ZodTypeAny, {
|
|
14
36
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
15
37
|
value?: any;
|
|
16
38
|
index?: number | undefined;
|
|
39
|
+
operations?: {
|
|
40
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
41
|
+
value?: any;
|
|
42
|
+
}[] | undefined;
|
|
17
43
|
}, {
|
|
18
44
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
19
45
|
value?: any;
|
|
20
46
|
index?: number | undefined;
|
|
47
|
+
operations?: {
|
|
48
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
49
|
+
value?: any;
|
|
50
|
+
}[] | undefined;
|
|
21
51
|
}>, {
|
|
22
52
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
23
53
|
value?: any;
|
|
24
54
|
index?: number | undefined;
|
|
55
|
+
operations?: {
|
|
56
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
57
|
+
value?: any;
|
|
58
|
+
}[] | undefined;
|
|
25
59
|
}, {
|
|
26
60
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
27
61
|
value?: any;
|
|
28
62
|
index?: number | undefined;
|
|
63
|
+
operations?: {
|
|
64
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
65
|
+
value?: any;
|
|
66
|
+
}[] | undefined;
|
|
29
67
|
}>;
|
|
30
68
|
}, "strip", z.ZodTypeAny, {
|
|
31
69
|
conditionType: "rpc";
|
|
32
|
-
method: "eth_getBalance";
|
|
33
70
|
returnValueTest: {
|
|
34
71
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
35
72
|
value?: any;
|
|
36
73
|
index?: number | undefined;
|
|
74
|
+
operations?: {
|
|
75
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
76
|
+
value?: any;
|
|
77
|
+
}[] | undefined;
|
|
37
78
|
};
|
|
38
|
-
parameters: [string] | [string, string | number];
|
|
39
79
|
chain: number;
|
|
40
|
-
}, {
|
|
41
80
|
method: "eth_getBalance";
|
|
81
|
+
parameters: [string, string | number] | [string];
|
|
82
|
+
}, {
|
|
42
83
|
returnValueTest: {
|
|
43
84
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
44
85
|
value?: any;
|
|
45
86
|
index?: number | undefined;
|
|
87
|
+
operations?: {
|
|
88
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
89
|
+
value?: any;
|
|
90
|
+
}[] | undefined;
|
|
46
91
|
};
|
|
47
|
-
parameters: [string] | [string, string | number];
|
|
48
92
|
chain: number;
|
|
93
|
+
method: "eth_getBalance";
|
|
94
|
+
parameters: [string, string | number] | [string];
|
|
49
95
|
conditionType?: "rpc" | undefined;
|
|
50
96
|
}>;
|
|
51
97
|
export type RpcConditionProps = z.infer<typeof rpcConditionSchema>;
|
|
@@ -4,6 +4,7 @@ import { baseConditionSchema, plainStringSchema } from './common';
|
|
|
4
4
|
import { CompoundConditionType } from './compound';
|
|
5
5
|
import { IfThenElseConditionType } from './if-then-else';
|
|
6
6
|
import { anyConditionSchema } from './utils';
|
|
7
|
+
import { variableOperationsArraySchema } from './variable-operation';
|
|
7
8
|
const getAllNestedConditionVariableNames = (condition) => {
|
|
8
9
|
const conditionVariables = [];
|
|
9
10
|
if (condition.conditionType === SequentialConditionType) {
|
|
@@ -32,10 +33,13 @@ const noDuplicateVarNames = (condition) => {
|
|
|
32
33
|
return duplicates.length === 0;
|
|
33
34
|
};
|
|
34
35
|
export const SequentialConditionType = 'sequential';
|
|
35
|
-
export const conditionVariableSchema = z.lazy(() => z
|
|
36
|
+
export const conditionVariableSchema = z.lazy(() => z
|
|
37
|
+
.object({
|
|
36
38
|
varName: plainStringSchema,
|
|
37
39
|
condition: anyConditionSchema,
|
|
38
|
-
|
|
40
|
+
operations: variableOperationsArraySchema.describe('Optional operations to perform on the obtained condition result before storing it'),
|
|
41
|
+
})
|
|
42
|
+
.describe('Executes a condition and stores the result as a variable within a sequential condition.'));
|
|
39
43
|
export const sequentialConditionSchema = baseConditionSchema
|
|
40
44
|
.extend({
|
|
41
45
|
conditionType: z
|
|
@@ -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;
|
|
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,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
|
|
|
8
8
|
returnValueTest: z.ZodEffects<z.ZodObject<{
|
|
9
9
|
index: z.ZodOptional<z.ZodNumber>;
|
|
10
10
|
comparator: z.ZodEnum<["==", ">", "<", ">=", "<=", "!=", "in", "!in"]>;
|
|
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"]>;
|
|
13
|
+
value: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
16
|
+
value?: any;
|
|
17
|
+
}, {
|
|
18
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
19
|
+
value?: any;
|
|
20
|
+
}>, {
|
|
21
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
22
|
+
value?: any;
|
|
23
|
+
}, {
|
|
24
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
25
|
+
value?: any;
|
|
26
|
+
}>, {
|
|
27
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
28
|
+
value?: any;
|
|
29
|
+
}, {
|
|
30
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
31
|
+
value?: any;
|
|
32
|
+
}>, "many">>;
|
|
11
33
|
} & {
|
|
12
34
|
value: z.ZodType<any, z.ZodTypeDef, any>;
|
|
13
35
|
}, "strip", z.ZodTypeAny, {
|
|
14
36
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
15
37
|
value?: any;
|
|
16
38
|
index?: number | undefined;
|
|
39
|
+
operations?: {
|
|
40
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
41
|
+
value?: any;
|
|
42
|
+
}[] | undefined;
|
|
17
43
|
}, {
|
|
18
44
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
19
45
|
value?: any;
|
|
20
46
|
index?: number | undefined;
|
|
47
|
+
operations?: {
|
|
48
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
49
|
+
value?: any;
|
|
50
|
+
}[] | undefined;
|
|
21
51
|
}>, {
|
|
22
52
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
23
53
|
value?: any;
|
|
24
54
|
index?: number | undefined;
|
|
55
|
+
operations?: {
|
|
56
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
57
|
+
value?: any;
|
|
58
|
+
}[] | undefined;
|
|
25
59
|
}, {
|
|
26
60
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
27
61
|
value?: any;
|
|
28
62
|
index?: number | undefined;
|
|
63
|
+
operations?: {
|
|
64
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
65
|
+
value?: any;
|
|
66
|
+
}[] | undefined;
|
|
29
67
|
}>;
|
|
30
68
|
}, "strip", z.ZodTypeAny, {
|
|
31
69
|
conditionType: "time";
|
|
32
|
-
method: "blocktime";
|
|
33
70
|
returnValueTest: {
|
|
34
71
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
35
72
|
value?: any;
|
|
36
73
|
index?: number | undefined;
|
|
74
|
+
operations?: {
|
|
75
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
76
|
+
value?: any;
|
|
77
|
+
}[] | undefined;
|
|
37
78
|
};
|
|
38
79
|
chain: number;
|
|
80
|
+
method: "blocktime";
|
|
39
81
|
}, {
|
|
40
82
|
returnValueTest: {
|
|
41
83
|
comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
|
|
42
84
|
value?: any;
|
|
43
85
|
index?: number | undefined;
|
|
86
|
+
operations?: {
|
|
87
|
+
operation: "float" | "index" | "+=" | "-=" | "*=" | "/=" | "%=" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
88
|
+
value?: any;
|
|
89
|
+
}[] | undefined;
|
|
44
90
|
};
|
|
45
91
|
chain: number;
|
|
46
92
|
conditionType?: "time" | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { compoundConditionSchema } from '../compound-condition';
|
|
3
|
-
import {
|
|
3
|
+
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';
|
|
@@ -14,7 +14,7 @@ import { timeConditionSchema } from './time';
|
|
|
14
14
|
export const anyConditionSchema = z.lazy(() => z.union([
|
|
15
15
|
rpcConditionSchema,
|
|
16
16
|
timeConditionSchema,
|
|
17
|
-
|
|
17
|
+
contextVariableConditionSchema,
|
|
18
18
|
contractConditionSchema,
|
|
19
19
|
ecdsaConditionSchema,
|
|
20
20
|
jsonApiConditionSchema,
|
|
@@ -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
|
|
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"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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"];
|
|
3
|
+
export declare const UNARY_OPERATOR_FUNCTIONS: string[];
|
|
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"]>;
|
|
6
|
+
value: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
9
|
+
value?: any;
|
|
10
|
+
}, {
|
|
11
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
12
|
+
value?: any;
|
|
13
|
+
}>, {
|
|
14
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
15
|
+
value?: any;
|
|
16
|
+
}, {
|
|
17
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
18
|
+
value?: any;
|
|
19
|
+
}>, {
|
|
20
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
21
|
+
value?: any;
|
|
22
|
+
}, {
|
|
23
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
24
|
+
value?: any;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const MAX_VARIABLE_OPERATIONS = 5;
|
|
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"]>;
|
|
29
|
+
value: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
32
|
+
value?: any;
|
|
33
|
+
}, {
|
|
34
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
35
|
+
value?: any;
|
|
36
|
+
}>, {
|
|
37
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
38
|
+
value?: any;
|
|
39
|
+
}, {
|
|
40
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
41
|
+
value?: any;
|
|
42
|
+
}>, {
|
|
43
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
44
|
+
value?: any;
|
|
45
|
+
}, {
|
|
46
|
+
operation: "float" | "+=" | "-=" | "*=" | "/=" | "%=" | "index" | "round" | "abs" | "avg" | "ceil" | "ethToWei" | "floor" | "len" | "max" | "min" | "sum" | "weiToEth" | "bool" | "int" | "str";
|
|
47
|
+
value?: any;
|
|
48
|
+
}>, "many">>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { paramOrContextParamSchema } from './context';
|
|
3
|
+
export const OPERATOR_FUNCTIONS = [
|
|
4
|
+
'+=',
|
|
5
|
+
'-=',
|
|
6
|
+
'*=',
|
|
7
|
+
'/=',
|
|
8
|
+
'%=',
|
|
9
|
+
'index',
|
|
10
|
+
'round',
|
|
11
|
+
// operations that don't require 2nd value
|
|
12
|
+
'abs',
|
|
13
|
+
'avg',
|
|
14
|
+
'ceil',
|
|
15
|
+
'ethToWei',
|
|
16
|
+
'floor',
|
|
17
|
+
'len',
|
|
18
|
+
'max',
|
|
19
|
+
'min',
|
|
20
|
+
'sum',
|
|
21
|
+
'weiToEth',
|
|
22
|
+
// casting
|
|
23
|
+
'bool',
|
|
24
|
+
'float',
|
|
25
|
+
'int',
|
|
26
|
+
'str',
|
|
27
|
+
];
|
|
28
|
+
export const UNARY_OPERATOR_FUNCTIONS = [
|
|
29
|
+
'abs',
|
|
30
|
+
'avg',
|
|
31
|
+
'ceil',
|
|
32
|
+
'ethToWei',
|
|
33
|
+
'floor',
|
|
34
|
+
'len',
|
|
35
|
+
'max',
|
|
36
|
+
'min',
|
|
37
|
+
'sum',
|
|
38
|
+
'weiToEth',
|
|
39
|
+
// casting
|
|
40
|
+
'bool',
|
|
41
|
+
'float',
|
|
42
|
+
'int',
|
|
43
|
+
'str',
|
|
44
|
+
];
|
|
45
|
+
export const variableOperationSchema = z
|
|
46
|
+
.object({
|
|
47
|
+
operation: z.enum(OPERATOR_FUNCTIONS),
|
|
48
|
+
value: paramOrContextParamSchema.optional(),
|
|
49
|
+
})
|
|
50
|
+
.refine((data) => {
|
|
51
|
+
if (UNARY_OPERATOR_FUNCTIONS.includes(data.operation) &&
|
|
52
|
+
data.value !== undefined) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
return true;
|
|
56
|
+
}, {
|
|
57
|
+
message: 'Value not allowed for this operation',
|
|
58
|
+
path: ['value'],
|
|
59
|
+
})
|
|
60
|
+
.refine((data) => {
|
|
61
|
+
if (!UNARY_OPERATOR_FUNCTIONS.includes(data.operation) &&
|
|
62
|
+
data.value === undefined) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
return true;
|
|
66
|
+
}, {
|
|
67
|
+
message: 'Value must be defined for operation',
|
|
68
|
+
path: ['value'],
|
|
69
|
+
})
|
|
70
|
+
.describe('An operation that can be performed on an obtained result.');
|
|
71
|
+
export const MAX_VARIABLE_OPERATIONS = 5;
|
|
72
|
+
export const variableOperationsArraySchema = z
|
|
73
|
+
.array(variableOperationSchema)
|
|
74
|
+
.min(1)
|
|
75
|
+
.max(MAX_VARIABLE_OPERATIONS)
|
|
76
|
+
.optional()
|
|
77
|
+
.describe('Optional operations to perform on the obtained result');
|
|
78
|
+
//# sourceMappingURL=variable-operation.js.map
|
|
@@ -0,0 +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;CACG,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;CACN,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/sign.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Domain, TacoSignature,
|
|
1
|
+
import { Domain, PackedUserOperationToSign, TacoSignature, UserOperationToSign } from '@nucypher/shared';
|
|
2
2
|
import { ethers } from 'ethers';
|
|
3
3
|
import { Condition } from './conditions/condition';
|
|
4
4
|
import { ConditionContext } from './conditions/context';
|
|
@@ -22,5 +22,5 @@ export type SignResult = {
|
|
|
22
22
|
* @returns A promise that resolves to a SignResult containing the message hash, aggregated signature, and signing results from the Porter service.
|
|
23
23
|
* @throws An error if the signing process fails due to insufficient signatures or mismatched hashes.
|
|
24
24
|
*/
|
|
25
|
-
export declare function signUserOp(provider: ethers.providers.Provider, domain: Domain, cohortId: number, chainId: number, userOp:
|
|
25
|
+
export declare function signUserOp(provider: ethers.providers.Provider, domain: Domain, cohortId: number, chainId: number, userOp: UserOperationToSign | PackedUserOperationToSign, aaVersion: 'mdt' | '0.8.0' | string, context?: ConditionContext, porterUris?: string[]): Promise<SignResult>;
|
|
26
26
|
export declare function setSigningCohortConditions(provider: ethers.providers.JsonRpcProvider, domain: Domain, conditions: Condition, cohortId: number, chainId: number, signer: ethers.Signer): Promise<ethers.ContractTransaction>;
|
package/dist/es/sign.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PackedUserOperationSignatureRequest, SessionStaticSecret, UserOperationSignatureRequest, } from '@nucypher/nucypher-core';
|
|
2
|
+
import { fromHexString, getPorterUris, isPackedUserOperation, PorterClient, SigningCoordinatorAgent, toCorePackedUserOperation, toCoreUserOperation, toHexString, } from '@nucypher/shared';
|
|
2
3
|
import { ethers } from 'ethers';
|
|
3
4
|
import { ConditionExpression } from './conditions/condition-expr';
|
|
4
5
|
const ERR_INSUFFICIENT_SIGNATURES = (errors) => `Threshold of signatures not met; TACo signing failed with errors: ${JSON.stringify(errors)}`;
|
|
@@ -15,6 +16,30 @@ function aggregateSignatures(signaturesByAddress, threshold) {
|
|
|
15
16
|
const allBytes = signatures.flatMap((hex) => Array.from(fromHexString(hex)));
|
|
16
17
|
return `0x${toHexString(new Uint8Array(allBytes))}`;
|
|
17
18
|
}
|
|
19
|
+
async function makeSigningRequests(cohortId, chainId, signers, userOp, aaVersion, conditionContext) {
|
|
20
|
+
const coreContext = conditionContext
|
|
21
|
+
? await conditionContext.toCoreContext()
|
|
22
|
+
: null;
|
|
23
|
+
let signingRequest;
|
|
24
|
+
if (isPackedUserOperation(userOp)) {
|
|
25
|
+
const corePackedUserOp = toCorePackedUserOperation(userOp);
|
|
26
|
+
signingRequest = new PackedUserOperationSignatureRequest(corePackedUserOp, cohortId, BigInt(chainId), aaVersion, coreContext);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
const coreUserOp = toCoreUserOperation(userOp);
|
|
30
|
+
signingRequest = new UserOperationSignatureRequest(coreUserOp, cohortId, BigInt(chainId), aaVersion, coreContext);
|
|
31
|
+
}
|
|
32
|
+
const ephemeralSessionKey = SessionStaticSecret.random();
|
|
33
|
+
const sharedSecrets = Object.fromEntries(signers.map(({ provider, signingRequestStaticKey }) => {
|
|
34
|
+
const sharedSecret = ephemeralSessionKey.deriveSharedSecret(signingRequestStaticKey);
|
|
35
|
+
return [provider, sharedSecret];
|
|
36
|
+
}));
|
|
37
|
+
const encryptedRequests = Object.fromEntries(Object.entries(sharedSecrets).map(([provider, sessionSharedSecret]) => {
|
|
38
|
+
const encryptedRequest = signingRequest.encrypt(sessionSharedSecret, ephemeralSessionKey.publicKey());
|
|
39
|
+
return [provider, encryptedRequest];
|
|
40
|
+
}));
|
|
41
|
+
return { sharedSecrets, encryptedRequests };
|
|
42
|
+
}
|
|
18
43
|
/**
|
|
19
44
|
* Signs a UserOperation.
|
|
20
45
|
* @param provider - The Ethereum provider to use for signing.
|
|
@@ -35,17 +60,49 @@ export async function signUserOp(provider, domain, cohortId, chainId, userOp, aa
|
|
|
35
60
|
const porter = new PorterClient(porterUrisFull);
|
|
36
61
|
const signers = await SigningCoordinatorAgent.getParticipants(provider, domain, cohortId);
|
|
37
62
|
const threshold = await SigningCoordinatorAgent.getThreshold(provider, domain, cohortId);
|
|
38
|
-
const
|
|
39
|
-
const signingRequest = new UserOperationSignatureRequest(pythonUserOp, aaVersion, cohortId, chainId, context || {}, 'userop');
|
|
40
|
-
const signingRequests = Object.fromEntries(signers.map((signer) => [
|
|
41
|
-
signer.provider,
|
|
42
|
-
toBase64(signingRequest.toBytes()),
|
|
43
|
-
]));
|
|
63
|
+
const { sharedSecrets, encryptedRequests } = await makeSigningRequests(cohortId, chainId, signers, userOp, aaVersion, context);
|
|
44
64
|
// Build signing request for the user operation
|
|
45
|
-
const
|
|
65
|
+
const { encryptedResponses, errors } = await porter.signUserOp(encryptedRequests, threshold);
|
|
66
|
+
if (Object.keys(encryptedResponses).length < threshold) {
|
|
67
|
+
// not enough signatures returned
|
|
68
|
+
throw new Error(ERR_INSUFFICIENT_SIGNATURES(errors));
|
|
69
|
+
}
|
|
70
|
+
const signaturesToAggregate = collectSignatures(encryptedResponses, sharedSecrets, threshold);
|
|
71
|
+
const aggregatedSignature = aggregateSignatures(signaturesToAggregate, threshold);
|
|
72
|
+
return {
|
|
73
|
+
messageHash: Object.values(signaturesToAggregate)[0].messageHash,
|
|
74
|
+
aggregatedSignature,
|
|
75
|
+
signingResults: signaturesToAggregate,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export async function setSigningCohortConditions(provider, domain, conditions, cohortId, chainId, signer) {
|
|
79
|
+
// Convert Condition to ConditionExpression, then to JSON, then to bytes
|
|
80
|
+
const conditionExpression = new ConditionExpression(conditions);
|
|
81
|
+
const conditionsJson = conditionExpression.toJson();
|
|
82
|
+
const conditionsBytes = ethers.utils.toUtf8Bytes(conditionsJson);
|
|
83
|
+
// Set conditions on the SigningCoordinator contract
|
|
84
|
+
return await SigningCoordinatorAgent.setSigningCohortConditions(provider, domain, cohortId, chainId, conditionsBytes, signer);
|
|
85
|
+
}
|
|
86
|
+
function decryptSignatureResponses(encryptedResponses, sharedSecrets) {
|
|
87
|
+
const decryptedResponses = Object.fromEntries(Object.entries(encryptedResponses).map(([ursulaAddress, encryptedResponse]) => [
|
|
88
|
+
ursulaAddress,
|
|
89
|
+
encryptedResponse.decrypt(sharedSecrets[ursulaAddress]),
|
|
90
|
+
]));
|
|
91
|
+
const tacoSignatures = Object.fromEntries(Object.entries(decryptedResponses).map(([ursulaAddress, signatureResponse]) => [
|
|
92
|
+
ursulaAddress,
|
|
93
|
+
{
|
|
94
|
+
messageHash: `0x${toHexString(signatureResponse.hash)}`,
|
|
95
|
+
signature: `0x${toHexString(signatureResponse.signature)}`,
|
|
96
|
+
signerAddress: signatureResponse.signer,
|
|
97
|
+
},
|
|
98
|
+
]));
|
|
99
|
+
return tacoSignatures;
|
|
100
|
+
}
|
|
101
|
+
function collectSignatures(encryptedResponses, sharedSecrets, threshold) {
|
|
102
|
+
const decryptedSignatures = decryptSignatureResponses(encryptedResponses, sharedSecrets);
|
|
46
103
|
const hashToSignatures = new Map();
|
|
47
104
|
// Single pass: decode signatures and populate signingResults
|
|
48
|
-
for (const [ursulaAddress, signature] of Object.entries(
|
|
105
|
+
for (const [ursulaAddress, signature] of Object.entries(decryptedSignatures)) {
|
|
49
106
|
// For non-optimistic: track hashes and group signatures for aggregation
|
|
50
107
|
const hash = signature.messageHash;
|
|
51
108
|
if (!hashToSignatures.has(hash)) {
|
|
@@ -53,43 +110,21 @@ export async function signUserOp(provider, domain, cohortId, chainId, userOp, aa
|
|
|
53
110
|
}
|
|
54
111
|
hashToSignatures.get(hash)[ursulaAddress] = signature;
|
|
55
112
|
}
|
|
56
|
-
|
|
113
|
+
// Find a hash that meets the threshold
|
|
57
114
|
let signaturesToAggregate = undefined;
|
|
58
|
-
for (const
|
|
115
|
+
for (const signatures of hashToSignatures.values()) {
|
|
59
116
|
if (Object.keys(signatures).length >= threshold) {
|
|
60
117
|
signaturesToAggregate = signatures;
|
|
61
|
-
messageHash = hash;
|
|
62
118
|
break;
|
|
63
119
|
}
|
|
64
120
|
}
|
|
65
121
|
// Insufficient signatures for a message hash to meet the threshold
|
|
66
|
-
if (!
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
// we don't really expect this to happen (other than some malicious nodes)
|
|
72
|
-
// 2. number of errors still could have allowed for a threshold of signatures
|
|
73
|
-
console.error('Porter returned mismatched message hashes:', hashToSignatures);
|
|
74
|
-
throw new Error(ERR_MISMATCHED_HASHES(hashToSignatures));
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
throw new Error(ERR_INSUFFICIENT_SIGNATURES(porterSignResult.errors));
|
|
78
|
-
}
|
|
122
|
+
if (!signaturesToAggregate) {
|
|
123
|
+
//we have multiple hashes, which means we have mismatched hashes from different nodes
|
|
124
|
+
// we don't really expect this to happen (other than some malicious nodes)
|
|
125
|
+
console.error('Porter returned mismatched message hashes:', hashToSignatures);
|
|
126
|
+
throw new Error(ERR_MISMATCHED_HASHES(hashToSignatures));
|
|
79
127
|
}
|
|
80
|
-
|
|
81
|
-
return {
|
|
82
|
-
messageHash,
|
|
83
|
-
aggregatedSignature,
|
|
84
|
-
signingResults: porterSignResult.signingResults,
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
export async function setSigningCohortConditions(provider, domain, conditions, cohortId, chainId, signer) {
|
|
88
|
-
// Convert Condition to ConditionExpression, then to JSON, then to bytes
|
|
89
|
-
const conditionExpression = new ConditionExpression(conditions);
|
|
90
|
-
const conditionsJson = conditionExpression.toJson();
|
|
91
|
-
const conditionsBytes = ethers.utils.toUtf8Bytes(conditionsJson);
|
|
92
|
-
// Set conditions on the SigningCoordinator contract
|
|
93
|
-
return await SigningCoordinatorAgent.setSigningCohortConditions(provider, domain, cohortId, chainId, conditionsBytes, signer);
|
|
128
|
+
return signaturesToAggregate;
|
|
94
129
|
}
|
|
95
130
|
//# sourceMappingURL=sign.js.map
|
package/dist/es/sign.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sign.js","sourceRoot":"","sources":["../../src/sign.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file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AC7E,OAAO,CAAC,KAAK,CACX,4CAA4C,EAC5C,gBAAgB,CACjB,CAAC;QACF,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,qBAAqB,CAAC;AAC/B,CAAC"}
|
package/dist/es/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Conditions as CoreConditions, Context as CoreContext, } from '@nucypher/nucypher-core';
|
|
2
|
-
export
|
|
2
|
+
export { UserOperationToSign } from '@nucypher/shared';
|