@cartridge/controller-wasm 0.3.2 → 0.3.4
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/package.json +1 -1
- package/pkg-controller/account_wasm.d.ts +30 -0
- package/pkg-controller/account_wasm_bg.js +229 -182
- package/pkg-controller/account_wasm_bg.wasm +0 -0
- package/pkg-session/session_wasm.d.ts +20 -0
- package/pkg-session/session_wasm_bg.js +183 -153
- package/pkg-session/session_wasm_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -83,6 +83,7 @@ export enum ErrorCode {
|
|
|
83
83
|
GasPriceTooHigh = 138,
|
|
84
84
|
TransactionTimeout = 139,
|
|
85
85
|
ConversionError = 140,
|
|
86
|
+
InvalidChainId = 141,
|
|
86
87
|
}
|
|
87
88
|
export interface JsCall {
|
|
88
89
|
contractAddress: JsFelt;
|
|
@@ -106,6 +107,25 @@ export interface JsFeeEstimate {
|
|
|
106
107
|
overall_fee: number;
|
|
107
108
|
}
|
|
108
109
|
|
|
110
|
+
/**
|
|
111
|
+
* JavaScript-friendly OutsideExecution V3 structure
|
|
112
|
+
*/
|
|
113
|
+
export interface JsOutsideExecutionV3 {
|
|
114
|
+
caller: JsFelt;
|
|
115
|
+
execute_after: number;
|
|
116
|
+
execute_before: number;
|
|
117
|
+
calls: JsCall[];
|
|
118
|
+
nonce: [JsFelt, JsFelt];
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Result type for signExecuteFromOutside containing both the OutsideExecution and signature
|
|
123
|
+
*/
|
|
124
|
+
export interface JsSignedOutsideExecution {
|
|
125
|
+
outside_execution: JsOutsideExecutionV3;
|
|
126
|
+
signature: JsFelt[];
|
|
127
|
+
}
|
|
128
|
+
|
|
109
129
|
export interface Owner {
|
|
110
130
|
signer?: Signer;
|
|
111
131
|
account?: JsFelt;
|
|
@@ -239,6 +259,16 @@ export class CartridgeAccount {
|
|
|
239
259
|
hasAuthorizedPoliciesForCalls(calls: JsCall[]): Promise<boolean>;
|
|
240
260
|
hasAuthorizedPoliciesForMessage(typed_data: string): Promise<boolean>;
|
|
241
261
|
subscribeCreateSession(controller_id: string, session_key_guid: JsFelt): Promise<JsSubscribeSessionResult>;
|
|
262
|
+
/**
|
|
263
|
+
* Signs an OutsideExecution V3 transaction and returns both the OutsideExecution object and its signature.
|
|
264
|
+
*
|
|
265
|
+
* # Parameters
|
|
266
|
+
* - `calls`: Array of calls to execute from outside
|
|
267
|
+
*
|
|
268
|
+
* # Returns
|
|
269
|
+
* A `JsSignedOutsideExecution` containing the OutsideExecution V3 object and its signature
|
|
270
|
+
*/
|
|
271
|
+
signExecuteFromOutside(calls: JsCall[]): Promise<JsSignedOutsideExecution>;
|
|
242
272
|
}
|
|
243
273
|
/**
|
|
244
274
|
* A type for accessing fixed attributes of `CartridgeAccount`.
|