From: Chris Duncan Date: Tue, 11 Mar 2025 20:25:14 +0000 (-0700) Subject: Fix JSDoc and parameter typings. X-Git-Tag: v3.1.0~9^2~17 X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=4c83c70eb478eceb1629adcf775accfefe3a9ee9;p=nano-pow.git Fix JSDoc and parameter typings. --- diff --git a/src/classes/gl.ts b/src/classes/gl.ts index 463f4c3..21e5368 100644 --- a/src/classes/gl.ts +++ b/src/classes/gl.ts @@ -330,7 +330,7 @@ export class NanoPowGl { * Finds a nonce that satisfies the Nano proof-of-work requirements. * * @param {string} hash - Hexadecimal hash of previous block, or public key for new accounts - * @param {number} [threshold=0xfffffff8] - Difficulty of proof-of-work calculation + * @param {NanoPowOptions} options - Options used to configure search execution */ static async search (hash: string, options?: NanoPowOptions): Promise { if (this.#busy) { @@ -412,7 +412,7 @@ export class NanoPowGl { * * @param {string} work - Hexadecimal proof-of-work value to validate * @param {string} hash - Hexadecimal hash of previous block, or public key for new accounts - * @param {number} [threshold=0xfffffff8] - Difficulty of proof-of-work calculation + * @param {NanoPowOptions} options - Options used to configure search execution */ static async validate (work: string, hash: string, options?: NanoPowOptions): Promise { if (this.#busy) { diff --git a/types.d.ts b/types.d.ts index b105ee8..58394ea 100644 --- a/types.d.ts +++ b/types.d.ts @@ -44,6 +44,7 @@ export type NanoPowOptions = { */ export declare class NanoPowGl { #private + static get size (): number | undefined /** Compile */ static init (): Promise static reset (): void @@ -51,7 +52,7 @@ export declare class NanoPowGl { * Finds a nonce that satisfies the Nano proof-of-work requirements. * * @param {string} hash - Hexadecimal hash of previous block, or public key for new accounts - * @param {number} [threshold=0xfffffff8] - Difficulty of proof-of-work calculation + * @param {NanoPowOptions} options - Options used to configure search execution */ static search (hash: string, options?: NanoPowOptions): Promise /** @@ -59,7 +60,7 @@ export declare class NanoPowGl { * * @param {string} work - Hexadecimal proof-of-work value to validate * @param {string} hash - Hexadecimal hash of previous block, or public key for new accounts - * @param {number} [threshold=0xfffffff8] - Difficulty of proof-of-work calculation + * @param {NanoPowOptions} options - Options used to configure search execution */ static validate (work: string, hash: string, options?: NanoPowOptions): Promise }