@wgb5445/aptos-intent-npm 0.0.8 → 0.0.9

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
@@ -115,105 +115,6 @@ function getInt32Memory0() {
115
115
  return cachedInt32Memory0;
116
116
  }
117
117
 
118
- function debugString(val) {
119
- // primitive types
120
- const type = typeof val;
121
- if (type == 'number' || type == 'boolean' || val == null) {
122
- return `${val}`;
123
- }
124
- if (type == 'string') {
125
- return `"${val}"`;
126
- }
127
- if (type == 'symbol') {
128
- const description = val.description;
129
- if (description == null) {
130
- return 'Symbol';
131
- } else {
132
- return `Symbol(${description})`;
133
- }
134
- }
135
- if (type == 'function') {
136
- const name = val.name;
137
- if (typeof name == 'string' && name.length > 0) {
138
- return `Function(${name})`;
139
- } else {
140
- return 'Function';
141
- }
142
- }
143
- // objects
144
- if (Array.isArray(val)) {
145
- const length = val.length;
146
- let debug = '[';
147
- if (length > 0) {
148
- debug += debugString(val[0]);
149
- }
150
- for(let i = 1; i < length; i++) {
151
- debug += ', ' + debugString(val[i]);
152
- }
153
- debug += ']';
154
- return debug;
155
- }
156
- // Test for built-in
157
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
158
- let className;
159
- if (builtInMatches.length > 1) {
160
- className = builtInMatches[1];
161
- } else {
162
- // Failed to match the standard '[object ClassName]'
163
- return toString.call(val);
164
- }
165
- if (className == 'Object') {
166
- // we're a user defined class or Object
167
- // JSON.stringify avoids problems with cycles, and is generally much
168
- // easier than looping through ownProperties of `val`.
169
- try {
170
- return 'Object(' + JSON.stringify(val) + ')';
171
- } catch (_) {
172
- return 'Object';
173
- }
174
- }
175
- // errors
176
- if (val instanceof Error) {
177
- return `${val.name}: ${val.message}\n${val.stack}`;
178
- }
179
- // TODO we could test for more things here, like `Set`s and `Map`s.
180
- return className;
181
- }
182
-
183
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
184
- ? { register: () => {}, unregister: () => {} }
185
- : new FinalizationRegistry(state => {
186
- wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b);
187
- });
188
-
189
- function makeMutClosure(arg0, arg1, dtor, f) {
190
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
191
- const real = (...args) => {
192
- // First up with a closure we increment the internal reference
193
- // count. This ensures that the Rust closure environment won't
194
- // be deallocated while we're invoking it.
195
- state.cnt++;
196
- const a = state.a;
197
- state.a = 0;
198
- try {
199
- return f(a, state.b, ...args);
200
- } finally {
201
- if (--state.cnt === 0) {
202
- wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
203
- CLOSURE_DTORS.unregister(state);
204
- } else {
205
- state.a = a;
206
- }
207
- }
208
- };
209
- real.original = state;
210
- CLOSURE_DTORS.register(real, state, state);
211
- return real;
212
- }
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__h09acdaa8b02601d5(arg0, arg1, addHeapObject(arg2));
215
- }
216
-
217
118
  let cachedUint32Memory0 = null;
218
119
 
219
120
  function getUint32Memory0() {
@@ -255,44 +156,54 @@ function passArray8ToWasm0(arg, malloc) {
255
156
  WASM_VECTOR_LEN = arg.length;
256
157
  return ptr;
257
158
  }
258
-
259
- function handleError(f, args) {
159
+ /**
160
+ * @param {Uint8Array} script
161
+ * @returns {(BatchedFunctionCall)[]}
162
+ */
163
+ function generate_intent_payload_wasm(script) {
260
164
  try {
261
- return f.apply(this, args);
262
- } catch (e) {
263
- wasm.__wbindgen_exn_store(addHeapObject(e));
165
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
166
+ const ptr0 = passArray8ToWasm0(script, wasm.__wbindgen_malloc);
167
+ const len0 = WASM_VECTOR_LEN;
168
+ wasm.generate_intent_payload_wasm(retptr, ptr0, len0);
169
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
170
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
171
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
172
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
173
+ if (r3) {
174
+ throw takeObject(r2);
175
+ }
176
+ var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
177
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
178
+ return v2;
179
+ } finally {
180
+ wasm.__wbindgen_add_to_stack_pointer(16);
264
181
  }
265
182
  }
266
- function __wbg_adapter_87(arg0, arg1, arg2, arg3) {
267
- wasm.wasm_bindgen__convert__closures__invoke2_mut__h4c0838795c3445c5(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
268
- }
269
183
 
270
- /**
271
- */
272
- const ArgumentOperation = Object.freeze({ Move:0,"0":"Move",Copy:1,"1":"Copy",Borrow:2,"2":"Borrow",BorrowMut:3,"3":"BorrowMut", });
273
184
  /**
274
185
  * Arguments for each function.
275
186
  */
276
187
  const BatchArgumentType = Object.freeze({ Raw:0,"0":"Raw",Signer:1,"1":"Signer",PreviousResult:2,"2":"PreviousResult", });
277
188
 
278
- const BatchArgumentFinalization = (typeof FinalizationRegistry === 'undefined')
189
+ const BatchArgumentWASMFinalization = (typeof FinalizationRegistry === 'undefined')
279
190
  ? { register: () => {}, unregister: () => {} }
280
- : new FinalizationRegistry(ptr => wasm.__wbg_batchargument_free(ptr >>> 0));
191
+ : new FinalizationRegistry(ptr => wasm.__wbg_batchargumentwasm_free(ptr >>> 0));
281
192
  /**
282
193
  * Arguments for each function. Wasm bindgen only support C-style enum so use option to work around.
283
194
  */
284
- class BatchArgument {
195
+ class BatchArgumentWASM {
285
196
 
286
197
  static __wrap(ptr) {
287
198
  ptr = ptr >>> 0;
288
- const obj = Object.create(BatchArgument.prototype);
199
+ const obj = Object.create(BatchArgumentWASM.prototype);
289
200
  obj.__wbg_ptr = ptr;
290
- BatchArgumentFinalization.register(obj, obj.__wbg_ptr, obj);
201
+ BatchArgumentWASMFinalization.register(obj, obj.__wbg_ptr, obj);
291
202
  return obj;
292
203
  }
293
204
 
294
205
  static __unwrap(jsValue) {
295
- if (!(jsValue instanceof BatchArgument)) {
206
+ if (!(jsValue instanceof BatchArgumentWASM)) {
296
207
  return 0;
297
208
  }
298
209
  return jsValue.__destroy_into_raw();
@@ -301,82 +212,82 @@ class BatchArgument {
301
212
  __destroy_into_raw() {
302
213
  const ptr = this.__wbg_ptr;
303
214
  this.__wbg_ptr = 0;
304
- BatchArgumentFinalization.unregister(this);
215
+ BatchArgumentWASMFinalization.unregister(this);
305
216
  return ptr;
306
217
  }
307
218
 
308
219
  free() {
309
220
  const ptr = this.__destroy_into_raw();
310
- wasm.__wbg_batchargument_free(ptr);
221
+ wasm.__wbg_batchargumentwasm_free(ptr);
311
222
  }
312
223
  /**
313
224
  * @param {Uint8Array} bytes
314
- * @returns {BatchArgument}
225
+ * @returns {BatchArgumentWASM}
315
226
  */
316
227
  static new_bytes(bytes) {
317
228
  const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
318
229
  const len0 = WASM_VECTOR_LEN;
319
- const ret = wasm.batchargument_new_bytes(ptr0, len0);
320
- return BatchArgument.__wrap(ret);
230
+ const ret = wasm.batchargumentwasm_new_bytes(ptr0, len0);
231
+ return BatchArgumentWASM.__wrap(ret);
321
232
  }
322
233
  /**
323
234
  * @param {number} signer_idx
324
- * @returns {BatchArgument}
235
+ * @returns {BatchArgumentWASM}
325
236
  */
326
237
  static new_signer(signer_idx) {
327
- const ret = wasm.batchargument_new_signer(signer_idx);
328
- return BatchArgument.__wrap(ret);
238
+ const ret = wasm.batchargumentwasm_new_signer(signer_idx);
239
+ return BatchArgumentWASM.__wrap(ret);
329
240
  }
330
241
  /**
331
- * @returns {BatchArgument}
242
+ * @returns {BatchArgumentWASM}
332
243
  */
333
244
  borrow() {
334
245
  try {
335
246
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
336
- wasm.batchargument_borrow(retptr, this.__wbg_ptr);
247
+ wasm.batchargumentwasm_borrow(retptr, this.__wbg_ptr);
337
248
  var r0 = getInt32Memory0()[retptr / 4 + 0];
338
249
  var r1 = getInt32Memory0()[retptr / 4 + 1];
339
250
  var r2 = getInt32Memory0()[retptr / 4 + 2];
340
251
  if (r2) {
341
252
  throw takeObject(r1);
342
253
  }
343
- return BatchArgument.__wrap(r0);
254
+ return BatchArgumentWASM.__wrap(r0);
344
255
  } finally {
345
256
  wasm.__wbindgen_add_to_stack_pointer(16);
346
257
  }
347
258
  }
348
259
  /**
349
- * @returns {BatchArgument}
260
+ * @returns {BatchArgumentWASM}
350
261
  */
351
262
  borrow_mut() {
352
263
  try {
353
264
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
354
- wasm.batchargument_borrow_mut(retptr, this.__wbg_ptr);
265
+ wasm.batchargumentwasm_borrow_mut(retptr, this.__wbg_ptr);
355
266
  var r0 = getInt32Memory0()[retptr / 4 + 0];
356
267
  var r1 = getInt32Memory0()[retptr / 4 + 1];
357
268
  var r2 = getInt32Memory0()[retptr / 4 + 2];
358
269
  if (r2) {
359
270
  throw takeObject(r1);
360
271
  }
361
- return BatchArgument.__wrap(r0);
272
+ return BatchArgumentWASM.__wrap(r0);
362
273
  } finally {
363
274
  wasm.__wbindgen_add_to_stack_pointer(16);
364
275
  }
365
276
  }
366
277
  /**
367
- * @returns {BatchArgument}
278
+ * @returns {BatchArgumentWASM}
368
279
  */
369
280
  copy() {
370
281
  try {
371
282
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
372
- wasm.batchargument_copy(retptr, this.__wbg_ptr);
283
+ wasm.batchargumentwasm_copy(retptr, this.__wbg_ptr);
373
284
  var r0 = getInt32Memory0()[retptr / 4 + 0];
374
285
  var r1 = getInt32Memory0()[retptr / 4 + 1];
375
286
  var r2 = getInt32Memory0()[retptr / 4 + 2];
376
287
  if (r2) {
377
288
  throw takeObject(r1);
378
289
  }
379
- return BatchArgument.__wrap(r0);
290
+ return BatchArgumentWASM.__wrap(r0);
380
291
  } finally {
381
292
  wasm.__wbindgen_add_to_stack_pointer(16);
382
293
  }
@@ -391,6 +302,14 @@ const BatchedFunctionCallFinalization = (typeof FinalizationRegistry === 'undefi
391
302
  */
392
303
  class BatchedFunctionCall {
393
304
 
305
+ static __wrap(ptr) {
306
+ ptr = ptr >>> 0;
307
+ const obj = Object.create(BatchedFunctionCall.prototype);
308
+ obj.__wbg_ptr = ptr;
309
+ BatchedFunctionCallFinalization.register(obj, obj.__wbg_ptr, obj);
310
+ return obj;
311
+ }
312
+
394
313
  __destroy_into_raw() {
395
314
  const ptr = this.__wbg_ptr;
396
315
  this.__wbg_ptr = 0;
@@ -449,8 +368,8 @@ class BatchedFunctionCallBuilder {
449
368
  * @param {string} module
450
369
  * @param {string} _function
451
370
  * @param {(string)[]} ty_args
452
- * @param {(BatchArgument)[]} args
453
- * @returns {(BatchArgument)[]}
371
+ * @param {(BatchArgumentWASM)[]} args
372
+ * @returns {(BatchArgumentWASM)[]}
454
373
  */
455
374
  add_batched_call(module, _function, ty_args, args) {
456
375
  try {
@@ -500,47 +419,26 @@ class BatchedFunctionCallBuilder {
500
419
  wasm.__wbindgen_add_to_stack_pointer(16);
501
420
  }
502
421
  }
503
- /**
504
- * @param {string} api_url
505
- * @param {string} module_name
506
- * @returns {Promise<void>}
507
- */
508
- load_module(api_url, module_name) {
509
- const ptr0 = passStringToWasm0(api_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
510
- const len0 = WASM_VECTOR_LEN;
511
- const ptr1 = passStringToWasm0(module_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
512
- const len1 = WASM_VECTOR_LEN;
513
- const ret = wasm.batchedfunctioncallbuilder_load_module(this.__wbg_ptr, ptr0, len0, ptr1, len1);
514
- return takeObject(ret);
515
- }
516
- }
517
-
518
- const PreviousResultFinalization = (typeof FinalizationRegistry === 'undefined')
519
- ? { register: () => {}, unregister: () => {} }
520
- : new FinalizationRegistry(ptr => wasm.__wbg_previousresult_free(ptr >>> 0));
521
- /**
522
- */
523
- class PreviousResult {
524
-
525
- __destroy_into_raw() {
526
- const ptr = this.__wbg_ptr;
527
- this.__wbg_ptr = 0;
528
- PreviousResultFinalization.unregister(this);
529
- return ptr;
530
- }
531
-
532
- free() {
533
- const ptr = this.__destroy_into_raw();
534
- wasm.__wbg_previousresult_free(ptr);
535
- }
536
422
  }
537
423
 
538
424
  function __wbg_get_imports() {
539
425
  const imports = {};
540
426
  imports.wbg = {};
427
+ imports.wbg.__wbg_batchargumentwasm_new = function(arg0) {
428
+ const ret = BatchArgumentWASM.__wrap(arg0);
429
+ return addHeapObject(ret);
430
+ };
431
+ imports.wbg.__wbg_batchedfunctioncall_new = function(arg0) {
432
+ const ret = BatchedFunctionCall.__wrap(arg0);
433
+ return addHeapObject(ret);
434
+ };
541
435
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
542
436
  takeObject(arg0);
543
437
  };
438
+ imports.wbg.__wbg_batchargumentwasm_unwrap = function(arg0) {
439
+ const ret = BatchArgumentWASM.__unwrap(takeObject(arg0));
440
+ return ret;
441
+ };
544
442
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
545
443
  const ret = getStringFromWasm0(arg0, arg1);
546
444
  return addHeapObject(ret);
@@ -553,234 +451,9 @@ function __wbg_get_imports() {
553
451
  getInt32Memory0()[arg0 / 4 + 1] = len1;
554
452
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
555
453
  };
556
- imports.wbg.__wbg_batchargument_unwrap = function(arg0) {
557
- const ret = BatchArgument.__unwrap(takeObject(arg0));
558
- return ret;
559
- };
560
- imports.wbg.__wbg_batchargument_new = function(arg0) {
561
- const ret = BatchArgument.__wrap(arg0);
562
- return addHeapObject(ret);
563
- };
564
- imports.wbg.__wbindgen_cb_drop = function(arg0) {
565
- const obj = takeObject(arg0).original;
566
- if (obj.cnt-- == 1) {
567
- obj.a = 0;
568
- return true;
569
- }
570
- const ret = false;
571
- return ret;
572
- };
573
- imports.wbg.__wbg_fetch_1e4e8ed1f64c7e28 = function(arg0) {
574
- const ret = fetch(getObject(arg0));
575
- return addHeapObject(ret);
576
- };
577
- imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
578
- const ret = getObject(arg0);
579
- return addHeapObject(ret);
580
- };
581
- imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) {
582
- queueMicrotask(getObject(arg0));
583
- };
584
- imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) {
585
- const ret = getObject(arg0).queueMicrotask;
586
- return addHeapObject(ret);
587
- };
588
- imports.wbg.__wbindgen_is_function = function(arg0) {
589
- const ret = typeof(getObject(arg0)) === 'function';
590
- return ret;
591
- };
592
- imports.wbg.__wbg_fetch_693453ca3f88c055 = function(arg0, arg1) {
593
- const ret = getObject(arg0).fetch(getObject(arg1));
594
- return addHeapObject(ret);
595
- };
596
- imports.wbg.__wbg_newwithstrandinit_f581dff0d19a8b03 = function() { return handleError(function (arg0, arg1, arg2) {
597
- const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2));
598
- return addHeapObject(ret);
599
- }, arguments) };
600
- imports.wbg.__wbg_signal_3c701f5f40a5f08d = function(arg0) {
601
- const ret = getObject(arg0).signal;
602
- return addHeapObject(ret);
603
- };
604
- imports.wbg.__wbg_new_0ae46f44b7485bb2 = function() { return handleError(function () {
605
- const ret = new AbortController();
606
- return addHeapObject(ret);
607
- }, arguments) };
608
- imports.wbg.__wbg_abort_2c4fb490d878d2b2 = function(arg0) {
609
- getObject(arg0).abort();
610
- };
611
- imports.wbg.__wbg_new_7a20246daa6eec7e = function() { return handleError(function () {
612
- const ret = new Headers();
613
- return addHeapObject(ret);
614
- }, arguments) };
615
- imports.wbg.__wbg_append_aa3f462f9e2b5ff2 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
616
- getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
617
- }, arguments) };
618
- imports.wbg.__wbg_instanceof_Response_4c3b1446206114d1 = function(arg0) {
619
- let result;
620
- try {
621
- result = getObject(arg0) instanceof Response;
622
- } catch (_) {
623
- result = false;
624
- }
625
- const ret = result;
626
- return ret;
627
- };
628
- imports.wbg.__wbg_url_83a6a4f65f7a2b38 = function(arg0, arg1) {
629
- const ret = getObject(arg1).url;
630
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
631
- const len1 = WASM_VECTOR_LEN;
632
- getInt32Memory0()[arg0 / 4 + 1] = len1;
633
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
634
- };
635
- imports.wbg.__wbg_status_d6d47ad2837621eb = function(arg0) {
636
- const ret = getObject(arg0).status;
637
- return ret;
638
- };
639
- imports.wbg.__wbg_headers_24def508a7518df9 = function(arg0) {
640
- const ret = getObject(arg0).headers;
641
- return addHeapObject(ret);
642
- };
643
- imports.wbg.__wbg_text_668782292b0bc561 = function() { return handleError(function (arg0) {
644
- const ret = getObject(arg0).text();
645
- return addHeapObject(ret);
646
- }, arguments) };
647
- imports.wbg.__wbindgen_is_object = function(arg0) {
648
- const val = getObject(arg0);
649
- const ret = typeof(val) === 'object' && val !== null;
650
- return ret;
651
- };
652
- imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {
653
- const ret = new Function(getStringFromWasm0(arg0, arg1));
654
- return addHeapObject(ret);
655
- };
656
- imports.wbg.__wbg_next_40fc327bfc8770e6 = function(arg0) {
657
- const ret = getObject(arg0).next;
658
- return addHeapObject(ret);
659
- };
660
- imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) {
661
- const ret = getObject(arg0).next();
662
- return addHeapObject(ret);
663
- }, arguments) };
664
- imports.wbg.__wbg_done_298b57d23c0fc80c = function(arg0) {
665
- const ret = getObject(arg0).done;
666
- return ret;
667
- };
668
- imports.wbg.__wbg_value_d93c65011f51a456 = function(arg0) {
669
- const ret = getObject(arg0).value;
670
- return addHeapObject(ret);
671
- };
672
- imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() {
673
- const ret = Symbol.iterator;
674
- return addHeapObject(ret);
675
- };
676
- imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) {
677
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
678
- return addHeapObject(ret);
679
- }, arguments) };
680
- imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {
681
- const ret = getObject(arg0).call(getObject(arg1));
682
- return addHeapObject(ret);
683
- }, arguments) };
684
- imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() {
685
- const ret = new Object();
686
- return addHeapObject(ret);
687
- };
688
- imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {
689
- const ret = self.self;
690
- return addHeapObject(ret);
691
- }, arguments) };
692
- imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {
693
- const ret = window.window;
694
- return addHeapObject(ret);
695
- }, arguments) };
696
- imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {
697
- const ret = globalThis.globalThis;
698
- return addHeapObject(ret);
699
- }, arguments) };
700
- imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {
701
- const ret = global.global;
702
- return addHeapObject(ret);
703
- }, arguments) };
704
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
705
- const ret = getObject(arg0) === undefined;
706
- return ret;
707
- };
708
- imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {
709
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
710
- return addHeapObject(ret);
711
- }, arguments) };
712
- imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) {
713
- try {
714
- var state0 = {a: arg0, b: arg1};
715
- var cb0 = (arg0, arg1) => {
716
- const a = state0.a;
717
- state0.a = 0;
718
- try {
719
- return __wbg_adapter_87(a, state0.b, arg0, arg1);
720
- } finally {
721
- state0.a = a;
722
- }
723
- };
724
- const ret = new Promise(cb0);
725
- return addHeapObject(ret);
726
- } finally {
727
- state0.a = state0.b = 0;
728
- }
729
- };
730
- imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) {
731
- const ret = Promise.resolve(getObject(arg0));
732
- return addHeapObject(ret);
733
- };
734
- imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) {
735
- const ret = getObject(arg0).then(getObject(arg1));
736
- return addHeapObject(ret);
737
- };
738
- imports.wbg.__wbg_then_a73caa9a87991566 = function(arg0, arg1, arg2) {
739
- const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
740
- return addHeapObject(ret);
741
- };
742
- imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {
743
- const ret = getObject(arg0).buffer;
744
- return addHeapObject(ret);
745
- };
746
- imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {
747
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
748
- return addHeapObject(ret);
749
- };
750
- imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {
751
- const ret = new Uint8Array(getObject(arg0));
752
- return addHeapObject(ret);
753
- };
754
- imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() { return handleError(function (arg0) {
755
- const ret = JSON.stringify(getObject(arg0));
756
- return addHeapObject(ret);
757
- }, arguments) };
758
- imports.wbg.__wbg_has_0af94d20077affa2 = function() { return handleError(function (arg0, arg1) {
759
- const ret = Reflect.has(getObject(arg0), getObject(arg1));
760
- return ret;
761
- }, arguments) };
762
- imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) {
763
- const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
764
- return ret;
765
- }, arguments) };
766
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
767
- const ret = debugString(getObject(arg1));
768
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
769
- const len1 = WASM_VECTOR_LEN;
770
- getInt32Memory0()[arg0 / 4 + 1] = len1;
771
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
772
- };
773
454
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
774
455
  throw new Error(getStringFromWasm0(arg0, arg1));
775
456
  };
776
- imports.wbg.__wbindgen_memory = function() {
777
- const ret = wasm.memory;
778
- return addHeapObject(ret);
779
- };
780
- imports.wbg.__wbindgen_closure_wrapper540 = function(arg0, arg1, arg2) {
781
- const ret = makeMutClosure(arg0, arg1, 264, __wbg_adapter_24);
782
- return addHeapObject(ret);
783
- };
784
457
 
785
458
  return imports;
786
459
  }
@@ -810,7 +483,7 @@ function initSync(module) {
810
483
  }
811
484
 
812
485
  async function get_wasm (){
813
- return (await import('./aptos_intent_bg-Dr5TXbTf.js')).default()
486
+ return (await import('./aptos_intent_bg-DEdT9YzH.js')).default()
814
487
  }
815
488
 
816
- export { ArgumentOperation, BatchArgument, BatchArgumentType, BatchedFunctionCall, BatchedFunctionCallBuilder, PreviousResult, get_wasm, initSync };
489
+ export { BatchArgumentType, BatchArgumentWASM, BatchedFunctionCall, BatchedFunctionCallBuilder, generate_intent_payload_wasm, get_wasm, initSync };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "Aptos Labs <opensource@aptoslabs.com>"
5
5
  ],
6
6
  "description": "Generating Move Script from intent",
7
- "version": "0.0.8",
7
+ "version": "0.0.9",
8
8
  "type": "module",
9
9
  "license": "Apache-2.0",
10
10
  "repository": {