From 46d6bb01b1e606afb637efef37648a48b1fe09b5 Mon Sep 17 00:00:00 2001 From: ymekuria Date: Mon, 6 May 2024 16:41:46 -0600 Subject: [PATCH 1/3] feat(recursion.mdx): make simple zkprogram code snippet methods async --- docs/zkapps/o1js/recursion.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zkapps/o1js/recursion.mdx b/docs/zkapps/o1js/recursion.mdx index 3987ef963..ad39fc366 100644 --- a/docs/zkapps/o1js/recursion.mdx +++ b/docs/zkapps/o1js/recursion.mdx @@ -57,10 +57,10 @@ const SimpleProgram = ZkProgram({ publicInput: Field, methods: { - run: { + run: { privateInputs: [], - method(publicInput: Field) { + async method(publicInput: Field) { publicInput.assertEquals(Field(0)); }, } From bbe3a51da6634cd37f9309e2984e8bcfe5913ad1 Mon Sep 17 00:00:00 2001 From: ymekuria Date: Mon, 6 May 2024 16:43:46 -0600 Subject: [PATCH 2/3] feat(recursion.mdx): make AddOne ZkProgram code snippet methods async --- docs/zkapps/o1js/recursion.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zkapps/o1js/recursion.mdx b/docs/zkapps/o1js/recursion.mdx index ad39fc366..1608dfff6 100644 --- a/docs/zkapps/o1js/recursion.mdx +++ b/docs/zkapps/o1js/recursion.mdx @@ -111,7 +111,7 @@ const AddOne = ZkProgram({ baseCase: { privateInputs: [], - method(publicInput: Field) { + async method(publicInput: Field) { publicInput.assertEquals(Field(0)); }, }, @@ -119,7 +119,7 @@ const AddOne = ZkProgram({ step: { privateInputs: [SelfProof], - method(publicInput: Field, earlierProof: SelfProof) { + async method(publicInput: Field, earlierProof: SelfProof) { earlierProof.verify(); earlierProof.publicInput.add(1).assertEquals(publicInput); }, From 6349f78be2fcfe1b0ac32dcfe1a5327db0ace131 Mon Sep 17 00:00:00 2001 From: ymekuria Date: Mon, 6 May 2024 17:55:10 -0600 Subject: [PATCH 3/3] feat(recursion.mdx): make RollupAdd ZkProgram code snippet methods async --- docs/zkapps/o1js/recursion.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zkapps/o1js/recursion.mdx b/docs/zkapps/o1js/recursion.mdx index 1608dfff6..80f27c555 100644 --- a/docs/zkapps/o1js/recursion.mdx +++ b/docs/zkapps/o1js/recursion.mdx @@ -177,13 +177,13 @@ let RollupAdd = ZkProgram({ baseCase: { privateInputs: [], - method(publicInput: Field) { }, + async method(publicInput: Field) { }, }, step: { privateInputs: [SelfProof, SelfProof], - method( + async method( publicInput: Field, left: SelfProof, right: SelfProof