Skip to content

Commit

Permalink
chore: update docs with function names to match version 0.25.0 specif…
Browse files Browse the repository at this point in the history
…ications (#4466)

# Description

## Problem

Other how-to guides not mentioned in #4410 need to be updated to the
v0.24.0 function naming.

## Summary

This pull request updates the documentation to match the function naming
conventions introduced in version 0.24.0. Specifically, it changes
references from `generateFinalProof` and `verifyFinalProof` to
`generateProof` and `verifyProof` respectively.

## Additional Context

The changes were made across multiple documentation files, including
tutorials and how-to guides.

## Documentation

- [x] Documentation included in this PR.

# PR Checklist

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.

---------

Co-authored-by: josh crites <jc@joshcrites.com>
  • Loading branch information
CodeDragonVN and critesjosh authored Mar 21, 2024
1 parent ff95fd9 commit 6271b8b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/docs/how_to/how-to-oracles.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ For example, if your Noir program expects the host machine to provide CPU pseudo
```js
const foreignCallHandler = (name, inputs) => crypto.randomBytes(16) // etc

await noir.generateFinalProof(inputs, foreignCallHandler)
await noir.generateProof(inputs, foreignCallHandler)
```

As one can see, in NoirJS, the [`foreignCallHandler`](../reference/NoirJS/noir_js/type-aliases/ForeignCallHandler.md) function simply means "a callback function that returns a value of type [`ForeignCallOutput`](../reference/NoirJS/noir_js/type-aliases/ForeignCallOutput.md). It doesn't have to be an RPC call like in the case for Nargo.
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/tutorials/noirjs_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ Now we're ready to prove stuff! Let's feed some inputs to our circuit and calcul
await setup(); // let's squeeze our wasm inits here

display('logs', 'Generating proof... ⌛');
const proof = await noir.generateFinalProof(input);
const proof = await noir.generateProof(input);
display('logs', 'Generating proof... ✅');
display('results', proof.proof);
```
Expand All @@ -264,7 +264,7 @@ Time to celebrate, yes! But we shouldn't trust machines so blindly. Let's add th
```js
display('logs', 'Verifying proof... ⌛');
const verification = await noir.verifyFinalProof(proof);
const verification = await noir.verifyProof(proof);
if (verification) display('logs', 'Verifying proof... ✅');
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ For example, if your Noir program expects the host machine to provide CPU pseudo
```js
const foreignCallHandler = (name, inputs) => crypto.randomBytes(16) // etc

await noir.generateFinalProof(inputs, foreignCallHandler)
await noir.generateProof(inputs, foreignCallHandler)
```

As one can see, in NoirJS, the [`foreignCallHandler`](../reference/NoirJS/noir_js/type-aliases/ForeignCallHandler.md) function simply means "a callback function that returns a value of type [`ForeignCallOutput`](../reference/NoirJS/noir_js/type-aliases/ForeignCallOutput.md). It doesn't have to be an RPC call like in the case for Nargo.
Expand Down
4 changes: 2 additions & 2 deletions docs/versioned_docs/version-v0.24.0/tutorials/noirjs_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ Now we're ready to prove stuff! Let's feed some inputs to our circuit and calcul
await setup(); // let's squeeze our wasm inits here

display('logs', 'Generating proof... ⌛');
const proof = await noir.generateFinalProof(input);
const proof = await noir.generateProof(input);
display('logs', 'Generating proof... ✅');
display('results', proof.proof);
```
Expand All @@ -264,7 +264,7 @@ Time to celebrate, yes! But we shouldn't trust machines so blindly. Let's add th
```js
display('logs', 'Verifying proof... ⌛');
const verification = await noir.verifyFinalProof(proof);
const verification = await noir.verifyProof(proof);
if (verification) display('logs', 'Verifying proof... ✅');
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ For example, if your Noir program expects the host machine to provide CPU pseudo
```js
const foreignCallHandler = (name, inputs) => crypto.randomBytes(16) // etc

await noir.generateFinalProof(inputs, foreignCallHandler)
await noir.generateProof(inputs, foreignCallHandler)
```

As one can see, in NoirJS, the [`foreignCallHandler`](../reference/NoirJS/noir_js/type-aliases/ForeignCallHandler.md) function simply means "a callback function that returns a value of type [`ForeignCallOutput`](../reference/NoirJS/noir_js/type-aliases/ForeignCallOutput.md). It doesn't have to be an RPC call like in the case for Nargo.
Expand Down
4 changes: 2 additions & 2 deletions docs/versioned_docs/version-v0.25.0/tutorials/noirjs_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ Now we're ready to prove stuff! Let's feed some inputs to our circuit and calcul
await setup(); // let's squeeze our wasm inits here

display('logs', 'Generating proof... ⌛');
const proof = await noir.generateFinalProof(input);
const proof = await noir.generateProof(input);
display('logs', 'Generating proof... ✅');
display('results', proof.proof);
```
Expand All @@ -264,7 +264,7 @@ Time to celebrate, yes! But we shouldn't trust machines so blindly. Let's add th
```js
display('logs', 'Verifying proof... ⌛');
const verification = await noir.verifyFinalProof(proof);
const verification = await noir.verifyProof(proof);
if (verification) display('logs', 'Verifying proof... ✅');
```
Expand Down

0 comments on commit 6271b8b

Please sign in to comment.