hd-wallet-wasm 2.0.21 → 2.0.26
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/LICENSE +190 -0
- package/README.md +104 -407
- package/dist/hd-wallet-wasi.wasm +0 -0
- package/dist/hd-wallet.js +1 -1
- package/dist/runtime/epm-attestation.d.ts +105 -0
- package/dist/{index.d.ts → runtime/index.d.ts} +204 -78
- package/{src → dist/runtime}/index.mjs +59 -2
- package/dist/runtime/sdn-plugin-manifest-codec.mjs +567 -0
- package/dist/runtime/sdn-typed.mjs +928 -0
- package/dist/wasm-loader.d.ts +76 -0
- package/package.json +18 -23
- package/dist/hd-wallet.wasm +0 -0
- package/src/index.d.ts +0 -1025
- /package/{src → dist/runtime}/aligned.d.ts +0 -0
- /package/{src → dist/runtime}/aligned.mjs +0 -0
- /package/{src → dist/runtime}/epm-attestation.mjs +0 -0
- /package/{src → dist/runtime}/generated/aligned/hd_wallet_aligned.mjs +0 -0
- /package/{src → dist/runtime}/generated/sdn_plugin_manifest.mjs +0 -0
- /package/{src → dist/runtime}/sdn-plugin-manifest-source.mjs +0 -0
- /package/{src → dist/runtime}/sdn-plugin.mjs +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export type EmscriptenValueType =
|
|
2
|
+
| 'array'
|
|
3
|
+
| 'boolean'
|
|
4
|
+
| 'number'
|
|
5
|
+
| 'string'
|
|
6
|
+
| null;
|
|
7
|
+
|
|
8
|
+
export type EmscriptenArgumentType = Exclude<EmscriptenValueType, null>;
|
|
9
|
+
|
|
10
|
+
export interface HDWalletWasmModuleOptions {
|
|
11
|
+
arguments?: string[];
|
|
12
|
+
thisProgram?: string;
|
|
13
|
+
noExitRuntime?: boolean;
|
|
14
|
+
noFSInit?: boolean;
|
|
15
|
+
preInit?: (() => void) | Array<() => void>;
|
|
16
|
+
preRun?: (() => void) | Array<() => void>;
|
|
17
|
+
postRun?: (() => void) | Array<() => void>;
|
|
18
|
+
print?: (message: string) => void;
|
|
19
|
+
printErr?: (message: string) => void;
|
|
20
|
+
setStatus?: (status: string) => void;
|
|
21
|
+
monitorRunDependencies?: (remaining: number) => void;
|
|
22
|
+
onAbort?: (reason: unknown) => void;
|
|
23
|
+
onRuntimeInitialized?: () => void;
|
|
24
|
+
locateFile?: (path: string, scriptDirectory: string) => string;
|
|
25
|
+
wasmBinary?: ArrayBuffer | Uint8Array;
|
|
26
|
+
instantiateWasm?: (
|
|
27
|
+
imports: WebAssembly.Imports,
|
|
28
|
+
receiveInstance: (
|
|
29
|
+
instance: WebAssembly.Instance,
|
|
30
|
+
module?: WebAssembly.Module,
|
|
31
|
+
) => void,
|
|
32
|
+
) => WebAssembly.Exports | Promise<WebAssembly.Exports>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface HDWalletWasmModule {
|
|
36
|
+
readonly HEAPU8: Uint8Array;
|
|
37
|
+
readonly HEAP32: Int32Array;
|
|
38
|
+
readonly calledRun: boolean;
|
|
39
|
+
_malloc(size: number): number;
|
|
40
|
+
_free(pointer: number): void;
|
|
41
|
+
ccall<Return = unknown>(
|
|
42
|
+
identifier: string,
|
|
43
|
+
returnType: EmscriptenValueType,
|
|
44
|
+
argumentTypes: EmscriptenArgumentType[] | undefined,
|
|
45
|
+
arguments_: unknown[] | undefined,
|
|
46
|
+
options: { async: true },
|
|
47
|
+
): Promise<Return>;
|
|
48
|
+
ccall<Return = unknown>(
|
|
49
|
+
identifier: string,
|
|
50
|
+
returnType: EmscriptenValueType,
|
|
51
|
+
argumentTypes?: EmscriptenArgumentType[],
|
|
52
|
+
arguments_?: unknown[],
|
|
53
|
+
options?: { async?: false },
|
|
54
|
+
): Return;
|
|
55
|
+
cwrap<Arguments extends unknown[] = unknown[], Return = unknown>(
|
|
56
|
+
identifier: string,
|
|
57
|
+
returnType: EmscriptenValueType,
|
|
58
|
+
argumentTypes: EmscriptenArgumentType[] | undefined,
|
|
59
|
+
options: { async: true },
|
|
60
|
+
): (...arguments_: Arguments) => Promise<Return>;
|
|
61
|
+
cwrap<Arguments extends unknown[] = unknown[], Return = unknown>(
|
|
62
|
+
identifier: string,
|
|
63
|
+
returnType: EmscriptenValueType,
|
|
64
|
+
argumentTypes?: EmscriptenArgumentType[],
|
|
65
|
+
options?: { async?: false },
|
|
66
|
+
): (...arguments_: Arguments) => Return;
|
|
67
|
+
getValue(pointer: number, type: string): number | bigint;
|
|
68
|
+
setValue(pointer: number, value: number | bigint, type: string): void;
|
|
69
|
+
UTF8ToString(pointer: number, maximumBytesToRead?: number): string;
|
|
70
|
+
stringToUTF8(value: string, outputPointer: number, maximumBytesToWrite: number): number;
|
|
71
|
+
lengthBytesUTF8(value: string): number;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export default function initializeHDWalletWasm(
|
|
75
|
+
options?: HDWalletWasmModuleOptions,
|
|
76
|
+
): Promise<HDWalletWasmModule>;
|
package/package.json
CHANGED
|
@@ -1,45 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hd-wallet-wasm",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.26",
|
|
4
4
|
"description": "Comprehensive HD Wallet implementation in WebAssembly - BIP-32/39/44, multi-curve, multi-chain support",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "
|
|
7
|
-
"module": "
|
|
8
|
-
"types": "
|
|
6
|
+
"main": "./dist/runtime/index.mjs",
|
|
7
|
+
"module": "./dist/runtime/index.mjs",
|
|
8
|
+
"types": "./dist/runtime/index.d.ts",
|
|
9
9
|
"sideEffects": false,
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"types": "./
|
|
13
|
-
"import": "./
|
|
12
|
+
"types": "./dist/runtime/index.d.ts",
|
|
13
|
+
"import": "./dist/runtime/index.mjs"
|
|
14
14
|
},
|
|
15
15
|
"./aligned": {
|
|
16
|
-
"types": "./
|
|
17
|
-
"import": "./
|
|
16
|
+
"types": "./dist/runtime/aligned.d.ts",
|
|
17
|
+
"import": "./dist/runtime/aligned.mjs"
|
|
18
18
|
},
|
|
19
19
|
"./attestation": {
|
|
20
|
-
"
|
|
20
|
+
"types": "./dist/runtime/epm-attestation.d.ts",
|
|
21
|
+
"import": "./dist/runtime/epm-attestation.mjs"
|
|
21
22
|
},
|
|
22
23
|
"./wasm": {
|
|
23
|
-
"types": "./dist/
|
|
24
|
+
"types": "./dist/wasm-loader.d.ts",
|
|
24
25
|
"import": "./dist/hd-wallet.js"
|
|
25
26
|
},
|
|
26
27
|
"./wasi.wasm": "./dist/hd-wallet-wasi.wasm",
|
|
27
28
|
"./dist/hd-wallet-wasi.wasm": "./dist/hd-wallet-wasi.wasm"
|
|
28
29
|
},
|
|
29
30
|
"files": [
|
|
30
|
-
"
|
|
31
|
-
"src/index.d.ts",
|
|
32
|
-
"src/sdn-plugin.mjs",
|
|
33
|
-
"src/sdn-plugin-manifest-source.mjs",
|
|
34
|
-
"src/epm-attestation.mjs",
|
|
35
|
-
"src/aligned.mjs",
|
|
36
|
-
"src/aligned.d.ts",
|
|
37
|
-
"src/generated/",
|
|
31
|
+
"dist/runtime/",
|
|
38
32
|
"dist/hd-wallet.js",
|
|
39
|
-
"dist/hd-wallet.wasm",
|
|
40
33
|
"dist/hd-wallet-wasi.wasm",
|
|
41
|
-
"dist/
|
|
42
|
-
"README.md"
|
|
34
|
+
"dist/wasm-loader.d.ts",
|
|
35
|
+
"README.md",
|
|
36
|
+
"LICENSE"
|
|
43
37
|
],
|
|
44
38
|
"scripts": {
|
|
45
39
|
"generate": "npm run generate:sdn-plugin",
|
|
@@ -93,9 +87,10 @@
|
|
|
93
87
|
"node": ">=18.0.0"
|
|
94
88
|
},
|
|
95
89
|
"dependencies": {
|
|
96
|
-
"flatbuffers": "
|
|
90
|
+
"flatbuffers": "25.9.23"
|
|
97
91
|
},
|
|
98
92
|
"devDependencies": {
|
|
99
93
|
"@types/node": "^20.0.0"
|
|
100
|
-
}
|
|
94
|
+
},
|
|
95
|
+
"gitHead": "428d8d54a2beac98d65ae33678b3adb972e35fd4"
|
|
101
96
|
}
|
package/dist/hd-wallet.wasm
DELETED
|
Binary file
|