Skip to content

Commit

Permalink
docs(poseidon-proof): update readme usage section
Browse files Browse the repository at this point in the history
  • Loading branch information
cedoor committed Nov 23, 2023
1 parent 3b9e552 commit 9f83a37
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions packages/poseidon-proof/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_>
Expand Down

0 comments on commit 9f83a37

Please sign in to comment.