@cartridge/controller-wasm 0.3.11 → 0.3.13

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.11",
3
+ "version": "0.3.13",
4
4
  "description": "Wasm bindings for Cartridge Controller and Session Account",
5
5
  "type": "module",
6
6
  "main": "./pkg-controller/account_wasm.js",
@@ -92,6 +92,7 @@ export enum ErrorCode {
92
92
  InvalidChainId = 141,
93
93
  SessionRefreshRequired = 142,
94
94
  ManualExecutionRequired = 143,
95
+ ForbiddenEntrypoint = 144,
95
96
  }
96
97
  export interface JsCall {
97
98
  contractAddress: JsFelt;
@@ -150,7 +151,13 @@ export interface TypedDataPolicy {
150
151
  authorized?: boolean;
151
152
  }
152
153
 
153
- export type Policy = CallPolicy | TypedDataPolicy;
154
+ export interface ApprovalPolicy {
155
+ target: JsFelt;
156
+ spender: JsFelt;
157
+ amount: JsFelt;
158
+ }
159
+
160
+ export type Policy = CallPolicy | TypedDataPolicy | ApprovalPolicy;
154
161
 
155
162
  export type JsRegister = RegisterInput;
156
163
 
@@ -347,11 +347,11 @@ export function signerToGuid(signer) {
347
347
  return takeObject(ret);
348
348
  }
349
349
 
350
- function __wbg_adapter_4(arg0, arg1, arg2) {
350
+ function __wbg_adapter_6(arg0, arg1, arg2) {
351
351
  wasm.__wbindgen_export_5(arg0, arg1, addHeapObject(arg2));
352
352
  }
353
353
 
354
- function __wbg_adapter_9(arg0, arg1) {
354
+ function __wbg_adapter_15(arg0, arg1) {
355
355
  wasm.__wbindgen_export_6(arg0, arg1);
356
356
  }
357
357
 
@@ -364,7 +364,7 @@ function __wbg_adapter_276(arg0, arg1, arg2, arg3) {
364
364
  }
365
365
 
366
366
  /**
367
- * @enum {1 | 20 | 24 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | 40 | 41 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 10 | 64 | 65 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143}
367
+ * @enum {1 | 20 | 24 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | 40 | 41 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 10 | 64 | 65 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144}
368
368
  */
369
369
  export const ErrorCode = Object.freeze({
370
370
  StarknetFailedToReceiveTransaction: 1, "1": "StarknetFailedToReceiveTransaction",
@@ -437,6 +437,7 @@ export const ErrorCode = Object.freeze({
437
437
  InvalidChainId: 141, "141": "InvalidChainId",
438
438
  SessionRefreshRequired: 142, "142": "SessionRefreshRequired",
439
439
  ManualExecutionRequired: 143, "143": "ManualExecutionRequired",
440
+ ForbiddenEntrypoint: 144, "144": "ForbiddenEntrypoint",
440
441
  });
441
442
 
442
443
  const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
@@ -2193,9 +2194,9 @@ export function __wbg_wbindgenthrow_451ec1a8469d7eb6(arg0, arg1) {
2193
2194
  throw new Error(getStringFromWasm0(arg0, arg1));
2194
2195
  };
2195
2196
 
2196
- export function __wbindgen_cast_1ab588f7c48ef669(arg0, arg1) {
2197
- // Cast intrinsic for `Closure(Closure { dtor_idx: 1002, function: Function { arguments: [Externref], shim_idx: 1003, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2198
- const ret = makeMutClosure(arg0, arg1, 1002, __wbg_adapter_18);
2197
+ export function __wbindgen_cast_09156783ef72d99b(arg0, arg1) {
2198
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 998, function: Function { arguments: [Externref], shim_idx: 999, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2199
+ const ret = makeMutClosure(arg0, arg1, 998, __wbg_adapter_6);
2199
2200
  return addHeapObject(ret);
2200
2201
  };
2201
2202
 
@@ -2205,6 +2206,12 @@ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
2205
2206
  return addHeapObject(ret);
2206
2207
  };
2207
2208
 
2209
+ export function __wbindgen_cast_7ee5a51087797a77(arg0, arg1) {
2210
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 964, function: Function { arguments: [], shim_idx: 965, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2211
+ const ret = makeMutClosure(arg0, arg1, 964, __wbg_adapter_15);
2212
+ return addHeapObject(ret);
2213
+ };
2214
+
2208
2215
  export function __wbindgen_cast_9ae0607507abb057(arg0) {
2209
2216
  // Cast intrinsic for `I64 -> Externref`.
2210
2217
  const ret = arg0;
@@ -2213,7 +2220,7 @@ export function __wbindgen_cast_9ae0607507abb057(arg0) {
2213
2220
 
2214
2221
  export function __wbindgen_cast_be6c52086ee82095(arg0, arg1) {
2215
2222
  // Cast intrinsic for `Closure(Closure { dtor_idx: 15, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 16, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
2216
- const ret = makeClosure(arg0, arg1, 15, __wbg_adapter_4);
2223
+ const ret = makeClosure(arg0, arg1, 15, __wbg_adapter_18);
2217
2224
  return addHeapObject(ret);
2218
2225
  };
2219
2226
 
@@ -2229,12 +2236,6 @@ export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
2229
2236
  return addHeapObject(ret);
2230
2237
  };
2231
2238
 
2232
- export function __wbindgen_cast_f8c41a10414abe07(arg0, arg1) {
2233
- // Cast intrinsic for `Closure(Closure { dtor_idx: 968, function: Function { arguments: [], shim_idx: 969, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2234
- const ret = makeMutClosure(arg0, arg1, 968, __wbg_adapter_9);
2235
- return addHeapObject(ret);
2236
- };
2237
-
2238
2239
  export function __wbindgen_object_clone_ref(arg0) {
2239
2240
  const ret = getObject(arg0);
2240
2241
  return addHeapObject(ret);
Binary file
@@ -78,6 +78,7 @@ export enum ErrorCode {
78
78
  InvalidChainId = 141,
79
79
  SessionRefreshRequired = 142,
80
80
  ManualExecutionRequired = 143,
81
+ ForbiddenEntrypoint = 144,
81
82
  }
82
83
  export interface JsCall {
83
84
  contractAddress: JsFelt;
@@ -136,7 +137,13 @@ export interface TypedDataPolicy {
136
137
  authorized?: boolean;
137
138
  }
138
139
 
139
- export type Policy = CallPolicy | TypedDataPolicy;
140
+ export interface ApprovalPolicy {
141
+ target: JsFelt;
142
+ spender: JsFelt;
143
+ amount: JsFelt;
144
+ }
145
+
146
+ export type Policy = CallPolicy | TypedDataPolicy | ApprovalPolicy;
140
147
 
141
148
  export type JsRegister = RegisterInput;
142
149
 
@@ -281,7 +281,7 @@ function __wbg_adapter_4(arg0, arg1) {
281
281
  wasm.__wbindgen_export_5(arg0, arg1);
282
282
  }
283
283
 
284
- function __wbg_adapter_9(arg0, arg1, arg2) {
284
+ function __wbg_adapter_13(arg0, arg1, arg2) {
285
285
  wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2));
286
286
  }
287
287
 
@@ -290,7 +290,7 @@ function __wbg_adapter_171(arg0, arg1, arg2, arg3) {
290
290
  }
291
291
 
292
292
  /**
293
- * @enum {1 | 20 | 24 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | 40 | 41 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 10 | 64 | 65 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143}
293
+ * @enum {1 | 20 | 24 | 27 | 28 | 29 | 31 | 32 | 33 | 34 | 40 | 41 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 10 | 64 | 65 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144}
294
294
  */
295
295
  export const ErrorCode = Object.freeze({
296
296
  StarknetFailedToReceiveTransaction: 1, "1": "StarknetFailedToReceiveTransaction",
@@ -363,6 +363,7 @@ export const ErrorCode = Object.freeze({
363
363
  InvalidChainId: 141, "141": "InvalidChainId",
364
364
  SessionRefreshRequired: 142, "142": "SessionRefreshRequired",
365
365
  ManualExecutionRequired: 143, "143": "ManualExecutionRequired",
366
+ ForbiddenEntrypoint: 144, "144": "ForbiddenEntrypoint",
366
367
  });
367
368
 
368
369
  const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
@@ -1164,9 +1165,9 @@ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
1164
1165
  return addHeapObject(ret);
1165
1166
  };
1166
1167
 
1167
- export function __wbindgen_cast_86daa9f8bfebbfee(arg0, arg1) {
1168
- // Cast intrinsic for `Closure(Closure { dtor_idx: 497, function: Function { arguments: [Externref], shim_idx: 498, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1169
- const ret = makeMutClosure(arg0, arg1, 497, __wbg_adapter_9);
1168
+ export function __wbindgen_cast_90f1d8883a9ae70e(arg0, arg1) {
1169
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 499, function: Function { arguments: [Externref], shim_idx: 500, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1170
+ const ret = makeMutClosure(arg0, arg1, 499, __wbg_adapter_13);
1170
1171
  return addHeapObject(ret);
1171
1172
  };
1172
1173
 
@@ -1176,18 +1177,18 @@ export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
1176
1177
  return addHeapObject(ret);
1177
1178
  };
1178
1179
 
1179
- export function __wbindgen_cast_d207c5207e18da12(arg0, arg1) {
1180
- // Cast intrinsic for `Closure(Closure { dtor_idx: 463, function: Function { arguments: [], shim_idx: 464, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1181
- const ret = makeMutClosure(arg0, arg1, 463, __wbg_adapter_4);
1182
- return addHeapObject(ret);
1183
- };
1184
-
1185
1180
  export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
1186
1181
  // Cast intrinsic for `F64 -> Externref`.
1187
1182
  const ret = arg0;
1188
1183
  return addHeapObject(ret);
1189
1184
  };
1190
1185
 
1186
+ export function __wbindgen_cast_e585a18257edad45(arg0, arg1) {
1187
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 465, function: Function { arguments: [], shim_idx: 466, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1188
+ const ret = makeMutClosure(arg0, arg1, 465, __wbg_adapter_4);
1189
+ return addHeapObject(ret);
1190
+ };
1191
+
1191
1192
  export function __wbindgen_object_clone_ref(arg0) {
1192
1193
  const ret = getObject(arg0);
1193
1194
  return addHeapObject(ret);
Binary file