@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/esm/entry.js
    CHANGED
    
    | @@ -296,29 +296,48 @@ 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();
         | 
| 320 320 | 
             
                }
         | 
| 321 321 |  | 
| 322 | 
            +
                __destroy_into_raw() {
         | 
| 323 | 
            +
                    const ptr = this.__wbg_ptr;
         | 
| 324 | 
            +
                    this.__wbg_ptr = 0;
         | 
| 325 | 
            +
                    BatchArgumentFinalization.unregister(this);
         | 
| 326 | 
            +
                    return ptr;
         | 
| 327 | 
            +
                }
         | 
| 328 | 
            +
             | 
| 329 | 
            +
                free() {
         | 
| 330 | 
            +
                    const ptr = this.__destroy_into_raw();
         | 
| 331 | 
            +
                    wasm.__wbg_batchargument_free(ptr);
         | 
| 332 | 
            +
                }
         | 
| 333 | 
            +
            }
         | 
| 334 | 
            +
             | 
| 335 | 
            +
            const BatchArgumentWASMFinalization = (typeof FinalizationRegistry === 'undefined')
         | 
| 336 | 
            +
                ? { register: () => {}, unregister: () => {} }
         | 
| 337 | 
            +
                : new FinalizationRegistry(ptr => wasm.__wbg_batchargumentwasm_free(ptr >>> 0));
         | 
| 338 | 
            +
             | 
| 339 | 
            +
            class BatchArgumentWASM {
         | 
| 340 | 
            +
             | 
| 322 341 | 
             
                __destroy_into_raw() {
         | 
| 323 342 | 
             
                    const ptr = this.__wbg_ptr;
         | 
| 324 343 | 
             
                    this.__wbg_ptr = 0;
         | 
| @@ -332,24 +351,24 @@ class BatchArgumentWASM { | |
| 332 351 | 
             
                }
         | 
| 333 352 | 
             
                /**
         | 
| 334 353 | 
             
                * @param {Uint8Array} bytes
         | 
| 335 | 
            -
                * @returns { | 
| 354 | 
            +
                * @returns {BatchArgument}
         | 
| 336 355 | 
             
                */
         | 
| 337 356 | 
             
                static new_bytes(bytes) {
         | 
| 338 357 | 
             
                    const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
         | 
| 339 358 | 
             
                    const len0 = WASM_VECTOR_LEN;
         | 
| 340 359 | 
             
                    const ret = wasm.batchargumentwasm_new_bytes(ptr0, len0);
         | 
| 341 | 
            -
                    return  | 
| 360 | 
            +
                    return BatchArgument.__wrap(ret);
         | 
| 342 361 | 
             
                }
         | 
| 343 362 | 
             
                /**
         | 
| 344 363 | 
             
                * @param {number} signer_idx
         | 
| 345 | 
            -
                * @returns { | 
| 364 | 
            +
                * @returns {BatchArgument}
         | 
| 346 365 | 
             
                */
         | 
| 347 366 | 
             
                static new_signer(signer_idx) {
         | 
| 348 367 | 
             
                    const ret = wasm.batchargumentwasm_new_signer(signer_idx);
         | 
| 349 | 
            -
                    return  | 
| 368 | 
            +
                    return BatchArgument.__wrap(ret);
         | 
| 350 369 | 
             
                }
         | 
| 351 370 | 
             
                /**
         | 
| 352 | 
            -
                * @returns { | 
| 371 | 
            +
                * @returns {BatchArgument}
         | 
| 353 372 | 
             
                */
         | 
| 354 373 | 
             
                borrow() {
         | 
| 355 374 | 
             
                    try {
         | 
| @@ -361,13 +380,13 @@ class BatchArgumentWASM { | |
| 361 380 | 
             
                        if (r2) {
         | 
| 362 381 | 
             
                            throw takeObject(r1);
         | 
| 363 382 | 
             
                        }
         | 
| 364 | 
            -
                        return  | 
| 383 | 
            +
                        return BatchArgument.__wrap(r0);
         | 
| 365 384 | 
             
                    } finally {
         | 
| 366 385 | 
             
                        wasm.__wbindgen_add_to_stack_pointer(16);
         | 
| 367 386 | 
             
                    }
         | 
| 368 387 | 
             
                }
         | 
| 369 388 | 
             
                /**
         | 
| 370 | 
            -
                * @returns { | 
| 389 | 
            +
                * @returns {BatchArgument}
         | 
| 371 390 | 
             
                */
         | 
| 372 391 | 
             
                borrow_mut() {
         | 
| 373 392 | 
             
                    try {
         | 
| @@ -379,13 +398,13 @@ class BatchArgumentWASM { | |
| 379 398 | 
             
                        if (r2) {
         | 
| 380 399 | 
             
                            throw takeObject(r1);
         | 
| 381 400 | 
             
                        }
         | 
| 382 | 
            -
                        return  | 
| 401 | 
            +
                        return BatchArgument.__wrap(r0);
         | 
| 383 402 | 
             
                    } finally {
         | 
| 384 403 | 
             
                        wasm.__wbindgen_add_to_stack_pointer(16);
         | 
| 385 404 | 
             
                    }
         | 
| 386 405 | 
             
                }
         | 
| 387 406 | 
             
                /**
         | 
| 388 | 
            -
                * @returns { | 
| 407 | 
            +
                * @returns {BatchArgument}
         | 
| 389 408 | 
             
                */
         | 
| 390 409 | 
             
                copy() {
         | 
| 391 410 | 
             
                    try {
         | 
| @@ -397,7 +416,7 @@ class BatchArgumentWASM { | |
| 397 416 | 
             
                        if (r2) {
         | 
| 398 417 | 
             
                            throw takeObject(r1);
         | 
| 399 418 | 
             
                        }
         | 
| 400 | 
            -
                        return  | 
| 419 | 
            +
                        return BatchArgument.__wrap(r0);
         | 
| 401 420 | 
             
                    } finally {
         | 
| 402 421 | 
             
                        wasm.__wbindgen_add_to_stack_pointer(16);
         | 
| 403 422 | 
             
                    }
         | 
| @@ -478,8 +497,8 @@ class BatchedFunctionCallBuilder { | |
| 478 497 | 
             
                * @param {string} module
         | 
| 479 498 | 
             
                * @param {string} _function
         | 
| 480 499 | 
             
                * @param {(string)[]} ty_args
         | 
| 481 | 
            -
                * @param {( | 
| 482 | 
            -
                * @returns {( | 
| 500 | 
            +
                * @param {(BatchArgument)[]} args
         | 
| 501 | 
            +
                * @returns {(BatchArgument)[]}
         | 
| 483 502 | 
             
                */
         | 
| 484 503 | 
             
                add_batched_call(module, _function, ty_args, args) {
         | 
| 485 504 | 
             
                    try {
         | 
| @@ -547,8 +566,8 @@ class BatchedFunctionCallBuilder { | |
| 547 566 | 
             
            function __wbg_get_imports() {
         | 
| 548 567 | 
             
                const imports = {};
         | 
| 549 568 | 
             
                imports.wbg = {};
         | 
| 550 | 
            -
                imports.wbg. | 
| 551 | 
            -
                    const ret =  | 
| 569 | 
            +
                imports.wbg.__wbg_batchargument_new = function(arg0) {
         | 
| 570 | 
            +
                    const ret = BatchArgument.__wrap(arg0);
         | 
| 552 571 | 
             
                    return addHeapObject(ret);
         | 
| 553 572 | 
             
                };
         | 
| 554 573 | 
             
                imports.wbg.__wbg_batchedfunctioncall_new = function(arg0) {
         | 
| @@ -567,8 +586,8 @@ function __wbg_get_imports() { | |
| 567 586 | 
             
                    const ret = false;
         | 
| 568 587 | 
             
                    return ret;
         | 
| 569 588 | 
             
                };
         | 
| 570 | 
            -
                imports.wbg. | 
| 571 | 
            -
                    const ret =  | 
| 589 | 
            +
                imports.wbg.__wbg_batchargument_unwrap = function(arg0) {
         | 
| 590 | 
            +
                    const ret = BatchArgument.__unwrap(takeObject(arg0));
         | 
| 572 591 | 
             
                    return ret;
         | 
| 573 592 | 
             
                };
         | 
| 574 593 | 
             
                imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
         | 
| @@ -823,7 +842,7 @@ function initSync(module) { | |
| 823 842 | 
             
            }
         | 
| 824 843 |  | 
| 825 844 | 
             
            async function get_wasm (){
         | 
| 826 | 
            -
               return (await import('./aptos_intent_bg- | 
| 845 | 
            +
               return (await import('./aptos_intent_bg-vY0jOTb5.js')).default()
         | 
| 827 846 | 
             
            }
         | 
| 828 847 |  | 
| 829 | 
            -
            export { BatchArgumentType, BatchArgumentWASM, BatchedFunctionCall, BatchedFunctionCallBuilder, generate_intent_payload_wasm, get_wasm, initSync };
         | 
| 848 | 
            +
            export { BatchArgument, BatchArgumentType, BatchArgumentWASM, BatchedFunctionCall, BatchedFunctionCallBuilder, generate_intent_payload_wasm, get_wasm, initSync };
         |