@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>;
|
|
@@ -7,6 +7,7 @@ const common_1 = require("./common");
|
|
|
7
7
|
const compound_1 = require("./compound");
|
|
8
8
|
const if_then_else_1 = require("./if-then-else");
|
|
9
9
|
const utils_1 = require("./utils");
|
|
10
|
+
const variable_operation_1 = require("./variable-operation");
|
|
10
11
|
const getAllNestedConditionVariableNames = (condition) => {
|
|
11
12
|
const conditionVariables = [];
|
|
12
13
|
if (condition.conditionType === exports.SequentialConditionType) {
|
|
@@ -35,10 +36,13 @@ const noDuplicateVarNames = (condition) => {
|
|
|
35
36
|
return duplicates.length === 0;
|
|
36
37
|
};
|
|
37
38
|
exports.SequentialConditionType = 'sequential';
|
|
38
|
-
exports.conditionVariableSchema = zod_1.z.lazy(() => zod_1.z
|
|
39
|
+
exports.conditionVariableSchema = zod_1.z.lazy(() => zod_1.z
|
|
40
|
+
.object({
|
|
39
41
|
varName: common_1.plainStringSchema,
|
|
40
42
|
condition: utils_1.anyConditionSchema,
|
|
41
|
-
|
|
43
|
+
operations: variable_operation_1.variableOperationsArraySchema.describe('Optional operations to perform on the obtained condition result before storing it'),
|
|
44
|
+
})
|
|
45
|
+
.describe('Executes a condition and stores the result as a variable within a sequential condition.'));
|
|
42
46
|
exports.sequentialConditionSchema = common_1.baseConditionSchema
|
|
43
47
|
.extend({
|
|
44
48
|
conditionType: zod_1.z
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequential.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/sequential.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAGxB,wDAAoD;AAEpD,qCAAkE;AAClE,yCAAmD;AACnD,iDAAyD;AACzD,mCAA6C;
|
|
1
|
+
{"version":3,"file":"sequential.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/sequential.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAGxB,wDAAoD;AAEpD,qCAAkE;AAClE,yCAAmD;AACnD,iDAAyD;AACzD,mCAA6C;AAC7C,6DAAqE;AAErE,MAAM,kCAAkC,GAAG,CACzC,SAAyB,EACf,EAAE;IACZ,MAAM,kBAAkB,GAAa,EAAE,CAAC;IACxC,IAAI,SAAS,CAAC,aAAa,KAAK,+BAAuB,EAAE,CAAC;QACxD,KAAK,MAAM,QAAQ,IAAI,SAAS,CAAC,kBAAkB,EAAE,CAAC;YACpD,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAC1C,kBAAkB,CAAC,IAAI,CACrB,GAAG,kCAAkC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAC1D,CAAC;QACJ,CAAC;IACH,CAAC;SAAM,IAAI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F;CACF,CAAC;KACD,QAAQ,CACP,yFAAyF,CAC1F,CACJ,CAAC;AAIW,QAAA,yBAAyB,GAAgB,4BAAmB;KACtE,MAAM,CAAC;IACN,aAAa,EAAE,OAAC;SACb,OAAO,CAAC,+BAAuB,CAAC;SAChC,OAAO,CAAC,+BAAuB,CAAC;IACnC,kBAAkB,EAAE,OAAC,CAAC,KAAK,CAAC,+BAAuB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CACnE,CAAC;KACD,MAAM,CACL,CAAC,SAAS,EAAE,EAAE,CAAC,IAAA,gCAAc,EAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EAC3C;IACE,OAAO,EAAE,yDAAyD;IAClE,IAAI,EAAE,CAAC,oBAAoB,CAAC;CAC7B,CACF;KACA,MAAM,CACL,CAAC,SAAS,EAAE,EAAE;IACZ,OAAO,mBAAmB,CAAC,SAAS,CAAC,CAAC;AACxC,CAAC,EACD;IACE,OAAO,EAAE,0CAA0C;IACnD,IAAI,EAAE,CAAC,oBAAoB,CAAC;CAC7B,CACF,CAAC"}
|
|
@@ -8,39 +8,85 @@ export declare const timeConditionSchema: 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: "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;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.anyConditionSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const compound_condition_1 = require("../compound-condition");
|
|
6
|
-
const
|
|
6
|
+
const context_variable_1 = require("./context-variable");
|
|
7
7
|
const contract_1 = require("./contract");
|
|
8
8
|
const ecdsa_1 = require("./ecdsa");
|
|
9
9
|
const if_then_else_1 = require("./if-then-else");
|
|
@@ -17,7 +17,7 @@ const time_1 = require("./time");
|
|
|
17
17
|
exports.anyConditionSchema = zod_1.z.lazy(() => zod_1.z.union([
|
|
18
18
|
rpc_1.rpcConditionSchema,
|
|
19
19
|
time_1.timeConditionSchema,
|
|
20
|
-
|
|
20
|
+
context_variable_1.contextVariableConditionSchema,
|
|
21
21
|
contract_1.contractConditionSchema,
|
|
22
22
|
ecdsa_1.ecdsaConditionSchema,
|
|
23
23
|
json_api_1.jsonApiConditionSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/utils.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,8DAAgE;AAEhE,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/conditions/schemas/utils.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,8DAAgE;AAEhE,yDAAoE;AACpE,yCAAqD;AACrD,mCAA+C;AAC/C,iDAA2D;AAC3D,yCAAoD;AACpD,yCAAoD;AACpD,+BAA2C;AAC3C,+BAA2C;AAC3C,6CAAyD;AACzD,uCAGmB;AACnB,iCAA6C;AAEhC,QAAA,kBAAkB,GAAgB,OAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACzD,OAAC,CAAC,KAAK,CAAC;IACN,wBAAkB;IAClB,0BAAmB;IACnB,iDAA8B;IAC9B,kCAAuB;IACvB,4BAAoB;IACpB,iCAAsB;IACtB,iCAAsB;IACtB,wBAAkB;IAClB,+CAAqC;IACrC,kDAAwC;IACxC,4CAAuB;IACvB,sCAAyB;IACzB,wCAAyB;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,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.variableOperationsArraySchema = exports.MAX_VARIABLE_OPERATIONS = exports.variableOperationSchema = exports.UNARY_OPERATOR_FUNCTIONS = exports.OPERATOR_FUNCTIONS = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const context_1 = require("./context");
|
|
6
|
+
exports.OPERATOR_FUNCTIONS = [
|
|
7
|
+
'+=',
|
|
8
|
+
'-=',
|
|
9
|
+
'*=',
|
|
10
|
+
'/=',
|
|
11
|
+
'%=',
|
|
12
|
+
'index',
|
|
13
|
+
'round',
|
|
14
|
+
// operations that don't require 2nd value
|
|
15
|
+
'abs',
|
|
16
|
+
'avg',
|
|
17
|
+
'ceil',
|
|
18
|
+
'ethToWei',
|
|
19
|
+
'floor',
|
|
20
|
+
'len',
|
|
21
|
+
'max',
|
|
22
|
+
'min',
|
|
23
|
+
'sum',
|
|
24
|
+
'weiToEth',
|
|
25
|
+
// casting
|
|
26
|
+
'bool',
|
|
27
|
+
'float',
|
|
28
|
+
'int',
|
|
29
|
+
'str',
|
|
30
|
+
];
|
|
31
|
+
exports.UNARY_OPERATOR_FUNCTIONS = [
|
|
32
|
+
'abs',
|
|
33
|
+
'avg',
|
|
34
|
+
'ceil',
|
|
35
|
+
'ethToWei',
|
|
36
|
+
'floor',
|
|
37
|
+
'len',
|
|
38
|
+
'max',
|
|
39
|
+
'min',
|
|
40
|
+
'sum',
|
|
41
|
+
'weiToEth',
|
|
42
|
+
// casting
|
|
43
|
+
'bool',
|
|
44
|
+
'float',
|
|
45
|
+
'int',
|
|
46
|
+
'str',
|
|
47
|
+
];
|
|
48
|
+
exports.variableOperationSchema = zod_1.z
|
|
49
|
+
.object({
|
|
50
|
+
operation: zod_1.z.enum(exports.OPERATOR_FUNCTIONS),
|
|
51
|
+
value: context_1.paramOrContextParamSchema.optional(),
|
|
52
|
+
})
|
|
53
|
+
.refine((data) => {
|
|
54
|
+
if (exports.UNARY_OPERATOR_FUNCTIONS.includes(data.operation) &&
|
|
55
|
+
data.value !== undefined) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
return true;
|
|
59
|
+
}, {
|
|
60
|
+
message: 'Value not allowed for this operation',
|
|
61
|
+
path: ['value'],
|
|
62
|
+
})
|
|
63
|
+
.refine((data) => {
|
|
64
|
+
if (!exports.UNARY_OPERATOR_FUNCTIONS.includes(data.operation) &&
|
|
65
|
+
data.value === undefined) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
return true;
|
|
69
|
+
}, {
|
|
70
|
+
message: 'Value must be defined for operation',
|
|
71
|
+
path: ['value'],
|
|
72
|
+
})
|
|
73
|
+
.describe('An operation that can be performed on an obtained result.');
|
|
74
|
+
exports.MAX_VARIABLE_OPERATIONS = 5;
|
|
75
|
+
exports.variableOperationsArraySchema = zod_1.z
|
|
76
|
+
.array(exports.variableOperationSchema)
|
|
77
|
+
.min(1)
|
|
78
|
+
.max(exports.MAX_VARIABLE_OPERATIONS)
|
|
79
|
+
.optional()
|
|
80
|
+
.describe('Optional operations to perform on the obtained result');
|
|
81
|
+
//# 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,6BAAwB;AAExB,uCAAsD;AAEzC,QAAA,kBAAkB,GAAG;IAChC,IAAI;IACJ,IAAI;IACJ,IAAI;IAC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;AAE5D,QAAA,uBAAuB,GAAG,CAAC,CAAC;AAE5B,QAAA,6BAA6B,GAAG,OAAC;KAC3C,KAAK,CAAC,+BAAuB,CAAC;KAC9B,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,+BAAuB,CAAC;KAC5B,QAAQ,EAAE;KACV,QAAQ,CAAC,uDAAuD,CAAC,CAAC"}
|
package/dist/cjs/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/cjs/sign.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.signUserOp = signUserOp;
|
|
4
4
|
exports.setSigningCohortConditions = setSigningCohortConditions;
|
|
5
|
+
const nucypher_core_1 = require("@nucypher/nucypher-core");
|
|
5
6
|
const shared_1 = require("@nucypher/shared");
|
|
6
7
|
const ethers_1 = require("ethers");
|
|
7
8
|
const condition_expr_1 = require("./conditions/condition-expr");
|
|
@@ -19,6 +20,30 @@ function aggregateSignatures(signaturesByAddress, threshold) {
|
|
|
19
20
|
const allBytes = signatures.flatMap((hex) => Array.from((0, shared_1.fromHexString)(hex)));
|
|
20
21
|
return `0x${(0, shared_1.toHexString)(new Uint8Array(allBytes))}`;
|
|
21
22
|
}
|
|
23
|
+
async function makeSigningRequests(cohortId, chainId, signers, userOp, aaVersion, conditionContext) {
|
|
24
|
+
const coreContext = conditionContext
|
|
25
|
+
? await conditionContext.toCoreContext()
|
|
26
|
+
: null;
|
|
27
|
+
let signingRequest;
|
|
28
|
+
if ((0, shared_1.isPackedUserOperation)(userOp)) {
|
|
29
|
+
const corePackedUserOp = (0, shared_1.toCorePackedUserOperation)(userOp);
|
|
30
|
+
signingRequest = new nucypher_core_1.PackedUserOperationSignatureRequest(corePackedUserOp, cohortId, BigInt(chainId), aaVersion, coreContext);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
const coreUserOp = (0, shared_1.toCoreUserOperation)(userOp);
|
|
34
|
+
signingRequest = new nucypher_core_1.UserOperationSignatureRequest(coreUserOp, cohortId, BigInt(chainId), aaVersion, coreContext);
|
|
35
|
+
}
|
|
36
|
+
const ephemeralSessionKey = nucypher_core_1.SessionStaticSecret.random();
|
|
37
|
+
const sharedSecrets = Object.fromEntries(signers.map(({ provider, signingRequestStaticKey }) => {
|
|
38
|
+
const sharedSecret = ephemeralSessionKey.deriveSharedSecret(signingRequestStaticKey);
|
|
39
|
+
return [provider, sharedSecret];
|
|
40
|
+
}));
|
|
41
|
+
const encryptedRequests = Object.fromEntries(Object.entries(sharedSecrets).map(([provider, sessionSharedSecret]) => {
|
|
42
|
+
const encryptedRequest = signingRequest.encrypt(sessionSharedSecret, ephemeralSessionKey.publicKey());
|
|
43
|
+
return [provider, encryptedRequest];
|
|
44
|
+
}));
|
|
45
|
+
return { sharedSecrets, encryptedRequests };
|
|
46
|
+
}
|
|
22
47
|
/**
|
|
23
48
|
* Signs a UserOperation.
|
|
24
49
|
* @param provider - The Ethereum provider to use for signing.
|
|
@@ -39,17 +64,49 @@ async function signUserOp(provider, domain, cohortId, chainId, userOp, aaVersion
|
|
|
39
64
|
const porter = new shared_1.PorterClient(porterUrisFull);
|
|
40
65
|
const signers = await shared_1.SigningCoordinatorAgent.getParticipants(provider, domain, cohortId);
|
|
41
66
|
const threshold = await shared_1.SigningCoordinatorAgent.getThreshold(provider, domain, cohortId);
|
|
42
|
-
const
|
|
43
|
-
const signingRequest = new shared_1.UserOperationSignatureRequest(pythonUserOp, aaVersion, cohortId, chainId, context || {}, 'userop');
|
|
44
|
-
const signingRequests = Object.fromEntries(signers.map((signer) => [
|
|
45
|
-
signer.provider,
|
|
46
|
-
(0, shared_1.toBase64)(signingRequest.toBytes()),
|
|
47
|
-
]));
|
|
67
|
+
const { sharedSecrets, encryptedRequests } = await makeSigningRequests(cohortId, chainId, signers, userOp, aaVersion, context);
|
|
48
68
|
// Build signing request for the user operation
|
|
49
|
-
const
|
|
69
|
+
const { encryptedResponses, errors } = await porter.signUserOp(encryptedRequests, threshold);
|
|
70
|
+
if (Object.keys(encryptedResponses).length < threshold) {
|
|
71
|
+
// not enough signatures returned
|
|
72
|
+
throw new Error(ERR_INSUFFICIENT_SIGNATURES(errors));
|
|
73
|
+
}
|
|
74
|
+
const signaturesToAggregate = collectSignatures(encryptedResponses, sharedSecrets, threshold);
|
|
75
|
+
const aggregatedSignature = aggregateSignatures(signaturesToAggregate, threshold);
|
|
76
|
+
return {
|
|
77
|
+
messageHash: Object.values(signaturesToAggregate)[0].messageHash,
|
|
78
|
+
aggregatedSignature,
|
|
79
|
+
signingResults: signaturesToAggregate,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
async function setSigningCohortConditions(provider, domain, conditions, cohortId, chainId, signer) {
|
|
83
|
+
// Convert Condition to ConditionExpression, then to JSON, then to bytes
|
|
84
|
+
const conditionExpression = new condition_expr_1.ConditionExpression(conditions);
|
|
85
|
+
const conditionsJson = conditionExpression.toJson();
|
|
86
|
+
const conditionsBytes = ethers_1.ethers.utils.toUtf8Bytes(conditionsJson);
|
|
87
|
+
// Set conditions on the SigningCoordinator contract
|
|
88
|
+
return await shared_1.SigningCoordinatorAgent.setSigningCohortConditions(provider, domain, cohortId, chainId, conditionsBytes, signer);
|
|
89
|
+
}
|
|
90
|
+
function decryptSignatureResponses(encryptedResponses, sharedSecrets) {
|
|
91
|
+
const decryptedResponses = Object.fromEntries(Object.entries(encryptedResponses).map(([ursulaAddress, encryptedResponse]) => [
|
|
92
|
+
ursulaAddress,
|
|
93
|
+
encryptedResponse.decrypt(sharedSecrets[ursulaAddress]),
|
|
94
|
+
]));
|
|
95
|
+
const tacoSignatures = Object.fromEntries(Object.entries(decryptedResponses).map(([ursulaAddress, signatureResponse]) => [
|
|
96
|
+
ursulaAddress,
|
|
97
|
+
{
|
|
98
|
+
messageHash: `0x${(0, shared_1.toHexString)(signatureResponse.hash)}`,
|
|
99
|
+
signature: `0x${(0, shared_1.toHexString)(signatureResponse.signature)}`,
|
|
100
|
+
signerAddress: signatureResponse.signer,
|
|
101
|
+
},
|
|
102
|
+
]));
|
|
103
|
+
return tacoSignatures;
|
|
104
|
+
}
|
|
105
|
+
function collectSignatures(encryptedResponses, sharedSecrets, threshold) {
|
|
106
|
+
const decryptedSignatures = decryptSignatureResponses(encryptedResponses, sharedSecrets);
|
|
50
107
|
const hashToSignatures = new Map();
|
|
51
108
|
// Single pass: decode signatures and populate signingResults
|
|
52
|
-
for (const [ursulaAddress, signature] of Object.entries(
|
|
109
|
+
for (const [ursulaAddress, signature] of Object.entries(decryptedSignatures)) {
|
|
53
110
|
// For non-optimistic: track hashes and group signatures for aggregation
|
|
54
111
|
const hash = signature.messageHash;
|
|
55
112
|
if (!hashToSignatures.has(hash)) {
|
|
@@ -57,43 +114,21 @@ async function signUserOp(provider, domain, cohortId, chainId, userOp, aaVersion
|
|
|
57
114
|
}
|
|
58
115
|
hashToSignatures.get(hash)[ursulaAddress] = signature;
|
|
59
116
|
}
|
|
60
|
-
|
|
117
|
+
// Find a hash that meets the threshold
|
|
61
118
|
let signaturesToAggregate = undefined;
|
|
62
|
-
for (const
|
|
119
|
+
for (const signatures of hashToSignatures.values()) {
|
|
63
120
|
if (Object.keys(signatures).length >= threshold) {
|
|
64
121
|
signaturesToAggregate = signatures;
|
|
65
|
-
messageHash = hash;
|
|
66
122
|
break;
|
|
67
123
|
}
|
|
68
124
|
}
|
|
69
125
|
// Insufficient signatures for a message hash to meet the threshold
|
|
70
|
-
if (!
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
// we don't really expect this to happen (other than some malicious nodes)
|
|
76
|
-
// 2. number of errors still could have allowed for a threshold of signatures
|
|
77
|
-
console.error('Porter returned mismatched message hashes:', hashToSignatures);
|
|
78
|
-
throw new Error(ERR_MISMATCHED_HASHES(hashToSignatures));
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
throw new Error(ERR_INSUFFICIENT_SIGNATURES(porterSignResult.errors));
|
|
82
|
-
}
|
|
126
|
+
if (!signaturesToAggregate) {
|
|
127
|
+
//we have multiple hashes, which means we have mismatched hashes from different nodes
|
|
128
|
+
// we don't really expect this to happen (other than some malicious nodes)
|
|
129
|
+
console.error('Porter returned mismatched message hashes:', hashToSignatures);
|
|
130
|
+
throw new Error(ERR_MISMATCHED_HASHES(hashToSignatures));
|
|
83
131
|
}
|
|
84
|
-
|
|
85
|
-
return {
|
|
86
|
-
messageHash,
|
|
87
|
-
aggregatedSignature,
|
|
88
|
-
signingResults: porterSignResult.signingResults,
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
async function setSigningCohortConditions(provider, domain, conditions, cohortId, chainId, signer) {
|
|
92
|
-
// Convert Condition to ConditionExpression, then to JSON, then to bytes
|
|
93
|
-
const conditionExpression = new condition_expr_1.ConditionExpression(conditions);
|
|
94
|
-
const conditionsJson = conditionExpression.toJson();
|
|
95
|
-
const conditionsBytes = ethers_1.ethers.utils.toUtf8Bytes(conditionsJson);
|
|
96
|
-
// Set conditions on the SigningCoordinator contract
|
|
97
|
-
return await shared_1.SigningCoordinatorAgent.setSigningCohortConditions(provider, domain, cohortId, chainId, conditionsBytes, signer);
|
|
132
|
+
return signaturesToAggregate;
|
|
98
133
|
}
|
|
99
134
|
//# sourceMappingURL=sign.js.map
|
package/dist/cjs/sign.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sign.js","sourceRoot":"","sources":["../../src/sign.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"sign.js","sourceRoot":"","sources":["../../src/sign.ts"],"names":[],"mappings":";;AA6IA,gCA8DC;AAED,gEAsBC;AAnOD,2DAQiC;AACjC,6CAc0B;AAC1B,mCAAgC;AAGhC,gEAAkE;AAGlE,MAAM,2BAA2B,GAAG,CAAC,MAAe,EAAE,EAAE,CACtD,qEAAqE,IAAI,CAAC,SAAS,CACjF,MAAM,CACP,EAAE,CAAC;AACN,MAAM,qBAAqB,GAAG,CAC5B,gBAAyE,EACzE,EAAE,CACF,sEAAsE,IAAI,CAAC,SAAS,CAClF,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAC/C,EAAE,CAAC;AAQN,SAAS,mBAAmB,CAC1B,mBAEC,EACD,SAAiB;IAEjB,oIAAoI;IACpI,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC;SAClD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC;SAC3B,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IACvB,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC;IACD,yBAAyB;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D,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;YAChD,qBAAqB,GAAG,UAAU,CAAC;YACnC,MAAM;QACR,CAAC;IACH,CAAC;IAED,mEAAmE;IACnE,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC3B,qFAAqF;QACrF,6EAA6E;QAC7E,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/cjs/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';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Condition } from '../condition';
|
|
2
|
+
import { ContextVariableConditionProps, ContextVariableConditionType } from '../schemas/context-variable';
|
|
3
|
+
import { OmitConditionType } from '../shared';
|
|
4
|
+
export { ContextVariableConditionProps, ContextVariableConditionType };
|
|
5
|
+
/**
|
|
6
|
+
* A condition that performs comparison operations on context variable values.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ContextVariableCondition extends Condition {
|
|
9
|
+
constructor(value: OmitConditionType<ContextVariableConditionProps>);
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Condition } from '../condition';
|
|
2
|
+
import { contextVariableConditionSchema, ContextVariableConditionType, } from '../schemas/context-variable';
|
|
3
|
+
export { ContextVariableConditionType };
|
|
4
|
+
/**
|
|
5
|
+
* A condition that performs comparison operations on context variable values.
|
|
6
|
+
*/
|
|
7
|
+
export class ContextVariableCondition extends Condition {
|
|
8
|
+
constructor(value) {
|
|
9
|
+
super(contextVariableConditionSchema, {
|
|
10
|
+
conditionType: ContextVariableConditionType,
|
|
11
|
+
...value,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=context-variable.js.map
|