Skip to content

Commit

Permalink
fix(docs): fix MaybeGetSnarkArtifacts signature
Browse files Browse the repository at this point in the history
  • Loading branch information
sripwoud committed Apr 29, 2024
1 parent 7039eb3 commit 2cfe7ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/utils/src/snark-artifacts/snark-artifacts.browser.ts
Original file line number Diff line number Diff line change
@@ -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<SnarkArtifacts>
function MaybeGetSnarkArtifacts(proof: Proof.EDDSA, version?: Version): () => Promise<Record<Artifact,string[]>>
function MaybeGetSnarkArtifacts(
proof: Proof.POSEIDON,
version?: Version
): (numberOfInputs: number) => Promise<SnarkArtifacts>
): (numberOfInputs: number) => Promise<Record<Artifact,string[]>>
function MaybeGetSnarkArtifacts(
proof: Proof.SEMAPHORE,
version?: Version
): (treeDepth: number) => Promise<SnarkArtifacts>
): (treeDepth: number) => Promise<Record<Artifact,string[]>>
function MaybeGetSnarkArtifacts(proof: Proof, version?: Version) {
switch (proof) {
case Proof.POSEIDON:
Expand Down
5 changes: 4 additions & 1 deletion packages/utils/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ export enum Artifact {
*/
export type SnarkArtifacts = Record<Artifact, string>

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.
Expand Down

0 comments on commit 2cfe7ed

Please sign in to comment.