@wgb5445/aptos-intent-npm 0.0.8 → 0.0.10

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.
@@ -1,8 +1,10 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
-
4
- import * as exp from "constants";
5
-
3
+ /**
4
+ * @param {Uint8Array} script
5
+ * @returns {(BatchedFunctionCall)[]}
6
+ */
7
+ export function generate_intent_payload_wasm(script: Uint8Array): (BatchedFunctionCall)[];
6
8
  /**
7
9
  * Arguments for each function.
8
10
  */
@@ -12,40 +14,32 @@ export enum BatchArgumentType {
12
14
  PreviousResult = 2,
13
15
  }
14
16
  /**
15
- */
16
- export enum ArgumentOperation {
17
- Move = 0,
18
- Copy = 1,
19
- Borrow = 2,
20
- BorrowMut = 3,
21
- }
22
- /**
23
17
  * Arguments for each function. Wasm bindgen only support C-style enum so use option to work around.
24
18
  */
25
- export class BatchArgument {
19
+ export class BatchArgumentWASM {
26
20
  free(): void;
27
21
  /**
28
22
  * @param {Uint8Array} bytes
29
- * @returns {BatchArgument}
23
+ * @returns {BatchArgumentWASM}
30
24
  */
31
- static new_bytes(bytes: Uint8Array): BatchArgument;
25
+ static new_bytes(bytes: Uint8Array): BatchArgumentWASM;
32
26
  /**
33
27
  * @param {number} signer_idx
34
- * @returns {BatchArgument}
28
+ * @returns {BatchArgumentWASM}
35
29
  */
36
- static new_signer(signer_idx: number): BatchArgument;
30
+ static new_signer(signer_idx: number): BatchArgumentWASM;
37
31
  /**
38
- * @returns {BatchArgument}
32
+ * @returns {BatchArgumentWASM}
39
33
  */
40
- borrow(): BatchArgument;
34
+ borrow(): BatchArgumentWASM;
41
35
  /**
42
- * @returns {BatchArgument}
36
+ * @returns {BatchArgumentWASM}
43
37
  */
44
- borrow_mut(): BatchArgument;
38
+ borrow_mut(): BatchArgumentWASM;
45
39
  /**
46
- * @returns {BatchArgument}
40
+ * @returns {BatchArgumentWASM}
47
41
  */
48
- copy(): BatchArgument;
42
+ copy(): BatchArgumentWASM;
49
43
  }
50
44
  /**
51
45
  * Call a Move entry function.
@@ -70,10 +64,10 @@ export class BatchedFunctionCallBuilder {
70
64
  * @param {string} module
71
65
  * @param {string} _function
72
66
  * @param {(string)[]} ty_args
73
- * @param {(BatchArgument)[]} args
74
- * @returns {(BatchArgument)[]}
67
+ * @param {(BatchArgumentWASM)[]} args
68
+ * @returns {(BatchArgumentWASM)[]}
75
69
  */
76
- add_batched_call(module: string, _function: string, ty_args: (string)[], args: (BatchArgument)[]): (BatchArgument)[];
70
+ add_batched_call(module: string, _function: string, ty_args: (string)[], args: (BatchArgumentWASM)[]): (BatchArgumentWASM)[];
77
71
  /**
78
72
  * @returns {Uint8Array}
79
73
  */
@@ -85,38 +79,33 @@ export class BatchedFunctionCallBuilder {
85
79
  */
86
80
  load_module(api_url: string, module_name: string): Promise<void>;
87
81
  }
88
- /**
89
- */
90
- export class PreviousResult {
91
- free(): void;
92
- }
93
82
 
94
83
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
95
84
 
96
85
  export interface InitOutput {
97
86
  readonly memory: WebAssembly.Memory;
98
- readonly __wbg_previousresult_free: (a: number) => void;
99
- readonly __wbg_batchargument_free: (a: number) => void;
100
- readonly __wbg_batchedfunctioncall_free: (a: number) => void;
87
+ readonly generate_intent_payload_wasm: (a: number, b: number, c: number) => void;
88
+ readonly __wbg_batchargumentwasm_free: (a: number) => void;
101
89
  readonly __wbg_batchedfunctioncallbuilder_free: (a: number) => void;
102
90
  readonly batchedfunctioncallbuilder_single_signer: () => number;
103
91
  readonly batchedfunctioncallbuilder_multi_signer: (a: number) => number;
104
92
  readonly batchedfunctioncallbuilder_add_batched_call: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
105
93
  readonly batchedfunctioncallbuilder_generate_batched_calls: (a: number, b: number) => void;
106
94
  readonly batchedfunctioncallbuilder_load_module: (a: number, b: number, c: number, d: number, e: number) => number;
107
- readonly batchargument_new_bytes: (a: number, b: number) => number;
108
- readonly batchargument_new_signer: (a: number) => number;
109
- readonly batchargument_borrow: (a: number, b: number) => void;
110
- readonly batchargument_borrow_mut: (a: number, b: number) => void;
111
- readonly batchargument_copy: (a: number, b: number) => void;
95
+ readonly batchargumentwasm_new_bytes: (a: number, b: number) => number;
96
+ readonly batchargumentwasm_new_signer: (a: number) => number;
97
+ readonly batchargumentwasm_borrow: (a: number, b: number) => void;
98
+ readonly batchargumentwasm_borrow_mut: (a: number, b: number) => void;
99
+ readonly batchargumentwasm_copy: (a: number, b: number) => void;
100
+ readonly __wbg_batchedfunctioncall_free: (a: number) => void;
112
101
  readonly __wbindgen_malloc: (a: number, b: number) => number;
113
102
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
114
103
  readonly __wbindgen_export_2: WebAssembly.Table;
115
- readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h09acdaa8b02601d5: (a: number, b: number, c: number) => void;
104
+ readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8273ed02fd8578ca: (a: number, b: number, c: number) => void;
116
105
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
117
106
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
118
107
  readonly __wbindgen_exn_store: (a: number) => void;
119
- readonly wasm_bindgen__convert__closures__invoke2_mut__h4c0838795c3445c5: (a: number, b: number, c: number, d: number) => void;
108
+ readonly wasm_bindgen__convert__closures__invoke2_mut__h7a552e5a28352106: (a: number, b: number, c: number, d: number) => void;
120
109
  }
121
110
 
122
111
  export type SyncInitInput = BufferSource | WebAssembly.Module;
@@ -138,6 +127,4 @@ export function initSync(module: SyncInitInput): InitOutput;
138
127
  *
139
128
  * @returns {Promise<InitOutput>}
140
129
  */
141
- export function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
142
-
143
- export function get_wasm(): any
130
+ export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;