@wgb5445/aptos-intent-npm 0.0.4 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
package/dist/esm/entry.js CHANGED
@@ -501,12 +501,12 @@ class BatchedFunctionCallBuilder {
501
501
  }
502
502
  }
503
503
  /**
504
- * @param {string} network
504
+ * @param {string} api_url
505
505
  * @param {string} module_name
506
506
  * @returns {Promise<void>}
507
507
  */
508
- load_module(network, module_name) {
509
- const ptr0 = passStringToWasm0(network, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
508
+ load_module(api_url, module_name) {
509
+ const ptr0 = passStringToWasm0(api_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
510
510
  const len0 = WASM_VECTOR_LEN;
511
511
  const ptr1 = passStringToWasm0(module_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
512
512
  const len1 = WASM_VECTOR_LEN;
@@ -810,7 +810,7 @@ function initSync(module) {
810
810
  }
811
811
 
812
812
  async function get_wasm (){
813
- return (await import('./aptos_intent_bg-BhFZXsdI.js')).default()
813
+ return (await import('./aptos_intent_bg-5HKQ9euF.js')).default()
814
814
  }
815
815
 
816
816
  export { ArgumentOperation, BatchArgument, BatchArgumentType, BatchedFunctionCall, BatchedFunctionCallBuilder, PreviousResult, get_wasm, initSync };
package/entry.js ADDED
@@ -0,0 +1,5 @@
1
+ export * from "../pkg/aptos_intent.js";
2
+
3
+ export async function get_wasm (){
4
+ return (await import("../pkg/aptos_intent_bg.wasm")).default()
5
+ }
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.4",
7
+ "version": "0.0.6",
8
8
  "type": "module",
9
9
  "license": "Apache-2.0",
10
10
  "repository": {
@@ -12,7 +12,9 @@
12
12
  "url": "https://github.com/aptos-labs/aptos-core"
13
13
  },
14
14
  "files": [
15
- "dist"
15
+ "dist",
16
+ "entry.js",
17
+ "rollup.config.mjs"
16
18
  ],
17
19
  "module": "dist/esm/entry.js",
18
20
  "types": "dist/aptos_intent.d.ts",
@@ -22,5 +24,12 @@
22
24
  ],
23
25
  "devDependencies": {
24
26
  "@rollup/plugin-wasm": "^6.2.2"
27
+ },
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/aptos_intent.d.ts",
31
+ "import": "./dist/esm/entry.js",
32
+ "default": "./dist/cjs/entry.js"
33
+ }
25
34
  }
26
35
  }
@@ -0,0 +1,18 @@
1
+ import { wasm } from '@rollup/plugin-wasm';
2
+ export default {
3
+ input: 'entry.js',
4
+ output: [
5
+ {
6
+ dir: 'dist/esm',
7
+ format: "esm",
8
+
9
+ },
10
+ {
11
+ dir: 'dist/cjs',
12
+ format: "cjs"
13
+ }
14
+ ],
15
+ plugins: [wasm({
16
+ maxFileSize: 10000000
17
+ })]
18
+ };