From 9f83a373c90c2d3be56eb1edaafdb460fc4651c2 Mon Sep 17 00:00:00 2001 From: cedoor Date: Thu, 23 Nov 2023 12:50:19 +0000 Subject: [PATCH] docs(poseidon-proof): update readme usage section --- packages/poseidon-proof/README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/poseidon-proof/README.md b/packages/poseidon-proof/README.md index f2688e9ec..d5ed4c6f8 100644 --- a/packages/poseidon-proof/README.md +++ b/packages/poseidon-proof/README.md @@ -60,24 +60,25 @@ yarn add @zk-kit/poseidon-proof ## 📜 Usage \# **generate**( -message: _NumericString_, -scope: _NumericString_, +message: _BigNumberish_, +scope: _BigNumberish_, snarkArtifacts?: _SnarkArtifacts_ ): Promise\<_PoseidonProof_> ```typescript import { generate } from "@zk-kit/poseidon-proof" -const scope = "1" -const message = "2" +const scope = 1 +const message = 2 +const fullProof = await generate(message, scope) + +// If not specified, the Snark artifacts are download automatically. +// You can also specify them. const fullProof = await generate(message, scope, { zkeyFilePath: "./poseidon-proof.zkey", wasmFilePath: "./poseidon-proof.wasm" }) - -// You can also use the default zkey/wasm files (it only works from browsers!). -// const fullProof = await generate(message, scope) ``` \# **verify**(poseidonProof: _PoseidonProof_): Promise\<_boolean_>