@wgb5445/aptos-intent-npm 0.0.10 → 0.0.12
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 +22 -20
- package/dist/cjs/aptos_intent_bg-2V_b8N0G.js +42 -0
- package/dist/cjs/aptos_intent_bg-A1npHFCR.js +42 -0
- package/dist/cjs/entry.js +31 -31
- package/dist/esm/aptos_intent_bg-CX0REmIg.js +40 -0
- package/dist/esm/aptos_intent_bg-vY0jOTb5.js +40 -0
- package/dist/esm/entry.js +31 -31
- package/package.json +1 -1
package/dist/esm/entry.js
CHANGED
@@ -296,24 +296,24 @@ function __wbg_adapter_90(arg0, arg1, arg2, arg3) {
|
|
296
296
|
*/
|
297
297
|
const BatchArgumentType = Object.freeze({ Raw:0,"0":"Raw",Signer:1,"1":"Signer",PreviousResult:2,"2":"PreviousResult", });
|
298
298
|
|
299
|
-
const
|
299
|
+
const BatchArgumentFinalization = (typeof FinalizationRegistry === 'undefined')
|
300
300
|
? { register: () => {}, unregister: () => {} }
|
301
|
-
: new FinalizationRegistry(ptr => wasm.
|
301
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_batchargument_free(ptr >>> 0));
|
302
302
|
/**
|
303
303
|
* Arguments for each function. Wasm bindgen only support C-style enum so use option to work around.
|
304
304
|
*/
|
305
|
-
class
|
305
|
+
class BatchArgument {
|
306
306
|
|
307
307
|
static __wrap(ptr) {
|
308
308
|
ptr = ptr >>> 0;
|
309
|
-
const obj = Object.create(
|
309
|
+
const obj = Object.create(BatchArgument.prototype);
|
310
310
|
obj.__wbg_ptr = ptr;
|
311
|
-
|
311
|
+
BatchArgumentFinalization.register(obj, obj.__wbg_ptr, obj);
|
312
312
|
return obj;
|
313
313
|
}
|
314
314
|
|
315
315
|
static __unwrap(jsValue) {
|
316
|
-
if (!(jsValue instanceof
|
316
|
+
if (!(jsValue instanceof BatchArgument)) {
|
317
317
|
return 0;
|
318
318
|
}
|
319
319
|
return jsValue.__destroy_into_raw();
|
@@ -322,82 +322,82 @@ class BatchArgumentWASM {
|
|
322
322
|
__destroy_into_raw() {
|
323
323
|
const ptr = this.__wbg_ptr;
|
324
324
|
this.__wbg_ptr = 0;
|
325
|
-
|
325
|
+
BatchArgumentFinalization.unregister(this);
|
326
326
|
return ptr;
|
327
327
|
}
|
328
328
|
|
329
329
|
free() {
|
330
330
|
const ptr = this.__destroy_into_raw();
|
331
|
-
wasm.
|
331
|
+
wasm.__wbg_batchargument_free(ptr);
|
332
332
|
}
|
333
333
|
/**
|
334
334
|
* @param {Uint8Array} bytes
|
335
|
-
* @returns {
|
335
|
+
* @returns {BatchArgument}
|
336
336
|
*/
|
337
337
|
static new_bytes(bytes) {
|
338
338
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
339
339
|
const len0 = WASM_VECTOR_LEN;
|
340
|
-
const ret = wasm.
|
341
|
-
return
|
340
|
+
const ret = wasm.batchargument_new_bytes(ptr0, len0);
|
341
|
+
return BatchArgument.__wrap(ret);
|
342
342
|
}
|
343
343
|
/**
|
344
344
|
* @param {number} signer_idx
|
345
|
-
* @returns {
|
345
|
+
* @returns {BatchArgument}
|
346
346
|
*/
|
347
347
|
static new_signer(signer_idx) {
|
348
|
-
const ret = wasm.
|
349
|
-
return
|
348
|
+
const ret = wasm.batchargument_new_signer(signer_idx);
|
349
|
+
return BatchArgument.__wrap(ret);
|
350
350
|
}
|
351
351
|
/**
|
352
|
-
* @returns {
|
352
|
+
* @returns {BatchArgument}
|
353
353
|
*/
|
354
354
|
borrow() {
|
355
355
|
try {
|
356
356
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
357
|
-
wasm.
|
357
|
+
wasm.batchargument_borrow(retptr, this.__wbg_ptr);
|
358
358
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
359
359
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
360
360
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
361
361
|
if (r2) {
|
362
362
|
throw takeObject(r1);
|
363
363
|
}
|
364
|
-
return
|
364
|
+
return BatchArgument.__wrap(r0);
|
365
365
|
} finally {
|
366
366
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
367
367
|
}
|
368
368
|
}
|
369
369
|
/**
|
370
|
-
* @returns {
|
370
|
+
* @returns {BatchArgument}
|
371
371
|
*/
|
372
372
|
borrow_mut() {
|
373
373
|
try {
|
374
374
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
375
|
-
wasm.
|
375
|
+
wasm.batchargument_borrow_mut(retptr, this.__wbg_ptr);
|
376
376
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
377
377
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
378
378
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
379
379
|
if (r2) {
|
380
380
|
throw takeObject(r1);
|
381
381
|
}
|
382
|
-
return
|
382
|
+
return BatchArgument.__wrap(r0);
|
383
383
|
} finally {
|
384
384
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
385
385
|
}
|
386
386
|
}
|
387
387
|
/**
|
388
|
-
* @returns {
|
388
|
+
* @returns {BatchArgument}
|
389
389
|
*/
|
390
390
|
copy() {
|
391
391
|
try {
|
392
392
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
393
|
-
wasm.
|
393
|
+
wasm.batchargument_copy(retptr, this.__wbg_ptr);
|
394
394
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
395
395
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
396
396
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
397
397
|
if (r2) {
|
398
398
|
throw takeObject(r1);
|
399
399
|
}
|
400
|
-
return
|
400
|
+
return BatchArgument.__wrap(r0);
|
401
401
|
} finally {
|
402
402
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
403
403
|
}
|
@@ -478,8 +478,8 @@ class BatchedFunctionCallBuilder {
|
|
478
478
|
* @param {string} module
|
479
479
|
* @param {string} _function
|
480
480
|
* @param {(string)[]} ty_args
|
481
|
-
* @param {(
|
482
|
-
* @returns {(
|
481
|
+
* @param {(BatchArgument)[]} args
|
482
|
+
* @returns {(BatchArgument)[]}
|
483
483
|
*/
|
484
484
|
add_batched_call(module, _function, ty_args, args) {
|
485
485
|
try {
|
@@ -547,8 +547,8 @@ class BatchedFunctionCallBuilder {
|
|
547
547
|
function __wbg_get_imports() {
|
548
548
|
const imports = {};
|
549
549
|
imports.wbg = {};
|
550
|
-
imports.wbg.
|
551
|
-
const ret =
|
550
|
+
imports.wbg.__wbg_batchargument_new = function(arg0) {
|
551
|
+
const ret = BatchArgument.__wrap(arg0);
|
552
552
|
return addHeapObject(ret);
|
553
553
|
};
|
554
554
|
imports.wbg.__wbg_batchedfunctioncall_new = function(arg0) {
|
@@ -567,8 +567,8 @@ function __wbg_get_imports() {
|
|
567
567
|
const ret = false;
|
568
568
|
return ret;
|
569
569
|
};
|
570
|
-
imports.wbg.
|
571
|
-
const ret =
|
570
|
+
imports.wbg.__wbg_batchargument_unwrap = function(arg0) {
|
571
|
+
const ret = BatchArgument.__unwrap(takeObject(arg0));
|
572
572
|
return ret;
|
573
573
|
};
|
574
574
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
@@ -823,7 +823,7 @@ function initSync(module) {
|
|
823
823
|
}
|
824
824
|
|
825
825
|
async function get_wasm (){
|
826
|
-
return (await import('./aptos_intent_bg-
|
826
|
+
return (await import('./aptos_intent_bg-CX0REmIg.js')).default()
|
827
827
|
}
|
828
828
|
|
829
|
-
export {
|
829
|
+
export { BatchArgument, BatchArgumentType, BatchedFunctionCall, BatchedFunctionCallBuilder, generate_intent_payload_wasm, get_wasm, initSync };
|