@thru/sdk 0.2.22

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.
Files changed (73) hide show
  1. package/README.abi.md +112 -0
  2. package/README.md +342 -0
  3. package/dist/abi/index.cjs +946 -0
  4. package/dist/abi/index.cjs.map +1 -0
  5. package/dist/abi/index.d.cts +331 -0
  6. package/dist/abi/index.d.ts +331 -0
  7. package/dist/abi/index.js +892 -0
  8. package/dist/abi/index.js.map +1 -0
  9. package/dist/abi/wasm/bundler/abi_reflect_wasm.d.ts +65 -0
  10. package/dist/abi/wasm/bundler/abi_reflect_wasm.js +5 -0
  11. package/dist/abi/wasm/bundler/abi_reflect_wasm_bg.js +412 -0
  12. package/dist/abi/wasm/bundler/abi_reflect_wasm_bg.wasm +0 -0
  13. package/dist/abi/wasm/bundler/abi_reflect_wasm_bg.wasm.d.ts +24 -0
  14. package/dist/abi/wasm/bundler/package.json +17 -0
  15. package/dist/abi/wasm/node/abi_reflect_wasm.d.ts +65 -0
  16. package/dist/abi/wasm/node/abi_reflect_wasm.js +425 -0
  17. package/dist/abi/wasm/node/abi_reflect_wasm_bg.wasm +0 -0
  18. package/dist/abi/wasm/node/abi_reflect_wasm_bg.wasm.d.ts +24 -0
  19. package/dist/abi/wasm/node/package.json +11 -0
  20. package/dist/abi/wasm/web/abi_reflect_wasm.d.ts +114 -0
  21. package/dist/abi/wasm/web/abi_reflect_wasm.js +499 -0
  22. package/dist/abi/wasm/web/abi_reflect_wasm_bg.wasm +0 -0
  23. package/dist/abi/wasm/web/abi_reflect_wasm_bg.wasm.d.ts +24 -0
  24. package/dist/abi/wasm/web/package.json +15 -0
  25. package/dist/chunk-CVBQ4UPL.js +3614 -0
  26. package/dist/chunk-CVBQ4UPL.js.map +1 -0
  27. package/dist/chunk-NSBPE2FW.js +15 -0
  28. package/dist/chunk-NSBPE2FW.js.map +1 -0
  29. package/dist/chunk-RL3Q6FDE.js +105 -0
  30. package/dist/chunk-RL3Q6FDE.js.map +1 -0
  31. package/dist/chunk-UDIXYJXC.js +260 -0
  32. package/dist/chunk-UDIXYJXC.js.map +1 -0
  33. package/dist/chunk-YQDWOMNO.js +271 -0
  34. package/dist/chunk-YQDWOMNO.js.map +1 -0
  35. package/dist/client-Cfi7zRLm.d.cts +1247 -0
  36. package/dist/client-worIo0a3.d.ts +1247 -0
  37. package/dist/client.cjs +3791 -0
  38. package/dist/client.cjs.map +1 -0
  39. package/dist/client.d.cts +7 -0
  40. package/dist/client.d.ts +7 -0
  41. package/dist/client.js +7 -0
  42. package/dist/client.js.map +1 -0
  43. package/dist/crypto/index.cjs +170 -0
  44. package/dist/crypto/index.cjs.map +1 -0
  45. package/dist/crypto/index.d.cts +60 -0
  46. package/dist/crypto/index.d.ts +60 -0
  47. package/dist/crypto/index.js +5 -0
  48. package/dist/crypto/index.js.map +1 -0
  49. package/dist/helpers/index.cjs +270 -0
  50. package/dist/helpers/index.cjs.map +1 -0
  51. package/dist/helpers/index.d.cts +15 -0
  52. package/dist/helpers/index.d.ts +15 -0
  53. package/dist/helpers/index.js +4 -0
  54. package/dist/helpers/index.js.map +1 -0
  55. package/dist/metafile-cjs.json +1 -0
  56. package/dist/metafile-esm.json +1 -0
  57. package/dist/proto/index.cjs +433 -0
  58. package/dist/proto/index.cjs.map +1 -0
  59. package/dist/proto/index.d.cts +435 -0
  60. package/dist/proto/index.d.ts +435 -0
  61. package/dist/proto/index.js +4 -0
  62. package/dist/proto/index.js.map +1 -0
  63. package/dist/sdk.cjs +4137 -0
  64. package/dist/sdk.cjs.map +1 -0
  65. package/dist/sdk.d.cts +36 -0
  66. package/dist/sdk.d.ts +36 -0
  67. package/dist/sdk.js +7 -0
  68. package/dist/sdk.js.map +1 -0
  69. package/dist/streaming_service_pb-DvCdJiCr.d.cts +4877 -0
  70. package/dist/streaming_service_pb-DvCdJiCr.d.ts +4877 -0
  71. package/dist/webcrypto-LTajLAad.d.cts +3 -0
  72. package/dist/webcrypto-LTajLAad.d.ts +3 -0
  73. package/package.json +88 -0
@@ -0,0 +1,499 @@
1
+ let wasm;
2
+
3
+ function getArrayU8FromWasm0(ptr, len) {
4
+ ptr = ptr >>> 0;
5
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
6
+ }
7
+
8
+ let cachedDataViewMemory0 = null;
9
+ function getDataViewMemory0() {
10
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
11
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
12
+ }
13
+ return cachedDataViewMemory0;
14
+ }
15
+
16
+ function getStringFromWasm0(ptr, len) {
17
+ ptr = ptr >>> 0;
18
+ return decodeText(ptr, len);
19
+ }
20
+
21
+ let cachedUint8ArrayMemory0 = null;
22
+ function getUint8ArrayMemory0() {
23
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
24
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
25
+ }
26
+ return cachedUint8ArrayMemory0;
27
+ }
28
+
29
+ function passStringToWasm0(arg, malloc, realloc) {
30
+ if (realloc === undefined) {
31
+ const buf = cachedTextEncoder.encode(arg);
32
+ const ptr = malloc(buf.length, 1) >>> 0;
33
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
34
+ WASM_VECTOR_LEN = buf.length;
35
+ return ptr;
36
+ }
37
+
38
+ let len = arg.length;
39
+ let ptr = malloc(len, 1) >>> 0;
40
+
41
+ const mem = getUint8ArrayMemory0();
42
+
43
+ let offset = 0;
44
+
45
+ for (; offset < len; offset++) {
46
+ const code = arg.charCodeAt(offset);
47
+ if (code > 0x7F) break;
48
+ mem[ptr + offset] = code;
49
+ }
50
+ if (offset !== len) {
51
+ if (offset !== 0) {
52
+ arg = arg.slice(offset);
53
+ }
54
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
55
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
56
+ const ret = cachedTextEncoder.encodeInto(arg, view);
57
+
58
+ offset += ret.written;
59
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
60
+ }
61
+
62
+ WASM_VECTOR_LEN = offset;
63
+ return ptr;
64
+ }
65
+
66
+ function takeFromExternrefTable0(idx) {
67
+ const value = wasm.__wbindgen_externrefs.get(idx);
68
+ wasm.__externref_table_dealloc(idx);
69
+ return value;
70
+ }
71
+
72
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
73
+ cachedTextDecoder.decode();
74
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
75
+ let numBytesDecoded = 0;
76
+ function decodeText(ptr, len) {
77
+ numBytesDecoded += len;
78
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
79
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
80
+ cachedTextDecoder.decode();
81
+ numBytesDecoded = len;
82
+ }
83
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
84
+ }
85
+
86
+ const cachedTextEncoder = new TextEncoder();
87
+
88
+ if (!('encodeInto' in cachedTextEncoder)) {
89
+ cachedTextEncoder.encodeInto = function (arg, view) {
90
+ const buf = cachedTextEncoder.encode(arg);
91
+ view.set(buf);
92
+ return {
93
+ read: arg.length,
94
+ written: buf.length
95
+ };
96
+ }
97
+ }
98
+
99
+ let WASM_VECTOR_LEN = 0;
100
+
101
+ /**
102
+ * @param {string} abi_yaml
103
+ * @returns {any}
104
+ */
105
+ export function build_layout_ir(abi_yaml) {
106
+ const ptr0 = passStringToWasm0(abi_yaml, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
107
+ const len0 = WASM_VECTOR_LEN;
108
+ const ret = wasm.build_layout_ir(ptr0, len0);
109
+ if (ret[2]) {
110
+ throw takeFromExternrefTable0(ret[1]);
111
+ }
112
+ return takeFromExternrefTable0(ret[0]);
113
+ }
114
+
115
+ /**
116
+ * Build layout IR from a pre-resolved manifest.
117
+ * @param {string} manifest_json
118
+ * @param {string} root_package
119
+ * @returns {any}
120
+ */
121
+ export function build_layout_ir_with_manifest(manifest_json, root_package) {
122
+ const ptr0 = passStringToWasm0(manifest_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
123
+ const len0 = WASM_VECTOR_LEN;
124
+ const ptr1 = passStringToWasm0(root_package, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
125
+ const len1 = WASM_VECTOR_LEN;
126
+ const ret = wasm.build_layout_ir_with_manifest(ptr0, len0, ptr1, len1);
127
+ if (ret[2]) {
128
+ throw takeFromExternrefTable0(ret[1]);
129
+ }
130
+ return takeFromExternrefTable0(ret[0]);
131
+ }
132
+
133
+ /**
134
+ * @param {string} raw_json
135
+ * @returns {any}
136
+ */
137
+ export function format_reflection(raw_json) {
138
+ const ptr0 = passStringToWasm0(raw_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
139
+ const len0 = WASM_VECTOR_LEN;
140
+ const ret = wasm.format_reflection(ptr0, len0);
141
+ if (ret[2]) {
142
+ throw takeFromExternrefTable0(ret[1]);
143
+ }
144
+ return takeFromExternrefTable0(ret[0]);
145
+ }
146
+
147
+ /**
148
+ * @param {string} raw_json
149
+ * @param {string} options_json
150
+ * @returns {any}
151
+ */
152
+ export function format_reflection_with_options(raw_json, options_json) {
153
+ const ptr0 = passStringToWasm0(raw_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
154
+ const len0 = WASM_VECTOR_LEN;
155
+ const ptr1 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
156
+ const len1 = WASM_VECTOR_LEN;
157
+ const ret = wasm.format_reflection_with_options(ptr0, len0, ptr1, len1);
158
+ if (ret[2]) {
159
+ throw takeFromExternrefTable0(ret[1]);
160
+ }
161
+ return takeFromExternrefTable0(ret[0]);
162
+ }
163
+
164
+ /**
165
+ * Get the list of package names in a manifest.
166
+ * @param {string} manifest_json
167
+ * @returns {any}
168
+ */
169
+ export function get_manifest_packages(manifest_json) {
170
+ const ptr0 = passStringToWasm0(manifest_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
171
+ const len0 = WASM_VECTOR_LEN;
172
+ const ret = wasm.get_manifest_packages(ptr0, len0);
173
+ if (ret[2]) {
174
+ throw takeFromExternrefTable0(ret[1]);
175
+ }
176
+ return takeFromExternrefTable0(ret[0]);
177
+ }
178
+
179
+ /**
180
+ * @param {string} abi_yaml
181
+ * @param {string} type_name
182
+ * @param {Uint8Array} buffer
183
+ * @returns {any}
184
+ */
185
+ export function reflect(abi_yaml, type_name, buffer) {
186
+ const ptr0 = passStringToWasm0(abi_yaml, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
187
+ const len0 = WASM_VECTOR_LEN;
188
+ const ptr1 = passStringToWasm0(type_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
189
+ const len1 = WASM_VECTOR_LEN;
190
+ const ret = wasm.reflect(ptr0, len0, ptr1, len1, buffer);
191
+ if (ret[2]) {
192
+ throw takeFromExternrefTable0(ret[1]);
193
+ }
194
+ return takeFromExternrefTable0(ret[0]);
195
+ }
196
+
197
+ /**
198
+ * @param {string} abi_yaml
199
+ * @param {Uint8Array} buffer
200
+ * @returns {any}
201
+ */
202
+ export function reflect_account(abi_yaml, buffer) {
203
+ const ptr0 = passStringToWasm0(abi_yaml, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
204
+ const len0 = WASM_VECTOR_LEN;
205
+ const ret = wasm.reflect_account(ptr0, len0, buffer);
206
+ if (ret[2]) {
207
+ throw takeFromExternrefTable0(ret[1]);
208
+ }
209
+ return takeFromExternrefTable0(ret[0]);
210
+ }
211
+
212
+ /**
213
+ * Reflect an account using a pre-resolved manifest.
214
+ * @param {string} manifest_json
215
+ * @param {string} root_package
216
+ * @param {Uint8Array} buffer
217
+ * @returns {any}
218
+ */
219
+ export function reflect_account_with_manifest(manifest_json, root_package, buffer) {
220
+ const ptr0 = passStringToWasm0(manifest_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
221
+ const len0 = WASM_VECTOR_LEN;
222
+ const ptr1 = passStringToWasm0(root_package, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
223
+ const len1 = WASM_VECTOR_LEN;
224
+ const ret = wasm.reflect_account_with_manifest(ptr0, len0, ptr1, len1, buffer);
225
+ if (ret[2]) {
226
+ throw takeFromExternrefTable0(ret[1]);
227
+ }
228
+ return takeFromExternrefTable0(ret[0]);
229
+ }
230
+
231
+ /**
232
+ * @param {string} abi_yaml
233
+ * @param {Uint8Array} buffer
234
+ * @returns {any}
235
+ */
236
+ export function reflect_event(abi_yaml, buffer) {
237
+ const ptr0 = passStringToWasm0(abi_yaml, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
238
+ const len0 = WASM_VECTOR_LEN;
239
+ const ret = wasm.reflect_event(ptr0, len0, buffer);
240
+ if (ret[2]) {
241
+ throw takeFromExternrefTable0(ret[1]);
242
+ }
243
+ return takeFromExternrefTable0(ret[0]);
244
+ }
245
+
246
+ /**
247
+ * Reflect an event using a pre-resolved manifest.
248
+ * @param {string} manifest_json
249
+ * @param {string} root_package
250
+ * @param {Uint8Array} buffer
251
+ * @returns {any}
252
+ */
253
+ export function reflect_event_with_manifest(manifest_json, root_package, buffer) {
254
+ const ptr0 = passStringToWasm0(manifest_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
255
+ const len0 = WASM_VECTOR_LEN;
256
+ const ptr1 = passStringToWasm0(root_package, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
257
+ const len1 = WASM_VECTOR_LEN;
258
+ const ret = wasm.reflect_event_with_manifest(ptr0, len0, ptr1, len1, buffer);
259
+ if (ret[2]) {
260
+ throw takeFromExternrefTable0(ret[1]);
261
+ }
262
+ return takeFromExternrefTable0(ret[0]);
263
+ }
264
+
265
+ /**
266
+ * @param {string} abi_yaml
267
+ * @param {Uint8Array} buffer
268
+ * @returns {any}
269
+ */
270
+ export function reflect_instruction(abi_yaml, buffer) {
271
+ const ptr0 = passStringToWasm0(abi_yaml, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
272
+ const len0 = WASM_VECTOR_LEN;
273
+ const ret = wasm.reflect_instruction(ptr0, len0, buffer);
274
+ if (ret[2]) {
275
+ throw takeFromExternrefTable0(ret[1]);
276
+ }
277
+ return takeFromExternrefTable0(ret[0]);
278
+ }
279
+
280
+ /**
281
+ * Reflect an instruction using a pre-resolved manifest.
282
+ * @param {string} manifest_json
283
+ * @param {string} root_package
284
+ * @param {Uint8Array} buffer
285
+ * @returns {any}
286
+ */
287
+ export function reflect_instruction_with_manifest(manifest_json, root_package, buffer) {
288
+ const ptr0 = passStringToWasm0(manifest_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
289
+ const len0 = WASM_VECTOR_LEN;
290
+ const ptr1 = passStringToWasm0(root_package, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
291
+ const len1 = WASM_VECTOR_LEN;
292
+ const ret = wasm.reflect_instruction_with_manifest(ptr0, len0, ptr1, len1, buffer);
293
+ if (ret[2]) {
294
+ throw takeFromExternrefTable0(ret[1]);
295
+ }
296
+ return takeFromExternrefTable0(ret[0]);
297
+ }
298
+
299
+ /**
300
+ * Reflect a binary buffer using a pre-resolved manifest.
301
+ *
302
+ * The manifest is a JSON object mapping package names to their ABI YAML content.
303
+ * The root_package parameter specifies which package contains the target type
304
+ * and root type configuration.
305
+ *
306
+ * Example manifest:
307
+ * ```json
308
+ * {
309
+ * "thru.program.token": "abi:\n package: thru.program.token\n ...",
310
+ * "thru.common.primitives": "abi:\n package: thru.common.primitives\n ..."
311
+ * }
312
+ * ```
313
+ * @param {string} manifest_json
314
+ * @param {string} root_package
315
+ * @param {string} type_name
316
+ * @param {Uint8Array} buffer
317
+ * @returns {any}
318
+ */
319
+ export function reflect_with_manifest(manifest_json, root_package, type_name, buffer) {
320
+ const ptr0 = passStringToWasm0(manifest_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
321
+ const len0 = WASM_VECTOR_LEN;
322
+ const ptr1 = passStringToWasm0(root_package, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
323
+ const len1 = WASM_VECTOR_LEN;
324
+ const ptr2 = passStringToWasm0(type_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
325
+ const len2 = WASM_VECTOR_LEN;
326
+ const ret = wasm.reflect_with_manifest(ptr0, len0, ptr1, len1, ptr2, len2, buffer);
327
+ if (ret[2]) {
328
+ throw takeFromExternrefTable0(ret[1]);
329
+ }
330
+ return takeFromExternrefTable0(ret[0]);
331
+ }
332
+
333
+ /**
334
+ * Validate a manifest and return information about its contents.
335
+ * @param {string} manifest_json
336
+ * @returns {any}
337
+ */
338
+ export function validate_manifest(manifest_json) {
339
+ const ptr0 = passStringToWasm0(manifest_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
340
+ const len0 = WASM_VECTOR_LEN;
341
+ const ret = wasm.validate_manifest(ptr0, len0);
342
+ if (ret[2]) {
343
+ throw takeFromExternrefTable0(ret[1]);
344
+ }
345
+ return takeFromExternrefTable0(ret[0]);
346
+ }
347
+
348
+ export function wasm_start() {
349
+ wasm.wasm_start();
350
+ }
351
+
352
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
353
+
354
+ async function __wbg_load(module, imports) {
355
+ if (typeof Response === 'function' && module instanceof Response) {
356
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
357
+ try {
358
+ return await WebAssembly.instantiateStreaming(module, imports);
359
+ } catch (e) {
360
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
361
+
362
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
363
+ 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);
364
+
365
+ } else {
366
+ throw e;
367
+ }
368
+ }
369
+ }
370
+
371
+ const bytes = await module.arrayBuffer();
372
+ return await WebAssembly.instantiate(bytes, imports);
373
+ } else {
374
+ const instance = await WebAssembly.instantiate(module, imports);
375
+
376
+ if (instance instanceof WebAssembly.Instance) {
377
+ return { instance, module };
378
+ } else {
379
+ return instance;
380
+ }
381
+ }
382
+ }
383
+
384
+ function __wbg_get_imports() {
385
+ const imports = {};
386
+ imports.wbg = {};
387
+ imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
388
+ throw new Error(getStringFromWasm0(arg0, arg1));
389
+ };
390
+ imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
391
+ let deferred0_0;
392
+ let deferred0_1;
393
+ try {
394
+ deferred0_0 = arg0;
395
+ deferred0_1 = arg1;
396
+ console.error(getStringFromWasm0(arg0, arg1));
397
+ } finally {
398
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
399
+ }
400
+ };
401
+ imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
402
+ const ret = arg0.length;
403
+ return ret;
404
+ };
405
+ imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
406
+ const ret = new Error();
407
+ return ret;
408
+ };
409
+ imports.wbg.__wbg_new_df1173567d5ff028 = function(arg0, arg1) {
410
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
411
+ return ret;
412
+ };
413
+ imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
414
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
415
+ };
416
+ imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
417
+ const ret = arg1.stack;
418
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
419
+ const len1 = WASM_VECTOR_LEN;
420
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
421
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
422
+ };
423
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
424
+ // Cast intrinsic for `Ref(String) -> Externref`.
425
+ const ret = getStringFromWasm0(arg0, arg1);
426
+ return ret;
427
+ };
428
+ imports.wbg.__wbindgen_init_externref_table = function() {
429
+ const table = wasm.__wbindgen_externrefs;
430
+ const offset = table.grow(4);
431
+ table.set(0, undefined);
432
+ table.set(offset + 0, undefined);
433
+ table.set(offset + 1, null);
434
+ table.set(offset + 2, true);
435
+ table.set(offset + 3, false);
436
+ };
437
+
438
+ return imports;
439
+ }
440
+
441
+ function __wbg_finalize_init(instance, module) {
442
+ wasm = instance.exports;
443
+ __wbg_init.__wbindgen_wasm_module = module;
444
+ cachedDataViewMemory0 = null;
445
+ cachedUint8ArrayMemory0 = null;
446
+
447
+
448
+ wasm.__wbindgen_start();
449
+ return wasm;
450
+ }
451
+
452
+ function initSync(module) {
453
+ if (wasm !== undefined) return wasm;
454
+
455
+
456
+ if (typeof module !== 'undefined') {
457
+ if (Object.getPrototypeOf(module) === Object.prototype) {
458
+ ({module} = module)
459
+ } else {
460
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
461
+ }
462
+ }
463
+
464
+ const imports = __wbg_get_imports();
465
+ if (!(module instanceof WebAssembly.Module)) {
466
+ module = new WebAssembly.Module(module);
467
+ }
468
+ const instance = new WebAssembly.Instance(module, imports);
469
+ return __wbg_finalize_init(instance, module);
470
+ }
471
+
472
+ async function __wbg_init(module_or_path) {
473
+ if (wasm !== undefined) return wasm;
474
+
475
+
476
+ if (typeof module_or_path !== 'undefined') {
477
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
478
+ ({module_or_path} = module_or_path)
479
+ } else {
480
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
481
+ }
482
+ }
483
+
484
+ if (typeof module_or_path === 'undefined') {
485
+ module_or_path = new URL('abi_reflect_wasm_bg.wasm', import.meta.url);
486
+ }
487
+ const imports = __wbg_get_imports();
488
+
489
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
490
+ module_or_path = fetch(module_or_path);
491
+ }
492
+
493
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
494
+
495
+ return __wbg_finalize_init(instance, module);
496
+ }
497
+
498
+ export { initSync };
499
+ export default __wbg_init;
@@ -0,0 +1,24 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const build_layout_ir: (a: number, b: number) => [number, number, number];
5
+ export const build_layout_ir_with_manifest: (a: number, b: number, c: number, d: number) => [number, number, number];
6
+ export const format_reflection: (a: number, b: number) => [number, number, number];
7
+ export const format_reflection_with_options: (a: number, b: number, c: number, d: number) => [number, number, number];
8
+ export const get_manifest_packages: (a: number, b: number) => [number, number, number];
9
+ export const reflect: (a: number, b: number, c: number, d: number, e: any) => [number, number, number];
10
+ export const reflect_account: (a: number, b: number, c: any) => [number, number, number];
11
+ export const reflect_account_with_manifest: (a: number, b: number, c: number, d: number, e: any) => [number, number, number];
12
+ export const reflect_event: (a: number, b: number, c: any) => [number, number, number];
13
+ export const reflect_event_with_manifest: (a: number, b: number, c: number, d: number, e: any) => [number, number, number];
14
+ export const reflect_instruction: (a: number, b: number, c: any) => [number, number, number];
15
+ export const reflect_instruction_with_manifest: (a: number, b: number, c: number, d: number, e: any) => [number, number, number];
16
+ export const reflect_with_manifest: (a: number, b: number, c: number, d: number, e: number, f: number, g: any) => [number, number, number];
17
+ export const validate_manifest: (a: number, b: number) => [number, number, number];
18
+ export const wasm_start: () => void;
19
+ export const __wbindgen_free: (a: number, b: number, c: number) => void;
20
+ export const __wbindgen_malloc: (a: number, b: number) => number;
21
+ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
22
+ export const __wbindgen_externrefs: WebAssembly.Table;
23
+ export const __externref_table_dealloc: (a: number) => void;
24
+ export const __wbindgen_start: () => void;
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "abi_reflect_wasm",
3
+ "type": "module",
4
+ "version": "0.1.0",
5
+ "files": [
6
+ "abi_reflect_wasm_bg.wasm",
7
+ "abi_reflect_wasm.js",
8
+ "abi_reflect_wasm.d.ts"
9
+ ],
10
+ "main": "abi_reflect_wasm.js",
11
+ "types": "abi_reflect_wasm.d.ts",
12
+ "sideEffects": [
13
+ "./snippets/*"
14
+ ]
15
+ }