@wgb5445/aptos-intent-npm 0.0.10 → 0.0.11
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/aptos_intent.d.ts +5 -27
- package/dist/cjs/aptos_intent_bg-2V_b8N0G.js +42 -0
- package/dist/cjs/entry.js +43 -23
- package/dist/esm/aptos_intent_bg-vY0jOTb5.js +40 -0
- package/dist/esm/entry.js +43 -24
- package/package.json +1 -1
package/dist/cjs/entry.js
CHANGED
@@ -298,29 +298,48 @@ function __wbg_adapter_90(arg0, arg1, arg2, arg3) {
|
|
298
298
|
*/
|
299
299
|
const BatchArgumentType = Object.freeze({ Raw:0,"0":"Raw",Signer:1,"1":"Signer",PreviousResult:2,"2":"PreviousResult", });
|
300
300
|
|
301
|
-
const
|
301
|
+
const BatchArgumentFinalization = (typeof FinalizationRegistry === 'undefined')
|
302
302
|
? { register: () => {}, unregister: () => {} }
|
303
|
-
: new FinalizationRegistry(ptr => wasm.
|
303
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_batchargument_free(ptr >>> 0));
|
304
304
|
/**
|
305
305
|
* Arguments for each function. Wasm bindgen only support C-style enum so use option to work around.
|
306
306
|
*/
|
307
|
-
class
|
307
|
+
class BatchArgument {
|
308
308
|
|
309
309
|
static __wrap(ptr) {
|
310
310
|
ptr = ptr >>> 0;
|
311
|
-
const obj = Object.create(
|
311
|
+
const obj = Object.create(BatchArgument.prototype);
|
312
312
|
obj.__wbg_ptr = ptr;
|
313
|
-
|
313
|
+
BatchArgumentFinalization.register(obj, obj.__wbg_ptr, obj);
|
314
314
|
return obj;
|
315
315
|
}
|
316
316
|
|
317
317
|
static __unwrap(jsValue) {
|
318
|
-
if (!(jsValue instanceof
|
318
|
+
if (!(jsValue instanceof BatchArgument)) {
|
319
319
|
return 0;
|
320
320
|
}
|
321
321
|
return jsValue.__destroy_into_raw();
|
322
322
|
}
|
323
323
|
|
324
|
+
__destroy_into_raw() {
|
325
|
+
const ptr = this.__wbg_ptr;
|
326
|
+
this.__wbg_ptr = 0;
|
327
|
+
BatchArgumentFinalization.unregister(this);
|
328
|
+
return ptr;
|
329
|
+
}
|
330
|
+
|
331
|
+
free() {
|
332
|
+
const ptr = this.__destroy_into_raw();
|
333
|
+
wasm.__wbg_batchargument_free(ptr);
|
334
|
+
}
|
335
|
+
}
|
336
|
+
|
337
|
+
const BatchArgumentWASMFinalization = (typeof FinalizationRegistry === 'undefined')
|
338
|
+
? { register: () => {}, unregister: () => {} }
|
339
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_batchargumentwasm_free(ptr >>> 0));
|
340
|
+
|
341
|
+
class BatchArgumentWASM {
|
342
|
+
|
324
343
|
__destroy_into_raw() {
|
325
344
|
const ptr = this.__wbg_ptr;
|
326
345
|
this.__wbg_ptr = 0;
|
@@ -334,24 +353,24 @@ class BatchArgumentWASM {
|
|
334
353
|
}
|
335
354
|
/**
|
336
355
|
* @param {Uint8Array} bytes
|
337
|
-
* @returns {
|
356
|
+
* @returns {BatchArgument}
|
338
357
|
*/
|
339
358
|
static new_bytes(bytes) {
|
340
359
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
341
360
|
const len0 = WASM_VECTOR_LEN;
|
342
361
|
const ret = wasm.batchargumentwasm_new_bytes(ptr0, len0);
|
343
|
-
return
|
362
|
+
return BatchArgument.__wrap(ret);
|
344
363
|
}
|
345
364
|
/**
|
346
365
|
* @param {number} signer_idx
|
347
|
-
* @returns {
|
366
|
+
* @returns {BatchArgument}
|
348
367
|
*/
|
349
368
|
static new_signer(signer_idx) {
|
350
369
|
const ret = wasm.batchargumentwasm_new_signer(signer_idx);
|
351
|
-
return
|
370
|
+
return BatchArgument.__wrap(ret);
|
352
371
|
}
|
353
372
|
/**
|
354
|
-
* @returns {
|
373
|
+
* @returns {BatchArgument}
|
355
374
|
*/
|
356
375
|
borrow() {
|
357
376
|
try {
|
@@ -363,13 +382,13 @@ class BatchArgumentWASM {
|
|
363
382
|
if (r2) {
|
364
383
|
throw takeObject(r1);
|
365
384
|
}
|
366
|
-
return
|
385
|
+
return BatchArgument.__wrap(r0);
|
367
386
|
} finally {
|
368
387
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
369
388
|
}
|
370
389
|
}
|
371
390
|
/**
|
372
|
-
* @returns {
|
391
|
+
* @returns {BatchArgument}
|
373
392
|
*/
|
374
393
|
borrow_mut() {
|
375
394
|
try {
|
@@ -381,13 +400,13 @@ class BatchArgumentWASM {
|
|
381
400
|
if (r2) {
|
382
401
|
throw takeObject(r1);
|
383
402
|
}
|
384
|
-
return
|
403
|
+
return BatchArgument.__wrap(r0);
|
385
404
|
} finally {
|
386
405
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
387
406
|
}
|
388
407
|
}
|
389
408
|
/**
|
390
|
-
* @returns {
|
409
|
+
* @returns {BatchArgument}
|
391
410
|
*/
|
392
411
|
copy() {
|
393
412
|
try {
|
@@ -399,7 +418,7 @@ class BatchArgumentWASM {
|
|
399
418
|
if (r2) {
|
400
419
|
throw takeObject(r1);
|
401
420
|
}
|
402
|
-
return
|
421
|
+
return BatchArgument.__wrap(r0);
|
403
422
|
} finally {
|
404
423
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
405
424
|
}
|
@@ -480,8 +499,8 @@ class BatchedFunctionCallBuilder {
|
|
480
499
|
* @param {string} module
|
481
500
|
* @param {string} _function
|
482
501
|
* @param {(string)[]} ty_args
|
483
|
-
* @param {(
|
484
|
-
* @returns {(
|
502
|
+
* @param {(BatchArgument)[]} args
|
503
|
+
* @returns {(BatchArgument)[]}
|
485
504
|
*/
|
486
505
|
add_batched_call(module, _function, ty_args, args) {
|
487
506
|
try {
|
@@ -549,8 +568,8 @@ class BatchedFunctionCallBuilder {
|
|
549
568
|
function __wbg_get_imports() {
|
550
569
|
const imports = {};
|
551
570
|
imports.wbg = {};
|
552
|
-
imports.wbg.
|
553
|
-
const ret =
|
571
|
+
imports.wbg.__wbg_batchargument_new = function(arg0) {
|
572
|
+
const ret = BatchArgument.__wrap(arg0);
|
554
573
|
return addHeapObject(ret);
|
555
574
|
};
|
556
575
|
imports.wbg.__wbg_batchedfunctioncall_new = function(arg0) {
|
@@ -569,8 +588,8 @@ function __wbg_get_imports() {
|
|
569
588
|
const ret = false;
|
570
589
|
return ret;
|
571
590
|
};
|
572
|
-
imports.wbg.
|
573
|
-
const ret =
|
591
|
+
imports.wbg.__wbg_batchargument_unwrap = function(arg0) {
|
592
|
+
const ret = BatchArgument.__unwrap(takeObject(arg0));
|
574
593
|
return ret;
|
575
594
|
};
|
576
595
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
@@ -825,9 +844,10 @@ function initSync(module) {
|
|
825
844
|
}
|
826
845
|
|
827
846
|
async function get_wasm (){
|
828
|
-
return (await Promise.resolve().then(function () { return require('./aptos_intent_bg-
|
847
|
+
return (await Promise.resolve().then(function () { return require('./aptos_intent_bg-2V_b8N0G.js'); })).default()
|
829
848
|
}
|
830
849
|
|
850
|
+
exports.BatchArgument = BatchArgument;
|
831
851
|
exports.BatchArgumentType = BatchArgumentType;
|
832
852
|
exports.BatchArgumentWASM = BatchArgumentWASM;
|
833
853
|
exports.BatchedFunctionCall = BatchedFunctionCall;
|