nano-pow 5.1.3 → 5.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types.d.ts +2 -16
- package/package.json +7 -12
package/dist/types.d.ts
CHANGED
|
@@ -7,20 +7,6 @@ declare global {
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export declare const ApiSupported: {
|
|
11
|
-
cpu: boolean
|
|
12
|
-
wasm: {
|
|
13
|
-
isSupported: boolean
|
|
14
|
-
}
|
|
15
|
-
webgl: {
|
|
16
|
-
isSupported: boolean
|
|
17
|
-
}
|
|
18
|
-
webgpu: {
|
|
19
|
-
isSupported: boolean
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
export type ApiSupportedTypes = keyof typeof ApiSupported
|
|
23
|
-
|
|
24
10
|
export declare class NanoPow {
|
|
25
11
|
/**
|
|
26
12
|
* Finds a nonce that satisfies the Nano proof-of-work requirements.
|
|
@@ -32,7 +18,7 @@ export declare class NanoPow {
|
|
|
32
18
|
* @param {number} [options.effort=0x4] - GPU load when generating work. Larger values are not necessarily better since they can quickly overwhelm the GPU. Default: 0x4
|
|
33
19
|
* @param {bigint} [options.difficulty=0xfffffff800000000] - Minimum value result of `BLAKE2b(nonce||blockhash)`. Default: 0xFFFFFFF800000000
|
|
34
20
|
*/
|
|
35
|
-
static work_generate (hash: bigint | string, options
|
|
21
|
+
static work_generate (hash: bigint | string, options?: NanoPowOptions): Promise<WorkGenerateResponse | WorkErrorResponse>
|
|
36
22
|
/**
|
|
37
23
|
* Validates that a nonce satisfies Nano proof-of-work requirements.
|
|
38
24
|
*
|
|
@@ -42,7 +28,7 @@ export declare class NanoPow {
|
|
|
42
28
|
* @param {boolean} [options.debug=false] - Enables additional debug logging to the console. Default: false
|
|
43
29
|
* @param {bigint} [options.difficulty=0xfffffff800000000] - Minimum value result of `BLAKE2b(nonce||blockhash)`. Default: 0xFFFFFFF800000000
|
|
44
30
|
*/
|
|
45
|
-
static work_validate (work: bigint | string, hash: bigint | string, options
|
|
31
|
+
static work_validate (work: bigint | string, hash: bigint | string, options?: NanoPowOptions): Promise<WorkValidateResponse | WorkErrorResponse>
|
|
46
32
|
}
|
|
47
33
|
export { NanoPow as default }
|
|
48
34
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nano-pow",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.5",
|
|
4
4
|
"description": "Proof-of-work generation and validation with WebGPU/WebGL/WASM for Nano cryptocurrency.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nemo",
|
|
@@ -33,11 +33,6 @@
|
|
|
33
33
|
"package.json.license"
|
|
34
34
|
],
|
|
35
35
|
"main": "./dist/main.min.js",
|
|
36
|
-
"browser": {
|
|
37
|
-
"./dist/main.min.js": true,
|
|
38
|
-
"node:fs/promises": false,
|
|
39
|
-
"node:worker_threads": false
|
|
40
|
-
},
|
|
41
36
|
"bin": {
|
|
42
37
|
"nano-pow": "dist/bin/nano-pow.sh"
|
|
43
38
|
},
|
|
@@ -57,15 +52,15 @@
|
|
|
57
52
|
"test": "npm run build:dev && ./test/script.sh"
|
|
58
53
|
},
|
|
59
54
|
"devDependencies": {
|
|
60
|
-
"@types/node": "^24.0
|
|
61
|
-
"@webgpu/types": "^0.1.
|
|
62
|
-
"assemblyscript": "^0.28.
|
|
63
|
-
"esbuild": "^0.25.
|
|
55
|
+
"@types/node": "^24.3.0",
|
|
56
|
+
"@webgpu/types": "^0.1.64",
|
|
57
|
+
"assemblyscript": "^0.28.4",
|
|
58
|
+
"esbuild": "^0.25.9",
|
|
64
59
|
"esbuild-plugin-glsl": "^1.4.0",
|
|
65
|
-
"typescript": "^5.
|
|
60
|
+
"typescript": "^5.9.2"
|
|
66
61
|
},
|
|
67
62
|
"optionalDependencies": {
|
|
68
|
-
"puppeteer": "^24.
|
|
63
|
+
"puppeteer": "^24.16.2"
|
|
69
64
|
},
|
|
70
65
|
"type": "module",
|
|
71
66
|
"exports": {
|