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