@nucypher/taco 0.7.0-alpha.3 → 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.
Files changed (75) hide show
  1. package/dist/cjs/conditions/condition.d.ts +1 -0
  2. package/dist/cjs/conditions/condition.js +4 -3
  3. package/dist/cjs/conditions/condition.js.map +1 -1
  4. package/dist/cjs/conditions/predefined/address-allowlist.d.ts +11 -0
  5. package/dist/cjs/conditions/predefined/address-allowlist.js +31 -0
  6. package/dist/cjs/conditions/predefined/address-allowlist.js.map +1 -0
  7. package/dist/cjs/conditions/predefined/index.d.ts +1 -0
  8. package/dist/cjs/conditions/predefined/index.js +2 -1
  9. package/dist/cjs/conditions/predefined/index.js.map +1 -1
  10. package/dist/cjs/conditions/schemas/address-allowlist.d.ts +3 -0
  11. package/dist/cjs/conditions/schemas/address-allowlist.js +11 -0
  12. package/dist/cjs/conditions/schemas/address-allowlist.js.map +1 -0
  13. package/dist/cjs/conditions/schemas/context-variable.d.ts +46 -0
  14. package/dist/cjs/conditions/schemas/contract.d.ts +54 -0
  15. package/dist/cjs/conditions/schemas/export-for-zod-doc-gen.d.ts +2 -0
  16. package/dist/cjs/conditions/schemas/export-for-zod-doc-gen.js +3 -0
  17. package/dist/cjs/conditions/schemas/export-for-zod-doc-gen.js.map +1 -1
  18. package/dist/cjs/conditions/schemas/json-api.d.ts +54 -0
  19. package/dist/cjs/conditions/schemas/json-rpc.d.ts +54 -0
  20. package/dist/cjs/conditions/schemas/json.d.ts +46 -0
  21. package/dist/cjs/conditions/schemas/return-value-test.d.ts +76 -0
  22. package/dist/cjs/conditions/schemas/return-value-test.js +2 -0
  23. package/dist/cjs/conditions/schemas/return-value-test.js.map +1 -1
  24. package/dist/cjs/conditions/schemas/rpc.d.ts +46 -0
  25. package/dist/cjs/conditions/schemas/sequential.js +6 -2
  26. package/dist/cjs/conditions/schemas/sequential.js.map +1 -1
  27. package/dist/cjs/conditions/schemas/time.d.ts +46 -0
  28. package/dist/cjs/conditions/schemas/utils.js +0 -2
  29. package/dist/cjs/conditions/schemas/utils.js.map +1 -1
  30. package/dist/cjs/conditions/schemas/variable-operation.d.ts +48 -0
  31. package/dist/cjs/conditions/schemas/variable-operation.js +81 -0
  32. package/dist/cjs/conditions/schemas/variable-operation.js.map +1 -0
  33. package/dist/cjs/sign.d.ts +2 -2
  34. package/dist/cjs/sign.js +73 -38
  35. package/dist/cjs/sign.js.map +1 -1
  36. package/dist/cjs/types.d.ts +1 -1
  37. package/dist/es/conditions/condition.d.ts +1 -0
  38. package/dist/es/conditions/condition.js +1 -1
  39. package/dist/es/conditions/condition.js.map +1 -1
  40. package/dist/es/conditions/predefined/address-allowlist.d.ts +11 -0
  41. package/dist/es/conditions/predefined/address-allowlist.js +27 -0
  42. package/dist/es/conditions/predefined/address-allowlist.js.map +1 -0
  43. package/dist/es/conditions/predefined/index.d.ts +1 -0
  44. package/dist/es/conditions/predefined/index.js +1 -0
  45. package/dist/es/conditions/predefined/index.js.map +1 -1
  46. package/dist/es/conditions/schemas/address-allowlist.d.ts +3 -0
  47. package/dist/es/conditions/schemas/address-allowlist.js +8 -0
  48. package/dist/es/conditions/schemas/address-allowlist.js.map +1 -0
  49. package/dist/es/conditions/schemas/context-variable.d.ts +46 -0
  50. package/dist/es/conditions/schemas/contract.d.ts +54 -0
  51. package/dist/es/conditions/schemas/export-for-zod-doc-gen.d.ts +2 -0
  52. package/dist/es/conditions/schemas/export-for-zod-doc-gen.js +3 -0
  53. package/dist/es/conditions/schemas/export-for-zod-doc-gen.js.map +1 -1
  54. package/dist/es/conditions/schemas/json-api.d.ts +54 -0
  55. package/dist/es/conditions/schemas/json-rpc.d.ts +54 -0
  56. package/dist/es/conditions/schemas/json.d.ts +46 -0
  57. package/dist/es/conditions/schemas/return-value-test.d.ts +76 -0
  58. package/dist/es/conditions/schemas/return-value-test.js +2 -0
  59. package/dist/es/conditions/schemas/return-value-test.js.map +1 -1
  60. package/dist/es/conditions/schemas/rpc.d.ts +46 -0
  61. package/dist/es/conditions/schemas/sequential.js +6 -2
  62. package/dist/es/conditions/schemas/sequential.js.map +1 -1
  63. package/dist/es/conditions/schemas/time.d.ts +46 -0
  64. package/dist/es/conditions/schemas/utils.js +0 -2
  65. package/dist/es/conditions/schemas/utils.js.map +1 -1
  66. package/dist/es/conditions/schemas/variable-operation.d.ts +48 -0
  67. package/dist/es/conditions/schemas/variable-operation.js +78 -0
  68. package/dist/es/conditions/schemas/variable-operation.js.map +1 -0
  69. package/dist/es/sign.d.ts +2 -2
  70. package/dist/es/sign.js +74 -39
  71. package/dist/es/sign.js.map +1 -1
  72. package/dist/es/types.d.ts +1 -1
  73. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  74. package/dist/tsconfig.es.tsbuildinfo +1 -1
  75. package/package.json +4 -4
@@ -8,24 +8,62 @@ 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";
@@ -33,6 +71,10 @@ export declare const timeConditionSchema: z.ZodObject<{
33
71
  comparator: "==" | ">" | "<" | ">=" | "<=" | "!=" | "in" | "!in";
34
72
  value?: any;
35
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;
36
78
  };
37
79
  chain: number;
38
80
  method: "blocktime";
@@ -41,6 +83,10 @@ export declare const timeConditionSchema: z.ZodObject<{
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;
@@ -4,7 +4,6 @@ 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';
8
7
  import { jsonApiConditionSchema } from './json-api';
9
8
  import { jsonRpcConditionSchema } from './json-rpc';
10
9
  import { jwtConditionSchema } from './jwt';
@@ -18,7 +17,6 @@ export const anyConditionSchema = z.lazy(() => z.union([
18
17
  contextVariableConditionSchema,
19
18
  contractConditionSchema,
20
19
  ecdsaConditionSchema,
21
- jsonConditionSchema,
22
20
  jsonApiConditionSchema,
23
21
  jsonRpcConditionSchema,
24
22
  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,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,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C;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, UserOperation } from '@nucypher/shared';
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: UserOperation, aaVersion: 'mdt' | '0.8.0' | string, context?: ConditionContext, porterUris?: string[]): Promise<SignResult>;
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 { convertUserOperationToPython, fromHexString, getPorterUris, PorterClient, SigningCoordinatorAgent, toBase64, toHexString, UserOperationSignatureRequest, } from '@nucypher/shared';
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 pythonUserOp = convertUserOperationToPython(userOp);
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 porterSignResult = await porter.signUserOp(signingRequests, threshold);
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(porterSignResult.signingResults)) {
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
- let messageHash = undefined;
113
+ // Find a hash that meets the threshold
57
114
  let signaturesToAggregate = undefined;
58
- for (const [hash, signatures] of hashToSignatures.entries()) {
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 (!messageHash || !signaturesToAggregate) {
67
- if (hashToSignatures.size > 1 &&
68
- Object.keys(porterSignResult.errors).length < signers.length - threshold) {
69
- // Two things are true:
70
- // 1. we have multiple hashes, which means we have mismatched hashes from different nodes
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
- const aggregatedSignature = aggregateSignatures(signaturesToAggregate, threshold);
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
@@ -1 +1 @@
1
- {"version":3,"file":"sign.js","sourceRoot":"","sources":["../../src/sign.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAE5B,aAAa,EACb,aAAa,EACb,YAAY,EACZ,uBAAuB,EAGvB,QAAQ,EACR,WAAW,EAEX,6BAA6B,GAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;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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AAS,iBAAiB,CACxB,kBAAuE,EACvE,aAAkD,EAClD,SAAiB;IAEjB,MAAM,mBAAmB,GAAG,yBAAyB,CACnD,kBAAkB,EAClB,aAAa,CACd,CAAC;IAEF,MAAM,gBAAgB,GAGlB,IAAI,GAAG,EAAE,CAAC;IAEd,6DAA6D;IAC7D,KAAK,MAAM,CAAC,aAAa,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CACrD,mBAAmB,CACpB,EAAE,CAAC;QACF,wEAAwE;QACxE,MAAM,IAAI,GAAG,SAAS,CAAC,WAAW,CAAC;QACnC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,gBAAgB,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACjC,CAAC;QACD,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC,aAAa,CAAC,GAAG,SAAS,CAAC;IACzD,CAAC;IAED,uCAAuC;IACvC,IAAI,qBAAqB,GAAG,SAAS,CAAC;IACtC,KAAK,MAAM,UAAU,IAAI,gBAAgB,CAAC,MAAM,EAAE,EAAE,CAAC;QACnD,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"}
@@ -1,2 +1,2 @@
1
1
  export { Conditions as CoreConditions, Context as CoreContext, } from '@nucypher/nucypher-core';
2
- export type { UserOperation } from '@nucypher/shared';
2
+ export { UserOperationToSign } from '@nucypher/shared';