]> zoso.dev Git - nano-pow.git/commitdiff
Fix JSDoc and parameter typings.
authorChris Duncan <chris@zoso.dev>
Tue, 11 Mar 2025 20:25:14 +0000 (13:25 -0700)
committerChris Duncan <chris@zoso.dev>
Tue, 11 Mar 2025 20:25:14 +0000 (13:25 -0700)
src/classes/gl.ts
types.d.ts

index 463f4c33150c4eafe14e8071fd994d52d544360c..21e53681264122676a66a917c6ba732d2c37a9d2 100644 (file)
@@ -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<string> {
                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<boolean> {
                if (this.#busy) {
index b105ee815cb27dc26721500e461a26532418f3cf..58394ea7173a592f6d1e8b73534462c45cc57eb2 100644 (file)
@@ -44,6 +44,7 @@ export type NanoPowOptions = {
 */
 export declare class NanoPowGl {
        #private
+       static get size (): number | undefined
        /** Compile */
        static init (): Promise<void>
        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<string>
        /**
@@ -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<boolean>
 }