From 4c83c70eb478eceb1629adcf775accfefe3a9ee9 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 11 Mar 2025 13:25:14 -0700 Subject: [PATCH] Fix JSDoc and parameter typings. --- src/classes/gl.ts | 4 ++-- types.d.ts | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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 } -- 2.47.3