Skip to content

Commit

Permalink
chore(docs): adding doc
Browse files Browse the repository at this point in the history
  • Loading branch information
signorecello committed Oct 28, 2023
1 parent b1898e1 commit 71e0564
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/docs/noir_js/reference/01_noirjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,20 @@ await noirInstance.init();

This async method allows to execute a circuit to get its witness and return value. [`generateFinalProof`](#generatefinalproof) calls it for you, but you can call it directly (i.e. to feed directly to a backend, or to get the return value).

You can optionally provide a foreignCallHandler, to handle functions that should run outside of the prover (i.e. println)

Check warning on line 61 in docs/docs/noir_js/reference/01_noirjs.md

View workflow job for this annotation

GitHub Actions / Spellcheck / Spellcheck

Unknown word (println)

### Syntax

```js
async execute(inputs)
async execute(inputs, foreignCallHandler)
```

### Parameters

| Parameter | Type | Description |
| --------- | ------ | ------------------------------------------------ |
| `inputs` | Object | An object containing the inputs to your circuit. |
| `foreignCallHandler` (optional) | Function | A function handling the foreign call from your circuit |

### Returns

Expand All @@ -81,6 +84,7 @@ async execute(inputs)

```js
const { witness, returnValue } = await noir.execute(inputs)
const { witness, returnValue } = await noir.execute(inputs, (event) => console.log(event))
```

## `generateFinalProof`
Expand Down

0 comments on commit 71e0564

Please sign in to comment.