@wgb5445/aptos-intent-npm 0.0.12 → 0.1.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.
package/dist/cjs/entry.js CHANGED
@@ -2,43 +2,29 @@
2
2
 
3
3
  let wasm;
4
4
 
5
- const heap = new Array(128).fill(undefined);
6
-
7
- heap.push(undefined, null, true, false);
8
-
9
- function getObject(idx) { return heap[idx]; }
10
-
11
- let heap_next = heap.length;
12
-
13
- function dropObject(idx) {
14
- if (idx < 132) return;
15
- heap[idx] = heap_next;
16
- heap_next = idx;
17
- }
18
-
19
- function takeObject(idx) {
20
- const ret = getObject(idx);
21
- dropObject(idx);
22
- return ret;
23
- }
24
-
25
5
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
26
6
 
27
7
  if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }
28
- let cachedUint8Memory0 = null;
8
+ let cachedUint8ArrayMemory0 = null;
29
9
 
30
- function getUint8Memory0() {
31
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
32
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
10
+ function getUint8ArrayMemory0() {
11
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
12
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
33
13
  }
34
- return cachedUint8Memory0;
14
+ return cachedUint8ArrayMemory0;
35
15
  }
36
16
 
37
17
  function getStringFromWasm0(ptr, len) {
38
18
  ptr = ptr >>> 0;
39
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
19
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
40
20
  }
41
21
 
22
+ const heap = new Array(128).fill(undefined);
23
+
24
+ heap.push(undefined, null, true, false);
25
+
26
+ let heap_next = heap.length;
27
+
42
28
  function addHeapObject(obj) {
43
29
  if (heap_next === heap.length) heap.push(heap.length + 1);
44
30
  const idx = heap_next;
@@ -48,6 +34,20 @@ function addHeapObject(obj) {
48
34
  return idx;
49
35
  }
50
36
 
37
+ function getObject(idx) { return heap[idx]; }
38
+
39
+ function dropObject(idx) {
40
+ if (idx < 132) return;
41
+ heap[idx] = heap_next;
42
+ heap_next = idx;
43
+ }
44
+
45
+ function takeObject(idx) {
46
+ const ret = getObject(idx);
47
+ dropObject(idx);
48
+ return ret;
49
+ }
50
+
51
51
  let WASM_VECTOR_LEN = 0;
52
52
 
53
53
  const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
@@ -70,7 +70,7 @@ function passStringToWasm0(arg, malloc, realloc) {
70
70
  if (realloc === undefined) {
71
71
  const buf = cachedTextEncoder.encode(arg);
72
72
  const ptr = malloc(buf.length, 1) >>> 0;
73
- getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
73
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
74
74
  WASM_VECTOR_LEN = buf.length;
75
75
  return ptr;
76
76
  }
@@ -78,7 +78,7 @@ function passStringToWasm0(arg, malloc, realloc) {
78
78
  let len = arg.length;
79
79
  let ptr = malloc(len, 1) >>> 0;
80
80
 
81
- const mem = getUint8Memory0();
81
+ const mem = getUint8ArrayMemory0();
82
82
 
83
83
  let offset = 0;
84
84
 
@@ -93,7 +93,7 @@ function passStringToWasm0(arg, malloc, realloc) {
93
93
  arg = arg.slice(offset);
94
94
  }
95
95
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
96
- const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
96
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
97
97
  const ret = encodeString(arg, view);
98
98
 
99
99
  offset += ret.written;
@@ -108,13 +108,13 @@ function isLikeNone(x) {
108
108
  return x === undefined || x === null;
109
109
  }
110
110
 
111
- let cachedInt32Memory0 = null;
111
+ let cachedDataViewMemory0 = null;
112
112
 
113
- function getInt32Memory0() {
114
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
115
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
113
+ function getDataViewMemory0() {
114
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
115
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
116
116
  }
117
- return cachedInt32Memory0;
117
+ return cachedDataViewMemory0;
118
118
  }
119
119
 
120
120
  function debugString(val) {
@@ -213,49 +213,55 @@ function makeMutClosure(arg0, arg1, dtor, f) {
213
213
  return real;
214
214
  }
215
215
  function __wbg_adapter_24(arg0, arg1, arg2) {
216
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8273ed02fd8578ca(arg0, arg1, addHeapObject(arg2));
216
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9d36ae248074657d(arg0, arg1, addHeapObject(arg2));
217
217
  }
218
218
 
219
- function passArray8ToWasm0(arg, malloc) {
220
- const ptr = malloc(arg.length * 1, 1) >>> 0;
221
- getUint8Memory0().set(arg, ptr / 1);
222
- WASM_VECTOR_LEN = arg.length;
223
- return ptr;
219
+ function getArrayU8FromWasm0(ptr, len) {
220
+ ptr = ptr >>> 0;
221
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
224
222
  }
225
223
 
226
- let cachedUint32Memory0 = null;
227
-
228
- function getUint32Memory0() {
229
- if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {
230
- cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
224
+ function passArrayJsValueToWasm0(array, malloc) {
225
+ const ptr = malloc(array.length * 4, 4) >>> 0;
226
+ const mem = getDataViewMemory0();
227
+ for (let i = 0; i < array.length; i++) {
228
+ mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
231
229
  }
232
- return cachedUint32Memory0;
230
+ WASM_VECTOR_LEN = array.length;
231
+ return ptr;
233
232
  }
234
233
 
235
234
  function getArrayJsValueFromWasm0(ptr, len) {
236
235
  ptr = ptr >>> 0;
237
- const mem = getUint32Memory0();
238
- const slice = mem.subarray(ptr / 4, ptr / 4 + len);
236
+ const mem = getDataViewMemory0();
239
237
  const result = [];
240
- for (let i = 0; i < slice.length; i++) {
241
- result.push(takeObject(slice[i]));
238
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
239
+ result.push(takeObject(mem.getUint32(i, true)));
242
240
  }
243
241
  return result;
244
242
  }
243
+
244
+ function passArray8ToWasm0(arg, malloc) {
245
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
246
+ getUint8ArrayMemory0().set(arg, ptr / 1);
247
+ WASM_VECTOR_LEN = arg.length;
248
+ return ptr;
249
+ }
245
250
  /**
246
- * @param {Uint8Array} script
247
- * @returns {(BatchedFunctionCall)[]}
248
- */
249
- function generate_intent_payload_wasm(script) {
251
+ * Wrapper to decompile script in its serialized form and wrap it with wasm errors.
252
+ * @param {Uint8Array} script
253
+ * @returns {(MoveFunctionCall)[]}
254
+ */
255
+ function generate_batched_call_payload_wasm(script) {
250
256
  try {
251
257
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
252
258
  const ptr0 = passArray8ToWasm0(script, wasm.__wbindgen_malloc);
253
259
  const len0 = WASM_VECTOR_LEN;
254
- wasm.generate_intent_payload_wasm(retptr, ptr0, len0);
255
- var r0 = getInt32Memory0()[retptr / 4 + 0];
256
- var r1 = getInt32Memory0()[retptr / 4 + 1];
257
- var r2 = getInt32Memory0()[retptr / 4 + 2];
258
- var r3 = getInt32Memory0()[retptr / 4 + 3];
260
+ wasm.generate_batched_call_payload_wasm(retptr, ptr0, len0);
261
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
262
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
263
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
264
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
259
265
  if (r3) {
260
266
  throw takeObject(r2);
261
267
  }
@@ -267,21 +273,6 @@ function generate_intent_payload_wasm(script) {
267
273
  }
268
274
  }
269
275
 
270
- function passArrayJsValueToWasm0(array, malloc) {
271
- const ptr = malloc(array.length * 4, 4) >>> 0;
272
- const mem = getUint32Memory0();
273
- for (let i = 0; i < array.length; i++) {
274
- mem[ptr / 4 + i] = addHeapObject(array[i]);
275
- }
276
- WASM_VECTOR_LEN = array.length;
277
- return ptr;
278
- }
279
-
280
- function getArrayU8FromWasm0(ptr, len) {
281
- ptr = ptr >>> 0;
282
- return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
283
- }
284
-
285
276
  function handleError(f, args) {
286
277
  try {
287
278
  return f.apply(this, args);
@@ -289,238 +280,471 @@ function handleError(f, args) {
289
280
  wasm.__wbindgen_exn_store(addHeapObject(e));
290
281
  }
291
282
  }
292
- function __wbg_adapter_90(arg0, arg1, arg2, arg3) {
293
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h7a552e5a28352106(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
283
+ function __wbg_adapter_135(arg0, arg1, arg2, arg3) {
284
+ wasm.wasm_bindgen__convert__closures__invoke2_mut__h0d57cb0f99d3b458(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
294
285
  }
295
286
 
296
- /**
297
- * Arguments for each function.
298
- */
299
- const BatchArgumentType = Object.freeze({ Raw:0,"0":"Raw",Signer:1,"1":"Signer",PreviousResult:2,"2":"PreviousResult", });
287
+ const __wbindgen_enum_ReadableStreamReaderMode = ["byob"];
300
288
 
301
- const BatchArgumentFinalization = (typeof FinalizationRegistry === 'undefined')
289
+ const AllocatedLocalFinalization = (typeof FinalizationRegistry === 'undefined')
302
290
  ? { register: () => {}, unregister: () => {} }
303
- : new FinalizationRegistry(ptr => wasm.__wbg_batchargument_free(ptr >>> 0));
304
- /**
305
- * Arguments for each function. Wasm bindgen only support C-style enum so use option to work around.
306
- */
307
- class BatchArgument {
291
+ : new FinalizationRegistry(ptr => wasm.__wbg_allocatedlocal_free(ptr >>> 0, 1));
308
292
 
309
- static __wrap(ptr) {
310
- ptr = ptr >>> 0;
311
- const obj = Object.create(BatchArgument.prototype);
312
- obj.__wbg_ptr = ptr;
313
- BatchArgumentFinalization.register(obj, obj.__wbg_ptr, obj);
314
- return obj;
293
+ class AllocatedLocal {
294
+
295
+ __destroy_into_raw() {
296
+ const ptr = this.__wbg_ptr;
297
+ this.__wbg_ptr = 0;
298
+ AllocatedLocalFinalization.unregister(this);
299
+ return ptr;
315
300
  }
316
301
 
317
- static __unwrap(jsValue) {
318
- if (!(jsValue instanceof BatchArgument)) {
319
- return 0;
320
- }
321
- return jsValue.__destroy_into_raw();
302
+ free() {
303
+ const ptr = this.__destroy_into_raw();
304
+ wasm.__wbg_allocatedlocal_free(ptr, 0);
305
+ }
306
+ }
307
+
308
+ const BuilderCallFinalization = (typeof FinalizationRegistry === 'undefined')
309
+ ? { register: () => {}, unregister: () => {} }
310
+ : new FinalizationRegistry(ptr => wasm.__wbg_buildercall_free(ptr >>> 0, 1));
311
+
312
+ class BuilderCall {
313
+
314
+ __destroy_into_raw() {
315
+ const ptr = this.__wbg_ptr;
316
+ this.__wbg_ptr = 0;
317
+ BuilderCallFinalization.unregister(this);
318
+ return ptr;
319
+ }
320
+
321
+ free() {
322
+ const ptr = this.__destroy_into_raw();
323
+ wasm.__wbg_buildercall_free(ptr, 0);
322
324
  }
325
+ }
326
+
327
+ const CallArgumentFinalization = (typeof FinalizationRegistry === 'undefined')
328
+ ? { register: () => {}, unregister: () => {} }
329
+ : new FinalizationRegistry(ptr => wasm.__wbg_callargument_free(ptr >>> 0, 1));
330
+
331
+ class CallArgument {
323
332
 
324
333
  __destroy_into_raw() {
325
334
  const ptr = this.__wbg_ptr;
326
335
  this.__wbg_ptr = 0;
327
- BatchArgumentFinalization.unregister(this);
336
+ CallArgumentFinalization.unregister(this);
328
337
  return ptr;
329
338
  }
330
339
 
331
340
  free() {
332
341
  const ptr = this.__destroy_into_raw();
333
- wasm.__wbg_batchargument_free(ptr);
342
+ wasm.__wbg_callargument_free(ptr, 0);
334
343
  }
335
344
  /**
336
- * @param {Uint8Array} bytes
337
- * @returns {BatchArgument}
338
- */
345
+ * @param {Uint8Array} bytes
346
+ * @returns {CallArgument}
347
+ */
339
348
  static new_bytes(bytes) {
340
349
  const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
341
350
  const len0 = WASM_VECTOR_LEN;
342
- const ret = wasm.batchargument_new_bytes(ptr0, len0);
343
- return BatchArgument.__wrap(ret);
351
+ const ret = wasm.callargument_new_bytes(ptr0, len0);
352
+ return takeObject(ret);
344
353
  }
345
354
  /**
346
- * @param {number} signer_idx
347
- * @returns {BatchArgument}
348
- */
355
+ * @param {number} signer_idx
356
+ * @returns {CallArgument}
357
+ */
349
358
  static new_signer(signer_idx) {
350
- const ret = wasm.batchargument_new_signer(signer_idx);
351
- return BatchArgument.__wrap(ret);
359
+ const ret = wasm.callargument_new_signer(signer_idx);
360
+ return takeObject(ret);
352
361
  }
353
362
  /**
354
- * @returns {BatchArgument}
355
- */
363
+ * @returns {CallArgument}
364
+ */
356
365
  borrow() {
357
366
  try {
358
367
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
359
- wasm.batchargument_borrow(retptr, this.__wbg_ptr);
360
- var r0 = getInt32Memory0()[retptr / 4 + 0];
361
- var r1 = getInt32Memory0()[retptr / 4 + 1];
362
- var r2 = getInt32Memory0()[retptr / 4 + 2];
368
+ wasm.callargument_borrow(retptr, this.__wbg_ptr);
369
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
370
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
371
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
363
372
  if (r2) {
364
373
  throw takeObject(r1);
365
374
  }
366
- return BatchArgument.__wrap(r0);
375
+ return takeObject(r0);
367
376
  } finally {
368
377
  wasm.__wbindgen_add_to_stack_pointer(16);
369
378
  }
370
379
  }
371
380
  /**
372
- * @returns {BatchArgument}
373
- */
381
+ * @returns {CallArgument}
382
+ */
374
383
  borrow_mut() {
375
384
  try {
376
385
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
377
- wasm.batchargument_borrow_mut(retptr, this.__wbg_ptr);
378
- var r0 = getInt32Memory0()[retptr / 4 + 0];
379
- var r1 = getInt32Memory0()[retptr / 4 + 1];
380
- var r2 = getInt32Memory0()[retptr / 4 + 2];
386
+ wasm.callargument_borrow_mut(retptr, this.__wbg_ptr);
387
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
388
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
389
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
381
390
  if (r2) {
382
391
  throw takeObject(r1);
383
392
  }
384
- return BatchArgument.__wrap(r0);
393
+ return takeObject(r0);
385
394
  } finally {
386
395
  wasm.__wbindgen_add_to_stack_pointer(16);
387
396
  }
388
397
  }
389
398
  /**
390
- * @returns {BatchArgument}
391
- */
399
+ * @returns {CallArgument}
400
+ */
392
401
  copy() {
393
402
  try {
394
403
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
395
- wasm.batchargument_copy(retptr, this.__wbg_ptr);
396
- var r0 = getInt32Memory0()[retptr / 4 + 0];
397
- var r1 = getInt32Memory0()[retptr / 4 + 1];
398
- var r2 = getInt32Memory0()[retptr / 4 + 2];
404
+ wasm.callargument_copy(retptr, this.__wbg_ptr);
405
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
406
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
407
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
399
408
  if (r2) {
400
409
  throw takeObject(r1);
401
410
  }
402
- return BatchArgument.__wrap(r0);
411
+ return takeObject(r0);
403
412
  } finally {
404
413
  wasm.__wbindgen_add_to_stack_pointer(16);
405
414
  }
406
415
  }
407
416
  }
408
417
 
409
- const BatchedFunctionCallFinalization = (typeof FinalizationRegistry === 'undefined')
418
+ const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
410
419
  ? { register: () => {}, unregister: () => {} }
411
- : new FinalizationRegistry(ptr => wasm.__wbg_batchedfunctioncall_free(ptr >>> 0));
420
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
421
+
422
+ class IntoUnderlyingByteSource {
423
+
424
+ __destroy_into_raw() {
425
+ const ptr = this.__wbg_ptr;
426
+ this.__wbg_ptr = 0;
427
+ IntoUnderlyingByteSourceFinalization.unregister(this);
428
+ return ptr;
429
+ }
430
+
431
+ free() {
432
+ const ptr = this.__destroy_into_raw();
433
+ wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
434
+ }
435
+ /**
436
+ * @returns {string}
437
+ */
438
+ get type() {
439
+ let deferred1_0;
440
+ let deferred1_1;
441
+ try {
442
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
443
+ wasm.intounderlyingbytesource_type(retptr, this.__wbg_ptr);
444
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
445
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
446
+ deferred1_0 = r0;
447
+ deferred1_1 = r1;
448
+ return getStringFromWasm0(r0, r1);
449
+ } finally {
450
+ wasm.__wbindgen_add_to_stack_pointer(16);
451
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
452
+ }
453
+ }
454
+ /**
455
+ * @returns {number}
456
+ */
457
+ get autoAllocateChunkSize() {
458
+ const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
459
+ return ret >>> 0;
460
+ }
461
+ /**
462
+ * @param {any} controller
463
+ */
464
+ start(controller) {
465
+ wasm.intounderlyingbytesource_start(this.__wbg_ptr, addHeapObject(controller));
466
+ }
467
+ /**
468
+ * @param {any} controller
469
+ * @returns {Promise<any>}
470
+ */
471
+ pull(controller) {
472
+ const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, addHeapObject(controller));
473
+ return takeObject(ret);
474
+ }
475
+ cancel() {
476
+ const ptr = this.__destroy_into_raw();
477
+ wasm.intounderlyingbytesource_cancel(ptr);
478
+ }
479
+ }
480
+
481
+ const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
482
+ ? { register: () => {}, unregister: () => {} }
483
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr >>> 0, 1));
484
+
485
+ class IntoUnderlyingSink {
486
+
487
+ __destroy_into_raw() {
488
+ const ptr = this.__wbg_ptr;
489
+ this.__wbg_ptr = 0;
490
+ IntoUnderlyingSinkFinalization.unregister(this);
491
+ return ptr;
492
+ }
493
+
494
+ free() {
495
+ const ptr = this.__destroy_into_raw();
496
+ wasm.__wbg_intounderlyingsink_free(ptr, 0);
497
+ }
498
+ /**
499
+ * @param {any} chunk
500
+ * @returns {Promise<any>}
501
+ */
502
+ write(chunk) {
503
+ const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, addHeapObject(chunk));
504
+ return takeObject(ret);
505
+ }
506
+ /**
507
+ * @returns {Promise<any>}
508
+ */
509
+ close() {
510
+ const ptr = this.__destroy_into_raw();
511
+ const ret = wasm.intounderlyingsink_close(ptr);
512
+ return takeObject(ret);
513
+ }
514
+ /**
515
+ * @param {any} reason
516
+ * @returns {Promise<any>}
517
+ */
518
+ abort(reason) {
519
+ const ptr = this.__destroy_into_raw();
520
+ const ret = wasm.intounderlyingsink_abort(ptr, addHeapObject(reason));
521
+ return takeObject(ret);
522
+ }
523
+ }
524
+
525
+ const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
526
+ ? { register: () => {}, unregister: () => {} }
527
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr >>> 0, 1));
528
+
529
+ class IntoUnderlyingSource {
530
+
531
+ __destroy_into_raw() {
532
+ const ptr = this.__wbg_ptr;
533
+ this.__wbg_ptr = 0;
534
+ IntoUnderlyingSourceFinalization.unregister(this);
535
+ return ptr;
536
+ }
537
+
538
+ free() {
539
+ const ptr = this.__destroy_into_raw();
540
+ wasm.__wbg_intounderlyingsource_free(ptr, 0);
541
+ }
542
+ /**
543
+ * @param {any} controller
544
+ * @returns {Promise<any>}
545
+ */
546
+ pull(controller) {
547
+ const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, addHeapObject(controller));
548
+ return takeObject(ret);
549
+ }
550
+ cancel() {
551
+ const ptr = this.__destroy_into_raw();
552
+ wasm.intounderlyingsource_cancel(ptr);
553
+ }
554
+ }
555
+
556
+ const MoveFunctionCallFinalization = (typeof FinalizationRegistry === 'undefined')
557
+ ? { register: () => {}, unregister: () => {} }
558
+ : new FinalizationRegistry(ptr => wasm.__wbg_movefunctioncall_free(ptr >>> 0, 1));
412
559
  /**
413
- * Call a Move entry function.
414
- */
415
- class BatchedFunctionCall {
560
+ * Calling a Move function.
561
+ *
562
+ * Similar to a public entry function call, but the arguments could specified as `CallArgument`,
563
+ * which can be a return value of a previous `MoveFunctionCall`.
564
+ */
565
+ class MoveFunctionCall {
416
566
 
417
567
  static __wrap(ptr) {
418
568
  ptr = ptr >>> 0;
419
- const obj = Object.create(BatchedFunctionCall.prototype);
569
+ const obj = Object.create(MoveFunctionCall.prototype);
420
570
  obj.__wbg_ptr = ptr;
421
- BatchedFunctionCallFinalization.register(obj, obj.__wbg_ptr, obj);
571
+ MoveFunctionCallFinalization.register(obj, obj.__wbg_ptr, obj);
422
572
  return obj;
423
573
  }
424
574
 
425
575
  __destroy_into_raw() {
426
576
  const ptr = this.__wbg_ptr;
427
577
  this.__wbg_ptr = 0;
428
- BatchedFunctionCallFinalization.unregister(this);
578
+ MoveFunctionCallFinalization.unregister(this);
579
+ return ptr;
580
+ }
581
+
582
+ free() {
583
+ const ptr = this.__destroy_into_raw();
584
+ wasm.__wbg_movefunctioncall_free(ptr, 0);
585
+ }
586
+ }
587
+
588
+ const PipeOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
589
+ ? { register: () => {}, unregister: () => {} }
590
+ : new FinalizationRegistry(ptr => wasm.__wbg_pipeoptions_free(ptr >>> 0, 1));
591
+ /**
592
+ * Raw options for [`pipeTo()`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/pipeTo).
593
+ */
594
+ class PipeOptions {
595
+
596
+ __destroy_into_raw() {
597
+ const ptr = this.__wbg_ptr;
598
+ this.__wbg_ptr = 0;
599
+ PipeOptionsFinalization.unregister(this);
600
+ return ptr;
601
+ }
602
+
603
+ free() {
604
+ const ptr = this.__destroy_into_raw();
605
+ wasm.__wbg_pipeoptions_free(ptr, 0);
606
+ }
607
+ /**
608
+ * @returns {boolean}
609
+ */
610
+ get preventClose() {
611
+ const ret = wasm.pipeoptions_preventClose(this.__wbg_ptr);
612
+ return ret !== 0;
613
+ }
614
+ /**
615
+ * @returns {boolean}
616
+ */
617
+ get preventCancel() {
618
+ const ret = wasm.pipeoptions_preventCancel(this.__wbg_ptr);
619
+ return ret !== 0;
620
+ }
621
+ /**
622
+ * @returns {boolean}
623
+ */
624
+ get preventAbort() {
625
+ const ret = wasm.pipeoptions_preventAbort(this.__wbg_ptr);
626
+ return ret !== 0;
627
+ }
628
+ /**
629
+ * @returns {AbortSignal | undefined}
630
+ */
631
+ get signal() {
632
+ const ret = wasm.pipeoptions_signal(this.__wbg_ptr);
633
+ return takeObject(ret);
634
+ }
635
+ }
636
+
637
+ const QueuingStrategyFinalization = (typeof FinalizationRegistry === 'undefined')
638
+ ? { register: () => {}, unregister: () => {} }
639
+ : new FinalizationRegistry(ptr => wasm.__wbg_queuingstrategy_free(ptr >>> 0, 1));
640
+
641
+ class QueuingStrategy {
642
+
643
+ __destroy_into_raw() {
644
+ const ptr = this.__wbg_ptr;
645
+ this.__wbg_ptr = 0;
646
+ QueuingStrategyFinalization.unregister(this);
429
647
  return ptr;
430
648
  }
431
649
 
432
650
  free() {
433
651
  const ptr = this.__destroy_into_raw();
434
- wasm.__wbg_batchedfunctioncall_free(ptr);
652
+ wasm.__wbg_queuingstrategy_free(ptr, 0);
653
+ }
654
+ /**
655
+ * @returns {number}
656
+ */
657
+ get highWaterMark() {
658
+ const ret = wasm.queuingstrategy_highWaterMark(this.__wbg_ptr);
659
+ return ret;
435
660
  }
436
661
  }
437
662
 
438
- const BatchedFunctionCallBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
663
+ const ReadableStreamGetReaderOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
439
664
  ? { register: () => {}, unregister: () => {} }
440
- : new FinalizationRegistry(ptr => wasm.__wbg_batchedfunctioncallbuilder_free(ptr >>> 0));
665
+ : new FinalizationRegistry(ptr => wasm.__wbg_readablestreamgetreaderoptions_free(ptr >>> 0, 1));
441
666
  /**
442
- */
443
- class BatchedFunctionCallBuilder {
667
+ * Raw options for [`getReader()`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/getReader).
668
+ */
669
+ class ReadableStreamGetReaderOptions {
670
+
671
+ __destroy_into_raw() {
672
+ const ptr = this.__wbg_ptr;
673
+ this.__wbg_ptr = 0;
674
+ ReadableStreamGetReaderOptionsFinalization.unregister(this);
675
+ return ptr;
676
+ }
677
+
678
+ free() {
679
+ const ptr = this.__destroy_into_raw();
680
+ wasm.__wbg_readablestreamgetreaderoptions_free(ptr, 0);
681
+ }
682
+ /**
683
+ * @returns {any}
684
+ */
685
+ get mode() {
686
+ const ret = wasm.readablestreamgetreaderoptions_mode(this.__wbg_ptr);
687
+ return __wbindgen_enum_ReadableStreamReaderMode[ret];
688
+ }
689
+ }
690
+
691
+ const TransactionComposerFinalization = (typeof FinalizationRegistry === 'undefined')
692
+ ? { register: () => {}, unregister: () => {} }
693
+ : new FinalizationRegistry(ptr => wasm.__wbg_transactioncomposer_free(ptr >>> 0, 1));
694
+
695
+ class TransactionComposer {
444
696
 
445
697
  static __wrap(ptr) {
446
698
  ptr = ptr >>> 0;
447
- const obj = Object.create(BatchedFunctionCallBuilder.prototype);
699
+ const obj = Object.create(TransactionComposer.prototype);
448
700
  obj.__wbg_ptr = ptr;
449
- BatchedFunctionCallBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
701
+ TransactionComposerFinalization.register(obj, obj.__wbg_ptr, obj);
450
702
  return obj;
451
703
  }
452
704
 
453
705
  __destroy_into_raw() {
454
706
  const ptr = this.__wbg_ptr;
455
707
  this.__wbg_ptr = 0;
456
- BatchedFunctionCallBuilderFinalization.unregister(this);
708
+ TransactionComposerFinalization.unregister(this);
457
709
  return ptr;
458
710
  }
459
711
 
460
712
  free() {
461
713
  const ptr = this.__destroy_into_raw();
462
- wasm.__wbg_batchedfunctioncallbuilder_free(ptr);
714
+ wasm.__wbg_transactioncomposer_free(ptr, 0);
463
715
  }
464
716
  /**
465
- * @returns {BatchedFunctionCallBuilder}
466
- */
717
+ * Create a builder with one distinct signer available. This should be the default configuration.
718
+ * @returns {TransactionComposer}
719
+ */
467
720
  static single_signer() {
468
- const ret = wasm.batchedfunctioncallbuilder_single_signer();
469
- return BatchedFunctionCallBuilder.__wrap(ret);
721
+ const ret = wasm.transactioncomposer_single_signer();
722
+ return TransactionComposer.__wrap(ret);
470
723
  }
471
724
  /**
472
- * @param {number} signer_count
473
- * @returns {BatchedFunctionCallBuilder}
474
- */
725
+ * Create a builder with one signer needed for script. This would be needed for multi-agent
726
+ * transaction where multiple signers are present.
727
+ * @param {number} signer_count
728
+ * @returns {TransactionComposer}
729
+ */
475
730
  static multi_signer(signer_count) {
476
- const ret = wasm.batchedfunctioncallbuilder_multi_signer(signer_count);
477
- return BatchedFunctionCallBuilder.__wrap(ret);
731
+ const ret = wasm.transactioncomposer_multi_signer(signer_count);
732
+ return TransactionComposer.__wrap(ret);
478
733
  }
479
734
  /**
480
- * @param {string} module
481
- * @param {string} _function
482
- * @param {(string)[]} ty_args
483
- * @param {(BatchArgument)[]} args
484
- * @returns {(BatchArgument)[]}
485
- */
486
- add_batched_call(module, _function, ty_args, args) {
487
- try {
488
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
489
- const ptr0 = passStringToWasm0(module, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
490
- const len0 = WASM_VECTOR_LEN;
491
- const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
492
- const len1 = WASM_VECTOR_LEN;
493
- const ptr2 = passArrayJsValueToWasm0(ty_args, wasm.__wbindgen_malloc);
494
- const len2 = WASM_VECTOR_LEN;
495
- const ptr3 = passArrayJsValueToWasm0(args, wasm.__wbindgen_malloc);
496
- const len3 = WASM_VECTOR_LEN;
497
- wasm.batchedfunctioncallbuilder_add_batched_call(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
498
- var r0 = getInt32Memory0()[retptr / 4 + 0];
499
- var r1 = getInt32Memory0()[retptr / 4 + 1];
500
- var r2 = getInt32Memory0()[retptr / 4 + 2];
501
- var r3 = getInt32Memory0()[retptr / 4 + 3];
502
- if (r3) {
503
- throw takeObject(r2);
504
- }
505
- var v5 = getArrayJsValueFromWasm0(r0, r1).slice();
506
- wasm.__wbindgen_free(r0, r1 * 4, 4);
507
- return v5;
508
- } finally {
509
- wasm.__wbindgen_add_to_stack_pointer(16);
510
- }
511
- }
512
- /**
513
- * @returns {Uint8Array}
514
- */
515
- generate_batched_calls() {
735
+ * Consume the builder and generate a serialized script with calls in the builder.
736
+ * @param {boolean} with_metadata
737
+ * @returns {Uint8Array}
738
+ */
739
+ generate_batched_calls(with_metadata) {
516
740
  try {
517
741
  const ptr = this.__destroy_into_raw();
518
742
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
519
- wasm.batchedfunctioncallbuilder_generate_batched_calls(retptr, ptr);
520
- var r0 = getInt32Memory0()[retptr / 4 + 0];
521
- var r1 = getInt32Memory0()[retptr / 4 + 1];
522
- var r2 = getInt32Memory0()[retptr / 4 + 2];
523
- var r3 = getInt32Memory0()[retptr / 4 + 3];
743
+ wasm.transactioncomposer_generate_batched_calls(retptr, ptr, with_metadata);
744
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
745
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
746
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
747
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
524
748
  if (r3) {
525
749
  throw takeObject(r2);
526
750
  }
@@ -532,34 +756,107 @@ class BatchedFunctionCallBuilder {
532
756
  }
533
757
  }
534
758
  /**
535
- * @param {string} api_url
536
- * @param {string} module_name
537
- * @returns {Promise<void>}
538
- */
759
+ * Load up a module from a remote endpoint. Will need to invoke this function prior to the
760
+ * call.
761
+ * @param {string} api_url
762
+ * @param {string} module_name
763
+ * @returns {Promise<void>}
764
+ */
539
765
  load_module(api_url, module_name) {
540
766
  const ptr0 = passStringToWasm0(api_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
541
767
  const len0 = WASM_VECTOR_LEN;
542
768
  const ptr1 = passStringToWasm0(module_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
543
769
  const len1 = WASM_VECTOR_LEN;
544
- const ret = wasm.batchedfunctioncallbuilder_load_module(this.__wbg_ptr, ptr0, len0, ptr1, len1);
770
+ const ret = wasm.transactioncomposer_load_module(this.__wbg_ptr, ptr0, len0, ptr1, len1);
771
+ return takeObject(ret);
772
+ }
773
+ /**
774
+ * Load up the dependency modules of a TypeTag from a remote endpoint.
775
+ * @param {string} api_url
776
+ * @param {string} type_tag
777
+ * @returns {Promise<void>}
778
+ */
779
+ load_type_tag(api_url, type_tag) {
780
+ const ptr0 = passStringToWasm0(api_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
781
+ const len0 = WASM_VECTOR_LEN;
782
+ const ptr1 = passStringToWasm0(type_tag, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
783
+ const len1 = WASM_VECTOR_LEN;
784
+ const ret = wasm.transactioncomposer_load_type_tag(this.__wbg_ptr, ptr0, len0, ptr1, len1);
545
785
  return takeObject(ret);
546
786
  }
787
+ /**
788
+ * This would be the core api for the `TransactionComposer`. The function would:
789
+ * - add the function call to the builder
790
+ * - allocate the locals and parameters needed for this function call
791
+ * - return the arguments back to the caller which could be passed into subsequent calls
792
+ * into `add_batched_call`.
793
+ *
794
+ * This function would also check for the ability and type safety when passing values
795
+ * into the function call, and will abort if there's a violation.
796
+ * @param {string} module
797
+ * @param {string} _function
798
+ * @param {(string)[]} ty_args
799
+ * @param {(CallArgument)[]} args
800
+ * @returns {(CallArgument)[]}
801
+ */
802
+ add_batched_call(module, _function, ty_args, args) {
803
+ try {
804
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
805
+ const ptr0 = passStringToWasm0(module, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
806
+ const len0 = WASM_VECTOR_LEN;
807
+ const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
808
+ const len1 = WASM_VECTOR_LEN;
809
+ const ptr2 = passArrayJsValueToWasm0(ty_args, wasm.__wbindgen_malloc);
810
+ const len2 = WASM_VECTOR_LEN;
811
+ const ptr3 = passArrayJsValueToWasm0(args, wasm.__wbindgen_malloc);
812
+ const len3 = WASM_VECTOR_LEN;
813
+ wasm.transactioncomposer_add_batched_call(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
814
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
815
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
816
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
817
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
818
+ if (r3) {
819
+ throw takeObject(r2);
820
+ }
821
+ var v5 = getArrayJsValueFromWasm0(r0, r1).slice();
822
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
823
+ return v5;
824
+ } finally {
825
+ wasm.__wbindgen_add_to_stack_pointer(16);
826
+ }
827
+ }
547
828
  }
548
829
 
549
830
  function __wbg_get_imports() {
550
831
  const imports = {};
551
832
  imports.wbg = {};
552
- imports.wbg.__wbg_batchargument_new = function(arg0) {
553
- const ret = BatchArgument.__wrap(arg0);
833
+ imports.wbg.__wbg_movefunctioncall_new = function(arg0) {
834
+ const ret = MoveFunctionCall.__wrap(arg0);
554
835
  return addHeapObject(ret);
555
836
  };
556
- imports.wbg.__wbg_batchedfunctioncall_new = function(arg0) {
557
- const ret = BatchedFunctionCall.__wrap(arg0);
837
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
838
+ const ret = getStringFromWasm0(arg0, arg1);
558
839
  return addHeapObject(ret);
559
840
  };
560
841
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
561
842
  takeObject(arg0);
562
843
  };
844
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
845
+ const obj = getObject(arg1);
846
+ const ret = typeof(obj) === 'string' ? obj : undefined;
847
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
848
+ var len1 = WASM_VECTOR_LEN;
849
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
850
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
851
+ };
852
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
853
+ const ret = getObject(arg0);
854
+ return addHeapObject(ret);
855
+ };
856
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
857
+ const ret = getObject(arg0) === undefined;
858
+ return ret;
859
+ };
563
860
  imports.wbg.__wbindgen_cb_drop = function(arg0) {
564
861
  const obj = takeObject(arg0).original;
565
862
  if (obj.cnt-- == 1) {
@@ -569,31 +866,46 @@ function __wbg_get_imports() {
569
866
  const ret = false;
570
867
  return ret;
571
868
  };
572
- imports.wbg.__wbg_batchargument_unwrap = function(arg0) {
573
- const ret = BatchArgument.__unwrap(takeObject(arg0));
869
+ imports.wbg.__wbg_fetch_6a2624d7f767e331 = function(arg0) {
870
+ const ret = fetch(getObject(arg0));
871
+ return addHeapObject(ret);
872
+ };
873
+ imports.wbg.__wbg_respond_8fadc5f5c9d95422 = function(arg0, arg1) {
874
+ getObject(arg0).respond(arg1 >>> 0);
875
+ };
876
+ imports.wbg.__wbg_byobRequest_08c18cee35def1f4 = function(arg0) {
877
+ const ret = getObject(arg0).byobRequest;
878
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
879
+ };
880
+ imports.wbg.__wbg_view_231340b0dd8a2484 = function(arg0) {
881
+ const ret = getObject(arg0).view;
882
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
883
+ };
884
+ imports.wbg.__wbg_byteLength_5299848ed3264181 = function(arg0) {
885
+ const ret = getObject(arg0).byteLength;
574
886
  return ret;
575
887
  };
576
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
577
- const ret = getStringFromWasm0(arg0, arg1);
888
+ imports.wbg.__wbg_close_da7e6fb9d9851e5a = function(arg0) {
889
+ getObject(arg0).close();
890
+ };
891
+ imports.wbg.__wbg_buffer_4e79326814bdd393 = function(arg0) {
892
+ const ret = getObject(arg0).buffer;
578
893
  return addHeapObject(ret);
579
894
  };
580
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
581
- const obj = getObject(arg1);
582
- const ret = typeof(obj) === 'string' ? obj : undefined;
583
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
584
- var len1 = WASM_VECTOR_LEN;
585
- getInt32Memory0()[arg0 / 4 + 1] = len1;
586
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
895
+ imports.wbg.__wbg_byteOffset_b69b0a07afccce19 = function(arg0) {
896
+ const ret = getObject(arg0).byteOffset;
897
+ return ret;
587
898
  };
588
- imports.wbg.__wbg_fetch_1e4e8ed1f64c7e28 = function(arg0) {
589
- const ret = fetch(getObject(arg0));
590
- return addHeapObject(ret);
899
+ imports.wbg.__wbg_close_e9110ca16e2567db = function(arg0) {
900
+ getObject(arg0).close();
591
901
  };
592
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
593
- const ret = getObject(arg0);
594
- return addHeapObject(ret);
902
+ imports.wbg.__wbg_enqueue_d71a1a518e21f5c3 = function(arg0, arg1) {
903
+ getObject(arg0).enqueue(getObject(arg1));
904
+ };
905
+ imports.wbg.__wbg_queueMicrotask_c5419c06eab41e73 = function(arg0) {
906
+ queueMicrotask(getObject(arg0));
595
907
  };
596
- imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {
908
+ imports.wbg.__wbg_queueMicrotask_848aa4969108a57e = function(arg0) {
597
909
  const ret = getObject(arg0).queueMicrotask;
598
910
  return addHeapObject(ret);
599
911
  };
@@ -601,35 +913,14 @@ function __wbg_get_imports() {
601
913
  const ret = typeof(getObject(arg0)) === 'function';
602
914
  return ret;
603
915
  };
604
- imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
605
- queueMicrotask(getObject(arg0));
606
- };
607
916
  imports.wbg.__wbg_fetch_693453ca3f88c055 = function(arg0, arg1) {
608
917
  const ret = getObject(arg0).fetch(getObject(arg1));
609
918
  return addHeapObject(ret);
610
919
  };
611
- imports.wbg.__wbg_new_7a20246daa6eec7e = function() { return handleError(function () {
612
- const ret = new Headers();
613
- return addHeapObject(ret);
614
- }, arguments) };
615
- imports.wbg.__wbg_append_aa3f462f9e2b5ff2 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
616
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
617
- }, arguments) };
618
- imports.wbg.__wbg_newwithstrandinit_f581dff0d19a8b03 = function() { return handleError(function (arg0, arg1, arg2) {
619
- const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
920
+ imports.wbg.__wbg_newwithu8arraysequenceandoptions_8a6b4effbcac4a62 = function() { return handleError(function (arg0, arg1) {
921
+ const ret = new Blob(getObject(arg0), getObject(arg1));
620
922
  return addHeapObject(ret);
621
923
  }, arguments) };
622
- imports.wbg.__wbg_signal_3c701f5f40a5f08d = function(arg0) {
623
- const ret = getObject(arg0).signal;
624
- return addHeapObject(ret);
625
- };
626
- imports.wbg.__wbg_new_0ae46f44b7485bb2 = function() { return handleError(function () {
627
- const ret = new AbortController();
628
- return addHeapObject(ret);
629
- }, arguments) };
630
- imports.wbg.__wbg_abort_2c4fb490d878d2b2 = function(arg0) {
631
- getObject(arg0).abort();
632
- };
633
924
  imports.wbg.__wbg_instanceof_Response_4c3b1446206114d1 = function(arg0) {
634
925
  let result;
635
926
  try {
@@ -644,8 +935,8 @@ function __wbg_get_imports() {
644
935
  const ret = getObject(arg1).url;
645
936
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
646
937
  const len1 = WASM_VECTOR_LEN;
647
- getInt32Memory0()[arg0 / 4 + 1] = len1;
648
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
938
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
939
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
649
940
  };
650
941
  imports.wbg.__wbg_status_d6d47ad2837621eb = function(arg0) {
651
942
  const ret = getObject(arg0).status;
@@ -659,79 +950,119 @@ function __wbg_get_imports() {
659
950
  const ret = getObject(arg0).text();
660
951
  return addHeapObject(ret);
661
952
  }, arguments) };
953
+ imports.wbg.__wbg_new_7a20246daa6eec7e = function() { return handleError(function () {
954
+ const ret = new Headers();
955
+ return addHeapObject(ret);
956
+ }, arguments) };
957
+ imports.wbg.__wbg_append_aa3f462f9e2b5ff2 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
958
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
959
+ }, arguments) };
960
+ imports.wbg.__wbg_signal_3c701f5f40a5f08d = function(arg0) {
961
+ const ret = getObject(arg0).signal;
962
+ return addHeapObject(ret);
963
+ };
964
+ imports.wbg.__wbg_new_0ae46f44b7485bb2 = function() { return handleError(function () {
965
+ const ret = new AbortController();
966
+ return addHeapObject(ret);
967
+ }, arguments) };
968
+ imports.wbg.__wbg_abort_2c4fb490d878d2b2 = function(arg0) {
969
+ getObject(arg0).abort();
970
+ };
971
+ imports.wbg.__wbg_newwithstrandinit_f581dff0d19a8b03 = function() { return handleError(function (arg0, arg1, arg2) {
972
+ const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
973
+ return addHeapObject(ret);
974
+ }, arguments) };
975
+ imports.wbg.__wbg_new_9543178e16f01733 = function() { return handleError(function () {
976
+ const ret = new FormData();
977
+ return addHeapObject(ret);
978
+ }, arguments) };
979
+ imports.wbg.__wbg_append_a2eb87e422026db5 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
980
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3));
981
+ }, arguments) };
982
+ imports.wbg.__wbg_append_26434afd037ecfb1 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
983
+ getObject(arg0).append(getStringFromWasm0(arg1, arg2), getObject(arg3), getStringFromWasm0(arg4, arg5));
984
+ }, arguments) };
662
985
  imports.wbg.__wbindgen_is_object = function(arg0) {
663
986
  const val = getObject(arg0);
664
987
  const ret = typeof(val) === 'object' && val !== null;
665
988
  return ret;
666
989
  };
667
- imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {
990
+ imports.wbg.__wbg_new_034f913e7636e987 = function() {
991
+ const ret = new Array();
992
+ return addHeapObject(ret);
993
+ };
994
+ imports.wbg.__wbg_newnoargs_1ede4bf2ebbaaf43 = function(arg0, arg1) {
668
995
  const ret = new Function(getStringFromWasm0(arg0, arg1));
669
996
  return addHeapObject(ret);
670
997
  };
671
- imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
998
+ imports.wbg.__wbg_next_13b477da1eaa3897 = function(arg0) {
672
999
  const ret = getObject(arg0).next;
673
1000
  return addHeapObject(ret);
674
1001
  };
675
- imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {
1002
+ imports.wbg.__wbg_next_b06e115d1b01e10b = function() { return handleError(function (arg0) {
676
1003
  const ret = getObject(arg0).next();
677
1004
  return addHeapObject(ret);
678
1005
  }, arguments) };
679
- imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {
1006
+ imports.wbg.__wbg_done_983b5ffcaec8c583 = function(arg0) {
680
1007
  const ret = getObject(arg0).done;
681
1008
  return ret;
682
1009
  };
683
- imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {
1010
+ imports.wbg.__wbg_value_2ab8a198c834c26a = function(arg0) {
684
1011
  const ret = getObject(arg0).value;
685
1012
  return addHeapObject(ret);
686
1013
  };
687
- imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {
1014
+ imports.wbg.__wbg_iterator_695d699a44d6234c = function() {
688
1015
  const ret = Symbol.iterator;
689
1016
  return addHeapObject(ret);
690
1017
  };
691
- imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
1018
+ imports.wbg.__wbg_get_ef828680c64da212 = function() { return handleError(function (arg0, arg1) {
692
1019
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
693
1020
  return addHeapObject(ret);
694
1021
  }, arguments) };
695
- imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
1022
+ imports.wbg.__wbg_call_a9ef466721e824f2 = function() { return handleError(function (arg0, arg1) {
696
1023
  const ret = getObject(arg0).call(getObject(arg1));
697
1024
  return addHeapObject(ret);
698
1025
  }, arguments) };
699
- imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {
1026
+ imports.wbg.__wbg_new_e69b5f66fda8f13c = function() {
700
1027
  const ret = new Object();
701
1028
  return addHeapObject(ret);
702
1029
  };
703
- imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {
1030
+ imports.wbg.__wbg_self_bf91bf94d9e04084 = function() { return handleError(function () {
704
1031
  const ret = self.self;
705
1032
  return addHeapObject(ret);
706
1033
  }, arguments) };
707
- imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {
1034
+ imports.wbg.__wbg_window_52dd9f07d03fd5f8 = function() { return handleError(function () {
708
1035
  const ret = window.window;
709
1036
  return addHeapObject(ret);
710
1037
  }, arguments) };
711
- imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {
1038
+ imports.wbg.__wbg_globalThis_05c129bf37fcf1be = function() { return handleError(function () {
712
1039
  const ret = globalThis.globalThis;
713
1040
  return addHeapObject(ret);
714
1041
  }, arguments) };
715
- imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {
1042
+ imports.wbg.__wbg_global_3eca19bb09e9c484 = function() { return handleError(function () {
716
1043
  const ret = global.global;
717
1044
  return addHeapObject(ret);
718
1045
  }, arguments) };
719
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
720
- const ret = getObject(arg0) === undefined;
1046
+ imports.wbg.__wbg_push_36cf4d81d7da33d1 = function(arg0, arg1) {
1047
+ const ret = getObject(arg0).push(getObject(arg1));
721
1048
  return ret;
722
1049
  };
723
- imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {
1050
+ imports.wbg.__wbg_new_70a2f23d1565c04c = function(arg0, arg1) {
1051
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1052
+ return addHeapObject(ret);
1053
+ };
1054
+ imports.wbg.__wbg_call_3bfa248576352471 = function() { return handleError(function (arg0, arg1, arg2) {
724
1055
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
725
1056
  return addHeapObject(ret);
726
1057
  }, arguments) };
727
- imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {
1058
+ imports.wbg.__wbg_new_1073970097e5a420 = function(arg0, arg1) {
728
1059
  try {
729
1060
  var state0 = {a: arg0, b: arg1};
730
1061
  var cb0 = (arg0, arg1) => {
731
1062
  const a = state0.a;
732
1063
  state0.a = 0;
733
1064
  try {
734
- return __wbg_adapter_90(a, state0.b, arg0, arg1);
1065
+ return __wbg_adapter_135(a, state0.b, arg0, arg1);
735
1066
  } finally {
736
1067
  state0.a = a;
737
1068
  }
@@ -742,39 +1073,50 @@ function __wbg_get_imports() {
742
1073
  state0.a = state0.b = 0;
743
1074
  }
744
1075
  };
745
- imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {
1076
+ imports.wbg.__wbg_resolve_0aad7c1484731c99 = function(arg0) {
746
1077
  const ret = Promise.resolve(getObject(arg0));
747
1078
  return addHeapObject(ret);
748
1079
  };
749
- imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {
1080
+ imports.wbg.__wbg_then_748f75edfb032440 = function(arg0, arg1) {
750
1081
  const ret = getObject(arg0).then(getObject(arg1));
751
1082
  return addHeapObject(ret);
752
1083
  };
753
- imports.wbg.__wbg_then_a73caa9a87991566 = function(arg0, arg1, arg2) {
1084
+ imports.wbg.__wbg_then_4866a7d9f55d8f3e = function(arg0, arg1, arg2) {
754
1085
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
755
1086
  return addHeapObject(ret);
756
1087
  };
757
- imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
1088
+ imports.wbg.__wbg_buffer_ccaed51a635d8a2d = function(arg0) {
758
1089
  const ret = getObject(arg0).buffer;
759
1090
  return addHeapObject(ret);
760
1091
  };
761
- imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {
1092
+ imports.wbg.__wbg_newwithbyteoffsetandlength_7e3eb787208af730 = function(arg0, arg1, arg2) {
762
1093
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
763
1094
  return addHeapObject(ret);
764
1095
  };
765
- imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {
1096
+ imports.wbg.__wbg_new_fec2611eb9180f95 = function(arg0) {
766
1097
  const ret = new Uint8Array(getObject(arg0));
767
1098
  return addHeapObject(ret);
768
1099
  };
769
- imports.wbg.__wbg_has_0af94d20077affa2 = function() { return handleError(function (arg0, arg1) {
1100
+ imports.wbg.__wbg_set_ec2fcf81bc573fd9 = function(arg0, arg1, arg2) {
1101
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
1102
+ };
1103
+ imports.wbg.__wbg_length_9254c4bd3b9f23c4 = function(arg0) {
1104
+ const ret = getObject(arg0).length;
1105
+ return ret;
1106
+ };
1107
+ imports.wbg.__wbg_has_bd717f25f195f23d = function() { return handleError(function (arg0, arg1) {
770
1108
  const ret = Reflect.has(getObject(arg0), getObject(arg1));
771
1109
  return ret;
772
1110
  }, arguments) };
773
- imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) {
1111
+ imports.wbg.__wbg_set_e864d25d9b399c9f = function() { return handleError(function (arg0, arg1, arg2) {
774
1112
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
775
1113
  return ret;
776
1114
  }, arguments) };
777
- imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() { return handleError(function (arg0) {
1115
+ imports.wbg.__wbg_parse_51ee5409072379d3 = function() { return handleError(function (arg0, arg1) {
1116
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
1117
+ return addHeapObject(ret);
1118
+ }, arguments) };
1119
+ imports.wbg.__wbg_stringify_eead5648c09faaf8 = function() { return handleError(function (arg0) {
778
1120
  const ret = JSON.stringify(getObject(arg0));
779
1121
  return addHeapObject(ret);
780
1122
  }, arguments) };
@@ -782,8 +1124,8 @@ function __wbg_get_imports() {
782
1124
  const ret = debugString(getObject(arg1));
783
1125
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
784
1126
  const len1 = WASM_VECTOR_LEN;
785
- getInt32Memory0()[arg0 / 4 + 1] = len1;
786
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1127
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1128
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
787
1129
  };
788
1130
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
789
1131
  throw new Error(getStringFromWasm0(arg0, arg1));
@@ -792,8 +1134,8 @@ function __wbg_get_imports() {
792
1134
  const ret = wasm.memory;
793
1135
  return addHeapObject(ret);
794
1136
  };
795
- imports.wbg.__wbindgen_closure_wrapper1042 = function(arg0, arg1, arg2) {
796
- const ret = makeMutClosure(arg0, arg1, 297, __wbg_adapter_24);
1137
+ imports.wbg.__wbindgen_closure_wrapper1378 = function(arg0, arg1, arg2) {
1138
+ const ret = makeMutClosure(arg0, arg1, 364, __wbg_adapter_24);
797
1139
  return addHeapObject(ret);
798
1140
  };
799
1141
 
@@ -802,9 +1144,9 @@ function __wbg_get_imports() {
802
1144
 
803
1145
  function __wbg_finalize_init(instance, module) {
804
1146
  wasm = instance.exports;
805
- cachedInt32Memory0 = null;
806
- cachedUint32Memory0 = null;
807
- cachedUint8Memory0 = null;
1147
+ cachedDataViewMemory0 = null;
1148
+ cachedUint8ArrayMemory0 = null;
1149
+
808
1150
 
809
1151
 
810
1152
  return wasm;
@@ -813,6 +1155,15 @@ function __wbg_finalize_init(instance, module) {
813
1155
  function initSync(module) {
814
1156
  if (wasm !== undefined) return wasm;
815
1157
 
1158
+
1159
+ if (typeof module !== 'undefined') {
1160
+ if (Object.getPrototypeOf(module) === Object.prototype) {
1161
+ ({module} = module);
1162
+ } else {
1163
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead');
1164
+ }
1165
+ }
1166
+
816
1167
  const imports = __wbg_get_imports();
817
1168
 
818
1169
  if (!(module instanceof WebAssembly.Module)) {
@@ -825,13 +1176,20 @@ function initSync(module) {
825
1176
  }
826
1177
 
827
1178
  async function get_wasm (){
828
- return (await Promise.resolve().then(function () { return require('./aptos_intent_bg-A1npHFCR.js'); })).default()
1179
+ return (await Promise.resolve().then(function () { return require('./aptos_dynamic_transaction_composer_bg-BYt8TUnu.js'); })).default()
829
1180
  }
830
1181
 
831
- exports.BatchArgument = BatchArgument;
832
- exports.BatchArgumentType = BatchArgumentType;
833
- exports.BatchedFunctionCall = BatchedFunctionCall;
834
- exports.BatchedFunctionCallBuilder = BatchedFunctionCallBuilder;
835
- exports.generate_intent_payload_wasm = generate_intent_payload_wasm;
1182
+ exports.AllocatedLocal = AllocatedLocal;
1183
+ exports.BuilderCall = BuilderCall;
1184
+ exports.CallArgument = CallArgument;
1185
+ exports.IntoUnderlyingByteSource = IntoUnderlyingByteSource;
1186
+ exports.IntoUnderlyingSink = IntoUnderlyingSink;
1187
+ exports.IntoUnderlyingSource = IntoUnderlyingSource;
1188
+ exports.MoveFunctionCall = MoveFunctionCall;
1189
+ exports.PipeOptions = PipeOptions;
1190
+ exports.QueuingStrategy = QueuingStrategy;
1191
+ exports.ReadableStreamGetReaderOptions = ReadableStreamGetReaderOptions;
1192
+ exports.TransactionComposer = TransactionComposer;
1193
+ exports.generate_batched_call_payload_wasm = generate_batched_call_payload_wasm;
836
1194
  exports.get_wasm = get_wasm;
837
1195
  exports.initSync = initSync;