@cartridge/controller-wasm 0.3.3 → 0.3.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cartridge/controller-wasm",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "Wasm bindings for Cartridge Controller and Session Account",
5
5
  "type": "module",
6
6
  "main": "./pkg-controller/account_wasm.js",
@@ -107,6 +107,25 @@ export interface JsFeeEstimate {
107
107
  overall_fee: number;
108
108
  }
109
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
+
110
129
  export interface Owner {
111
130
  signer?: Signer;
112
131
  account?: JsFelt;
@@ -240,6 +259,16 @@ export class CartridgeAccount {
240
259
  hasAuthorizedPoliciesForCalls(calls: JsCall[]): Promise<boolean>;
241
260
  hasAuthorizedPoliciesForMessage(typed_data: string): Promise<boolean>;
242
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>;
243
272
  }
244
273
  /**
245
274
  * A type for accessing fixed attributes of `CartridgeAccount`.