@tychosdk/disasm 0.1.6 → 0.2.0

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);
@@ -19,20 +30,10 @@ if (typeof TextDecoder !== 'undefined') {
19
30
  cachedTextDecoder.decode();
20
31
  }
21
32
  ;
22
- let cachedUint8ArrayMemory0 = null;
23
- function getUint8ArrayMemory0() {
24
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
25
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
26
- }
27
- return cachedUint8ArrayMemory0;
28
- }
29
33
  function getStringFromWasm0(ptr, len) {
30
34
  ptr = ptr >>> 0;
31
35
  return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
32
36
  }
33
- function isLikeNone(x) {
34
- return x === undefined || x === null;
35
- }
36
37
  let WASM_VECTOR_LEN = 0;
37
38
  const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available'); } });
38
39
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
@@ -127,97 +128,11 @@ async function __wbg_load(module, imports) {
127
128
  function __wbg_get_imports() {
128
129
  const imports = {};
129
130
  imports.wbg = {};
130
- imports.wbg.__wbg_buffer_609cc3eee51ed158 = function (arg0) {
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 () {
131
+ imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function () {
184
132
  return handleError(function (arg0, arg1) {
185
- arg0.randomFillSync(arg1);
186
- }, arguments);
187
- };
188
- imports.wbg.__wbg_require_79b1e9274cde3c87 = function () {
189
- return handleError(function () {
190
- const ret = module.require;
191
- return ret;
133
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
192
134
  }, arguments);
193
135
  };
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;
216
- };
217
- imports.wbg.__wbg_versions_c71aa1626a93e0a1 = function (arg0) {
218
- const ret = arg0.versions;
219
- return ret;
220
- };
221
136
  imports.wbg.__wbindgen_init_externref_table = function () {
222
137
  const table = wasm.__wbindgen_export_2;
223
138
  const offset = table.grow(4);
@@ -228,27 +143,6 @@ function __wbg_get_imports() {
228
143
  table.set(offset + 3, false);
229
144
  ;
230
145
  };
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
146
  imports.wbg.__wbindgen_string_new = function (arg0, arg1) {
253
147
  const ret = getStringFromWasm0(arg0, arg1);
254
148
  return ret;
Binary file
@@ -1,31 +1,6 @@
1
1
  export function disasm_structured(code: string): string;
2
- export function __wbg_buffer_609cc3eee51ed158(arg0: any): any;
3
- export function __wbg_call_672a4d21634d4a24(...args: any[]): any;
4
- export function __wbg_call_7cccdd69e0791ae2(...args: any[]): any;
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;
23
3
  export function __wbindgen_init_externref_table(): void;
24
- export function __wbindgen_is_function(arg0: any): boolean;
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
4
  export function __wbindgen_string_new(arg0: any, arg1: any): string;
30
5
  export function __wbindgen_throw(arg0: any, arg1: any): never;
31
6
  export { wasm as __wasm };
@@ -3,6 +3,17 @@ let imports = {};
3
3
  imports['wbg'] = module.exports;
4
4
  let wasm;
5
5
  const { TextDecoder, TextEncoder } = require(`util`);
6
+ let cachedUint8ArrayMemory0 = null;
7
+ function getUint8ArrayMemory0() {
8
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
9
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
10
+ }
11
+ return cachedUint8ArrayMemory0;
12
+ }
13
+ function getArrayU8FromWasm0(ptr, len) {
14
+ ptr = ptr >>> 0;
15
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
16
+ }
6
17
  function addToExternrefTable0(obj) {
7
18
  const idx = wasm.__externref_table_alloc();
8
19
  wasm.__wbindgen_export_2.set(idx, obj);
@@ -19,20 +30,10 @@ function handleError(f, args) {
19
30
  }
20
31
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
21
32
  cachedTextDecoder.decode();
22
- let cachedUint8ArrayMemory0 = null;
23
- function getUint8ArrayMemory0() {
24
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
25
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
26
- }
27
- return cachedUint8ArrayMemory0;
28
- }
29
33
  function getStringFromWasm0(ptr, len) {
30
34
  ptr = ptr >>> 0;
31
35
  return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
32
36
  }
33
- function isLikeNone(x) {
34
- return x === undefined || x === null;
35
- }
36
37
  let WASM_VECTOR_LEN = 0;
37
38
  let cachedTextEncoder = new TextEncoder('utf-8');
38
39
  const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
@@ -96,97 +97,11 @@ module.exports.disasm_structured = function (code) {
96
97
  }
97
98
  return takeFromExternrefTable0(ret[0]);
98
99
  };
99
- module.exports.__wbg_buffer_609cc3eee51ed158 = function (arg0) {
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 () {
120
- return handleError(function (arg0, arg1) {
121
- arg0.getRandomValues(arg1);
122
- }, arguments);
123
- };
124
- module.exports.__wbg_msCrypto_0a36e2ec3a343d26 = function (arg0) {
125
- const ret = arg0.msCrypto;
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 () {
100
+ module.exports.__wbg_getRandomValues_3c9c0d586e575a16 = function () {
153
101
  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;
102
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
161
103
  }, arguments);
162
104
  };
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;
185
- };
186
- module.exports.__wbg_versions_c71aa1626a93e0a1 = function (arg0) {
187
- const ret = arg0.versions;
188
- return ret;
189
- };
190
105
  module.exports.__wbindgen_init_externref_table = function () {
191
106
  const table = wasm.__wbindgen_export_2;
192
107
  const offset = table.grow(4);
@@ -197,27 +112,6 @@ module.exports.__wbindgen_init_externref_table = function () {
197
112
  table.set(offset + 3, false);
198
113
  ;
199
114
  };
200
- module.exports.__wbindgen_is_function = function (arg0) {
201
- const ret = typeof (arg0) === 'function';
202
- return ret;
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
115
  module.exports.__wbindgen_string_new = function (arg0, arg1) {
222
116
  const ret = getStringFromWasm0(arg0, arg1);
223
117
  return ret;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tychosdk/disasm",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
4
4
  "description": "Tycho TVM disasm",
5
5
  "main": "dist/index.js",
6
6
  "browser": {
@@ -16,12 +16,12 @@
16
16
  "url": "git+https://github.com/broxus/tycho-disasm.git"
17
17
  },
18
18
  "devDependencies": {
19
- "@ton/core": "^0.60.1",
19
+ "@ton/core": "^0.61.0",
20
20
  "@ton/crypto": "^3.3.0",
21
- "@types/jest": "^29.5.14",
21
+ "@types/jest": "^30.0.0",
22
22
  "@types/node": "^18.15.11",
23
- "jest": "^29.7.0",
24
- "ts-jest": "^29.0.5",
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
  },