o1js-pack 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v0.8
2
+
3
+ - Upgrage o1js to version 2.0.0
4
+
1
5
  ## v0.7
2
6
 
3
7
  - Upgrage o1js to version 1.3.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "o1js-pack",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "",
5
5
  "author": "45930",
6
6
  "license": "Apache-2.0",
@@ -45,7 +45,7 @@
45
45
  "typescript": "^5.5.2"
46
46
  },
47
47
  "peerDependencies": {
48
- "o1js": "^1.0.0"
48
+ "o1js": "^2.0.0"
49
49
  },
50
50
  "volta": {
51
51
  "node": "20.15.0"
@@ -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
  });