@tychosdk/disasm 0.1.7 → 0.2.1
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.
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
let wasm;
|
|
3
|
+
let cachedUint8ArrayMemory0 = null;
|
|
4
|
+
function getUint8ArrayMemory0() {
|
|
5
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
6
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
7
|
+
}
|
|
8
|
+
return cachedUint8ArrayMemory0;
|
|
9
|
+
}
|
|
10
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
11
|
+
ptr = ptr >>> 0;
|
|
12
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
13
|
+
}
|
|
3
14
|
function addToExternrefTable0(obj) {
|
|
4
15
|
const idx = wasm.__externref_table_alloc();
|
|
5
16
|
wasm.__wbindgen_export_2.set(idx, obj);
|
|
@@ -14,39 +25,35 @@ function handleError(f, args) {
|
|
|
14
25
|
wasm.__wbindgen_exn_store(idx);
|
|
15
26
|
}
|
|
16
27
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
29
|
+
cachedTextDecoder.decode();
|
|
30
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
31
|
+
let numBytesDecoded = 0;
|
|
32
|
+
function decodeText(ptr, len) {
|
|
33
|
+
numBytesDecoded += len;
|
|
34
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
35
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
36
|
+
cachedTextDecoder.decode();
|
|
37
|
+
numBytesDecoded = len;
|
|
26
38
|
}
|
|
27
|
-
return
|
|
39
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
28
40
|
}
|
|
29
41
|
function getStringFromWasm0(ptr, len) {
|
|
30
42
|
ptr = ptr >>> 0;
|
|
31
|
-
return
|
|
32
|
-
}
|
|
33
|
-
function isLikeNone(x) {
|
|
34
|
-
return x === undefined || x === null;
|
|
43
|
+
return decodeText(ptr, len);
|
|
35
44
|
}
|
|
36
45
|
let WASM_VECTOR_LEN = 0;
|
|
37
|
-
const cachedTextEncoder =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
|
41
|
-
}
|
|
42
|
-
: function (arg, view) {
|
|
46
|
+
const cachedTextEncoder = new TextEncoder();
|
|
47
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
48
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
43
49
|
const buf = cachedTextEncoder.encode(arg);
|
|
44
50
|
view.set(buf);
|
|
45
51
|
return {
|
|
46
52
|
read: arg.length,
|
|
47
53
|
written: buf.length
|
|
48
54
|
};
|
|
49
|
-
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
50
57
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
51
58
|
if (realloc === undefined) {
|
|
52
59
|
const buf = cachedTextEncoder.encode(arg);
|
|
@@ -71,7 +78,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
71
78
|
}
|
|
72
79
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
73
80
|
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
74
|
-
const ret =
|
|
81
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
75
82
|
offset += ret.written;
|
|
76
83
|
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
77
84
|
}
|
|
@@ -96,6 +103,7 @@ export function disasm_structured(code) {
|
|
|
96
103
|
}
|
|
97
104
|
return takeFromExternrefTable0(ret[0]);
|
|
98
105
|
}
|
|
106
|
+
const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
|
|
99
107
|
async function __wbg_load(module, imports) {
|
|
100
108
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
101
109
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
@@ -103,7 +111,8 @@ async function __wbg_load(module, imports) {
|
|
|
103
111
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
104
112
|
}
|
|
105
113
|
catch (e) {
|
|
106
|
-
|
|
114
|
+
const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
|
|
115
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
107
116
|
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
108
117
|
}
|
|
109
118
|
else {
|
|
@@ -127,95 +136,17 @@ async function __wbg_load(module, imports) {
|
|
|
127
136
|
function __wbg_get_imports() {
|
|
128
137
|
const imports = {};
|
|
129
138
|
imports.wbg = {};
|
|
130
|
-
imports.wbg.
|
|
131
|
-
const ret = arg0.buffer;
|
|
132
|
-
return ret;
|
|
133
|
-
};
|
|
134
|
-
imports.wbg.__wbg_call_672a4d21634d4a24 = function () {
|
|
135
|
-
return handleError(function (arg0, arg1) {
|
|
136
|
-
const ret = arg0.call(arg1);
|
|
137
|
-
return ret;
|
|
138
|
-
}, arguments);
|
|
139
|
-
};
|
|
140
|
-
imports.wbg.__wbg_call_7cccdd69e0791ae2 = function () {
|
|
141
|
-
return handleError(function (arg0, arg1, arg2) {
|
|
142
|
-
const ret = arg0.call(arg1, arg2);
|
|
143
|
-
return ret;
|
|
144
|
-
}, arguments);
|
|
145
|
-
};
|
|
146
|
-
imports.wbg.__wbg_crypto_ed58b8e10a292839 = function (arg0) {
|
|
147
|
-
const ret = arg0.crypto;
|
|
148
|
-
return ret;
|
|
149
|
-
};
|
|
150
|
-
imports.wbg.__wbg_getRandomValues_bcb4912f16000dc4 = function () {
|
|
151
|
-
return handleError(function (arg0, arg1) {
|
|
152
|
-
arg0.getRandomValues(arg1);
|
|
153
|
-
}, arguments);
|
|
154
|
-
};
|
|
155
|
-
imports.wbg.__wbg_msCrypto_0a36e2ec3a343d26 = function (arg0) {
|
|
156
|
-
const ret = arg0.msCrypto;
|
|
157
|
-
return ret;
|
|
158
|
-
};
|
|
159
|
-
imports.wbg.__wbg_new_a12002a7f91c75be = function (arg0) {
|
|
160
|
-
const ret = new Uint8Array(arg0);
|
|
161
|
-
return ret;
|
|
162
|
-
};
|
|
163
|
-
imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function (arg0, arg1) {
|
|
164
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
165
|
-
return ret;
|
|
166
|
-
};
|
|
167
|
-
imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function (arg0, arg1, arg2) {
|
|
168
|
-
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
169
|
-
return ret;
|
|
170
|
-
};
|
|
171
|
-
imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function (arg0) {
|
|
172
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
173
|
-
return ret;
|
|
174
|
-
};
|
|
175
|
-
imports.wbg.__wbg_node_02999533c4ea02e3 = function (arg0) {
|
|
176
|
-
const ret = arg0.node;
|
|
177
|
-
return ret;
|
|
178
|
-
};
|
|
179
|
-
imports.wbg.__wbg_process_5c1d670bc53614b8 = function (arg0) {
|
|
180
|
-
const ret = arg0.process;
|
|
181
|
-
return ret;
|
|
182
|
-
};
|
|
183
|
-
imports.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740 = function () {
|
|
139
|
+
imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function () {
|
|
184
140
|
return handleError(function (arg0, arg1) {
|
|
185
|
-
|
|
141
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
186
142
|
}, arguments);
|
|
187
143
|
};
|
|
188
|
-
imports.wbg.
|
|
189
|
-
|
|
190
|
-
const ret = module.require;
|
|
191
|
-
return ret;
|
|
192
|
-
}, arguments);
|
|
193
|
-
};
|
|
194
|
-
imports.wbg.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
195
|
-
arg0.set(arg1, arg2 >>> 0);
|
|
196
|
-
};
|
|
197
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function () {
|
|
198
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
199
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
200
|
-
};
|
|
201
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function () {
|
|
202
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
203
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
204
|
-
};
|
|
205
|
-
imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function () {
|
|
206
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
207
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
208
|
-
};
|
|
209
|
-
imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function () {
|
|
210
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
211
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
212
|
-
};
|
|
213
|
-
imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function (arg0, arg1, arg2) {
|
|
214
|
-
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
215
|
-
return ret;
|
|
144
|
+
imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function (arg0, arg1) {
|
|
145
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
216
146
|
};
|
|
217
|
-
imports.wbg.
|
|
218
|
-
|
|
147
|
+
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function (arg0, arg1) {
|
|
148
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
149
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
219
150
|
return ret;
|
|
220
151
|
};
|
|
221
152
|
imports.wbg.__wbindgen_init_externref_table = function () {
|
|
@@ -228,34 +159,6 @@ function __wbg_get_imports() {
|
|
|
228
159
|
table.set(offset + 3, false);
|
|
229
160
|
;
|
|
230
161
|
};
|
|
231
|
-
imports.wbg.__wbindgen_is_function = function (arg0) {
|
|
232
|
-
const ret = typeof (arg0) === 'function';
|
|
233
|
-
return ret;
|
|
234
|
-
};
|
|
235
|
-
imports.wbg.__wbindgen_is_object = function (arg0) {
|
|
236
|
-
const val = arg0;
|
|
237
|
-
const ret = typeof (val) === 'object' && val !== null;
|
|
238
|
-
return ret;
|
|
239
|
-
};
|
|
240
|
-
imports.wbg.__wbindgen_is_string = function (arg0) {
|
|
241
|
-
const ret = typeof (arg0) === 'string';
|
|
242
|
-
return ret;
|
|
243
|
-
};
|
|
244
|
-
imports.wbg.__wbindgen_is_undefined = function (arg0) {
|
|
245
|
-
const ret = arg0 === undefined;
|
|
246
|
-
return ret;
|
|
247
|
-
};
|
|
248
|
-
imports.wbg.__wbindgen_memory = function () {
|
|
249
|
-
const ret = wasm.memory;
|
|
250
|
-
return ret;
|
|
251
|
-
};
|
|
252
|
-
imports.wbg.__wbindgen_string_new = function (arg0, arg1) {
|
|
253
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
254
|
-
return ret;
|
|
255
|
-
};
|
|
256
|
-
imports.wbg.__wbindgen_throw = function (arg0, arg1) {
|
|
257
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
258
|
-
};
|
|
259
162
|
return imports;
|
|
260
163
|
}
|
|
261
164
|
function __wbg_init_memory(imports, memory) {
|
|
Binary file
|
|
@@ -1,32 +1,6 @@
|
|
|
1
1
|
export function disasm_structured(code: string): string;
|
|
2
|
-
export function
|
|
3
|
-
export function
|
|
4
|
-
export function
|
|
5
|
-
export function __wbg_crypto_ed58b8e10a292839(arg0: any): any;
|
|
6
|
-
export function __wbg_getRandomValues_bcb4912f16000dc4(...args: any[]): any;
|
|
7
|
-
export function __wbg_msCrypto_0a36e2ec3a343d26(arg0: any): any;
|
|
8
|
-
export function __wbg_new_a12002a7f91c75be(arg0: any): Uint8Array<any>;
|
|
9
|
-
export function __wbg_newnoargs_105ed471475aaf50(arg0: any, arg1: any): Function;
|
|
10
|
-
export function __wbg_newwithbyteoffsetandlength_d97e637ebe145a9a(arg0: any, arg1: any, arg2: any): Uint8Array<any>;
|
|
11
|
-
export function __wbg_newwithlength_a381634e90c276d4(arg0: any): Uint8Array<ArrayBuffer>;
|
|
12
|
-
export function __wbg_node_02999533c4ea02e3(arg0: any): any;
|
|
13
|
-
export function __wbg_process_5c1d670bc53614b8(arg0: any): any;
|
|
14
|
-
export function __wbg_randomFillSync_ab2cfe79ebbf2740(...args: any[]): any;
|
|
15
|
-
export function __wbg_require_79b1e9274cde3c87(...args: any[]): any;
|
|
16
|
-
export function __wbg_set_65595bdd868b3009(arg0: any, arg1: any, arg2: any): void;
|
|
17
|
-
export function __wbg_static_accessor_GLOBAL_88a902d13a557d07(): any;
|
|
18
|
-
export function __wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0(): any;
|
|
19
|
-
export function __wbg_static_accessor_SELF_37c5d418e4bf5819(): any;
|
|
20
|
-
export function __wbg_static_accessor_WINDOW_5de37043a91a9c40(): any;
|
|
21
|
-
export function __wbg_subarray_aa9065fa9dc5df96(arg0: any, arg1: any, arg2: any): any;
|
|
22
|
-
export function __wbg_versions_c71aa1626a93e0a1(arg0: any): any;
|
|
2
|
+
export function __wbg_getRandomValues_3c9c0d586e575a16(...args: any[]): any;
|
|
3
|
+
export function __wbg_wbindgenthrow_451ec1a8469d7eb6(arg0: any, arg1: any): never;
|
|
4
|
+
export function __wbindgen_cast_2241b6af4c4b2941(arg0: any, arg1: any): string;
|
|
23
5
|
export function __wbindgen_init_externref_table(): void;
|
|
24
|
-
export
|
|
25
|
-
export function __wbindgen_is_object(arg0: any): boolean;
|
|
26
|
-
export function __wbindgen_is_string(arg0: any): arg0 is string;
|
|
27
|
-
export function __wbindgen_is_undefined(arg0: any): boolean;
|
|
28
|
-
export function __wbindgen_memory(): any;
|
|
29
|
-
export function __wbindgen_string_new(arg0: any, arg1: any): string;
|
|
30
|
-
export function __wbindgen_throw(arg0: any, arg1: any): never;
|
|
31
|
-
export { wasm as __wasm };
|
|
32
|
-
declare let wasm: any;
|
|
6
|
+
export const __wasm: WebAssembly.Exports;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
let imports = {};
|
|
3
3
|
imports['wbg'] = module.exports;
|
|
4
|
-
let
|
|
5
|
-
|
|
4
|
+
let cachedUint8ArrayMemory0 = null;
|
|
5
|
+
function getUint8ArrayMemory0() {
|
|
6
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
7
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
8
|
+
}
|
|
9
|
+
return cachedUint8ArrayMemory0;
|
|
10
|
+
}
|
|
11
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
12
|
+
ptr = ptr >>> 0;
|
|
13
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
14
|
+
}
|
|
6
15
|
function addToExternrefTable0(obj) {
|
|
7
16
|
const idx = wasm.__externref_table_alloc();
|
|
8
17
|
wasm.__wbindgen_export_2.set(idx, obj);
|
|
@@ -19,34 +28,25 @@ function handleError(f, args) {
|
|
|
19
28
|
}
|
|
20
29
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
21
30
|
cachedTextDecoder.decode();
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
25
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
26
|
-
}
|
|
27
|
-
return cachedUint8ArrayMemory0;
|
|
31
|
+
function decodeText(ptr, len) {
|
|
32
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
28
33
|
}
|
|
29
34
|
function getStringFromWasm0(ptr, len) {
|
|
30
35
|
ptr = ptr >>> 0;
|
|
31
|
-
return
|
|
32
|
-
}
|
|
33
|
-
function isLikeNone(x) {
|
|
34
|
-
return x === undefined || x === null;
|
|
36
|
+
return decodeText(ptr, len);
|
|
35
37
|
}
|
|
36
38
|
let WASM_VECTOR_LEN = 0;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
|
41
|
-
}
|
|
42
|
-
: function (arg, view) {
|
|
39
|
+
const cachedTextEncoder = new TextEncoder();
|
|
40
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
41
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
43
42
|
const buf = cachedTextEncoder.encode(arg);
|
|
44
43
|
view.set(buf);
|
|
45
44
|
return {
|
|
46
45
|
read: arg.length,
|
|
47
46
|
written: buf.length
|
|
48
47
|
};
|
|
49
|
-
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
50
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
51
51
|
if (realloc === undefined) {
|
|
52
52
|
const buf = cachedTextEncoder.encode(arg);
|
|
@@ -71,7 +71,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
71
71
|
}
|
|
72
72
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
73
73
|
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
74
|
-
const ret =
|
|
74
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
75
75
|
offset += ret.written;
|
|
76
76
|
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
77
77
|
}
|
|
@@ -87,7 +87,7 @@ function takeFromExternrefTable0(idx) {
|
|
|
87
87
|
* @param {string} code
|
|
88
88
|
* @returns {string}
|
|
89
89
|
*/
|
|
90
|
-
|
|
90
|
+
exports.disasm_structured = function (code) {
|
|
91
91
|
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
92
92
|
const len0 = WASM_VECTOR_LEN;
|
|
93
93
|
const ret = wasm.disasm_structured(ptr0, len0);
|
|
@@ -96,98 +96,20 @@ module.exports.disasm_structured = function (code) {
|
|
|
96
96
|
}
|
|
97
97
|
return takeFromExternrefTable0(ret[0]);
|
|
98
98
|
};
|
|
99
|
-
|
|
100
|
-
const ret = arg0.buffer;
|
|
101
|
-
return ret;
|
|
102
|
-
};
|
|
103
|
-
module.exports.__wbg_call_672a4d21634d4a24 = function () {
|
|
104
|
-
return handleError(function (arg0, arg1) {
|
|
105
|
-
const ret = arg0.call(arg1);
|
|
106
|
-
return ret;
|
|
107
|
-
}, arguments);
|
|
108
|
-
};
|
|
109
|
-
module.exports.__wbg_call_7cccdd69e0791ae2 = function () {
|
|
110
|
-
return handleError(function (arg0, arg1, arg2) {
|
|
111
|
-
const ret = arg0.call(arg1, arg2);
|
|
112
|
-
return ret;
|
|
113
|
-
}, arguments);
|
|
114
|
-
};
|
|
115
|
-
module.exports.__wbg_crypto_ed58b8e10a292839 = function (arg0) {
|
|
116
|
-
const ret = arg0.crypto;
|
|
117
|
-
return ret;
|
|
118
|
-
};
|
|
119
|
-
module.exports.__wbg_getRandomValues_bcb4912f16000dc4 = function () {
|
|
99
|
+
exports.__wbg_getRandomValues_3c9c0d586e575a16 = function () {
|
|
120
100
|
return handleError(function (arg0, arg1) {
|
|
121
|
-
|
|
101
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
122
102
|
}, arguments);
|
|
123
103
|
};
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return ret;
|
|
127
|
-
};
|
|
128
|
-
module.exports.__wbg_new_a12002a7f91c75be = function (arg0) {
|
|
129
|
-
const ret = new Uint8Array(arg0);
|
|
130
|
-
return ret;
|
|
131
|
-
};
|
|
132
|
-
module.exports.__wbg_newnoargs_105ed471475aaf50 = function (arg0, arg1) {
|
|
133
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
134
|
-
return ret;
|
|
135
|
-
};
|
|
136
|
-
module.exports.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function (arg0, arg1, arg2) {
|
|
137
|
-
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
138
|
-
return ret;
|
|
139
|
-
};
|
|
140
|
-
module.exports.__wbg_newwithlength_a381634e90c276d4 = function (arg0) {
|
|
141
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
142
|
-
return ret;
|
|
143
|
-
};
|
|
144
|
-
module.exports.__wbg_node_02999533c4ea02e3 = function (arg0) {
|
|
145
|
-
const ret = arg0.node;
|
|
146
|
-
return ret;
|
|
147
|
-
};
|
|
148
|
-
module.exports.__wbg_process_5c1d670bc53614b8 = function (arg0) {
|
|
149
|
-
const ret = arg0.process;
|
|
150
|
-
return ret;
|
|
151
|
-
};
|
|
152
|
-
module.exports.__wbg_randomFillSync_ab2cfe79ebbf2740 = function () {
|
|
153
|
-
return handleError(function (arg0, arg1) {
|
|
154
|
-
arg0.randomFillSync(arg1);
|
|
155
|
-
}, arguments);
|
|
156
|
-
};
|
|
157
|
-
module.exports.__wbg_require_79b1e9274cde3c87 = function () {
|
|
158
|
-
return handleError(function () {
|
|
159
|
-
const ret = module.require;
|
|
160
|
-
return ret;
|
|
161
|
-
}, arguments);
|
|
162
|
-
};
|
|
163
|
-
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
164
|
-
arg0.set(arg1, arg2 >>> 0);
|
|
165
|
-
};
|
|
166
|
-
module.exports.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function () {
|
|
167
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
168
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
169
|
-
};
|
|
170
|
-
module.exports.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function () {
|
|
171
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
172
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
173
|
-
};
|
|
174
|
-
module.exports.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function () {
|
|
175
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
176
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
177
|
-
};
|
|
178
|
-
module.exports.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function () {
|
|
179
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
180
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
181
|
-
};
|
|
182
|
-
module.exports.__wbg_subarray_aa9065fa9dc5df96 = function (arg0, arg1, arg2) {
|
|
183
|
-
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
184
|
-
return ret;
|
|
104
|
+
exports.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function (arg0, arg1) {
|
|
105
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
185
106
|
};
|
|
186
|
-
|
|
187
|
-
|
|
107
|
+
exports.__wbindgen_cast_2241b6af4c4b2941 = function (arg0, arg1) {
|
|
108
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
109
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
188
110
|
return ret;
|
|
189
111
|
};
|
|
190
|
-
|
|
112
|
+
exports.__wbindgen_init_externref_table = function () {
|
|
191
113
|
const table = wasm.__wbindgen_export_2;
|
|
192
114
|
const offset = table.grow(4);
|
|
193
115
|
table.set(0, undefined);
|
|
@@ -197,38 +119,8 @@ module.exports.__wbindgen_init_externref_table = function () {
|
|
|
197
119
|
table.set(offset + 3, false);
|
|
198
120
|
;
|
|
199
121
|
};
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
module.exports.__wbindgen_is_object = function (arg0) {
|
|
205
|
-
const val = arg0;
|
|
206
|
-
const ret = typeof (val) === 'object' && val !== null;
|
|
207
|
-
return ret;
|
|
208
|
-
};
|
|
209
|
-
module.exports.__wbindgen_is_string = function (arg0) {
|
|
210
|
-
const ret = typeof (arg0) === 'string';
|
|
211
|
-
return ret;
|
|
212
|
-
};
|
|
213
|
-
module.exports.__wbindgen_is_undefined = function (arg0) {
|
|
214
|
-
const ret = arg0 === undefined;
|
|
215
|
-
return ret;
|
|
216
|
-
};
|
|
217
|
-
module.exports.__wbindgen_memory = function () {
|
|
218
|
-
const ret = wasm.memory;
|
|
219
|
-
return ret;
|
|
220
|
-
};
|
|
221
|
-
module.exports.__wbindgen_string_new = function (arg0, arg1) {
|
|
222
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
223
|
-
return ret;
|
|
224
|
-
};
|
|
225
|
-
module.exports.__wbindgen_throw = function (arg0, arg1) {
|
|
226
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
227
|
-
};
|
|
228
|
-
const path = require('path').join(__dirname, 'tycho_disasm_bg.wasm');
|
|
229
|
-
const bytes = require('fs').readFileSync(path);
|
|
230
|
-
const wasmModule = new WebAssembly.Module(bytes);
|
|
231
|
-
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
232
|
-
wasm = wasmInstance.exports;
|
|
233
|
-
module.exports.__wasm = wasm;
|
|
122
|
+
const wasmPath = `${__dirname}/tycho_disasm_bg.wasm`;
|
|
123
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
124
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
125
|
+
const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
|
|
234
126
|
wasm.__wbindgen_start();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tychosdk/disasm",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Tycho TVM disasm",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"browser": {
|
|
@@ -16,17 +16,18 @@
|
|
|
16
16
|
"url": "git+https://github.com/broxus/tycho-disasm.git"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@ton/core": "^0.
|
|
19
|
+
"@ton/core": "^0.61.0",
|
|
20
20
|
"@ton/crypto": "^3.3.0",
|
|
21
|
-
"@types/jest": "^
|
|
21
|
+
"@types/jest": "^30.0.0",
|
|
22
22
|
"@types/node": "^18.15.11",
|
|
23
|
-
"jest": "^
|
|
24
|
-
"ts-jest": "^29.
|
|
23
|
+
"jest": "^30.1.1",
|
|
24
|
+
"ts-jest": "^29.4.1",
|
|
25
25
|
"ts-node": "^10.9.2",
|
|
26
26
|
"typescript": "^5.8.3"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@ton/
|
|
29
|
+
"@ton/core": ">=0.61.0",
|
|
30
|
+
"@ton/crypto": ">=3.3.0"
|
|
30
31
|
},
|
|
31
32
|
"scripts": {
|
|
32
33
|
"wasm:build": "./scripts/build-wasm.sh",
|