@cartridge/controller-wasm 0.2.7 → 0.3.1

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.2.7",
3
+ "version": "0.3.1",
4
4
  "description": "Wasm bindings for Cartridge Controller and Session Account",
5
5
  "type": "module",
6
6
  "main": "./pkg-controller/account_wasm.js",
@@ -42,6 +42,8 @@ export enum ErrorCode {
42
42
  StarknetUnsupportedContractClassVersion = 62,
43
43
  StarknetUnexpectedError = 63,
44
44
  StarknetNoTraceAvailable = 10,
45
+ StarknetReplacementTransactionUnderpriced = 64,
46
+ StarknetFeeBelowMinimum = 65,
45
47
  SignError = 101,
46
48
  StorageError = 102,
47
49
  AccountFactoryError = 103,
@@ -79,6 +81,8 @@ export enum ErrorCode {
79
81
  PolicyChainIdMismatch = 136,
80
82
  InvalidOwner = 137,
81
83
  GasPriceTooHigh = 138,
84
+ TransactionTimeout = 139,
85
+ ConversionError = 140,
82
86
  }
83
87
  export interface JsCall {
84
88
  contractAddress: JsFelt;
@@ -100,7 +104,6 @@ export interface JsFeeEstimate {
100
104
  l1_data_gas_consumed: number;
101
105
  l1_data_gas_price: number;
102
106
  overall_fee: number;
103
- unit: JsPriceUnit;
104
107
  }
105
108
 
106
109
  export interface Owner {
@@ -156,6 +159,8 @@ export type Felts = JsFelt[];
156
159
 
157
160
  export type JsFeeSource = "PAYMASTER" | "CREDITS";
158
161
 
162
+ export type JsSubscribeSessionResult = ResponseData;
163
+
159
164
  export type JsRevokableSession = RevokableSession;
160
165
 
161
166
  export interface AuthorizedSession {
@@ -213,7 +218,6 @@ export class CartridgeAccount {
213
218
  registerSession(policies: Policy[], expires_at: bigint, public_key: JsFelt, max_fee?: JsFeeEstimate | null): Promise<any>;
214
219
  registerSessionCalldata(policies: Policy[], expires_at: bigint, public_key: JsFelt): Promise<any>;
215
220
  upgrade(new_class_hash: JsFelt): Promise<JsCall>;
216
- login(expires_at: bigint, is_controller_registered?: boolean | null, signers?: Signer | null): Promise<AuthorizedSession>;
217
221
  register(register: JsRegister): Promise<JsRegisterResponse>;
218
222
  createSession(policies: Policy[], expires_at: bigint): Promise<AuthorizedSession | undefined>;
219
223
  skipSession(policies: Policy[]): Promise<void>;
@@ -234,6 +238,7 @@ export class CartridgeAccount {
234
238
  delegateAccount(): Promise<JsFelt>;
235
239
  hasAuthorizedPoliciesForCalls(calls: JsCall[]): Promise<boolean>;
236
240
  hasAuthorizedPoliciesForMessage(typed_data: string): Promise<boolean>;
241
+ subscribeCreateSession(controller_id: string, session_key_guid: JsFelt): Promise<JsSubscribeSessionResult>;
237
242
  }
238
243
  /**
239
244
  * A type for accessing fixed attributes of `CartridgeAccount`.
@@ -257,8 +262,8 @@ export class CartridgeAccountMeta {
257
262
  classHash(): string;
258
263
  rpcUrl(): string;
259
264
  chainId(): string;
260
- ownerGuid(): JsFelt;
261
265
  owner(): Owner;
266
+ ownerGuid(): JsFelt;
262
267
  }
263
268
  /**
264
269
  * A type used as the return type for constructing `CartridgeAccount` to provide an extra,
@@ -273,6 +278,12 @@ export class CartridgeAccountWithMeta {
273
278
  meta(): CartridgeAccountMeta;
274
279
  intoAccount(): CartridgeAccount;
275
280
  }
281
+ export class ControllerFactory {
282
+ private constructor();
283
+ free(): void;
284
+ static from_storage(app_id: string, cartridge_api_url: string): CartridgeAccountWithMeta | undefined;
285
+ static login(app_id: string, username: string, class_hash: JsFelt, rpc_url: string, chain_id: JsFelt, address: JsFelt, owner: Owner, cartridge_api_url: string, session_expires_at_s: bigint, is_controller_registered?: boolean | null): Promise<LoginResult>;
286
+ }
276
287
  export class JsControllerError {
277
288
  private constructor();
278
289
  free(): void;
@@ -281,3 +292,8 @@ export class JsControllerError {
281
292
  get data(): string | undefined;
282
293
  set data(value: string | null | undefined);
283
294
  }
295
+ export class LoginResult {
296
+ private constructor();
297
+ free(): void;
298
+ intoValues(): Array<any>;
299
+ }
@@ -315,12 +315,12 @@ function __wbg_adapter_50(arg0, arg1, arg2) {
315
315
  wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2));
316
316
  }
317
317
 
318
- function __wbg_adapter_277(arg0, arg1, arg2, arg3) {
318
+ function __wbg_adapter_286(arg0, arg1, arg2, arg3) {
319
319
  wasm.__wbindgen_export_8(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
320
320
  }
321
321
 
322
322
  /**
323
- * @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 | 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}
323
+ * @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}
324
324
  */
325
325
  export const ErrorCode = Object.freeze({
326
326
  StarknetFailedToReceiveTransaction: 1, "1": "StarknetFailedToReceiveTransaction",
@@ -349,6 +349,8 @@ export const ErrorCode = Object.freeze({
349
349
  StarknetUnsupportedContractClassVersion: 62, "62": "StarknetUnsupportedContractClassVersion",
350
350
  StarknetUnexpectedError: 63, "63": "StarknetUnexpectedError",
351
351
  StarknetNoTraceAvailable: 10, "10": "StarknetNoTraceAvailable",
352
+ StarknetReplacementTransactionUnderpriced: 64, "64": "StarknetReplacementTransactionUnderpriced",
353
+ StarknetFeeBelowMinimum: 65, "65": "StarknetFeeBelowMinimum",
352
354
  SignError: 101, "101": "SignError",
353
355
  StorageError: 102, "102": "StorageError",
354
356
  AccountFactoryError: 103, "103": "AccountFactoryError",
@@ -386,8 +388,12 @@ export const ErrorCode = Object.freeze({
386
388
  PolicyChainIdMismatch: 136, "136": "PolicyChainIdMismatch",
387
389
  InvalidOwner: 137, "137": "InvalidOwner",
388
390
  GasPriceTooHigh: 138, "138": "GasPriceTooHigh",
391
+ TransactionTimeout: 139, "139": "TransactionTimeout",
392
+ ConversionError: 140, "140": "ConversionError",
389
393
  });
390
394
 
395
+ const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
396
+
391
397
  const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
392
398
 
393
399
  const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
@@ -564,16 +570,6 @@ export class CartridgeAccount {
564
570
  const ret = wasm.cartridgeaccount_upgrade(this.__wbg_ptr, addHeapObject(new_class_hash));
565
571
  return takeObject(ret);
566
572
  }
567
- /**
568
- * @param {bigint} expires_at
569
- * @param {boolean | null} [is_controller_registered]
570
- * @param {Signer | null} [signers]
571
- * @returns {Promise<AuthorizedSession>}
572
- */
573
- login(expires_at, is_controller_registered, signers) {
574
- const ret = wasm.cartridgeaccount_login(this.__wbg_ptr, expires_at, isLikeNone(is_controller_registered) ? 0xFFFFFF : is_controller_registered ? 1 : 0, isLikeNone(signers) ? 0 : addHeapObject(signers));
575
- return takeObject(ret);
576
- }
577
573
  /**
578
574
  * @param {JsRegister} register
579
575
  * @returns {Promise<JsRegisterResponse>}
@@ -768,6 +764,17 @@ export class CartridgeAccount {
768
764
  const ret = wasm.cartridgeaccount_hasAuthorizedPoliciesForMessage(this.__wbg_ptr, ptr0, len0);
769
765
  return takeObject(ret);
770
766
  }
767
+ /**
768
+ * @param {string} controller_id
769
+ * @param {JsFelt} session_key_guid
770
+ * @returns {Promise<JsSubscribeSessionResult>}
771
+ */
772
+ subscribeCreateSession(controller_id, session_key_guid) {
773
+ const ptr0 = passStringToWasm0(controller_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
774
+ const len0 = WASM_VECTOR_LEN;
775
+ const ret = wasm.cartridgeaccount_subscribeCreateSession(this.__wbg_ptr, ptr0, len0, addHeapObject(session_key_guid));
776
+ return takeObject(ret);
777
+ }
771
778
  }
772
779
 
773
780
  const CartridgeAccountMetaFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -922,17 +929,17 @@ export class CartridgeAccountMeta {
922
929
  }
923
930
  }
924
931
  /**
925
- * @returns {JsFelt}
932
+ * @returns {Owner}
926
933
  */
927
- ownerGuid() {
928
- const ret = wasm.cartridgeaccountmeta_ownerGuid(this.__wbg_ptr);
934
+ owner() {
935
+ const ret = wasm.cartridgeaccountmeta_owner(this.__wbg_ptr);
929
936
  return takeObject(ret);
930
937
  }
931
938
  /**
932
- * @returns {Owner}
939
+ * @returns {JsFelt}
933
940
  */
934
- owner() {
935
- const ret = wasm.cartridgeaccountmeta_owner(this.__wbg_ptr);
941
+ ownerGuid() {
942
+ const ret = wasm.cartridgeaccountmeta_ownerGuid(this.__wbg_ptr);
936
943
  return takeObject(ret);
937
944
  }
938
945
  }
@@ -985,6 +992,74 @@ export class CartridgeAccountWithMeta {
985
992
  }
986
993
  }
987
994
 
995
+ const ControllerFactoryFinalization = (typeof FinalizationRegistry === 'undefined')
996
+ ? { register: () => {}, unregister: () => {} }
997
+ : new FinalizationRegistry(ptr => wasm.__wbg_controllerfactory_free(ptr >>> 0, 1));
998
+
999
+ export class ControllerFactory {
1000
+
1001
+ __destroy_into_raw() {
1002
+ const ptr = this.__wbg_ptr;
1003
+ this.__wbg_ptr = 0;
1004
+ ControllerFactoryFinalization.unregister(this);
1005
+ return ptr;
1006
+ }
1007
+
1008
+ free() {
1009
+ const ptr = this.__destroy_into_raw();
1010
+ wasm.__wbg_controllerfactory_free(ptr, 0);
1011
+ }
1012
+ /**
1013
+ * @param {string} app_id
1014
+ * @param {string} cartridge_api_url
1015
+ * @returns {CartridgeAccountWithMeta | undefined}
1016
+ */
1017
+ static from_storage(app_id, cartridge_api_url) {
1018
+ try {
1019
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1020
+ const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1021
+ const len0 = WASM_VECTOR_LEN;
1022
+ const ptr1 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1023
+ const len1 = WASM_VECTOR_LEN;
1024
+ wasm.cartridgeaccount_fromStorage(retptr, ptr0, len0, ptr1, len1);
1025
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1026
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1027
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1028
+ if (r2) {
1029
+ throw takeObject(r1);
1030
+ }
1031
+ return r0 === 0 ? undefined : CartridgeAccountWithMeta.__wrap(r0);
1032
+ } finally {
1033
+ wasm.__wbindgen_add_to_stack_pointer(16);
1034
+ }
1035
+ }
1036
+ /**
1037
+ * @param {string} app_id
1038
+ * @param {string} username
1039
+ * @param {JsFelt} class_hash
1040
+ * @param {string} rpc_url
1041
+ * @param {JsFelt} chain_id
1042
+ * @param {JsFelt} address
1043
+ * @param {Owner} owner
1044
+ * @param {string} cartridge_api_url
1045
+ * @param {bigint} session_expires_at_s
1046
+ * @param {boolean | null} [is_controller_registered]
1047
+ * @returns {Promise<LoginResult>}
1048
+ */
1049
+ static login(app_id, username, class_hash, rpc_url, chain_id, address, owner, cartridge_api_url, session_expires_at_s, is_controller_registered) {
1050
+ const ptr0 = passStringToWasm0(app_id, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1051
+ const len0 = WASM_VECTOR_LEN;
1052
+ const ptr1 = passStringToWasm0(username, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1053
+ const len1 = WASM_VECTOR_LEN;
1054
+ const ptr2 = passStringToWasm0(rpc_url, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1055
+ const len2 = WASM_VECTOR_LEN;
1056
+ const ptr3 = passStringToWasm0(cartridge_api_url, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1057
+ const len3 = WASM_VECTOR_LEN;
1058
+ const ret = wasm.controllerfactory_login(ptr0, len0, ptr1, len1, addHeapObject(class_hash), ptr2, len2, addHeapObject(chain_id), addHeapObject(address), addHeapObject(owner), ptr3, len3, session_expires_at_s, isLikeNone(is_controller_registered) ? 0xFFFFFF : is_controller_registered ? 1 : 0);
1059
+ return takeObject(ret);
1060
+ }
1061
+ }
1062
+
988
1063
  const JsControllerErrorFinalization = (typeof FinalizationRegistry === 'undefined')
989
1064
  ? { register: () => {}, unregister: () => {} }
990
1065
  : new FinalizationRegistry(ptr => wasm.__wbg_jscontrollererror_free(ptr >>> 0, 1));
@@ -1079,6 +1154,41 @@ export class JsControllerError {
1079
1154
  }
1080
1155
  }
1081
1156
 
1157
+ const LoginResultFinalization = (typeof FinalizationRegistry === 'undefined')
1158
+ ? { register: () => {}, unregister: () => {} }
1159
+ : new FinalizationRegistry(ptr => wasm.__wbg_loginresult_free(ptr >>> 0, 1));
1160
+
1161
+ export class LoginResult {
1162
+
1163
+ static __wrap(ptr) {
1164
+ ptr = ptr >>> 0;
1165
+ const obj = Object.create(LoginResult.prototype);
1166
+ obj.__wbg_ptr = ptr;
1167
+ LoginResultFinalization.register(obj, obj.__wbg_ptr, obj);
1168
+ return obj;
1169
+ }
1170
+
1171
+ __destroy_into_raw() {
1172
+ const ptr = this.__wbg_ptr;
1173
+ this.__wbg_ptr = 0;
1174
+ LoginResultFinalization.unregister(this);
1175
+ return ptr;
1176
+ }
1177
+
1178
+ free() {
1179
+ const ptr = this.__destroy_into_raw();
1180
+ wasm.__wbg_loginresult_free(ptr, 0);
1181
+ }
1182
+ /**
1183
+ * @returns {Array<any>}
1184
+ */
1185
+ intoValues() {
1186
+ const ptr = this.__destroy_into_raw();
1187
+ const ret = wasm.loginresult_intoValues(ptr);
1188
+ return takeObject(ret);
1189
+ }
1190
+ }
1191
+
1082
1192
  export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
1083
1193
  const ret = String(getObject(arg1));
1084
1194
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
@@ -1123,7 +1233,12 @@ export function __wbg_call_7cccdd69e0791ae2() { return handleError(function (arg
1123
1233
  return addHeapObject(ret);
1124
1234
  }, arguments) };
1125
1235
 
1126
- export function __wbg_clearTimeout_0b53d391c1b94dda(arg0) {
1236
+ export function __wbg_cartridgeaccountwithmeta_new(arg0) {
1237
+ const ret = CartridgeAccountWithMeta.__wrap(arg0);
1238
+ return addHeapObject(ret);
1239
+ };
1240
+
1241
+ export function __wbg_clearTimeout_6222fede17abcb1a(arg0) {
1127
1242
  const ret = clearTimeout(takeObject(arg0));
1128
1243
  return addHeapObject(ret);
1129
1244
  };
@@ -1161,13 +1276,13 @@ export function __wbg_error_524f506f44df1645(arg0) {
1161
1276
  console.error(getObject(arg0));
1162
1277
  };
1163
1278
 
1164
- export function __wbg_fetch_11bff8299d0ecd2b(arg0) {
1165
- const ret = fetch(getObject(arg0));
1279
+ export function __wbg_fetch_509096533071c657(arg0, arg1) {
1280
+ const ret = getObject(arg0).fetch(getObject(arg1));
1166
1281
  return addHeapObject(ret);
1167
1282
  };
1168
1283
 
1169
- export function __wbg_fetch_509096533071c657(arg0, arg1) {
1170
- const ret = getObject(arg0).fetch(getObject(arg1));
1284
+ export function __wbg_fetch_f156d10be9a5c88a(arg0) {
1285
+ const ret = fetch(getObject(arg0));
1171
1286
  return addHeapObject(ret);
1172
1287
  };
1173
1288
 
@@ -1318,6 +1433,11 @@ export function __wbg_log_c222819a41e063d3(arg0) {
1318
1433
  console.log(getObject(arg0));
1319
1434
  };
1320
1435
 
1436
+ export function __wbg_loginresult_new(arg0) {
1437
+ const ret = LoginResult.__wrap(arg0);
1438
+ return addHeapObject(ret);
1439
+ };
1440
+
1321
1441
  export function __wbg_msCrypto_a61aeb35a24c1329(arg0) {
1322
1442
  const ret = getObject(arg0).msCrypto;
1323
1443
  return addHeapObject(ret);
@@ -1345,7 +1465,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
1345
1465
  const a = state0.a;
1346
1466
  state0.a = 0;
1347
1467
  try {
1348
- return __wbg_adapter_277(a, state0.b, arg0, arg1);
1468
+ return __wbg_adapter_286(a, state0.b, arg0, arg1);
1349
1469
  } finally {
1350
1470
  state0.a = a;
1351
1471
  }
@@ -1498,7 +1618,7 @@ export function __wbg_setItem_212ecc915942ab0a() { return handleError(function (
1498
1618
  getObject(arg0).setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
1499
1619
  }, arguments) };
1500
1620
 
1501
- export function __wbg_setTimeout_73ce8df12de4f2f2(arg0, arg1) {
1621
+ export function __wbg_setTimeout_2b339866a2aa3789(arg0, arg1) {
1502
1622
  const ret = setTimeout(getObject(arg0), arg1);
1503
1623
  return addHeapObject(ret);
1504
1624
  };
@@ -1543,6 +1663,10 @@ export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
1543
1663
  getObject(arg0).body = getObject(arg1);
1544
1664
  };
1545
1665
 
1666
+ export function __wbg_setcache_12f17c3a980650e4(arg0, arg1) {
1667
+ getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
1668
+ };
1669
+
1546
1670
  export function __wbg_setcredentials_c3a22f1cd105a2c6(arg0, arg1) {
1547
1671
  getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
1548
1672
  };
@@ -1683,18 +1807,18 @@ export function __wbindgen_cb_drop(arg0) {
1683
1807
  return ret;
1684
1808
  };
1685
1809
 
1686
- export function __wbindgen_closure_wrapper1288(arg0, arg1, arg2) {
1687
- const ret = makeClosure(arg0, arg1, 26, __wbg_adapter_44);
1810
+ export function __wbindgen_closure_wrapper2570(arg0, arg1, arg2) {
1811
+ const ret = makeClosure(arg0, arg1, 33, __wbg_adapter_44);
1688
1812
  return addHeapObject(ret);
1689
1813
  };
1690
1814
 
1691
- export function __wbindgen_closure_wrapper5858(arg0, arg1, arg2) {
1692
- const ret = makeMutClosure(arg0, arg1, 684, __wbg_adapter_47);
1815
+ export function __wbindgen_closure_wrapper8191(arg0, arg1, arg2) {
1816
+ const ret = makeMutClosure(arg0, arg1, 871, __wbg_adapter_47);
1693
1817
  return addHeapObject(ret);
1694
1818
  };
1695
1819
 
1696
- export function __wbindgen_closure_wrapper6004(arg0, arg1, arg2) {
1697
- const ret = makeMutClosure(arg0, arg1, 717, __wbg_adapter_50);
1820
+ export function __wbindgen_closure_wrapper8340(arg0, arg1, arg2) {
1821
+ const ret = makeMutClosure(arg0, arg1, 905, __wbg_adapter_50);
1698
1822
  return addHeapObject(ret);
1699
1823
  };
1700
1824
 
Binary file
@@ -27,6 +27,8 @@ export enum ErrorCode {
27
27
  StarknetUnsupportedContractClassVersion = 62,
28
28
  StarknetUnexpectedError = 63,
29
29
  StarknetNoTraceAvailable = 10,
30
+ StarknetReplacementTransactionUnderpriced = 64,
31
+ StarknetFeeBelowMinimum = 65,
30
32
  SignError = 101,
31
33
  StorageError = 102,
32
34
  AccountFactoryError = 103,
@@ -64,6 +66,8 @@ export enum ErrorCode {
64
66
  PolicyChainIdMismatch = 136,
65
67
  InvalidOwner = 137,
66
68
  GasPriceTooHigh = 138,
69
+ TransactionTimeout = 139,
70
+ ConversionError = 140,
67
71
  }
68
72
  export interface JsCall {
69
73
  contractAddress: JsFelt;
@@ -85,7 +89,6 @@ export interface JsFeeEstimate {
85
89
  l1_data_gas_consumed: number;
86
90
  l1_data_gas_price: number;
87
91
  overall_fee: number;
88
- unit: JsPriceUnit;
89
92
  }
90
93
 
91
94
  export interface Owner {
@@ -141,6 +144,8 @@ export type Felts = JsFelt[];
141
144
 
142
145
  export type JsFeeSource = "PAYMASTER" | "CREDITS";
143
146
 
147
+ export type JsSubscribeSessionResult = ResponseData;
148
+
144
149
  export type JsRevokableSession = RevokableSession;
145
150
 
146
151
  export interface AuthorizedSession {
@@ -247,12 +247,12 @@ function __wbg_adapter_45(arg0, arg1, arg2) {
247
247
  wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2));
248
248
  }
249
249
 
250
- function __wbg_adapter_199(arg0, arg1, arg2, arg3) {
250
+ function __wbg_adapter_201(arg0, arg1, arg2, arg3) {
251
251
  wasm.__wbindgen_export_7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
252
252
  }
253
253
 
254
254
  /**
255
- * @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 | 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}
255
+ * @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}
256
256
  */
257
257
  export const ErrorCode = Object.freeze({
258
258
  StarknetFailedToReceiveTransaction: 1, "1": "StarknetFailedToReceiveTransaction",
@@ -281,6 +281,8 @@ export const ErrorCode = Object.freeze({
281
281
  StarknetUnsupportedContractClassVersion: 62, "62": "StarknetUnsupportedContractClassVersion",
282
282
  StarknetUnexpectedError: 63, "63": "StarknetUnexpectedError",
283
283
  StarknetNoTraceAvailable: 10, "10": "StarknetNoTraceAvailable",
284
+ StarknetReplacementTransactionUnderpriced: 64, "64": "StarknetReplacementTransactionUnderpriced",
285
+ StarknetFeeBelowMinimum: 65, "65": "StarknetFeeBelowMinimum",
284
286
  SignError: 101, "101": "SignError",
285
287
  StorageError: 102, "102": "StorageError",
286
288
  AccountFactoryError: 103, "103": "AccountFactoryError",
@@ -318,8 +320,12 @@ export const ErrorCode = Object.freeze({
318
320
  PolicyChainIdMismatch: 136, "136": "PolicyChainIdMismatch",
319
321
  InvalidOwner: 137, "137": "InvalidOwner",
320
322
  GasPriceTooHigh: 138, "138": "GasPriceTooHigh",
323
+ TransactionTimeout: 139, "139": "TransactionTimeout",
324
+ ConversionError: 140, "140": "ConversionError",
321
325
  });
322
326
 
327
+ const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
328
+
323
329
  const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
324
330
 
325
331
  const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
@@ -570,7 +576,7 @@ export function __wbg_call_7cccdd69e0791ae2() { return handleError(function (arg
570
576
  return addHeapObject(ret);
571
577
  }, arguments) };
572
578
 
573
- export function __wbg_clearTimeout_0b53d391c1b94dda(arg0) {
579
+ export function __wbg_clearTimeout_6222fede17abcb1a(arg0) {
574
580
  const ret = clearTimeout(takeObject(arg0));
575
581
  return addHeapObject(ret);
576
582
  };
@@ -590,13 +596,13 @@ export function __wbg_done_769e5ede4b31c67b(arg0) {
590
596
  return ret;
591
597
  };
592
598
 
593
- export function __wbg_fetch_11bff8299d0ecd2b(arg0) {
594
- const ret = fetch(getObject(arg0));
599
+ export function __wbg_fetch_509096533071c657(arg0, arg1) {
600
+ const ret = getObject(arg0).fetch(getObject(arg1));
595
601
  return addHeapObject(ret);
596
602
  };
597
603
 
598
- export function __wbg_fetch_509096533071c657(arg0, arg1) {
599
- const ret = getObject(arg0).fetch(getObject(arg1));
604
+ export function __wbg_fetch_f156d10be9a5c88a(arg0) {
605
+ const ret = fetch(getObject(arg0));
600
606
  return addHeapObject(ret);
601
607
  };
602
608
 
@@ -750,7 +756,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
750
756
  const a = state0.a;
751
757
  state0.a = 0;
752
758
  try {
753
- return __wbg_adapter_199(a, state0.b, arg0, arg1);
759
+ return __wbg_adapter_201(a, state0.b, arg0, arg1);
754
760
  } finally {
755
761
  state0.a = a;
756
762
  }
@@ -868,7 +874,7 @@ export function __wbg_resolve_4851785c9c5f573d(arg0) {
868
874
  return addHeapObject(ret);
869
875
  };
870
876
 
871
- export function __wbg_setTimeout_73ce8df12de4f2f2(arg0, arg1) {
877
+ export function __wbg_setTimeout_2b339866a2aa3789(arg0, arg1) {
872
878
  const ret = setTimeout(getObject(arg0), arg1);
873
879
  return addHeapObject(ret);
874
880
  };
@@ -898,6 +904,10 @@ export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
898
904
  getObject(arg0).body = getObject(arg1);
899
905
  };
900
906
 
907
+ export function __wbg_setcache_12f17c3a980650e4(arg0, arg1) {
908
+ getObject(arg0).cache = __wbindgen_enum_RequestCache[arg1];
909
+ };
910
+
901
911
  export function __wbg_setcredentials_c3a22f1cd105a2c6(arg0, arg1) {
902
912
  getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
903
913
  };
@@ -1025,13 +1035,13 @@ export function __wbindgen_cb_drop(arg0) {
1025
1035
  return ret;
1026
1036
  };
1027
1037
 
1028
- export function __wbindgen_closure_wrapper2850(arg0, arg1, arg2) {
1029
- const ret = makeMutClosure(arg0, arg1, 362, __wbg_adapter_42);
1038
+ export function __wbindgen_closure_wrapper3365(arg0, arg1, arg2) {
1039
+ const ret = makeMutClosure(arg0, arg1, 401, __wbg_adapter_42);
1030
1040
  return addHeapObject(ret);
1031
1041
  };
1032
1042
 
1033
- export function __wbindgen_closure_wrapper2983(arg0, arg1, arg2) {
1034
- const ret = makeMutClosure(arg0, arg1, 395, __wbg_adapter_45);
1043
+ export function __wbindgen_closure_wrapper3501(arg0, arg1, arg2) {
1044
+ const ret = makeMutClosure(arg0, arg1, 436, __wbg_adapter_45);
1035
1045
  return addHeapObject(ret);
1036
1046
  };
1037
1047
 
Binary file