diff --git a/yarn-project/acir-simulator/src/index.ts b/yarn-project/acir-simulator/src/index.ts index d51150943c6..e166c532bdd 100644 --- a/yarn-project/acir-simulator/src/index.ts +++ b/yarn-project/acir-simulator/src/index.ts @@ -1,4 +1,3 @@ export * from './client/index.js'; export * from './acvm/index.js'; export * from './public/index.js'; -export { computeSlotForMapping } from './utils.js'; diff --git a/yarn-project/circuits.js/src/barretenberg/crypto/pedersen/pedersen.ts b/yarn-project/circuits.js/src/barretenberg/crypto/pedersen/pedersen.ts index 7013aabc78c..0131c49c629 100644 --- a/yarn-project/circuits.js/src/barretenberg/crypto/pedersen/pedersen.ts +++ b/yarn-project/circuits.js/src/barretenberg/crypto/pedersen/pedersen.ts @@ -10,7 +10,7 @@ import { deserializeArrayFromVector, deserializeField, serializeBufferArrayToVec * @param lhs - The first hash. * @param rhs - The second hash. * @returns The new 32-byte hash. - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ export function pedersenCompress(wasm: IWasmModule, lhs: Uint8Array, rhs: Uint8Array): Buffer { // If not done already, precompute constants. @@ -30,7 +30,7 @@ export function pedersenCompress(wasm: IWasmModule, lhs: Uint8Array, rhs: Uint8A * @param lhs - The first hash. * @param rhs - The second hash. * @returns The new 32-byte hash. - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ export function pedersenHashInputs(wasm: IWasmModule, inputs: Buffer[]): Buffer { // If not done already, precompute constants. @@ -46,7 +46,7 @@ export function pedersenHashInputs(wasm: IWasmModule, inputs: Buffer[]): Buffer * @param wasm - The barretenberg module. * @param inputs - The array of buffers to compress. * @returns The resulting 32-byte hash. - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ export function pedersenCompressInputs(wasm: IWasmModule, inputs: Buffer[]): Buffer { // If not done already, precompute constants. @@ -62,7 +62,7 @@ export function pedersenCompressInputs(wasm: IWasmModule, inputs: Buffer[]): Buf * @param wasm - The barretenberg module. * @param inputs - The array of buffers to compress. * @returns The resulting 32-byte hash. - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ export function pedersenPlookupCommitInputs(wasm: IWasmModule, inputs: Buffer[]): Buffer { // If not done already, precompute constants. @@ -79,7 +79,7 @@ export function pedersenPlookupCommitInputs(wasm: IWasmModule, inputs: Buffer[]) * @param inputs - The array of buffers to compress. * @param hashIndex - Hash index of the generator to use (See GeneratorIndex enum). * @returns The resulting 32-byte hash. - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ export function pedersenPlookupCommitWithHashIndex(wasm: IWasmModule, inputs: Buffer[], hashIndex: number): Buffer { // If not done already, precompute constants. @@ -96,7 +96,7 @@ export function pedersenPlookupCommitWithHashIndex(wasm: IWasmModule, inputs: Bu * @param inputs - The array of buffers to compress. * @param hashIndex - Hash index of the generator to use (See GeneratorIndex enum). * @returns The resulting 32-byte hash. - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ export function pedersenCompressWithHashIndex(wasm: IWasmModule, inputs: Buffer[], hashIndex: number): Buffer { // If not done already, precompute constants. @@ -113,7 +113,7 @@ export function pedersenCompressWithHashIndex(wasm: IWasmModule, inputs: Buffer[ * @param inputs - The array of buffers to compress. * @param hashIndex - Hash index of the generator to use (See GeneratorIndex enum). * @returns The resulting 32-byte hash. - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ export function pedersenPlookupCompressWithHashIndex(wasm: IWasmModule, inputs: Buffer[], hashIndex: number): Buffer { // If not done already, precompute constants. @@ -129,7 +129,7 @@ export function pedersenPlookupCompressWithHashIndex(wasm: IWasmModule, inputs: * @param wasm - The barretenberg module. * @param data - The data buffer. * @returns The hash buffer. - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ export function pedersenGetHash(wasm: IWasmModule, data: Buffer): Buffer { // If not done already, precompute constants. @@ -152,7 +152,7 @@ export function pedersenGetHash(wasm: IWasmModule, data: Buffer): Buffer { * @param wasm - The barretenberg module. * @param values - The 32 byte pedersen leaves. * @returns A tree represented by an array. - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ export function pedersenGetHashTree(wasm: IWasmModule, values: Buffer[]) { // If not done already, precompute constants. diff --git a/yarn-project/merkle-tree/src/pedersen.ts b/yarn-project/merkle-tree/src/pedersen.ts index 1f26a812706..6132306178c 100644 --- a/yarn-project/merkle-tree/src/pedersen.ts +++ b/yarn-project/merkle-tree/src/pedersen.ts @@ -9,34 +9,34 @@ import { Hasher } from '@aztec/types'; /** * A helper class encapsulating Pedersen hash functionality. - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ export class Pedersen implements Hasher { constructor(private wasm: IWasmModule) {} /* - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ public compress(lhs: Uint8Array, rhs: Uint8Array): Buffer { return pedersenCompress(this.wasm, lhs, rhs); } /* - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ public compressInputs(inputs: Buffer[]): Buffer { return pedersenHashInputs(this.wasm, inputs); } /* - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ public hashToField(data: Uint8Array): Buffer { return pedersenGetHash(this.wasm, Buffer.from(data)); } /* - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ public hashToTree(leaves: Buffer[]): Promise { return Promise.resolve(pedersenGetHashTree(this.wasm, leaves)); diff --git a/yarn-project/merkle-tree/src/test/utils/pedersen_with_counter.ts b/yarn-project/merkle-tree/src/test/utils/pedersen_with_counter.ts index 79eaab79214..401cddbe474 100644 --- a/yarn-project/merkle-tree/src/test/utils/pedersen_with_counter.ts +++ b/yarn-project/merkle-tree/src/test/utils/pedersen_with_counter.ts @@ -2,7 +2,7 @@ import { Pedersen } from '../../index.js'; /** * A test utility allowing us to count the number of times the compress function has been called. - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ export class PedersenWithCounter extends Pedersen { /** @@ -15,7 +15,7 @@ export class PedersenWithCounter extends Pedersen { * @param lhs - The first hash. * @param rhs - The second hash. * @returns The new 32-byte hash. - * @deprecated Don't call pedersen directly. Create specific nicely-called WASM functions for your use-case. + * @deprecated Don't call pedersen directly in production code. Instead, create specific nicely-called WASM functions. */ public compress(lhs: Uint8Array, rhs: Uint8Array): Buffer { this.compressCounter++;