Skip to content

Commit

Permalink
chore: making docs build before cutting versions (#4568)
Browse files Browse the repository at this point in the history
# Description

Release was broken because the CI doesn't build docs before cutting new
versions. Instead of changing the CI I'm adding docs build to the `yarn
version` command.

I'm also adding the missing 0.25.0 docs (took a snapshot at tag 0.25.0)
  • Loading branch information
signorecello authored Mar 15, 2024
1 parent 4c3ac29 commit 414194c
Show file tree
Hide file tree
Showing 34 changed files with 1,011 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "yarn preprocess && yarn version::stables && docusaurus build",
"version::stables": "ts-node ./scripts/setStable.ts",
"serve": "serve build",
"version": "yarn preprocess && docusaurus docs:version"
"version": "yarn preprocess && docusaurus build && docusaurus docs:version"
},
"dependencies": {
"@docusaurus/core": "^3.0.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# BarretenbergBackend

## Implements

- [`Backend`](../interfaces/Backend.md)

## Constructors

### new BarretenbergBackend(acirCircuit, options)

```ts
new BarretenbergBackend(acirCircuit, options): BarretenbergBackend
```

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `acirCircuit` | [`CompiledCircuit`](../type-aliases/CompiledCircuit.md) |
| `options` | [`BackendOptions`](../type-aliases/BackendOptions.md) |

#### Returns

[`BarretenbergBackend`](BarretenbergBackend.md)

## Methods

### destroy()

```ts
destroy(): Promise<void>
```

#### Returns

`Promise`\<`void`\>

#### Implementation of

[`Backend`](../interfaces/Backend.md).[`destroy`](../interfaces/Backend.md#destroy)

#### Description

Destroys the backend

***

### generateProof()

```ts
generateProof(compressedWitness): Promise<ProofData>
```

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `compressedWitness` | `Uint8Array` |

#### Returns

`Promise`\<[`ProofData`](../type-aliases/ProofData.md)\>

#### Description

Generates a proof

***

### generateRecursiveProofArtifacts()

```ts
generateRecursiveProofArtifacts(proofData, numOfPublicInputs): Promise<object>
```

Generates artifacts that will be passed to a circuit that will verify this proof.

Instead of passing the proof and verification key as a byte array, we pass them
as fields which makes it cheaper to verify in a circuit.

The proof that is passed here will have been created using a circuit
that has the #[recursive] attribute on its `main` method.

The number of public inputs denotes how many public inputs are in the inner proof.

#### Parameters

| Parameter | Type | Default value |
| :------ | :------ | :------ |
| `proofData` | [`ProofData`](../type-aliases/ProofData.md) | `undefined` |
| `numOfPublicInputs` | `number` | `0` |

#### Returns

`Promise`\<`object`\>

#### Example

```typescript
const artifacts = await backend.generateRecursiveProofArtifacts(proof, numOfPublicInputs);
```

***

### verifyProof()

```ts
verifyProof(proofData): Promise<boolean>
```

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `proofData` | [`ProofData`](../type-aliases/ProofData.md) |

#### Returns

`Promise`\<`boolean`\>

#### Description

Verifies a proof

***

Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/)
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# backend_barretenberg

## Exports

### Classes

| Class | Description |
| :------ | :------ |
| [BarretenbergBackend](classes/BarretenbergBackend.md) | - |

### Interfaces

| Interface | Description |
| :------ | :------ |
| [Backend](interfaces/Backend.md) | - |

### Type Aliases

| Type alias | Description |
| :------ | :------ |
| [BackendOptions](type-aliases/BackendOptions.md) | - |
| [CompiledCircuit](type-aliases/CompiledCircuit.md) | - |
| [ProofData](type-aliases/ProofData.md) | - |

## Functions

### publicInputsToWitnessMap()

```ts
publicInputsToWitnessMap(publicInputs, abi): WitnessMap
```

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `publicInputs` | `string`[] |
| `abi` | `Abi` |

#### Returns

`WitnessMap`

***

Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/)
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Backend

## Methods

### destroy()

```ts
destroy(): Promise<void>
```

#### Returns

`Promise`\<`void`\>

#### Description

Destroys the backend

***

### generateFinalProof()

```ts
generateFinalProof(decompressedWitness): Promise<ProofData>
```

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `decompressedWitness` | `Uint8Array` |

#### Returns

`Promise`\<[`ProofData`](../type-aliases/ProofData.md)\>

#### Description

Generates a final proof (not meant to be verified in another circuit)

***

### generateIntermediateProof()

```ts
generateIntermediateProof(decompressedWitness): Promise<ProofData>
```

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `decompressedWitness` | `Uint8Array` |

#### Returns

`Promise`\<[`ProofData`](../type-aliases/ProofData.md)\>

#### Description

Generates an intermediate proof (meant to be verified in another circuit)

***

### generateIntermediateProofArtifacts()

```ts
generateIntermediateProofArtifacts(proofData, numOfPublicInputs): Promise<object>
```

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `proofData` | [`ProofData`](../type-aliases/ProofData.md) |
| `numOfPublicInputs` | `number` |

#### Returns

`Promise`\<`object`\>

#### Description

Retrieves the artifacts from a proof in the Field format

***

### verifyFinalProof()

```ts
verifyFinalProof(proofData): Promise<boolean>
```

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `proofData` | [`ProofData`](../type-aliases/ProofData.md) |

#### Returns

`Promise`\<`boolean`\>

#### Description

Verifies a final proof

***

### verifyIntermediateProof()

```ts
verifyIntermediateProof(proofData): Promise<boolean>
```

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `proofData` | [`ProofData`](../type-aliases/ProofData.md) |

#### Returns

`Promise`\<`boolean`\>

#### Description

Verifies an intermediate proof

***

Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/)
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# BackendOptions

```ts
type BackendOptions: object;
```

## Description

An options object, currently only used to specify the number of threads to use.

## Type declaration

| Member | Type | Description |
| :------ | :------ | :------ |
| `memory` | `object` | - |
| `memory.maximum` | `number` | - |
| `threads` | `number` | **Description**<br /><br />Number of threads |

***

Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# CompiledCircuit

```ts
type CompiledCircuit: object;
```

## Description

The representation of a compiled circuit

## Type declaration

| Member | Type | Description |
| :------ | :------ | :------ |
| `abi` | `Abi` | **Description**<br /><br />ABI representation of the circuit |
| `bytecode` | `string` | **Description**<br /><br />The bytecode of the circuit |

***

Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# ProofData

```ts
type ProofData: object;
```

## Description

The representation of a proof

## Type declaration

| Member | Type | Description |
| :------ | :------ | :------ |
| `proof` | `Uint8Array` | **Description**<br /><br />An byte array representing the proof |
| `publicInputs` | `string`[] | **Description**<br /><br />Public inputs of a proof |

***

Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// @ts-check
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const typedocSidebar = { items: [{"type":"category","label":"Classes","items":[{"type":"doc","id":"reference/NoirJS/backend_barretenberg/classes/BarretenbergBackend","label":"BarretenbergBackend"}]},{"type":"category","label":"Interfaces","items":[{"type":"doc","id":"reference/NoirJS/backend_barretenberg/interfaces/Backend","label":"Backend"}]},{"type":"category","label":"Type Aliases","items":[{"type":"doc","id":"reference/NoirJS/backend_barretenberg/type-aliases/BackendOptions","label":"BackendOptions"},{"type":"doc","id":"reference/NoirJS/backend_barretenberg/type-aliases/CompiledCircuit","label":"CompiledCircuit"},{"type":"doc","id":"reference/NoirJS/backend_barretenberg/type-aliases/ProofData","label":"ProofData"}]}]};
module.exports = typedocSidebar.items;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
Loading

0 comments on commit 414194c

Please sign in to comment.