o1js-pack 0.3.1 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. package/.github/workflows/ci.yml +1 -1
  2. package/.husky/pre-commit +0 -0
  3. package/README.md +9 -30
  4. package/build/src/index.d.ts +5 -5
  5. package/build/src/index.js +5 -5
  6. package/build/src/lib/PackingPlant.d.ts +132 -92
  7. package/build/src/lib/PackingPlant.js +190 -74
  8. package/build/src/lib/PackingPlant.js.map +1 -1
  9. package/build/src/lib/packed-types/PackedBool.d.ts +85 -77
  10. package/build/src/lib/packed-types/PackedBool.js +49 -47
  11. package/build/src/lib/packed-types/PackedBool.js.map +1 -1
  12. package/build/src/lib/packed-types/PackedBool.test.d.ts +1 -1
  13. package/build/src/lib/packed-types/PackedBool.test.js +75 -75
  14. package/build/src/lib/packed-types/PackedBool.test.js.map +1 -1
  15. package/build/src/lib/packed-types/PackedString.d.ts +181 -78
  16. package/build/src/lib/packed-types/PackedString.js +127 -82
  17. package/build/src/lib/packed-types/PackedString.js.map +1 -1
  18. package/build/src/lib/packed-types/PackedString.test.d.ts +1 -1
  19. package/build/src/lib/packed-types/PackedString.test.js +100 -99
  20. package/build/src/lib/packed-types/PackedString.test.js.map +1 -1
  21. package/build/src/lib/packed-types/PackedUInt32.d.ts +85 -77
  22. package/build/src/lib/packed-types/PackedUInt32.js +49 -47
  23. package/build/src/lib/packed-types/PackedUInt32.js.map +1 -1
  24. package/build/src/lib/packed-types/PackedUInt32.test.d.ts +1 -1
  25. package/build/src/lib/packed-types/PackedUInt32.test.js +83 -83
  26. package/build/src/lib/packed-types/PackedUInt32.test.js.map +1 -1
  27. package/package.json +1 -1
  28. package/tests/provable/end_to_end.test.ts +65 -0
  29. package/tests/provable/example_packed_string_circuit.ts +47 -0
  30. package/tests/provable/example_packed_uint_circuit.ts +39 -0
  31. package/build/src/lib/packed-types/PackedCharacter.d.ts +0 -51
  32. package/build/src/lib/packed-types/PackedCharacter.js +0 -34
  33. package/build/src/lib/packed-types/PackedCharacter.js.map +0 -1
  34. package/build/src/lib/packed-types/PackedCharacter.test.d.ts +0 -1
  35. package/build/src/lib/packed-types/PackedCharacter.test.js +0 -31
  36. package/build/src/lib/packed-types/PackedCharacter.test.js.map +0 -1
  37. package/build/src/lib/scratch.d.ts +0 -1
  38. package/build/src/lib/scratch.js +0 -16
  39. package/build/src/lib/scratch.js.map +0 -1
  40. package/build/src/packed-types/PackedBool.d.ts +0 -51
  41. package/build/src/packed-types/PackedBool.js +0 -34
  42. package/build/src/packed-types/PackedBool.js.map +0 -1
  43. package/build/src/packed-types/PackedBool.test.d.ts +0 -1
  44. package/build/src/packed-types/PackedBool.test.js +0 -101
  45. package/build/src/packed-types/PackedBool.test.js.map +0 -1
  46. package/build/src/packed-types/PackedCharacter.d.ts +0 -51
  47. package/build/src/packed-types/PackedCharacter.js +0 -34
  48. package/build/src/packed-types/PackedCharacter.js.map +0 -1
  49. package/build/src/packed-types/PackedCharacter.test.d.ts +0 -1
  50. package/build/src/packed-types/PackedCharacter.test.js +0 -31
  51. package/build/src/packed-types/PackedCharacter.test.js.map +0 -1
  52. package/build/src/packed-types/PackedUInt32.d.ts +0 -51
  53. package/build/src/packed-types/PackedUInt32.js +0 -34
  54. package/build/src/packed-types/PackedUInt32.js.map +0 -1
  55. package/build/src/packed-types/PackedUInt32.test.d.ts +0 -1
  56. package/build/src/packed-types/PackedUInt32.test.js +0 -68
  57. package/build/src/packed-types/PackedUInt32.test.js.map +0 -1
  58. package/build/src/packed-types/PackingPlant.d.ts +0 -54
  59. package/build/src/packed-types/PackingPlant.js +0 -45
  60. package/build/src/packed-types/PackingPlant.js.map +0 -1
  61. package/build/src/packed-types/scratch.d.ts +0 -1
  62. package/build/src/packed-types/scratch.js +0 -5
  63. package/build/src/packed-types/scratch.js.map +0 -1
  64. package/coverage/clover.xml +0 -166
  65. package/coverage/coverage-final.json +0 -5
  66. package/coverage/lcov-report/PackedBool.ts.html +0 -268
  67. package/coverage/lcov-report/PackedUInt32.ts.html +0 -313
  68. package/coverage/lcov-report/base.css +0 -224
  69. package/coverage/lcov-report/block-navigation.js +0 -87
  70. package/coverage/lcov-report/favicon.png +0 -0
  71. package/coverage/lcov-report/index.html +0 -131
  72. package/coverage/lcov-report/lib/PackingPlant.ts.html +0 -478
  73. package/coverage/lcov-report/lib/index.html +0 -116
  74. package/coverage/lcov-report/lib/packed-types/PackedBool.ts.html +0 -238
  75. package/coverage/lcov-report/lib/packed-types/PackedString.ts.html +0 -364
  76. package/coverage/lcov-report/lib/packed-types/PackedUInt32.ts.html +0 -238
  77. package/coverage/lcov-report/lib/packed-types/index.html +0 -146
  78. package/coverage/lcov-report/prettify.css +0 -1
  79. package/coverage/lcov-report/prettify.js +0 -2
  80. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  81. package/coverage/lcov-report/sorter.js +0 -196
  82. package/coverage/lcov.info +0 -282
@@ -1,100 +1,101 @@
1
- import { Character, Provable } from 'o1js';
2
- import { PackedStringFactory } from './PackedString';
3
- describe('PackedString', () => {
4
- describe('Outside of the Circuit', () => {
5
- const vitalik_dot_eth = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045';
6
- class EthAddressString extends PackedStringFactory(42) {
7
- }
8
- let characters = [];
9
- beforeEach(() => {
10
- characters = [];
11
- for (let i = 0; i < vitalik_dot_eth.length; i++) {
12
- characters.push(Character.fromString(vitalik_dot_eth[i]));
13
- }
14
- });
15
- it('#fromString', () => {
16
- const myEthAddress = EthAddressString.fromString(vitalik_dot_eth);
17
- expect(myEthAddress.toString()).toBe(vitalik_dot_eth);
18
- });
19
- it('#fromAuxilliary', () => {
20
- const myEthAddress = EthAddressString.fromAuxiliary(characters);
21
- expect(myEthAddress.toString()).toBe(vitalik_dot_eth);
22
- });
23
- it('#pack and #unPack', () => {
24
- const packed = EthAddressString.pack(characters);
25
- const unpacked = EthAddressString.unpack(packed);
26
- expect(packed.length).toBe(Math.ceil(vitalik_dot_eth.length / 15));
27
- expect(unpacked.length).toBe(vitalik_dot_eth.length);
28
- expect(unpacked.toString()).toBe(characters.toString());
29
- });
30
- });
31
- describe('Provable Properties', () => {
32
- it('#sizeInFields', () => {
33
- class one extends PackedStringFactory(15) {
34
- }
35
- class two extends PackedStringFactory(16) {
36
- }
37
- class three extends PackedStringFactory(40) {
38
- }
39
- expect(one.sizeInFields()).toBe(1);
40
- expect(two.sizeInFields()).toBe(2);
41
- expect(three.sizeInFields()).toBe(3);
42
- });
43
- });
44
- describe('Defensive Cases', () => {
45
- it('Initializes a class with fewer than allowed characters', () => {
46
- class String10 extends PackedStringFactory(10) {
47
- }
48
- const string0 = String10.fromString('');
49
- const string2 = String10.fromString('ab');
50
- expect(string0.toString()).toBe('');
51
- expect(string2.toString()).toBe('ab');
52
- });
53
- it('Initializes a class with more than allowed characters', () => {
54
- class String10 extends PackedStringFactory(10) {
55
- }
56
- expect(() => {
57
- const string11 = String10.fromString('abcdefghijk');
58
- }).toThrow();
59
- });
60
- it('Exceeds maximum size string', () => {
61
- const tooLong = 'too long!'.repeat(20);
62
- class MaxString extends PackedStringFactory(120) {
63
- }
64
- expect(() => {
65
- MaxString.fromString(tooLong);
66
- }).toThrow();
67
- });
68
- });
69
- describe('In the circuit', () => {
70
- const vitalik_dot_eth = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045';
71
- class EthAddressString extends PackedStringFactory(42) {
72
- }
73
- const outsideEthAddress = EthAddressString.fromString(vitalik_dot_eth);
74
- it('Initializes a string', () => {
75
- expect(() => {
76
- Provable.runAndCheck(() => {
77
- const myEthAddress = new EthAddressString(outsideEthAddress.packed, outsideEthAddress.aux);
78
- EthAddressString.check({ packed: myEthAddress.packed });
79
- });
80
- }).not.toThrow();
81
- });
82
- it('#assertEquals', () => {
83
- expect(() => {
84
- Provable.runAndCheck(() => {
85
- const myEthAddress = new EthAddressString(outsideEthAddress.packed, outsideEthAddress.aux);
86
- myEthAddress.assertEquals(outsideEthAddress);
87
- });
88
- }).not.toThrow();
89
- expect(() => {
90
- Provable.runAndCheck(() => {
91
- const fakePacked = [...outsideEthAddress.packed];
92
- fakePacked[0] = fakePacked[0].add(1);
93
- const myEthAddress = new EthAddressString(fakePacked, outsideEthAddress.aux);
94
- myEthAddress.assertEquals(outsideEthAddress);
95
- });
96
- }).toThrow();
97
- });
98
- });
99
- });
1
+ import { Character, Provable } from 'o1js';
2
+ import { PackedStringFactory, MultiPackedStringFactory } from './PackedString';
3
+ describe('PackedString', () => {
4
+ describe('Outside of the Circuit', () => {
5
+ const vitalik_dot_eth = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045';
6
+ class EthAddressString extends MultiPackedStringFactory(3) {
7
+ }
8
+ let characters = [];
9
+ beforeEach(() => {
10
+ characters = [];
11
+ for (let i = 0; i < vitalik_dot_eth.length; i++) {
12
+ characters.push(Character.fromString(vitalik_dot_eth[i]));
13
+ }
14
+ });
15
+ it('#fromString', () => {
16
+ const myEthAddress = EthAddressString.fromString(vitalik_dot_eth);
17
+ expect(myEthAddress.toString()).toBe(vitalik_dot_eth);
18
+ });
19
+ it('#fromCharacters', () => {
20
+ const myEthAddress = EthAddressString.fromCharacters(characters);
21
+ expect(myEthAddress.toString()).toBe(vitalik_dot_eth);
22
+ });
23
+ it('#pack and #unPack', () => {
24
+ const unpacked = EthAddressString.unpack(EthAddressString.fromCharacters(characters).packed);
25
+ const packed = EthAddressString.pack(unpacked);
26
+ expect(packed.length).toBe(Math.ceil(vitalik_dot_eth.length / 15));
27
+ expect(unpacked.length).toBe(EthAddressString.l);
28
+ expect(unpacked.length).toBe(45);
29
+ expect(unpacked.slice(0, characters.length).toString()).toBe(characters.toString());
30
+ });
31
+ });
32
+ describe('Provable Properties', () => {
33
+ it('#sizeInFields', () => {
34
+ class one extends PackedStringFactory(15) {
35
+ }
36
+ class two extends MultiPackedStringFactory(2) {
37
+ }
38
+ class three extends MultiPackedStringFactory(3) {
39
+ }
40
+ expect(one.sizeInFields()).toBe(1);
41
+ expect(two.sizeInFields()).toBe(2);
42
+ expect(three.sizeInFields()).toBe(3);
43
+ });
44
+ });
45
+ describe('Defensive Cases', () => {
46
+ it('Initializes a class with fewer than allowed characters', () => {
47
+ class String10 extends PackedStringFactory(10) {
48
+ }
49
+ const string0 = String10.fromString('');
50
+ const string2 = String10.fromString('ab');
51
+ expect(string0.toString()).toBe('');
52
+ expect(string2.toString()).toBe('ab');
53
+ });
54
+ it('Initializes a class with more than allowed characters', () => {
55
+ class String10 extends PackedStringFactory(10) {
56
+ }
57
+ expect(() => {
58
+ String10.fromString('abcdefghijk');
59
+ }).toThrow();
60
+ });
61
+ it('Exceeds maximum size string', () => {
62
+ const tooLong = 'too long!'.repeat(20);
63
+ class MaxString extends MultiPackedStringFactory(8) {
64
+ }
65
+ expect(() => {
66
+ MaxString.fromString(tooLong);
67
+ }).toThrow();
68
+ });
69
+ });
70
+ describe('In the circuit', () => {
71
+ const vitalik_dot_eth = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045';
72
+ class EthAddressString extends MultiPackedStringFactory(3) {
73
+ }
74
+ const outsideEthAddress = EthAddressString.fromString(vitalik_dot_eth);
75
+ it('Initializes a string', () => {
76
+ expect(() => {
77
+ Provable.runAndCheck(() => {
78
+ const myEthAddress = new EthAddressString(outsideEthAddress.packed);
79
+ EthAddressString.check({ packed: myEthAddress.packed });
80
+ });
81
+ }).not.toThrow();
82
+ });
83
+ it('#assertEquals', () => {
84
+ expect(() => {
85
+ Provable.runAndCheck(() => {
86
+ const myEthAddress = new EthAddressString(outsideEthAddress.packed);
87
+ myEthAddress.assertEquals(outsideEthAddress);
88
+ });
89
+ }).not.toThrow();
90
+ expect(() => {
91
+ Provable.runAndCheck(() => {
92
+ const fakePacked = [...outsideEthAddress.packed];
93
+ fakePacked[0] = fakePacked[0].add(1);
94
+ const myEthAddress = new EthAddressString(fakePacked);
95
+ myEthAddress.assertEquals(outsideEthAddress);
96
+ });
97
+ }).toThrow();
98
+ });
99
+ });
100
+ });
100
101
  //# sourceMappingURL=PackedString.test.js.map
@@ -1 +1 @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
- import { Field, UInt32 } from 'o1js';
2
- export declare function PackedUInt32Factory(l: number): {
3
- new (packed: import("o1js/dist/node/lib/field.js").Field, aux: UInt32[]): {
4
- toBigInts(): Array<bigint>;
5
- packed: import("o1js/dist/node/lib/field.js").Field;
6
- aux: UInt32[];
7
- bitSize: bigint;
8
- assertEquals(other: {
9
- packed: import("o1js/dist/node/lib/field.js").Field;
10
- aux: UInt32[];
11
- bitSize: bigint;
12
- assertEquals(other: any): void;
13
- }): void;
14
- };
15
- toAuxiliary(value?: {
16
- packed: Field;
17
- } | undefined): Array<UInt32>;
18
- pack(aux: Array<UInt32>): Field;
19
- fromAuxiliary(aux: Array<UInt32>): {
20
- toBigInts(): Array<bigint>;
21
- packed: import("o1js/dist/node/lib/field.js").Field;
22
- aux: UInt32[];
23
- bitSize: bigint;
24
- assertEquals(other: {
25
- packed: import("o1js/dist/node/lib/field.js").Field;
26
- aux: UInt32[];
27
- bitSize: bigint;
28
- assertEquals(other: any): void;
29
- }): void;
30
- };
31
- fromBigInts(bigints: Array<bigint>): {
32
- toBigInts(): Array<bigint>;
33
- packed: import("o1js/dist/node/lib/field.js").Field;
34
- aux: UInt32[];
35
- bitSize: bigint;
36
- assertEquals(other: {
37
- packed: import("o1js/dist/node/lib/field.js").Field;
38
- aux: UInt32[];
39
- bitSize: bigint;
40
- assertEquals(other: any): void;
41
- }): void;
42
- };
43
- type: import("o1js/dist/node/bindings/lib/provable-snarky.js").ProvableExtended<{
44
- packed: import("o1js/dist/node/lib/field.js").Field;
45
- }, {
46
- packed: string;
47
- }>;
48
- l: number;
49
- unpack(f: import("o1js/dist/node/lib/field.js").Field): UInt32[];
50
- _isStruct: true;
51
- toFields: (value: {
52
- packed: import("o1js/dist/node/lib/field.js").Field;
53
- }) => import("o1js/dist/node/lib/field.js").Field[];
54
- fromFields: (fields: import("o1js/dist/node/lib/field.js").Field[]) => {
55
- packed: import("o1js/dist/node/lib/field.js").Field;
56
- };
57
- sizeInFields(): number;
58
- check: (value: {
59
- packed: import("o1js/dist/node/lib/field.js").Field;
60
- }) => void;
61
- toInput: (x: {
62
- packed: import("o1js/dist/node/lib/field.js").Field;
63
- }) => {
64
- fields?: import("o1js/dist/node/lib/field.js").Field[] | undefined;
65
- packed?: [import("o1js/dist/node/lib/field.js").Field, number][] | undefined;
66
- };
67
- toJSON: (x: {
68
- packed: import("o1js/dist/node/lib/field.js").Field;
69
- }) => {
70
- packed: string;
71
- };
72
- fromJSON: (x: {
73
- packed: string;
74
- }) => {
75
- packed: import("o1js/dist/node/lib/field.js").Field;
76
- };
77
- };
1
+ import { Field, UInt32 } from 'o1js';
2
+ export declare function PackedUInt32Factory(l?: number): {
3
+ new (packed: import("o1js/dist/node/lib/field.js").Field): {
4
+ toBigInts(): Array<bigint>;
5
+ assertEquals(other: {
6
+ assertEquals(other: any): void;
7
+ packed: import("o1js/dist/node/lib/field.js").Field;
8
+ }): void;
9
+ packed: import("o1js/dist/node/lib/field.js").Field;
10
+ };
11
+ extractField(input: UInt32): Field;
12
+ sizeInBits(): bigint;
13
+ /**
14
+ *
15
+ * @param f Field, packed with the information, as returned by #pack
16
+ * @returns Array of UInt32
17
+ */
18
+ unpack(f: Field): UInt32[];
19
+ /**
20
+ *
21
+ * @param uint32s Array of UInt32s to be packed
22
+ * @returns Instance of the implementing class
23
+ */
24
+ fromUInt32s(uint32s: Array<UInt32>): {
25
+ toBigInts(): Array<bigint>;
26
+ assertEquals(other: {
27
+ assertEquals(other: any): void;
28
+ packed: import("o1js/dist/node/lib/field.js").Field;
29
+ }): void;
30
+ packed: import("o1js/dist/node/lib/field.js").Field;
31
+ };
32
+ /**
33
+ *
34
+ * @param bigints Array of bigints to be packed
35
+ * @returns Instance of the implementing class
36
+ */
37
+ fromBigInts(bigints: Array<bigint>): {
38
+ toBigInts(): Array<bigint>;
39
+ assertEquals(other: {
40
+ assertEquals(other: any): void;
41
+ packed: import("o1js/dist/node/lib/field.js").Field;
42
+ }): void;
43
+ packed: import("o1js/dist/node/lib/field.js").Field;
44
+ };
45
+ type: import("o1js/dist/node/bindings/lib/provable-snarky.js").ProvableExtended<{
46
+ packed: import("o1js/dist/node/lib/field.js").Field;
47
+ }, {
48
+ packed: string;
49
+ }>;
50
+ l: number;
51
+ bitSize: bigint;
52
+ checkPack(unpacked: UInt32[]): void;
53
+ pack(unpacked: UInt32[]): import("o1js/dist/node/lib/field.js").Field;
54
+ unpackToBigints(f: import("o1js/dist/node/lib/field.js").Field): bigint[];
55
+ _isStruct: true;
56
+ toFields: (value: {
57
+ packed: import("o1js/dist/node/lib/field.js").Field;
58
+ }) => import("o1js/dist/node/lib/field.js").Field[];
59
+ toAuxiliary: (value?: {
60
+ packed: import("o1js/dist/node/lib/field.js").Field;
61
+ } | undefined) => any[];
62
+ fromFields: (fields: import("o1js/dist/node/lib/field.js").Field[]) => {
63
+ packed: import("o1js/dist/node/lib/field.js").Field;
64
+ };
65
+ sizeInFields(): number;
66
+ check: (value: {
67
+ packed: import("o1js/dist/node/lib/field.js").Field;
68
+ }) => void;
69
+ toInput: (x: {
70
+ packed: import("o1js/dist/node/lib/field.js").Field;
71
+ }) => {
72
+ fields?: import("o1js/dist/node/lib/field.js").Field[] | undefined;
73
+ packed?: [import("o1js/dist/node/lib/field.js").Field, number][] | undefined;
74
+ };
75
+ toJSON: (x: {
76
+ packed: import("o1js/dist/node/lib/field.js").Field;
77
+ }) => {
78
+ packed: string;
79
+ };
80
+ fromJSON: (x: {
81
+ packed: string;
82
+ }) => {
83
+ packed: import("o1js/dist/node/lib/field.js").Field;
84
+ };
85
+ };
@@ -1,48 +1,50 @@
1
- import { Field, Provable, UInt32 } from 'o1js';
2
- import { PackingPlant } from '../PackingPlant.js';
3
- const SIZE_IN_BITS = 32n;
4
- export function PackedUInt32Factory(l) {
5
- class PackedUInt32_ extends PackingPlant(UInt32, l, SIZE_IN_BITS) {
6
- static toAuxiliary(value) {
7
- const auxiliary = Provable.witness(Provable.Array(UInt32, l), () => {
8
- let uints_ = new Array(l);
9
- uints_.fill(0n);
10
- let packedN;
11
- if (value && value.packed) {
12
- packedN = value.packed.toBigInt();
13
- }
14
- else {
15
- throw new Error('No Packed Value Provided');
16
- }
17
- for (let i = 0; i < l; i++) {
18
- uints_[i] = packedN & ((1n << SIZE_IN_BITS) - 1n);
19
- packedN >>= SIZE_IN_BITS;
20
- }
21
- return uints_.map((x) => UInt32.from(x));
22
- });
23
- return auxiliary;
24
- }
25
- static pack(aux) {
26
- let f = aux[0].value;
27
- const n = Math.min(aux.length, l);
28
- for (let i = 1; i < n; i++) {
29
- const c = Field((2n ** SIZE_IN_BITS) ** BigInt(i));
30
- f = f.add(aux[i].value.mul(c));
31
- }
32
- return f;
33
- }
34
- static fromAuxiliary(aux) {
35
- const packed = PackedUInt32_.pack(aux);
36
- return new PackedUInt32_(packed, aux);
37
- }
38
- static fromBigInts(bigints) {
39
- const uint32s = bigints.map((x) => UInt32.from(x));
40
- return this.fromAuxiliary(uint32s);
41
- }
42
- toBigInts() {
43
- return PackedUInt32_.unpack(this.packed).map((x) => x.toBigint());
44
- }
45
- }
46
- return PackedUInt32_;
47
- }
1
+ import { Provable, UInt32 } from 'o1js';
2
+ import { PackingPlant } from '../PackingPlant.js';
3
+ const L = 7; // 7 32-bit uints fit in one Field
4
+ const SIZE_IN_BITS = 32n;
5
+ export function PackedUInt32Factory(l = L) {
6
+ class PackedUInt32_ extends PackingPlant(UInt32, l, SIZE_IN_BITS) {
7
+ static extractField(input) {
8
+ return input.value;
9
+ }
10
+ static sizeInBits() {
11
+ return SIZE_IN_BITS;
12
+ }
13
+ /**
14
+ *
15
+ * @param f Field, packed with the information, as returned by #pack
16
+ * @returns Array of UInt32
17
+ */
18
+ static unpack(f) {
19
+ const unpacked = Provable.witness(Provable.Array(UInt32, l), () => {
20
+ const unpacked = this.unpackToBigints(f);
21
+ return unpacked.map((x) => UInt32.from(x));
22
+ });
23
+ f.assertEquals(PackedUInt32_.pack(unpacked));
24
+ return unpacked;
25
+ }
26
+ /**
27
+ *
28
+ * @param uint32s Array of UInt32s to be packed
29
+ * @returns Instance of the implementing class
30
+ */
31
+ static fromUInt32s(uint32s) {
32
+ const packed = PackedUInt32_.pack(uint32s);
33
+ return new PackedUInt32_(packed);
34
+ }
35
+ /**
36
+ *
37
+ * @param bigints Array of bigints to be packed
38
+ * @returns Instance of the implementing class
39
+ */
40
+ static fromBigInts(bigints) {
41
+ const uint32s = bigints.map((x) => UInt32.from(x));
42
+ return PackedUInt32_.fromUInt32s(uint32s);
43
+ }
44
+ toBigInts() {
45
+ return PackedUInt32_.unpack(this.packed).map((x) => x.toBigint());
46
+ }
47
+ }
48
+ return PackedUInt32_;
49
+ }
48
50
  //# sourceMappingURL=PackedUInt32.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PackedUInt32.js","sourceRoot":"","sources":["../../../../src/lib/packed-types/PackedUInt32.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,YAAY,GAAG,GAAG,CAAC;AAEzB,MAAM,UAAU,mBAAmB,CAAC,CAAS;IAC3C,MAAM,aAAc,SAAQ,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,YAAY,CAAC;QAC/D,MAAM,CAAC,WAAW,CAAC,KAAqC;YACtD,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE;gBACjE,IAAI,MAAM,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;gBAC1B,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBAChB,IAAI,OAAO,CAAC;gBACZ,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE;oBACzB,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;iBACnC;qBAA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