Skip to content

Commit

Permalink
Merge pull request #260 from privacy-scaling-explorations/sripwoud/docs
Browse files Browse the repository at this point in the history
docs: fix `typedoc` compilation warnings
  • Loading branch information
cedoor authored Apr 23, 2024
2 parents d70e7c8 + 5d5b32e commit 292c38d
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/eddsa-poseidon/src/eddsa-poseidon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export function packSignature(signature: Signature): Buffer {
}

/**
* Unpacks a signature produced by {@link #packSignature}. See that function
* Unpacks a signature produced by {@link packSignature}. See that function
* for the details of the format.
*
* @param packedSignature the 64 byte buffer to unpack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function LazyTowerHashChainProofBuilder(H: number, W: number, hash = defa
}
/**
* Builds a proof of membership.
* @param index Index of the proof's item.
* @param idx Index of the proof's item.
* @returns Proof object.
*/
function build(idx: number): LazyTowerHashChainProof {
Expand Down
3 changes: 2 additions & 1 deletion packages/poseidon-proof/src/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import verificationKeys from "./verification-keys.json"

/**
* Verifies that a Poseidon proof is valid.
* @param poseidonProof The Poseidon zero-knowledge proof.
* @param numberOfInputs The number of inputs supported by the Poseidon hash function.
* @param proof PoseidonProof
* @returns True if the proof is valid, false otherwise.
*/
export default function verify(numberOfInputs: number, { scope, digest, proof }: PoseidonProof): Promise<boolean> {
Expand Down
1 change: 0 additions & 1 deletion packages/smt/src/smt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ export default class SMT {
* @param node The node to start from.
* @param path The path of the key.
* @param siblings The siblings of the path.
* @param i The index to start from.
*/
private deleteOldNodes(node: Node, path: number[], siblings: Siblings) {
for (let i = siblings.length - 1; i >= 0; i -= 1) {
Expand Down
6 changes: 3 additions & 3 deletions packages/utils/src/type-checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import { Buffer } from "buffer"

// The list of types supported by this utility functions.
const supportedTypes = [
/** @internal */
export const supportedTypes = [
"number",
"string",
"function",
Expand All @@ -25,7 +25,6 @@ const supportedTypes = [
"bignumberish"
] as const

// Type extracted from the list above.
export type SupportedType = (typeof supportedTypes)[number]

/**
Expand Down Expand Up @@ -173,6 +172,7 @@ export function isBigNumberish(value: any): boolean {
/**
* Returns true if the value type is the same as the type passed
* as the second parameter, false otherwise.
* @param value
* @param type The expected type.
*/
export function isType(value: any, type: SupportedType): boolean {
Expand Down
16 changes: 16 additions & 0 deletions typedoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const fs = require("fs")
const path = require("path")

const EXCLUDE_PKGS = ["circuits", "lazytower.circom", "lazytower.sol", "imt.sol", "rollup-plugin-rust"]
const packagesDir = path.join(__dirname, "packages")
const entryPoints = fs
.readdirSync(packagesDir, { withFileTypes: true })
.filter((dirent) => dirent.isDirectory() && !EXCLUDE_PKGS.includes(dirent.name))
.map((dirent) => path.join("packages", dirent.name))

/** @type {import('typedoc').typedocoptions} */
module.exports = {
entryPoints,
name: "zk-kit",
entryPointStrategy: "packages"
}
6 changes: 0 additions & 6 deletions typedoc.json

This file was deleted.

0 comments on commit 292c38d

Please sign in to comment.