@wgb5445/aptos-intent-npm 0.0.11 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
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,257 +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);
320
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 {
321
311
 
322
312
  __destroy_into_raw() {
323
313
  const ptr = this.__wbg_ptr;
324
314
  this.__wbg_ptr = 0;
325
- BatchArgumentFinalization.unregister(this);
315
+ BuilderCallFinalization.unregister(this);
326
316
  return ptr;
327
317
  }
328
318
 
329
319
  free() {
330
320
  const ptr = this.__destroy_into_raw();
331
- wasm.__wbg_batchargument_free(ptr);
321
+ wasm.__wbg_buildercall_free(ptr, 0);
332
322
  }
333
323
  }
334
324
 
335
- const BatchArgumentWASMFinalization = (typeof FinalizationRegistry === 'undefined')
325
+ const CallArgumentFinalization = (typeof FinalizationRegistry === 'undefined')
336
326
  ? { register: () => {}, unregister: () => {} }
337
- : new FinalizationRegistry(ptr => wasm.__wbg_batchargumentwasm_free(ptr >>> 0));
327
+ : new FinalizationRegistry(ptr => wasm.__wbg_callargument_free(ptr >>> 0, 1));
338
328
 
339
- class BatchArgumentWASM {
329
+ class CallArgument {
340
330
 
341
331
  __destroy_into_raw() {
342
332
  const ptr = this.__wbg_ptr;
343
333
  this.__wbg_ptr = 0;
344
- BatchArgumentWASMFinalization.unregister(this);
334
+ CallArgumentFinalization.unregister(this);
345
335
  return ptr;
346
336
  }
347
337
 
348
338
  free() {
349
339
  const ptr = this.__destroy_into_raw();
350
- wasm.__wbg_batchargumentwasm_free(ptr);
340
+ wasm.__wbg_callargument_free(ptr, 0);
351
341
  }
352
342
  /**
353
- * @param {Uint8Array} bytes
354
- * @returns {BatchArgument}
355
- */
343
+ * @param {Uint8Array} bytes
344
+ * @returns {CallArgument}
345
+ */
356
346
  static new_bytes(bytes) {
357
347
  const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
358
348
  const len0 = WASM_VECTOR_LEN;
359
- const ret = wasm.batchargumentwasm_new_bytes(ptr0, len0);
360
- return BatchArgument.__wrap(ret);
349
+ const ret = wasm.callargument_new_bytes(ptr0, len0);
350
+ return takeObject(ret);
361
351
  }
362
352
  /**
363
- * @param {number} signer_idx
364
- * @returns {BatchArgument}
365
- */
353
+ * @param {number} signer_idx
354
+ * @returns {CallArgument}
355
+ */
366
356
  static new_signer(signer_idx) {
367
- const ret = wasm.batchargumentwasm_new_signer(signer_idx);
368
- return BatchArgument.__wrap(ret);
357
+ const ret = wasm.callargument_new_signer(signer_idx);
358
+ return takeObject(ret);
369
359
  }
370
360
  /**
371
- * @returns {BatchArgument}
372
- */
361
+ * @returns {CallArgument}
362
+ */
373
363
  borrow() {
374
364
  try {
375
365
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
376
- wasm.batchargumentwasm_borrow(retptr, this.__wbg_ptr);
377
- var r0 = getInt32Memory0()[retptr / 4 + 0];
378
- var r1 = getInt32Memory0()[retptr / 4 + 1];
379
- 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);
380
370
  if (r2) {
381
371
  throw takeObject(r1);
382
372
  }
383
- return BatchArgument.__wrap(r0);
373
+ return takeObject(r0);
384
374
  } finally {
385
375
  wasm.__wbindgen_add_to_stack_pointer(16);
386
376
  }
387
377
  }
388
378
  /**
389
- * @returns {BatchArgument}
390
- */
379
+ * @returns {CallArgument}
380
+ */
391
381
  borrow_mut() {
392
382
  try {
393
383
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
394
- wasm.batchargumentwasm_borrow_mut(retptr, this.__wbg_ptr);
395
- var r0 = getInt32Memory0()[retptr / 4 + 0];
396
- var r1 = getInt32Memory0()[retptr / 4 + 1];
397
- 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);
398
388
  if (r2) {
399
389
  throw takeObject(r1);
400
390
  }
401
- return BatchArgument.__wrap(r0);
391
+ return takeObject(r0);
402
392
  } finally {
403
393
  wasm.__wbindgen_add_to_stack_pointer(16);
404
394
  }
405
395
  }
406
396
  /**
407
- * @returns {BatchArgument}
408
- */
397
+ * @returns {CallArgument}
398
+ */
409
399
  copy() {
410
400
  try {
411
401
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
412
- wasm.batchargumentwasm_copy(retptr, this.__wbg_ptr);
413
- var r0 = getInt32Memory0()[retptr / 4 + 0];
414
- var r1 = getInt32Memory0()[retptr / 4 + 1];
415
- 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);
416
406
  if (r2) {
417
407
  throw takeObject(r1);
418
408
  }
419
- return BatchArgument.__wrap(r0);
409
+ return takeObject(r0);
420
410
  } finally {
421
411
  wasm.__wbindgen_add_to_stack_pointer(16);
422
412
  }
423
413
  }
424
414
  }
425
415
 
426
- const BatchedFunctionCallFinalization = (typeof FinalizationRegistry === 'undefined')
416
+ const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
427
417
  ? { register: () => {}, unregister: () => {} }
428
- : 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));
429
557
  /**
430
- * Call a Move entry function.
431
- */
432
- 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 {
433
564
 
434
565
  static __wrap(ptr) {
435
566
  ptr = ptr >>> 0;
436
- const obj = Object.create(BatchedFunctionCall.prototype);
567
+ const obj = Object.create(MoveFunctionCall.prototype);
437
568
  obj.__wbg_ptr = ptr;
438
- BatchedFunctionCallFinalization.register(obj, obj.__wbg_ptr, obj);
569
+ MoveFunctionCallFinalization.register(obj, obj.__wbg_ptr, obj);
439
570
  return obj;
440
571
  }
441
572
 
442
573
  __destroy_into_raw() {
443
574
  const ptr = this.__wbg_ptr;
444
575
  this.__wbg_ptr = 0;
445
- 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);
446
645
  return ptr;
447
646
  }
448
647
 
449
648
  free() {
450
649
  const ptr = this.__destroy_into_raw();
451
- 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;
452
658
  }
453
659
  }
454
660
 
455
- const BatchedFunctionCallBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
661
+ const ReadableStreamGetReaderOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
456
662
  ? { register: () => {}, unregister: () => {} }
457
- : new FinalizationRegistry(ptr => wasm.__wbg_batchedfunctioncallbuilder_free(ptr >>> 0));
663
+ : new FinalizationRegistry(ptr => wasm.__wbg_readablestreamgetreaderoptions_free(ptr >>> 0, 1));
458
664
  /**
459
- */
460
- 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 {
461
694
 
462
695
  static __wrap(ptr) {
463
696
  ptr = ptr >>> 0;
464
- const obj = Object.create(BatchedFunctionCallBuilder.prototype);
697
+ const obj = Object.create(TransactionComposer.prototype);
465
698
  obj.__wbg_ptr = ptr;
466
- BatchedFunctionCallBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
699
+ TransactionComposerFinalization.register(obj, obj.__wbg_ptr, obj);
467
700
  return obj;
468
701
  }
469
702
 
470
703
  __destroy_into_raw() {
471
704
  const ptr = this.__wbg_ptr;
472
705
  this.__wbg_ptr = 0;
473
- BatchedFunctionCallBuilderFinalization.unregister(this);
706
+ TransactionComposerFinalization.unregister(this);
474
707
  return ptr;
475
708
  }
476
709
 
477
710
  free() {
478
711
  const ptr = this.__destroy_into_raw();
479
- wasm.__wbg_batchedfunctioncallbuilder_free(ptr);
712
+ wasm.__wbg_transactioncomposer_free(ptr, 0);
480
713
  }
481
714
  /**
482
- * @returns {BatchedFunctionCallBuilder}
483
- */
715
+ * Create a builder with one distinct signer available. This should be the default configuration.
716
+ * @returns {TransactionComposer}
717
+ */
484
718
  static single_signer() {
485
- const ret = wasm.batchedfunctioncallbuilder_single_signer();
486
- return BatchedFunctionCallBuilder.__wrap(ret);
719
+ const ret = wasm.transactioncomposer_single_signer();
720
+ return TransactionComposer.__wrap(ret);
487
721
  }
488
722
  /**
489
- * @param {number} signer_count
490
- * @returns {BatchedFunctionCallBuilder}
491
- */
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
+ */
492
728
  static multi_signer(signer_count) {
493
- const ret = wasm.batchedfunctioncallbuilder_multi_signer(signer_count);
494
- return BatchedFunctionCallBuilder.__wrap(ret);
495
- }
496
- /**
497
- * @param {string} module
498
- * @param {string} _function
499
- * @param {(string)[]} ty_args
500
- * @param {(BatchArgument)[]} args
501
- * @returns {(BatchArgument)[]}
502
- */
503
- add_batched_call(module, _function, ty_args, args) {
504
- try {
505
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
506
- const ptr0 = passStringToWasm0(module, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
507
- const len0 = WASM_VECTOR_LEN;
508
- const ptr1 = passStringToWasm0(_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
509
- const len1 = WASM_VECTOR_LEN;
510
- const ptr2 = passArrayJsValueToWasm0(ty_args, wasm.__wbindgen_malloc);
511
- const len2 = WASM_VECTOR_LEN;
512
- const ptr3 = passArrayJsValueToWasm0(args, wasm.__wbindgen_malloc);
513
- const len3 = WASM_VECTOR_LEN;
514
- wasm.batchedfunctioncallbuilder_add_batched_call(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
515
- var r0 = getInt32Memory0()[retptr / 4 + 0];
516
- var r1 = getInt32Memory0()[retptr / 4 + 1];
517
- var r2 = getInt32Memory0()[retptr / 4 + 2];
518
- var r3 = getInt32Memory0()[retptr / 4 + 3];
519
- if (r3) {
520
- throw takeObject(r2);
521
- }
522
- var v5 = getArrayJsValueFromWasm0(r0, r1).slice();
523
- wasm.__wbindgen_free(r0, r1 * 4, 4);
524
- return v5;
525
- } finally {
526
- wasm.__wbindgen_add_to_stack_pointer(16);
527
- }
729
+ const ret = wasm.transactioncomposer_multi_signer(signer_count);
730
+ return TransactionComposer.__wrap(ret);
528
731
  }
529
732
  /**
530
- * @returns {Uint8Array}
531
- */
532
- 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) {
533
738
  try {
534
739
  const ptr = this.__destroy_into_raw();
535
740
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
536
- wasm.batchedfunctioncallbuilder_generate_batched_calls(retptr, ptr);
537
- var r0 = getInt32Memory0()[retptr / 4 + 0];
538
- var r1 = getInt32Memory0()[retptr / 4 + 1];
539
- var r2 = getInt32Memory0()[retptr / 4 + 2];
540
- 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);
541
746
  if (r3) {
542
747
  throw takeObject(r2);
543
748
  }
@@ -549,34 +754,107 @@ class BatchedFunctionCallBuilder {
549
754
  }
550
755
  }
551
756
  /**
552
- * @param {string} api_url
553
- * @param {string} module_name
554
- * @returns {Promise<void>}
555
- */
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
+ */
556
763
  load_module(api_url, module_name) {
557
764
  const ptr0 = passStringToWasm0(api_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
558
765
  const len0 = WASM_VECTOR_LEN;
559
766
  const ptr1 = passStringToWasm0(module_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
560
767
  const len1 = WASM_VECTOR_LEN;
561
- 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);
562
783
  return takeObject(ret);
563
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
+ }
564
826
  }
565
827
 
566
828
  function __wbg_get_imports() {
567
829
  const imports = {};
568
830
  imports.wbg = {};
569
- imports.wbg.__wbg_batchargument_new = function(arg0) {
570
- const ret = BatchArgument.__wrap(arg0);
831
+ imports.wbg.__wbg_movefunctioncall_new = function(arg0) {
832
+ const ret = MoveFunctionCall.__wrap(arg0);
571
833
  return addHeapObject(ret);
572
834
  };
573
- imports.wbg.__wbg_batchedfunctioncall_new = function(arg0) {
574
- const ret = BatchedFunctionCall.__wrap(arg0);
835
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
836
+ const ret = getStringFromWasm0(arg0, arg1);
575
837
  return addHeapObject(ret);
576
838
  };
577
839
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
578
840
  takeObject(arg0);
579
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
+ };
580
858
  imports.wbg.__wbindgen_cb_drop = function(arg0) {
581
859
  const obj = takeObject(arg0).original;
582
860
  if (obj.cnt-- == 1) {
@@ -586,31 +864,46 @@ function __wbg_get_imports() {
586
864
  const ret = false;
587
865
  return ret;
588
866
  };
589
- imports.wbg.__wbg_batchargument_unwrap = function(arg0) {
590
- 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;
591
884
  return ret;
592
885
  };
593
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
594
- 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;
595
891
  return addHeapObject(ret);
596
892
  };
597
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
598
- const obj = getObject(arg1);
599
- const ret = typeof(obj) === 'string' ? obj : undefined;
600
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
601
- var len1 = WASM_VECTOR_LEN;
602
- getInt32Memory0()[arg0 / 4 + 1] = len1;
603
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
893
+ imports.wbg.__wbg_byteOffset_b69b0a07afccce19 = function(arg0) {
894
+ const ret = getObject(arg0).byteOffset;
895
+ return ret;
604
896
  };
605
- imports.wbg.__wbg_fetch_1e4e8ed1f64c7e28 = function(arg0) {
606
- const ret = fetch(getObject(arg0));
607
- return addHeapObject(ret);
897
+ imports.wbg.__wbg_close_e9110ca16e2567db = function(arg0) {
898
+ getObject(arg0).close();
608
899
  };
609
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
610
- const ret = getObject(arg0);
611
- 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));
612
905
  };
613
- imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {
906
+ imports.wbg.__wbg_queueMicrotask_848aa4969108a57e = function(arg0) {
614
907
  const ret = getObject(arg0).queueMicrotask;
615
908
  return addHeapObject(ret);
616
909
  };
@@ -618,35 +911,14 @@ function __wbg_get_imports() {
618
911
  const ret = typeof(getObject(arg0)) === 'function';
619
912
  return ret;
620
913
  };
621
- imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
622
- queueMicrotask(getObject(arg0));
623
- };
624
914
  imports.wbg.__wbg_fetch_693453ca3f88c055 = function(arg0, arg1) {
625
915
  const ret = getObject(arg0).fetch(getObject(arg1));
626
916
  return addHeapObject(ret);
627
917
  };
628
- imports.wbg.__wbg_new_7a20246daa6eec7e = function() { return handleError(function () {
629
- const ret = new Headers();
630
- return addHeapObject(ret);
631
- }, arguments) };
632
- imports.wbg.__wbg_append_aa3f462f9e2b5ff2 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
633
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
634
- }, arguments) };
635
- imports.wbg.__wbg_newwithstrandinit_f581dff0d19a8b03 = function() { return handleError(function (arg0, arg1, arg2) {
636
- const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
637
- return addHeapObject(ret);
638
- }, arguments) };
639
- imports.wbg.__wbg_signal_3c701f5f40a5f08d = function(arg0) {
640
- const ret = getObject(arg0).signal;
641
- return addHeapObject(ret);
642
- };
643
- imports.wbg.__wbg_new_0ae46f44b7485bb2 = function() { return handleError(function () {
644
- const ret = new AbortController();
918
+ imports.wbg.__wbg_newwithu8arraysequenceandoptions_8a6b4effbcac4a62 = function() { return handleError(function (arg0, arg1) {
919
+ const ret = new Blob(getObject(arg0), getObject(arg1));
645
920
  return addHeapObject(ret);
646
921
  }, arguments) };
647
- imports.wbg.__wbg_abort_2c4fb490d878d2b2 = function(arg0) {
648
- getObject(arg0).abort();
649
- };
650
922
  imports.wbg.__wbg_instanceof_Response_4c3b1446206114d1 = function(arg0) {
651
923
  let result;
652
924
  try {
@@ -661,8 +933,8 @@ function __wbg_get_imports() {
661
933
  const ret = getObject(arg1).url;
662
934
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
663
935
  const len1 = WASM_VECTOR_LEN;
664
- getInt32Memory0()[arg0 / 4 + 1] = len1;
665
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
936
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
937
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
666
938
  };
667
939
  imports.wbg.__wbg_status_d6d47ad2837621eb = function(arg0) {
668
940
  const ret = getObject(arg0).status;
@@ -676,79 +948,119 @@ function __wbg_get_imports() {
676
948
  const ret = getObject(arg0).text();
677
949
  return addHeapObject(ret);
678
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) };
679
983
  imports.wbg.__wbindgen_is_object = function(arg0) {
680
984
  const val = getObject(arg0);
681
985
  const ret = typeof(val) === 'object' && val !== null;
682
986
  return ret;
683
987
  };
684
- 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) {
685
993
  const ret = new Function(getStringFromWasm0(arg0, arg1));
686
994
  return addHeapObject(ret);
687
995
  };
688
- imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
996
+ imports.wbg.__wbg_next_13b477da1eaa3897 = function(arg0) {
689
997
  const ret = getObject(arg0).next;
690
998
  return addHeapObject(ret);
691
999
  };
692
- imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {
1000
+ imports.wbg.__wbg_next_b06e115d1b01e10b = function() { return handleError(function (arg0) {
693
1001
  const ret = getObject(arg0).next();
694
1002
  return addHeapObject(ret);
695
1003
  }, arguments) };
696
- imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {
1004
+ imports.wbg.__wbg_done_983b5ffcaec8c583 = function(arg0) {
697
1005
  const ret = getObject(arg0).done;
698
1006
  return ret;
699
1007
  };
700
- imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {
1008
+ imports.wbg.__wbg_value_2ab8a198c834c26a = function(arg0) {
701
1009
  const ret = getObject(arg0).value;
702
1010
  return addHeapObject(ret);
703
1011
  };
704
- imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {
1012
+ imports.wbg.__wbg_iterator_695d699a44d6234c = function() {
705
1013
  const ret = Symbol.iterator;
706
1014
  return addHeapObject(ret);
707
1015
  };
708
- imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
1016
+ imports.wbg.__wbg_get_ef828680c64da212 = function() { return handleError(function (arg0, arg1) {
709
1017
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
710
1018
  return addHeapObject(ret);
711
1019
  }, arguments) };
712
- imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
1020
+ imports.wbg.__wbg_call_a9ef466721e824f2 = function() { return handleError(function (arg0, arg1) {
713
1021
  const ret = getObject(arg0).call(getObject(arg1));
714
1022
  return addHeapObject(ret);
715
1023
  }, arguments) };
716
- imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {
1024
+ imports.wbg.__wbg_new_e69b5f66fda8f13c = function() {
717
1025
  const ret = new Object();
718
1026
  return addHeapObject(ret);
719
1027
  };
720
- imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {
1028
+ imports.wbg.__wbg_self_bf91bf94d9e04084 = function() { return handleError(function () {
721
1029
  const ret = self.self;
722
1030
  return addHeapObject(ret);
723
1031
  }, arguments) };
724
- imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {
1032
+ imports.wbg.__wbg_window_52dd9f07d03fd5f8 = function() { return handleError(function () {
725
1033
  const ret = window.window;
726
1034
  return addHeapObject(ret);
727
1035
  }, arguments) };
728
- imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {
1036
+ imports.wbg.__wbg_globalThis_05c129bf37fcf1be = function() { return handleError(function () {
729
1037
  const ret = globalThis.globalThis;
730
1038
  return addHeapObject(ret);
731
1039
  }, arguments) };
732
- imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {
1040
+ imports.wbg.__wbg_global_3eca19bb09e9c484 = function() { return handleError(function () {
733
1041
  const ret = global.global;
734
1042
  return addHeapObject(ret);
735
1043
  }, arguments) };
736
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
737
- const ret = getObject(arg0) === undefined;
1044
+ imports.wbg.__wbg_push_36cf4d81d7da33d1 = function(arg0, arg1) {
1045
+ const ret = getObject(arg0).push(getObject(arg1));
738
1046
  return ret;
739
1047
  };
740
- 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) {
741
1053
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
742
1054
  return addHeapObject(ret);
743
1055
  }, arguments) };
744
- imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {
1056
+ imports.wbg.__wbg_new_1073970097e5a420 = function(arg0, arg1) {
745
1057
  try {
746
1058
  var state0 = {a: arg0, b: arg1};
747
1059
  var cb0 = (arg0, arg1) => {
748
1060
  const a = state0.a;
749
1061
  state0.a = 0;
750
1062
  try {
751
- return __wbg_adapter_90(a, state0.b, arg0, arg1);
1063
+ return __wbg_adapter_135(a, state0.b, arg0, arg1);
752
1064
  } finally {
753
1065
  state0.a = a;
754
1066
  }
@@ -759,39 +1071,50 @@ function __wbg_get_imports() {
759
1071
  state0.a = state0.b = 0;
760
1072
  }
761
1073
  };
762
- imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {
1074
+ imports.wbg.__wbg_resolve_0aad7c1484731c99 = function(arg0) {
763
1075
  const ret = Promise.resolve(getObject(arg0));
764
1076
  return addHeapObject(ret);
765
1077
  };
766
- imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {
1078
+ imports.wbg.__wbg_then_748f75edfb032440 = function(arg0, arg1) {
767
1079
  const ret = getObject(arg0).then(getObject(arg1));
768
1080
  return addHeapObject(ret);
769
1081
  };
770
- imports.wbg.__wbg_then_a73caa9a87991566 = function(arg0, arg1, arg2) {
1082
+ imports.wbg.__wbg_then_4866a7d9f55d8f3e = function(arg0, arg1, arg2) {
771
1083
  const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
772
1084
  return addHeapObject(ret);
773
1085
  };
774
- imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
1086
+ imports.wbg.__wbg_buffer_ccaed51a635d8a2d = function(arg0) {
775
1087
  const ret = getObject(arg0).buffer;
776
1088
  return addHeapObject(ret);
777
1089
  };
778
- imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {
1090
+ imports.wbg.__wbg_newwithbyteoffsetandlength_7e3eb787208af730 = function(arg0, arg1, arg2) {
779
1091
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
780
1092
  return addHeapObject(ret);
781
1093
  };
782
- imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {
1094
+ imports.wbg.__wbg_new_fec2611eb9180f95 = function(arg0) {
783
1095
  const ret = new Uint8Array(getObject(arg0));
784
1096
  return addHeapObject(ret);
785
1097
  };
786
- 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) {
787
1106
  const ret = Reflect.has(getObject(arg0), getObject(arg1));
788
1107
  return ret;
789
1108
  }, arguments) };
790
- 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) {
791
1110
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
792
1111
  return ret;
793
1112
  }, arguments) };
794
- 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) {
795
1118
  const ret = JSON.stringify(getObject(arg0));
796
1119
  return addHeapObject(ret);
797
1120
  }, arguments) };
@@ -799,8 +1122,8 @@ function __wbg_get_imports() {
799
1122
  const ret = debugString(getObject(arg1));
800
1123
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
801
1124
  const len1 = WASM_VECTOR_LEN;
802
- getInt32Memory0()[arg0 / 4 + 1] = len1;
803
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
1125
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1126
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
804
1127
  };
805
1128
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
806
1129
  throw new Error(getStringFromWasm0(arg0, arg1));
@@ -809,8 +1132,8 @@ function __wbg_get_imports() {
809
1132
  const ret = wasm.memory;
810
1133
  return addHeapObject(ret);
811
1134
  };
812
- imports.wbg.__wbindgen_closure_wrapper1042 = function(arg0, arg1, arg2) {
813
- 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);
814
1137
  return addHeapObject(ret);
815
1138
  };
816
1139
 
@@ -819,9 +1142,9 @@ function __wbg_get_imports() {
819
1142
 
820
1143
  function __wbg_finalize_init(instance, module) {
821
1144
  wasm = instance.exports;
822
- cachedInt32Memory0 = null;
823
- cachedUint32Memory0 = null;
824
- cachedUint8Memory0 = null;
1145
+ cachedDataViewMemory0 = null;
1146
+ cachedUint8ArrayMemory0 = null;
1147
+
825
1148
 
826
1149
 
827
1150
  return wasm;
@@ -830,6 +1153,15 @@ function __wbg_finalize_init(instance, module) {
830
1153
  function initSync(module) {
831
1154
  if (wasm !== undefined) return wasm;
832
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
+
833
1165
  const imports = __wbg_get_imports();
834
1166
 
835
1167
  if (!(module instanceof WebAssembly.Module)) {
@@ -842,7 +1174,7 @@ function initSync(module) {
842
1174
  }
843
1175
 
844
1176
  async function get_wasm (){
845
- return (await import('./aptos_intent_bg-vY0jOTb5.js')).default()
1177
+ return (await import('./aptos_dynamic_transaction_composer_bg-69aEwTzx.js')).default()
846
1178
  }
847
1179
 
848
- export { BatchArgument, BatchArgumentType, BatchArgumentWASM, 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 };