From 2cfe7edb5922928fb2e7600b138475cce1d826fe Mon Sep 17 00:00:00 2001 From: sripwoud Date: Mon, 29 Apr 2024 11:35:14 +0200 Subject: [PATCH] fix(docs): fix MaybeGetSnarkArtifacts signature --- .../utils/src/snark-artifacts/snark-artifacts.browser.ts | 8 ++++---- packages/utils/src/types/index.ts | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/utils/src/snark-artifacts/snark-artifacts.browser.ts b/packages/utils/src/snark-artifacts/snark-artifacts.browser.ts index 66b858149..bb1faa452 100644 --- a/packages/utils/src/snark-artifacts/snark-artifacts.browser.ts +++ b/packages/utils/src/snark-artifacts/snark-artifacts.browser.ts @@ -1,15 +1,15 @@ import { GetSnarkArtifactUrls } from "./config" -import { Proof, SnarkArtifacts, Version } from "../types" +import { Artifact, Proof, Version } from "../types" -function MaybeGetSnarkArtifacts(proof: Proof.EDDSA, version?: Version): () => Promise +function MaybeGetSnarkArtifacts(proof: Proof.EDDSA, version?: Version): () => Promise> function MaybeGetSnarkArtifacts( proof: Proof.POSEIDON, version?: Version -): (numberOfInputs: number) => Promise +): (numberOfInputs: number) => Promise> function MaybeGetSnarkArtifacts( proof: Proof.SEMAPHORE, version?: Version -): (treeDepth: number) => Promise +): (treeDepth: number) => Promise> function MaybeGetSnarkArtifacts(proof: Proof, version?: Version) { switch (proof) { case Proof.POSEIDON: diff --git a/packages/utils/src/types/index.ts b/packages/utils/src/types/index.ts index d5cdd3034..dffdf2510 100644 --- a/packages/utils/src/types/index.ts +++ b/packages/utils/src/types/index.ts @@ -45,7 +45,10 @@ export enum Artifact { */ export type SnarkArtifacts = Record -type Digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" +/** + * @internal + */ +export type Digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" /** * Semantic version.