o1js-pack 0.6.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,7 @@ jobs:
14
14
  - name: Set up NodeJS
15
15
  uses: actions/setup-node@v2
16
16
  with:
17
- node-version: '16'
17
+ node-version: '20'
18
18
  - name: Git checkout
19
19
  uses: actions/checkout@v2
20
20
  - name: NPM ci, build, & test
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## v0.8
2
+
3
+ - Upgrage o1js to version 2.0.0
4
+
5
+ ## v0.7
6
+
7
+ - Upgrage o1js to version 1.3.1
8
+
1
9
  ## v0.6
2
10
 
3
11
  - Upgrading to o1js version 0.18.0
@@ -5,13 +5,15 @@ export declare function PackingPlant<A, T extends InferProvable<A> = InferProvab
5
5
  */
6
6
  toFields(): Array<Field>;
7
7
  assertEquals(other: any): void;
8
- packed: import("o1js/dist/node/lib/field").Field;
8
+ packed: import("o1js/dist/node/lib/provable/field").Field;
9
9
  }) & {
10
10
  type: import("o1js/dist/node/bindings/lib/generic").GenericProvableExtendedPure<{
11
- packed: import("o1js/dist/node/lib/field").Field;
11
+ packed: import("o1js/dist/node/lib/provable/field").Field;
12
+ }, {
13
+ packed: bigint;
12
14
  }, {
13
15
  packed: string;
14
- }, import("o1js/dist/node/lib/field").Field>;
16
+ }, import("o1js/dist/node/lib/provable/field").Field>;
15
17
  l: number;
16
18
  bitSize: bigint;
17
19
  extractField(input: T): Field;
@@ -37,36 +39,52 @@ export declare function PackingPlant<A, T extends InferProvable<A> = InferProvab
37
39
  unpackToBigints(f: Field): Array<bigint>;
38
40
  _isStruct: true;
39
41
  toFields: (value: {
40
- packed: import("o1js/dist/node/lib/field").Field;
41
- }) => import("o1js/dist/node/lib/field").Field[];
42
+ packed: import("o1js/dist/node/lib/provable/field").Field;
43
+ }) => import("o1js/dist/node/lib/provable/field").Field[];
42
44
  toAuxiliary: (value?: {
43
- packed: import("o1js/dist/node/lib/field").Field;
45
+ packed: import("o1js/dist/node/lib/provable/field").Field;
44
46
  } | undefined) => any[];
45
- fromFields: (fields: import("o1js/dist/node/lib/field").Field[]) => {
46
- packed: import("o1js/dist/node/lib/field").Field;
47
- };
48
- sizeInFields(): number;
47
+ sizeInFields: () => number;
49
48
  check: (value: {
50
- packed: import("o1js/dist/node/lib/field").Field;
49
+ packed: import("o1js/dist/node/lib/provable/field").Field;
51
50
  }) => void;
51
+ toValue: (x: {
52
+ packed: import("o1js/dist/node/lib/provable/field").Field;
53
+ }) => {
54
+ packed: bigint;
55
+ };
56
+ fromValue: ((x: {
57
+ packed: import("o1js/dist/node/lib/provable/field").Field;
58
+ } | {
59
+ packed: bigint;
60
+ }) => {
61
+ packed: import("o1js/dist/node/lib/provable/field").Field;
62
+ }) & ((value: {
63
+ packed: string | number | bigint | import("o1js/dist/node/lib/provable/field").Field;
64
+ }) => {
65
+ packed: import("o1js/dist/node/lib/provable/field").Field;
66
+ });
67
+ fromFields: (fields: import("o1js/dist/node/lib/provable/field").Field[]) => {
68
+ packed: import("o1js/dist/node/lib/provable/field").Field;
69
+ };
52
70
  toInput: (x: {
53
- packed: import("o1js/dist/node/lib/field").Field;
71
+ packed: import("o1js/dist/node/lib/provable/field").Field;
54
72
  }) => {
55
- fields?: import("o1js/dist/node/lib/field").Field[] | undefined;
56
- packed?: [import("o1js/dist/node/lib/field").Field, number][] | undefined;
73
+ fields?: Field[] | undefined;
74
+ packed?: [Field, number][] | undefined;
57
75
  };
58
76
  toJSON: (x: {
59
- packed: import("o1js/dist/node/lib/field").Field;
77
+ packed: import("o1js/dist/node/lib/provable/field").Field;
60
78
  }) => {
61
79
  packed: string;
62
80
  };
63
81
  fromJSON: (x: {
64
82
  packed: string;
65
83
  }) => {
66
- packed: import("o1js/dist/node/lib/field").Field;
84
+ packed: import("o1js/dist/node/lib/provable/field").Field;
67
85
  };
68
86
  empty: () => {
69
- packed: import("o1js/dist/node/lib/field").Field;
87
+ packed: import("o1js/dist/node/lib/provable/field").Field;
70
88
  };
71
89
  };
72
90
  export declare function MultiPackingPlant<A, T extends InferProvable<A> = InferProvable<A>>(elementType: A, l: number, bitSize: bigint): (abstract new (packed: Array<Field>) => {
@@ -75,13 +93,15 @@ export declare function MultiPackingPlant<A, T extends InferProvable<A> = InferP
75
93
  */
76
94
  toFields(): Array<Field>;
77
95
  assertEquals(other: any): void;
78
- packed: import("o1js/dist/node/lib/field").Field[];
96
+ packed: import("o1js/dist/node/lib/provable/field").Field[];
79
97
  }) & {
80
98
  type: import("o1js/dist/node/bindings/lib/generic").GenericProvableExtendedPure<{
81
- packed: import("o1js/dist/node/lib/field").Field[];
99
+ packed: import("o1js/dist/node/lib/provable/field").Field[];
100
+ }, {
101
+ packed: bigint[];
82
102
  }, {
83
103
  packed: string[];
84
- }, import("o1js/dist/node/lib/field").Field>;
104
+ }, import("o1js/dist/node/lib/provable/field").Field>;
85
105
  l: number;
86
106
  n: number;
87
107
  bitSize: bigint;
@@ -112,35 +132,51 @@ export declare function MultiPackingPlant<A, T extends InferProvable<A> = InferP
112
132
  unpackToBigints(fields: Array<Field>): Array<bigint>;
113
133
  _isStruct: true;
114
134
  toFields: (value: {
115
- packed: import("o1js/dist/node/lib/field").Field[];
116
- }) => import("o1js/dist/node/lib/field").Field[];
135
+ packed: import("o1js/dist/node/lib/provable/field").Field[];
136
+ }) => import("o1js/dist/node/lib/provable/field").Field[];
117
137
  toAuxiliary: (value?: {
118
- packed: import("o1js/dist/node/lib/field").Field[];
138
+ packed: import("o1js/dist/node/lib/provable/field").Field[];
119
139
  } | undefined) => any[];
120
- fromFields: (fields: import("o1js/dist/node/lib/field").Field[]) => {
121
- packed: import("o1js/dist/node/lib/field").Field[];
122
- };
123
- sizeInFields(): number;
140
+ sizeInFields: () => number;
124
141
  check: (value: {
125
- packed: import("o1js/dist/node/lib/field").Field[];
142
+ packed: import("o1js/dist/node/lib/provable/field").Field[];
126
143
  }) => void;
144
+ toValue: (x: {
145
+ packed: import("o1js/dist/node/lib/provable/field").Field[];
146
+ }) => {
147
+ packed: bigint[];
148
+ };
149
+ fromValue: ((x: {
150
+ packed: import("o1js/dist/node/lib/provable/field").Field[];
151
+ } | {
152
+ packed: bigint[];
153
+ }) => {
154
+ packed: import("o1js/dist/node/lib/provable/field").Field[];
155
+ }) & ((value: {
156
+ packed: import("o1js/dist/node/lib/provable/field").Field[] | bigint[];
157
+ }) => {
158
+ packed: import("o1js/dist/node/lib/provable/field").Field[];
159
+ });
160
+ fromFields: (fields: import("o1js/dist/node/lib/provable/field").Field[]) => {
161
+ packed: import("o1js/dist/node/lib/provable/field").Field[];
162
+ };
127
163
  toInput: (x: {
128
- packed: import("o1js/dist/node/lib/field").Field[];
164
+ packed: import("o1js/dist/node/lib/provable/field").Field[];
129
165
  }) => {
130
- fields?: import("o1js/dist/node/lib/field").Field[] | undefined;
131
- packed?: [import("o1js/dist/node/lib/field").Field, number][] | undefined;
166
+ fields?: Field[] | undefined;
167
+ packed?: [Field, number][] | undefined;
132
168
  };
133
169
  toJSON: (x: {
134
- packed: import("o1js/dist/node/lib/field").Field[];
170
+ packed: import("o1js/dist/node/lib/provable/field").Field[];
135
171
  }) => {
136
172
  packed: string[];
137
173
  };
138
174
  fromJSON: (x: {
139
175
  packed: string[];
140
176
  }) => {
141
- packed: import("o1js/dist/node/lib/field").Field[];
177
+ packed: import("o1js/dist/node/lib/provable/field").Field[];
142
178
  };
143
179
  empty: () => {
144
- packed: import("o1js/dist/node/lib/field").Field[];
180
+ packed: import("o1js/dist/node/lib/provable/field").Field[];
145
181
  };
146
182
  };
@@ -1,4 +1,4 @@
1
- import { Field, Struct, provable, Provable, } from 'o1js';
1
+ import { Field, Struct, provable, Provable } from 'o1js';
2
2
  const MAX_BITS_PER_FIELD = 254n;
3
3
  export function PackingPlant(elementType, l, bitSize) {
4
4
  if (bitSize * BigInt(l) > MAX_BITS_PER_FIELD) {
@@ -1 +1 @@
1
- {"version":3,"file":"PackingPlant.js","sourceRoot":"","sources":["../../../src/lib/PackingPlant.ts"],"names":[],"mappings":"AAAA,OAAO,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OAAO,CAAC;IAmHnC,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,14 +1,14 @@
1
1
  import { Field, Bool } from 'o1js';
2
2
  export declare function PackedBoolFactory(l?: number): {
3
- new (packed: import("o1js/dist/node/lib/field.js").Field): {
3
+ new (packed: Field): {
4
4
  toBooleans(): Array<boolean>;
5
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
5
+ toFields(): Array<Field>;
6
6
  assertEquals(other: {
7
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
7
+ toFields(): Array<Field>;
8
8
  assertEquals(other: any): void;
9
- packed: import("o1js/dist/node/lib/field.js").Field;
9
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
10
10
  }): void;
11
- packed: import("o1js/dist/node/lib/field.js").Field;
11
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
12
12
  };
13
13
  extractField(input: Bool): Field;
14
14
  sizeInBits(): bigint;
@@ -25,13 +25,13 @@ export declare function PackedBoolFactory(l?: number): {
25
25
  */
26
26
  fromBools(bools: Array<Bool>): {
27
27
  toBooleans(): Array<boolean>;
28
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
28
+ toFields(): Array<Field>;
29
29
  assertEquals(other: {
30
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
30
+ toFields(): Array<Field>;
31
31
  assertEquals(other: any): void;
32
- packed: import("o1js/dist/node/lib/field.js").Field;
32
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
33
33
  }): void;
34
- packed: import("o1js/dist/node/lib/field.js").Field;
34
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
35
35
  };
36
36
  /**
37
37
  *
@@ -40,55 +40,73 @@ export declare function PackedBoolFactory(l?: number): {
40
40
  */
41
41
  fromBooleans(booleans: Array<boolean>): {
42
42
  toBooleans(): Array<boolean>;
43
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
43
+ toFields(): Array<Field>;
44
44
  assertEquals(other: {
45
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
45
+ toFields(): Array<Field>;
46
46
  assertEquals(other: any): void;
47
- packed: import("o1js/dist/node/lib/field.js").Field;
47
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
48
48
  }): void;
49
- packed: import("o1js/dist/node/lib/field.js").Field;
49
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
50
50
  };
51
51
  type: import("o1js/dist/node/bindings/lib/generic.js").GenericProvableExtendedPure<{
52
- packed: import("o1js/dist/node/lib/field.js").Field;
52
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
53
+ }, {
54
+ packed: bigint;
53
55
  }, {
54
56
  packed: string;
55
- }, import("o1js/dist/node/lib/field.js").Field>;
57
+ }, import("o1js/dist/node/lib/provable/field.js").Field>;
56
58
  l: number;
57
59
  bitSize: bigint;
58
- checkPack(unpacked: import("o1js/dist/node/lib/bool.js").Bool[]): void;
59
- pack(unpacked: import("o1js/dist/node/lib/bool.js").Bool[]): import("o1js/dist/node/lib/field.js").Field;
60
- unpackToBigints(f: import("o1js/dist/node/lib/field.js").Field): bigint[];
60
+ checkPack(unpacked: import("o1js/dist/node/lib/provable/bool.js").Bool[]): void;
61
+ pack(unpacked: import("o1js/dist/node/lib/provable/bool.js").Bool[]): Field;
62
+ unpackToBigints(f: Field): Array<bigint>;
61
63
  _isStruct: true;
62
64
  toFields: (value: {
63
- packed: import("o1js/dist/node/lib/field.js").Field;
64
- }) => import("o1js/dist/node/lib/field.js").Field[];
65
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
66
+ }) => import("o1js/dist/node/lib/provable/field.js").Field[];
65
67
  toAuxiliary: (value?: {
66
- packed: import("o1js/dist/node/lib/field.js").Field;
68
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
67
69
  } | undefined) => any[];
68
- fromFields: (fields: import("o1js/dist/node/lib/field.js").Field[]) => {
69
- packed: import("o1js/dist/node/lib/field.js").Field;
70
- };
71
- sizeInFields(): number;
70
+ sizeInFields: () => number;
72
71
  check: (value: {
73
- packed: import("o1js/dist/node/lib/field.js").Field;
72
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
74
73
  }) => void;
74
+ toValue: (x: {
75
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
76
+ }) => {
77
+ packed: bigint;
78
+ };
79
+ fromValue: ((x: {
80
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
81
+ } | {
82
+ packed: bigint;
83
+ }) => {
84
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
85
+ }) & ((value: {
86
+ packed: string | number | bigint | import("o1js/dist/node/lib/provable/field.js").Field;
87
+ }) => {
88
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
89
+ });
90
+ fromFields: (fields: import("o1js/dist/node/lib/provable/field.js").Field[]) => {
91
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
92
+ };
75
93
  toInput: (x: {
76
- packed: import("o1js/dist/node/lib/field.js").Field;
94
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
77
95
  }) => {
78
- fields?: import("o1js/dist/node/lib/field.js").Field[] | undefined;
79
- packed?: [import("o1js/dist/node/lib/field.js").Field, number][] | undefined;
96
+ fields?: Field[] | undefined;
97
+ packed?: [Field, number][] | undefined;
80
98
  };
81
99
  toJSON: (x: {
82
- packed: import("o1js/dist/node/lib/field.js").Field;
100
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
83
101
  }) => {
84
102
  packed: string;
85
103
  };
86
104
  fromJSON: (x: {
87
105
  packed: string;
88
106
  }) => {
89
- packed: import("o1js/dist/node/lib/field.js").Field;
107
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
90
108
  };
91
109
  empty: () => {
92
- packed: import("o1js/dist/node/lib/field.js").Field;
110
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
93
111
  };
94
112
  };
@@ -63,13 +63,17 @@ describe('PackedBool', () => {
63
63
  packedBool.assertEquals(outsidePackedBool);
64
64
  });
65
65
  }).not.toThrow();
66
- expect(() => {
67
- Provable.runAndCheck(() => {
68
- const fakePacked = outsidePackedBool.packed.add(32);
69
- const packedBool = new PackedBool(fakePacked);
70
- packedBool.assertEquals(outsidePackedBool);
71
- });
72
- }).toThrow();
66
+ // TODO: This test should not be in the "provable" block since it's not in the runAndCheck
67
+ // It seems like failures in the runAndCheck can't be tested for with #toThrow
68
+ try {
69
+ const fakePacked = outsidePackedBool.packed.add(32);
70
+ const packedBool = new PackedBool(fakePacked);
71
+ packedBool.assertEquals(outsidePackedBool);
72
+ fail('Expected to throw Field.assertEquals error');
73
+ }
74
+ catch (e) {
75
+ expect(e.message).toContain('Field.assertEquals');
76
+ }
73
77
  });
74
78
  });
75
79
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PackedBool.test.js","sourceRoot":"","sources":["../../../../src/lib/packed-types/PackedBool.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3C,MAAM,UAAW,SAAQ,iBAAiB,EAAE;KAAG;IAC/C,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;QACtC,EAAE,CAAC,eAAe,EAAE,GAAG,EAAE;YACvB,MAAM,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;YACvD,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAC5D,CAAC,CAAC,CAAC;Q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AAG,CAAC,OAAO,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,eAAe,EAAE,GAAG,EAAE;YACvB,MAAM,CAAC,GAAG,EAAE;gBACV,QAAQ,CAAC,WAAW,CAAC,GAAG,EAAE;oBACxB,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;oBAC5D,UAAU,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;gBAC7C,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;YAEjB,0FAA0F;YAC1F,oFAAoF;YACpF,IAAI,CAAC;gBACH,MAAM,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBACpD,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC;gBAC9C,UAAU,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;gBAC3C,IAAI,CAAC,4CAA4C,CAAC,CAAC;YACrD,CAAC;YAAC,OAAO,CAAM,EAAE,CAAC;gBAChB,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;YACpD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,14 +1,14 @@
1
1
  import { Field, Character } from 'o1js';
2
2
  export declare function PackedStringFactory(l?: number): {
3
- new (packed: import("o1js/dist/node/lib/field.js").Field): {
3
+ new (packed: Field): {
4
4
  toString(): string;
5
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
5
+ toFields(): Array<Field>;
6
6
  assertEquals(other: {
7
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
7
+ toFields(): Array<Field>;
8
8
  assertEquals(other: any): void;
9
- packed: import("o1js/dist/node/lib/field.js").Field;
9
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
10
10
  }): void;
11
- packed: import("o1js/dist/node/lib/field.js").Field;
11
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
12
12
  };
13
13
  extractField(input: Character): Field;
14
14
  sizeInBits(): bigint;
@@ -25,13 +25,13 @@ export declare function PackedStringFactory(l?: number): {
25
25
  */
26
26
  fromCharacters(input: Array<Character>): {
27
27
  toString(): string;
28
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
28
+ toFields(): Array<Field>;
29
29
  assertEquals(other: {
30
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
30
+ toFields(): Array<Field>;
31
31
  assertEquals(other: any): void;
32
- packed: import("o1js/dist/node/lib/field.js").Field;
32
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
33
33
  }): void;
34
- packed: import("o1js/dist/node/lib/field.js").Field;
34
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
35
35
  };
36
36
  /**
37
37
  *
@@ -40,60 +40,74 @@ export declare function PackedStringFactory(l?: number): {
40
40
  */
41
41
  fromString(str: string): {
42
42
  toString(): string;
43
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
43
+ toFields(): Array<Field>;
44
44
  assertEquals(other: {
45
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
45
+ toFields(): Array<Field>;
46
46
  assertEquals(other: any): void;
47
- packed: import("o1js/dist/node/lib/field.js").Field;
47
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
48
48
  }): void;
49
- packed: import("o1js/dist/node/lib/field.js").Field;
49
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
50
50
  };
51
51
  type: import("o1js/dist/node/bindings/lib/generic.js").GenericProvableExtendedPure<{
52
- packed: import("o1js/dist/node/lib/field.js").Field;
52
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
53
+ }, {
54
+ packed: bigint;
53
55
  }, {
54
56
  packed: string;
55
- }, import("o1js/dist/node/lib/field.js").Field>;
57
+ }, import("o1js/dist/node/lib/provable/field.js").Field>;
56
58
  l: number;
57
59
  bitSize: bigint;
58
60
  checkPack(unpacked: Character[]): void;
59
- pack(unpacked: Character[]): import("o1js/dist/node/lib/field.js").Field;
60
- unpackToBigints(f: import("o1js/dist/node/lib/field.js").Field): bigint[]; /**
61
- *
62
- * @param fields Array of Fields, containing packed Characters
63
- * @returns Array of Character
64
- */
61
+ pack(unpacked: Character[]): Field;
62
+ unpackToBigints(f: Field): Array<bigint>;
65
63
  _isStruct: true;
66
64
  toFields: (value: {
67
- packed: import("o1js/dist/node/lib/field.js").Field;
68
- }) => import("o1js/dist/node/lib/field.js").Field[];
65
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
66
+ }) => import("o1js/dist/node/lib/provable/field.js").Field[];
69
67
  toAuxiliary: (value?: {
70
- packed: import("o1js/dist/node/lib/field.js").Field;
68
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
71
69
  } | undefined) => any[];
72
- fromFields: (fields: import("o1js/dist/node/lib/field.js").Field[]) => {
73
- packed: import("o1js/dist/node/lib/field.js").Field;
74
- };
75
- sizeInFields(): number;
70
+ sizeInFields: () => number;
76
71
  check: (value: {
77
- packed: import("o1js/dist/node/lib/field.js").Field;
72
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
78
73
  }) => void;
74
+ toValue: (x: {
75
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
76
+ }) => {
77
+ packed: bigint;
78
+ };
79
+ fromValue: ((x: {
80
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
81
+ } | {
82
+ packed: bigint;
83
+ }) => {
84
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
85
+ }) & ((value: {
86
+ packed: string | number | bigint | import("o1js/dist/node/lib/provable/field.js").Field;
87
+ }) => {
88
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
89
+ });
90
+ fromFields: (fields: import("o1js/dist/node/lib/provable/field.js").Field[]) => {
91
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
92
+ };
79
93
  toInput: (x: {
80
- packed: import("o1js/dist/node/lib/field.js").Field;
94
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
81
95
  }) => {
82
- fields?: import("o1js/dist/node/lib/field.js").Field[] | undefined;
83
- packed?: [import("o1js/dist/node/lib/field.js").Field, number][] | undefined;
96
+ fields?: Field[] | undefined;
97
+ packed?: [Field, number][] | undefined;
84
98
  };
85
99
  toJSON: (x: {
86
- packed: import("o1js/dist/node/lib/field.js").Field;
100
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
87
101
  }) => {
88
102
  packed: string;
89
103
  };
90
104
  fromJSON: (x: {
91
105
  packed: string;
92
106
  }) => {
93
- packed: import("o1js/dist/node/lib/field.js").Field;
107
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
94
108
  };
95
109
  empty: () => {
96
- packed: import("o1js/dist/node/lib/field.js").Field;
110
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
97
111
  };
98
112
  };
99
113
  /**
@@ -102,15 +116,15 @@ export declare function PackedStringFactory(l?: number): {
102
116
  * @returns MultiPackedString_ class with length of n * CHARS_PER_FIELD
103
117
  */
104
118
  export declare function MultiPackedStringFactory(n?: number): {
105
- new (packed: import("o1js/dist/node/lib/field.js").Field[]): {
119
+ new (packed: Array<Field>): {
106
120
  toString(): string;
107
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
121
+ toFields(): Array<Field>;
108
122
  assertEquals(other: {
109
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
123
+ toFields(): Array<Field>;
110
124
  assertEquals(other: any): void;
111
- packed: import("o1js/dist/node/lib/field.js").Field[];
125
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
112
126
  }): void;
113
- packed: import("o1js/dist/node/lib/field.js").Field[];
127
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
114
128
  };
115
129
  extractField(input: Character): Field;
116
130
  sizeInBits(): bigint;
@@ -128,13 +142,13 @@ export declare function MultiPackedStringFactory(n?: number): {
128
142
  */
129
143
  fromCharacters(input: Array<Character>): {
130
144
  toString(): string;
131
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
145
+ toFields(): Array<Field>;
132
146
  assertEquals(other: {
133
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
147
+ toFields(): Array<Field>;
134
148
  assertEquals(other: any): void;
135
- packed: import("o1js/dist/node/lib/field.js").Field[];
149
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
136
150
  }): void;
137
- packed: import("o1js/dist/node/lib/field.js").Field[];
151
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
138
152
  };
139
153
  /**
140
154
  *
@@ -143,56 +157,74 @@ export declare function MultiPackedStringFactory(n?: number): {
143
157
  */
144
158
  fromString(str: string): {
145
159
  toString(): string;
146
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
160
+ toFields(): Array<Field>;
147
161
  assertEquals(other: {
148
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
162
+ toFields(): Array<Field>;
149
163
  assertEquals(other: any): void;
150
- packed: import("o1js/dist/node/lib/field.js").Field[];
164
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
151
165
  }): void;
152
- packed: import("o1js/dist/node/lib/field.js").Field[];
166
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
153
167
  };
154
168
  type: import("o1js/dist/node/bindings/lib/generic.js").GenericProvableExtendedPure<{
155
- packed: import("o1js/dist/node/lib/field.js").Field[];
169
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
170
+ }, {
171
+ packed: bigint[];
156
172
  }, {
157
173
  packed: string[];
158
- }, import("o1js/dist/node/lib/field.js").Field>;
174
+ }, import("o1js/dist/node/lib/provable/field.js").Field>;
159
175
  l: number;
160
176
  n: number;
161
177
  bitSize: bigint;
162
178
  checkPack(unpacked: Character[]): void;
163
- pack(unpacked: Character[]): import("o1js/dist/node/lib/field.js").Field[];
164
- unpackToBigints(fields: import("o1js/dist/node/lib/field.js").Field[]): bigint[];
179
+ pack(unpacked: Character[]): Array<Field>;
180
+ unpackToBigints(fields: Array<Field>): Array<bigint>;
165
181
  _isStruct: true;
166
182
  toFields: (value: {
167
- packed: import("o1js/dist/node/lib/field.js").Field[];
168
- }) => import("o1js/dist/node/lib/field.js").Field[];
183
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
184
+ }) => import("o1js/dist/node/lib/provable/field.js").Field[];
169
185
  toAuxiliary: (value?: {
170
- packed: import("o1js/dist/node/lib/field.js").Field[];
186
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
171
187
  } | undefined) => any[];
172
- fromFields: (fields: import("o1js/dist/node/lib/field.js").Field[]) => {
173
- packed: import("o1js/dist/node/lib/field.js").Field[];
174
- };
175
- sizeInFields(): number;
188
+ sizeInFields: () => number;
176
189
  check: (value: {
177
- packed: import("o1js/dist/node/lib/field.js").Field[];
190
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
178
191
  }) => void;
192
+ toValue: (x: {
193
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
194
+ }) => {
195
+ packed: bigint[];
196
+ };
197
+ fromValue: ((x: {
198
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
199
+ } | {
200
+ packed: bigint[];
201
+ }) => {
202
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
203
+ }) & ((value: {
204
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[] | bigint[];
205
+ }) => {
206
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
207
+ });
208
+ fromFields: (fields: import("o1js/dist/node/lib/provable/field.js").Field[]) => {
209
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
210
+ };
179
211
  toInput: (x: {
180
- packed: import("o1js/dist/node/lib/field.js").Field[];
212
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
181
213
  }) => {
182
- fields?: import("o1js/dist/node/lib/field.js").Field[] | undefined;
183
- packed?: [import("o1js/dist/node/lib/field.js").Field, number][] | undefined;
214
+ fields?: Field[] | undefined;
215
+ packed?: [Field, number][] | undefined;
184
216
  };
185
217
  toJSON: (x: {
186
- packed: import("o1js/dist/node/lib/field.js").Field[];
218
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
187
219
  }) => {
188
220
  packed: string[];
189
221
  };
190
222
  fromJSON: (x: {
191
223
  packed: string[];
192
224
  }) => {
193
- packed: import("o1js/dist/node/lib/field.js").Field[];
225
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
194
226
  };
195
227
  empty: () => {
196
- packed: import("o1js/dist/node/lib/field.js").Field[];
228
+ packed: import("o1js/dist/node/lib/provable/field.js").Field[];
197
229
  };
198
230
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PackedString.js","sourceRoot":"","sources":["../../../../src/lib/packed-types/PackedString.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAErE,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,2CAA2C;AACzD,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,MAAM,UAAU,mBAAmB,CAAC,IAAY,CAAC;IAC/C,MAAM,aAAc,SAAQ,YAAY,CAAC,SAAS,EAAE,CAAC,EAAE,YAAY,CAAC;QAClE,MAAM,CAAC,YAAY,CAAC,KAAgB;YAClC,OAAO,KAAK,CAAC,KAAK,CAAC;QACrB,CAAC;QAED,MAAM,CAAC,UAAU;YACf,OAAO,YAAY,CAAC;QACtB,CAAC;QAED;;;;WAIG;QACH,MAAM,CAAC,MAAM,CAAC,CAAQ;YACpB,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE;gBACnE,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,CAA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AAC;YAC/C,CAAC;YACD,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACzC,CAAC;QAED,QAAQ;YACN,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YACxC,OAAO,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;iBAC1C,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,QAAQ,CAAC;iBACxC,IAAI,CAAC,EAAE,CAAC,CAAC;QACd,CAAC;KACF;IACD,OAAO,kBAAkB,CAAC;AAC5B,CAAC"}
@@ -106,14 +106,18 @@ describe('PackedString', () => {
106
106
  myEthAddress.assertEquals(outsideEthAddress);
107
107
  });
108
108
  }).not.toThrow();
109
- expect(() => {
110
- Provable.runAndCheck(() => {
111
- const fakePacked = [...outsideEthAddress.packed];
112
- fakePacked[0] = fakePacked[0].add(1);
113
- const myEthAddress = new EthAddressString(fakePacked);
114
- myEthAddress.assertEquals(outsideEthAddress);
115
- });
116
- }).toThrow();
109
+ // TODO: This test should not be in the "provable" block since it's not in the runAndCheck
110
+ // It seems like failures in the runAndCheck can't be tested for with #toThrow
111
+ try {
112
+ const fakePacked = [...outsideEthAddress.packed];
113
+ fakePacked[0] = fakePacked[0].add(1);
114
+ const myEthAddress = new EthAddressString(fakePacked);
115
+ myEthAddress.assertEquals(outsideEthAddress);
116
+ fail('Expected to throw Field.assertEquals error');
117
+ }
118
+ catch (e) {
119
+ expect(e.message).toContain('Field.assertEquals');
120
+ }
117
121
  });
118
122
  });
119
123
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PackedString.test.js","sourceRoot":"","sources":["../../../../src/lib/packed-types/PackedString.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MA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0FAA0F;YAC1F,oFAAoF;YACpF,IAAI,CAAC;gBACH,MAAM,UAAU,GAAG,CAAC,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;gBACjD,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBACrC,MAAM,YAAY,GAAG,IAAI,gBAAgB,CAAC,UAAU,CAAC,CAAC;gBACtD,YAAY,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;gBAC7C,IAAI,CAAC,4CAA4C,CAAC,CAAC;YACrD,CAAC;YAAC,OAAO,CAAM,EAAE,CAAC;gBAChB,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;YACpD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,14 +1,14 @@
1
1
  import { Field, UInt32 } from 'o1js';
2
2
  export declare function PackedUInt32Factory(l?: number): {
3
- new (packed: import("o1js/dist/node/lib/field.js").Field): {
3
+ new (packed: Field): {
4
4
  toBigInts(): Array<bigint>;
5
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
5
+ toFields(): Array<Field>;
6
6
  assertEquals(other: {
7
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
7
+ toFields(): Array<Field>;
8
8
  assertEquals(other: any): void;
9
- packed: import("o1js/dist/node/lib/field.js").Field;
9
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
10
10
  }): void;
11
- packed: import("o1js/dist/node/lib/field.js").Field;
11
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
12
12
  };
13
13
  extractField(input: UInt32): Field;
14
14
  sizeInBits(): bigint;
@@ -25,13 +25,13 @@ export declare function PackedUInt32Factory(l?: number): {
25
25
  */
26
26
  fromUInt32s(uint32s: Array<UInt32>): {
27
27
  toBigInts(): Array<bigint>;
28
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
28
+ toFields(): Array<Field>;
29
29
  assertEquals(other: {
30
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
30
+ toFields(): Array<Field>;
31
31
  assertEquals(other: any): void;
32
- packed: import("o1js/dist/node/lib/field.js").Field;
32
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
33
33
  }): void;
34
- packed: import("o1js/dist/node/lib/field.js").Field;
34
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
35
35
  };
36
36
  /**
37
37
  *
@@ -40,55 +40,73 @@ export declare function PackedUInt32Factory(l?: number): {
40
40
  */
41
41
  fromBigInts(bigints: Array<bigint>): {
42
42
  toBigInts(): Array<bigint>;
43
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
43
+ toFields(): Array<Field>;
44
44
  assertEquals(other: {
45
- toFields(): import("o1js/dist/node/lib/field.js").Field[];
45
+ toFields(): Array<Field>;
46
46
  assertEquals(other: any): void;
47
- packed: import("o1js/dist/node/lib/field.js").Field;
47
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
48
48
  }): void;
49
- packed: import("o1js/dist/node/lib/field.js").Field;
49
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
50
50
  };
51
51
  type: import("o1js/dist/node/bindings/lib/generic.js").GenericProvableExtendedPure<{
52
- packed: import("o1js/dist/node/lib/field.js").Field;
52
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
53
+ }, {
54
+ packed: bigint;
53
55
  }, {
54
56
  packed: string;
55
- }, import("o1js/dist/node/lib/field.js").Field>;
57
+ }, import("o1js/dist/node/lib/provable/field.js").Field>;
56
58
  l: number;
57
59
  bitSize: bigint;
58
60
  checkPack(unpacked: UInt32[]): void;
59
- pack(unpacked: UInt32[]): import("o1js/dist/node/lib/field.js").Field;
60
- unpackToBigints(f: import("o1js/dist/node/lib/field.js").Field): bigint[];
61
+ pack(unpacked: UInt32[]): Field;
62
+ unpackToBigints(f: Field): Array<bigint>;
61
63
  _isStruct: true;
62
64
  toFields: (value: {
63
- packed: import("o1js/dist/node/lib/field.js").Field;
64
- }) => import("o1js/dist/node/lib/field.js").Field[];
65
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
66
+ }) => import("o1js/dist/node/lib/provable/field.js").Field[];
65
67
  toAuxiliary: (value?: {
66
- packed: import("o1js/dist/node/lib/field.js").Field;
68
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
67
69
  } | undefined) => any[];
68
- fromFields: (fields: import("o1js/dist/node/lib/field.js").Field[]) => {
69
- packed: import("o1js/dist/node/lib/field.js").Field;
70
- };
71
- sizeInFields(): number;
70
+ sizeInFields: () => number;
72
71
  check: (value: {
73
- packed: import("o1js/dist/node/lib/field.js").Field;
72
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
74
73
  }) => void;
74
+ toValue: (x: {
75
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
76
+ }) => {
77
+ packed: bigint;
78
+ };
79
+ fromValue: ((x: {
80
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
81
+ } | {
82
+ packed: bigint;
83
+ }) => {
84
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
85
+ }) & ((value: {
86
+ packed: string | number | bigint | import("o1js/dist/node/lib/provable/field.js").Field;
87
+ }) => {
88
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
89
+ });
90
+ fromFields: (fields: import("o1js/dist/node/lib/provable/field.js").Field[]) => {
91
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
92
+ };
75
93
  toInput: (x: {
76
- packed: import("o1js/dist/node/lib/field.js").Field;
94
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
77
95
  }) => {
78
- fields?: import("o1js/dist/node/lib/field.js").Field[] | undefined;
79
- packed?: [import("o1js/dist/node/lib/field.js").Field, number][] | undefined;
96
+ fields?: Field[] | undefined;
97
+ packed?: [Field, number][] | undefined;
80
98
  };
81
99
  toJSON: (x: {
82
- packed: import("o1js/dist/node/lib/field.js").Field;
100
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
83
101
  }) => {
84
102
  packed: string;
85
103
  };
86
104
  fromJSON: (x: {
87
105
  packed: string;
88
106
  }) => {
89
- packed: import("o1js/dist/node/lib/field.js").Field;
107
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
90
108
  };
91
109
  empty: () => {
92
- packed: import("o1js/dist/node/lib/field.js").Field;
110
+ packed: import("o1js/dist/node/lib/provable/field.js").Field;
93
111
  };
94
112
  };
@@ -64,20 +64,24 @@ describe('PackedUInt32', () => {
64
64
  });
65
65
  }).not.toThrow();
66
66
  });
67
- it('#assertEquals', () => {
67
+ it('#assertEquals', async () => {
68
68
  expect(() => {
69
69
  Provable.runAndCheck(() => {
70
70
  const packedUInt32 = new PackedUInt32(outsidePackedUInt.packed);
71
71
  packedUInt32.assertEquals(outsidePackedUInt);
72
72
  });
73
73
  }).not.toThrow();
74
- expect(() => {
75
- Provable.runAndCheck(() => {
76
- const fakePacked = outsidePackedUInt.packed.add(32);
77
- const packedUInt32 = new PackedUInt32(fakePacked);
78
- packedUInt32.assertEquals(outsidePackedUInt);
79
- });
80
- }).toThrow();
74
+ // TODO: This test should not be in the "provable" block since it's not in the runAndCheck
75
+ // It seems like failures in the runAndCheck can't be tested for with #toThrow
76
+ try {
77
+ const fakePacked = outsidePackedUInt.packed.add(32);
78
+ const packedUInt32 = new PackedUInt32(fakePacked);
79
+ packedUInt32.assertEquals(outsidePackedUInt);
80
+ fail('Expected to throw Field.assertEquals error');
81
+ }
82
+ catch (e) {
83
+ expect(e.message).toContain('Field.assertEquals');
84
+ }
81
85
  });
82
86
  });
83
87
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PackedUInt32.test.js","sourceRoot":"","sources":["../../../../src/lib/packed-types/PackedUInt32.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD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AAW,CAAC,GAAG,EAAE;oBACxB,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;oBAChE,YAAY,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;gBAC/C,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;YAEjB,0FAA0F;YAC1F,oFAAoF;YACpF,IAAI,CAAC;gBACH,MAAM,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBACpD,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,UAAU,CAAC,CAAC;gBAClD,YAAY,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;gBAC7C,IAAI,CAAC,4CAA4C,CAAC,CAAC;YACrD,CAAC;YAAC,OAAO,CAAM,EAAE,CAAC;gBAChB,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;YACpD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "o1js-pack",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "",
5
5
  "author": "45930",
6
6
  "license": "Apache-2.0",
@@ -16,11 +16,11 @@
16
16
  "scripts": {
17
17
  "build": "tsc",
18
18
  "buildw": "tsc --watch",
19
- "coverage": "node --experimental-vm-modules --experimental-wasm-threads node_modules/jest/bin/jest.js --coverage",
19
+ "coverage": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage",
20
20
  "format": "prettier --write --ignore-unknown **/*",
21
21
  "prepare": "husky install",
22
- "test": "node --experimental-vm-modules --experimental-wasm-threads node_modules/jest/bin/jest.js",
23
- "testw": "node --experimental-vm-modules --experimental-wasm-threads node_modules/jest/bin/jest.js --watch",
22
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
23
+ "testw": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watch",
24
24
  "lint": "npx eslint src/* --fix"
25
25
  },
26
26
  "lint-staged": {
@@ -38,13 +38,16 @@
38
38
  "eslint": "^8.7.0",
39
39
  "eslint-plugin-o1js": "^0.4.0",
40
40
  "husky": "^7.0.1",
41
- "jest": "^27.3.1",
41
+ "jest": "^29.7.0",
42
42
  "lint-staged": "^11.0.1",
43
43
  "prettier": "^2.3.2",
44
- "ts-jest": "^27.0.7",
45
- "typescript": "^4.7.2"
44
+ "ts-jest": "^29.1.5",
45
+ "typescript": "^5.5.2"
46
46
  },
47
47
  "peerDependencies": {
48
- "o1js": "^0.18.0"
48
+ "o1js": "^2.0.0"
49
+ },
50
+ "volta": {
51
+ "node": "20.15.0"
49
52
  }
50
53
  }
@@ -13,7 +13,7 @@ describe('End to End Votes Test', () => {
13
13
 
14
14
  beforeAll(async () => {
15
15
  await VotesProgram.compile();
16
- initProof = await VotesProgram.init(initVotes);
16
+ initProof = (await VotesProgram.init(initVotes)).proof;
17
17
  initProof.verify();
18
18
  });
19
19
 
@@ -21,7 +21,8 @@ describe('End to End Votes Test', () => {
21
21
  it('Increments the 0th index', async () => {
22
22
  const unpackedVotes = [1n, 0n];
23
23
  const proofVotes = Votes.fromBigInts(unpackedVotes);
24
- const proof = await VotesProgram.incrementIndex0(proofVotes, initProof);
24
+ const proof = (await VotesProgram.incrementIndex0(proofVotes, initProof))
25
+ .proof;
25
26
  proof.verify();
26
27
  proofVotes.packed.assertEquals(proof.publicInput.packed);
27
28
  });
@@ -30,7 +31,8 @@ describe('End to End Votes Test', () => {
30
31
  it.skip('throws when verifying an invalid proof', async () => {
31
32
  const unpackedVotes = [1n, 0n];
32
33
  const proofVotes = Votes.fromBigInts(unpackedVotes);
33
- const proof = await VotesProgram.incrementIndex1(proofVotes, initProof);
34
+ const proof = (await VotesProgram.incrementIndex1(proofVotes, initProof))
35
+ .proof;
34
36
  expect(() => {
35
37
  proof.verify();
36
38
  }).toThrow();
@@ -45,7 +47,7 @@ describe('End to End Text Input Test', () => {
45
47
 
46
48
  beforeAll(async () => {
47
49
  await TextInputProgram.compile();
48
- initProof = await TextInputProgram.init(initTextInput);
50
+ initProof = (await TextInputProgram.init(initTextInput)).proof;
49
51
  initProof.verify();
50
52
  });
51
53
 
@@ -53,12 +55,14 @@ describe('End to End Text Input Test', () => {
53
55
  it('adds input', async () => {
54
56
  let unpackedTextInput = 'Zina Protocol';
55
57
  let proofTextInput = TextInput.fromString(unpackedTextInput);
56
- const p1 = await TextInputProgram.changeFirstLetter(
57
- proofTextInput,
58
- initProof,
59
- TextInput.unpack(initProof.publicInput.packed),
60
- Character.fromString('Z')
61
- );
58
+ const p1 = (
59
+ await TextInputProgram.changeFirstLetter(
60
+ proofTextInput,
61
+ initProof,
62
+ TextInput.unpack(initProof.publicInput.packed),
63
+ Character.fromString('Z')
64
+ )
65
+ ).proof;
62
66
  proofTextInput.assertEquals(p1.publicInput);
63
67
  });
64
68
  });
package/tsconfig.json CHANGED
@@ -19,5 +19,6 @@
19
19
  "noFallthroughCasesInSwitch": true,
20
20
  "allowSyntheticDefaultImports": true
21
21
  },
22
- "include": ["./src"]
22
+ "include": ["./src"],
23
+ "exclude": ["./node_modules"]
23
24
  }