starknet 11.5.0 → 11.6.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ # [11.6.0](https://github.com/starknet-io/starknet.js/compare/v11.5.1...v11.6.0) (2026-11-06)
2
+
3
+ ### Features
4
+
5
+ - deprecate the get-starknet v4 wallet namespace and show the fee estimate deprecations ([cd5f9a6](https://github.com/starknet-io/starknet.js/commit/cd5f9a66d85d52d3648af98f45ce3bfd92079210))
6
+
7
+ ## [11.5.1](https://github.com/starknet-io/starknet.js/compare/v11.5.0...v11.5.1) (2026-11-04)
8
+
9
+ ### Bug Fixes
10
+
11
+ - **cairo-types:** refuse huge arrays of elements that read no felt ([3a8873d](https://github.com/starknet-io/starknet.js/commit/3a8873d0bc63c3baeb595b780cbd179dfcdf26e2))
12
+ - **typed-data:** bound the cost of hashing untrusted typed data ([be2cffc](https://github.com/starknet-io/starknet.js/commit/be2cffc5e797b894eab7c3b8d769716138da8fa4))
13
+ - **typed-data:** bound the work of hashing typed data ([0116d8a](https://github.com/starknet-io/starknet.js/commit/0116d8af3e8975ab51eca63a64295c1d5c2ee3cf))
14
+ - **typed-data:** refuse duplicate field names, share the zero-width bound across nesting ([8601fc3](https://github.com/starknet-io/starknet.js/commit/8601fc384f102442ee8e49a6457dc10bc03aa1f0))
15
+
1
16
  # [11.5.0](https://github.com/starknet-io/starknet.js/compare/v11.4.3...v11.5.0) (2026-11-02)
2
17
 
3
18
  ### Features
package/dist/index.d.ts CHANGED
@@ -1201,12 +1201,14 @@ declare abstract class ProviderInterface {
1201
1201
  * @param blockIdentifier - (optional) block identifier
1202
1202
  * @param skipValidate - (optional) skip cairo __validate__ method
1203
1203
  * @returns the estimated fee
1204
- * @deprecated Consider using getEstimateFeeBulk for multiple transactions
1204
+ * @deprecated This method only calls `getEstimateFeeBulk` with one transaction. Use
1205
+ * {@link ProviderInterface.getEstimateFeeBulk | getEstimateFeeBulk} instead (see the example).
1206
+ * This method will be removed in a future major version, not before v13.
1205
1207
  * @example
1206
1208
  * ```typescript
1207
1209
  * const feeEstimate = await provider.getInvokeEstimateFee(invocation, details);
1208
1210
  * // Equivalent to:
1209
- * const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: ETransactionType.INVOKE, ...invocation, ...details }], options);
1211
+ * const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: TransactionType.INVOKE, ...invocation, ...details }]);
1210
1212
  * ```
1211
1213
  * @remarks This method is an alias that calls getEstimateFeeBulk with a single transaction
1212
1214
  */
@@ -1224,12 +1226,14 @@ declare abstract class ProviderInterface {
1224
1226
  * @param blockIdentifier - (optional) block identifier
1225
1227
  * @param skipValidate - (optional) skip cairo __validate__ method
1226
1228
  * @returns the estimated fee
1227
- * @deprecated Consider using getEstimateFeeBulk for multiple transactions
1229
+ * @deprecated This method only calls `getEstimateFeeBulk` with one transaction. Use
1230
+ * {@link ProviderInterface.getEstimateFeeBulk | getEstimateFeeBulk} instead (see the example).
1231
+ * This method will be removed in a future major version, not before v13.
1228
1232
  * @example
1229
1233
  * ```typescript
1230
1234
  * const feeEstimate = await provider.getDeclareEstimateFee(transaction, details);
1231
1235
  * // Equivalent to:
1232
- * const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: ETransactionType.DECLARE, ...transaction, ...details }], options);
1236
+ * const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: TransactionType.DECLARE, ...transaction, ...details }]);
1233
1237
  * ```
1234
1238
  * @remarks This method is an alias that calls getEstimateFeeBulk with a single transaction
1235
1239
  */
@@ -1248,12 +1252,14 @@ declare abstract class ProviderInterface {
1248
1252
  * @param blockIdentifier - (optional) block identifier
1249
1253
  * @param skipValidate - (optional) skip cairo __validate__ method
1250
1254
  * @returns the estimated fee
1251
- * @deprecated Consider using getEstimateFeeBulk for multiple transactions
1255
+ * @deprecated This method only calls `getEstimateFeeBulk` with one transaction. Use
1256
+ * {@link ProviderInterface.getEstimateFeeBulk | getEstimateFeeBulk} instead (see the example).
1257
+ * This method will be removed in a future major version, not before v13.
1252
1258
  * @example
1253
1259
  * ```typescript
1254
1260
  * const feeEstimate = await provider.getDeployAccountEstimateFee(transaction, details);
1255
1261
  * // Equivalent to:
1256
- * const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: ETransactionType.DEPLOY_ACCOUNT, ...transaction, ...details }], options);
1262
+ * const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: TransactionType.DEPLOY_ACCOUNT, ...transaction, ...details }]);
1257
1263
  * ```
1258
1264
  * @remarks This method is an alias that calls getEstimateFeeBulk with a single transaction
1259
1265
  */
@@ -7961,6 +7967,7 @@ declare function btoaUniversal(b: ArrayBuffer): string;
7961
7967
  *
7962
7968
  * @param {Uint8Array} buffer The encoded Uint8Array.
7963
7969
  * @returns {string} The hex-string
7970
+ * @see {@link num.hexToBytes} Does the inverse conversion: hex-string to `Uint8Array`.
7964
7971
  *
7965
7972
  * @example
7966
7973
  * ```typescript
@@ -8284,6 +8291,38 @@ declare const UDC: {
8284
8291
  declare const OutsideExecutionCallerAny = "0x414e595f43414c4c4552";
8285
8292
  declare const SNIP9_V1_INTERFACE_ID = "0x68cfd18b92d1907b8ba3cc324900277f5a3622099431ea85dd8089255e4181";
8286
8293
  declare const SNIP9_V2_INTERFACE_ID = "0x1d1144bb2138366ff28d8e9ab57456b1d332ac42196230c3a602003c89872";
8294
+ /**
8295
+ * The most types that the `types` object of one typed data message (SNIP-12) may declare.
8296
+ *
8297
+ * Real messages declare a few types: an outside execution (SNIP-9) declares 3, the domain
8298
+ * included. 64 leaves a wide margin above that. A higher limit would only let a message make each
8299
+ * struct cost more to hash, or overflow the call stack with a long chain of types. So the hash
8300
+ * functions of `typedData` refuse a message that declares more types than this.
8301
+ */
8302
+ declare const TYPED_DATA_MAX_TYPES = 64;
8303
+ /**
8304
+ * The most work that hashing one typed data message (SNIP-12) may take, counted in felts.
8305
+ *
8306
+ * A message can come from someone you do not trust, and a small message can make the hash take
8307
+ * minutes. So the hash functions of `typedData` give each hash this budget, and throw an error when
8308
+ * the budget runs out.
8309
+ *
8310
+ * The hash spends:
8311
+ * - 1 felt for each value: a struct field, an array element, an enum parameter, a merkle tree leaf;
8312
+ * - for a value written as text (a `string`, a selector name, a number written in digits), 1 felt
8313
+ * for each 31 characters, but the first 2 felts are free. So a felt written in hex or in digits
8314
+ * still costs 1 felt;
8315
+ * - 1 felt for each 31 characters of the type string of each struct.
8316
+ *
8317
+ * The value covers the largest outside execution (SNIP-9 V1 or V2) that Starknet accepts. A
8318
+ * transaction carries at most 5,000 felts of calldata, so at most about 1,660 calls, and an
8319
+ * outside execution V1 hashes them with about 13,300 felts. A higher value would only let a
8320
+ * message keep the CPU busy longer.
8321
+ *
8322
+ * A message of revision 0 hashes with Pedersen, about 15 times slower for each felt than Poseidon
8323
+ * (revision 1). So with the same budget, a revision 0 message can take about 15 times longer.
8324
+ */
8325
+ declare const TYPED_DATA_MAX_HASHED_FELTS = 13500;
8287
8326
  declare const HARDENING_BYTE = 128;
8288
8327
  declare const HARDENING_4BYTES = 2147483648n;
8289
8328
  declare const _NetworkName: {
@@ -8438,10 +8477,12 @@ type constants_SupportedCairoVersion = SupportedCairoVersion;
8438
8477
  type constants_SupportedRpcVersion0_10 = SupportedRpcVersion0_10;
8439
8478
  type constants_SupportedTransactionVersion = SupportedTransactionVersion;
8440
8479
  declare const constants_TEXT_TO_FELT_MAX_LEN: typeof TEXT_TO_FELT_MAX_LEN;
8480
+ declare const constants_TYPED_DATA_MAX_HASHED_FELTS: typeof TYPED_DATA_MAX_HASHED_FELTS;
8481
+ declare const constants_TYPED_DATA_MAX_TYPES: typeof TYPED_DATA_MAX_TYPES;
8441
8482
  declare const constants_UDC: typeof UDC;
8442
8483
  declare const constants_ZERO: typeof ZERO;
8443
8484
  declare namespace constants {
8444
- export { constants_ADDR_BOUND as ADDR_BOUND, constants_API_VERSION as API_VERSION, type constants_ChannelDefaultOptions as ChannelDefaultOptions, type constants_ChannelDefaults as ChannelDefaults, type constants_ChannelMethodOptions as ChannelMethodOptions, constants_DEFAULT_GLOBAL_CONFIG as DEFAULT_GLOBAL_CONFIG, constants_HARDENING_4BYTES as HARDENING_4BYTES, constants_HARDENING_BYTE as HARDENING_BYTE, constants_IS_BROWSER as IS_BROWSER, constants_LegacyUDC as LegacyUDC, constants_MASK_250 as MASK_250, constants_MASK_31 as MASK_31, constants_MAX_STORAGE_ITEM_SIZE as MAX_STORAGE_ITEM_SIZE, _NetworkName as NetworkName, constants_OutsideExecutionCallerAny as OutsideExecutionCallerAny, constants_PAYMASTER_RPC_NODES as PAYMASTER_RPC_NODES, constants_PRIME as PRIME, constants_RANGE_CLASS_HASH as RANGE_CLASS_HASH, constants_RANGE_CONTRACT_ADDRESS as RANGE_CONTRACT_ADDRESS, constants_RANGE_ETH_ADDRESS as RANGE_ETH_ADDRESS, constants_RANGE_FELT as RANGE_FELT, constants_RANGE_I128 as RANGE_I128, constants_RANGE_I16 as RANGE_I16, constants_RANGE_I32 as RANGE_I32, constants_RANGE_I64 as RANGE_I64, constants_RANGE_I8 as RANGE_I8, constants_RANGE_STORAGE_ADDRESS as RANGE_STORAGE_ADDRESS, constants_RANGE_U128 as RANGE_U128, constants_RANGE_U16 as RANGE_U16, constants_RANGE_U32 as RANGE_U32, constants_RANGE_U64 as RANGE_U64, constants_RANGE_U8 as RANGE_U8, constants_RANGE_U96 as RANGE_U96, constants_RPC_DEFAULT_NODES as RPC_DEFAULT_NODES, constants_SNIP9_V1_INTERFACE_ID as SNIP9_V1_INTERFACE_ID, constants_SNIP9_V2_INTERFACE_ID as SNIP9_V2_INTERFACE_ID, constants_SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS as SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS, constants_SYSTEM_MESSAGES as SYSTEM_MESSAGES, _StarknetChainId as StarknetChainId, type constants_SupportedCairoVersion as SupportedCairoVersion, _SupportedRpcVersion as SupportedRpcVersion, type constants_SupportedRpcVersion0_10 as SupportedRpcVersion0_10, type constants_SupportedTransactionVersion as SupportedTransactionVersion, constants_TEXT_TO_FELT_MAX_LEN as TEXT_TO_FELT_MAX_LEN, _TransactionHashPrefix as TransactionHashPrefix, constants_UDC as UDC, constants_ZERO as ZERO };
8485
+ export { constants_ADDR_BOUND as ADDR_BOUND, constants_API_VERSION as API_VERSION, type constants_ChannelDefaultOptions as ChannelDefaultOptions, type constants_ChannelDefaults as ChannelDefaults, type constants_ChannelMethodOptions as ChannelMethodOptions, constants_DEFAULT_GLOBAL_CONFIG as DEFAULT_GLOBAL_CONFIG, constants_HARDENING_4BYTES as HARDENING_4BYTES, constants_HARDENING_BYTE as HARDENING_BYTE, constants_IS_BROWSER as IS_BROWSER, constants_LegacyUDC as LegacyUDC, constants_MASK_250 as MASK_250, constants_MASK_31 as MASK_31, constants_MAX_STORAGE_ITEM_SIZE as MAX_STORAGE_ITEM_SIZE, _NetworkName as NetworkName, constants_OutsideExecutionCallerAny as OutsideExecutionCallerAny, constants_PAYMASTER_RPC_NODES as PAYMASTER_RPC_NODES, constants_PRIME as PRIME, constants_RANGE_CLASS_HASH as RANGE_CLASS_HASH, constants_RANGE_CONTRACT_ADDRESS as RANGE_CONTRACT_ADDRESS, constants_RANGE_ETH_ADDRESS as RANGE_ETH_ADDRESS, constants_RANGE_FELT as RANGE_FELT, constants_RANGE_I128 as RANGE_I128, constants_RANGE_I16 as RANGE_I16, constants_RANGE_I32 as RANGE_I32, constants_RANGE_I64 as RANGE_I64, constants_RANGE_I8 as RANGE_I8, constants_RANGE_STORAGE_ADDRESS as RANGE_STORAGE_ADDRESS, constants_RANGE_U128 as RANGE_U128, constants_RANGE_U16 as RANGE_U16, constants_RANGE_U32 as RANGE_U32, constants_RANGE_U64 as RANGE_U64, constants_RANGE_U8 as RANGE_U8, constants_RANGE_U96 as RANGE_U96, constants_RPC_DEFAULT_NODES as RPC_DEFAULT_NODES, constants_SNIP9_V1_INTERFACE_ID as SNIP9_V1_INTERFACE_ID, constants_SNIP9_V2_INTERFACE_ID as SNIP9_V2_INTERFACE_ID, constants_SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS as SN_VERSION_IMPLEMENTING_BLAKE_FOR_COMPILED_CLASS, constants_SYSTEM_MESSAGES as SYSTEM_MESSAGES, _StarknetChainId as StarknetChainId, type constants_SupportedCairoVersion as SupportedCairoVersion, _SupportedRpcVersion as SupportedRpcVersion, type constants_SupportedRpcVersion0_10 as SupportedRpcVersion0_10, type constants_SupportedTransactionVersion as SupportedTransactionVersion, constants_TEXT_TO_FELT_MAX_LEN as TEXT_TO_FELT_MAX_LEN, constants_TYPED_DATA_MAX_HASHED_FELTS as TYPED_DATA_MAX_HASHED_FELTS, constants_TYPED_DATA_MAX_TYPES as TYPED_DATA_MAX_TYPES, _TransactionHashPrefix as TransactionHashPrefix, constants_UDC as UDC, constants_ZERO as ZERO };
8445
8486
  }
8446
8487
 
8447
8488
  /** What a {@link SubscriptionChannel} needs: a socket to borrow, and how much to buffer. */
@@ -9546,8 +9587,82 @@ declare class RpcProvider implements ProviderInterface {
9546
9587
  getClassAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>;
9547
9588
  getContractVersion(contractAddress: BigNumberish, classHash?: undefined, options?: getContractVersionOptions): Promise<ContractVersion>;
9548
9589
  getContractVersion(contractAddress: undefined, classHash: BigNumberish, options?: getContractVersionOptions): Promise<ContractVersion>;
9590
+ /**
9591
+ * Estimates the fee for a given INVOKE transaction
9592
+ *
9593
+ * @param invocation the invocation object containing:
9594
+ * - contractAddress - the address of the contract
9595
+ * - entrypoint - (optional) the entrypoint of the contract
9596
+ * - calldata - (optional, defaults to []) the calldata
9597
+ * - signature - (optional, defaults to []) the signature
9598
+ * @param details - optional details containing:
9599
+ * - nonce - optional nonce
9600
+ * - version - optional version
9601
+ * @param blockIdentifier - (optional) block identifier
9602
+ * @param skipValidate - (optional) skip cairo __validate__ method
9603
+ * @returns the estimated fee
9604
+ * @deprecated This method only calls `getEstimateFeeBulk` with one transaction. Use
9605
+ * {@link RpcProvider.getEstimateFeeBulk | getEstimateFeeBulk} instead (see the example).
9606
+ * This method will be removed in a future major version, not before v13.
9607
+ * @example
9608
+ * ```typescript
9609
+ * const feeEstimate = await provider.getInvokeEstimateFee(invocation, details);
9610
+ * // Equivalent to:
9611
+ * const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: TransactionType.INVOKE, ...invocation, ...details }]);
9612
+ * ```
9613
+ * @remarks This method is an alias that calls getEstimateFeeBulk with a single transaction
9614
+ */
9549
9615
  getInvokeEstimateFee(invocation: Invocation, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier, skipValidate?: boolean): Promise<EstimateFeeResponseOverhead>;
9616
+ /**
9617
+ * Estimates the fee for a given DECLARE transaction
9618
+ *
9619
+ * @param invocation transaction payload to be declared containing:
9620
+ * - compiled contract code
9621
+ * - sender address
9622
+ * - signature - (defaults to []) the signature
9623
+ * @param details - optional details containing:
9624
+ * - nonce
9625
+ * - version - optional version
9626
+ * @param blockIdentifier - (optional) block identifier
9627
+ * @param skipValidate - (optional) skip cairo __validate__ method
9628
+ * @returns the estimated fee
9629
+ * @deprecated This method only calls `getEstimateFeeBulk` with one transaction. Use
9630
+ * {@link RpcProvider.getEstimateFeeBulk | getEstimateFeeBulk} instead (see the example).
9631
+ * This method will be removed in a future major version, not before v13.
9632
+ * @example
9633
+ * ```typescript
9634
+ * const feeEstimate = await provider.getDeclareEstimateFee(transaction, details);
9635
+ * // Equivalent to:
9636
+ * const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: TransactionType.DECLARE, ...transaction, ...details }]);
9637
+ * ```
9638
+ * @remarks This method is an alias that calls getEstimateFeeBulk with a single transaction
9639
+ */
9550
9640
  getDeclareEstimateFee(invocation: DeclareContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier, skipValidate?: boolean): Promise<EstimateFeeResponseOverhead>;
9641
+ /**
9642
+ * Estimates the fee for a given DEPLOY_ACCOUNT transaction
9643
+ *
9644
+ * @param invocation transaction payload to be deployed containing:
9645
+ * - classHash
9646
+ * - constructorCalldata
9647
+ * - addressSalt
9648
+ * - signature - (defaults to []) the signature
9649
+ * @param details - optional details containing:
9650
+ * - nonce
9651
+ * - version - optional version
9652
+ * @param blockIdentifier - (optional) block identifier
9653
+ * @param skipValidate - (optional) skip cairo __validate__ method
9654
+ * @returns the estimated fee
9655
+ * @deprecated This method only calls `getEstimateFeeBulk` with one transaction. Use
9656
+ * {@link RpcProvider.getEstimateFeeBulk | getEstimateFeeBulk} instead (see the example).
9657
+ * This method will be removed in a future major version, not before v13.
9658
+ * @example
9659
+ * ```typescript
9660
+ * const feeEstimate = await provider.getDeployAccountEstimateFee(transaction, details);
9661
+ * // Equivalent to:
9662
+ * const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: TransactionType.DEPLOY_ACCOUNT, ...transaction, ...details }]);
9663
+ * ```
9664
+ * @remarks This method is an alias that calls getEstimateFeeBulk with a single transaction
9665
+ */
9551
9666
  getDeployAccountEstimateFee(invocation: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier, skipValidate?: boolean): Promise<EstimateFeeResponseOverhead>;
9552
9667
  getEstimateFeeBulk(invocations: AccountInvocations, options?: getEstimateFeeBulkOptions): Promise<EstimateFeeResponseBulkOverhead>;
9553
9668
  invokeFunction(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<{
@@ -9953,7 +10068,7 @@ type WalletAccountV6Options = {
9953
10068
 
9954
10069
  /**
9955
10070
  * @deprecated Use {@link WalletAccountV6} (get-starknet v6) instead. This class is kept only for
9956
- * DAPPs that are still on get-starknet v4.
10071
+ * DAPPs that are still on get-starknet v4. It will be removed in v12.
9957
10072
  *
9958
10073
  * @remarks
9959
10074
  * Account that lets a wallet sign and send the transactions, using get-starknet v4.
@@ -12177,6 +12292,7 @@ declare function toCairoBool(value: boolean): string;
12177
12292
  * @param {string} str hex-string
12178
12293
  * @returns {Uint8Array} array containing the converted elements
12179
12294
  * @throws str must be a hex-string
12295
+ * @see {@link encode.buf2hex} Does the inverse conversion: `Uint8Array` to hex-string.
12180
12296
  * @example
12181
12297
  * ```typescript
12182
12298
  * let result;
@@ -13139,13 +13255,17 @@ declare function isMerkleTreeType(type: StarknetType): type is StarknetMerkleTyp
13139
13255
  * Get the dependencies of a struct type. If a struct has the same dependency multiple times, it's only included once
13140
13256
  * in the resulting array.
13141
13257
  *
13258
+ * The walk visits each type once, even when several types point to it, so its cost follows the size of the type
13259
+ * graph.
13260
+ *
13142
13261
  * @param {TypedData['types']} types - The types object containing all defined types.
13143
13262
  * @param {string} type - The name of the type to get dependencies for.
13144
- * @param {string[]} [dependencies=[]] - The array to store dependencies.
13263
+ * @param {string[]} [dependencies=[]] - The type names to leave out when `type` points to them.
13145
13264
  * @param {string} [contains=''] - The type contained within the struct.
13146
13265
  * @param {Revision} [revision=Revision.Legacy] - The revision of the TypedData.
13147
13266
  *
13148
13267
  * @returns {string[]} The array of dependencies.
13268
+ * @throws Will throw an error if a type refers to itself, directly or through other types.
13149
13269
  */
13150
13270
  declare function getDependencies(types: TypedData['types'], type: string, dependencies?: string[], contains?: string, revision?: TypedDataRevision): string[];
13151
13271
  /**
@@ -13156,6 +13276,7 @@ declare function getDependencies(types: TypedData['types'], type: string, depend
13156
13276
  * @param {Revision} [revision=Revision.Legacy] - The revision of the TypedData.
13157
13277
  *
13158
13278
  * @returns {string} The encoded string.
13279
+ * @throws Will throw an error if the types declare more than `constants.TYPED_DATA_MAX_TYPES` types, or if a type refers to itself, directly or through other types.
13159
13280
  *
13160
13281
  * @example
13161
13282
  * ```typescript
@@ -13174,6 +13295,7 @@ declare function encodeType(types: TypedData['types'], type: string, revision?:
13174
13295
  * @param {Revision} [revision=Revision.Legacy] - The revision of the TypedData.
13175
13296
  *
13176
13297
  * @returns {string} The hash.
13298
+ * @throws Will throw an error if the types declare more than `constants.TYPED_DATA_MAX_TYPES` types, or if a type refers to itself, directly or through other types.
13177
13299
  *
13178
13300
  * @example
13179
13301
  * ```typescript
@@ -13195,6 +13317,7 @@ declare function getTypeHash(types: TypedData['types'], type: string, revision?:
13195
13317
  * @param {Revision} [revision=Revision.Legacy] - The revision of the TypedData.
13196
13318
  *
13197
13319
  * @returns {[string, string]} The ABI compatible type and corresponding value.
13320
+ * @throws Will throw an error if the types declare more than `constants.TYPED_DATA_MAX_TYPES` types, if the data needs more than `constants.TYPED_DATA_MAX_HASHED_FELTS` felts to hash, or if a type refers to itself.
13198
13321
  *
13199
13322
  * @example
13200
13323
  * ```typescript
@@ -13218,6 +13341,7 @@ declare function encodeValue(types: TypedData['types'], type: string, data: unkn
13218
13341
  * @param {Revision} [revision=Revision.Legacy] - The revision of the TypedData.
13219
13342
  *
13220
13343
  * @returns {[string[], string[]]} The ABI compatible types and corresponding values.
13344
+ * @throws Will throw an error if the types declare more than `constants.TYPED_DATA_MAX_TYPES` types, if the data needs more than `constants.TYPED_DATA_MAX_HASHED_FELTS` felts to hash, or if a type refers to itself.
13221
13345
  */
13222
13346
  declare function encodeData<T extends TypedData>(types: T['types'], type: string, data: T['message'], revision?: TypedDataRevision): [string[], string[]];
13223
13347
  /**
@@ -13230,6 +13354,7 @@ declare function encodeData<T extends TypedData>(types: T['types'], type: string
13230
13354
  * @param {Revision} [revision=Revision.Legacy] - The revision of the TypedData.
13231
13355
  *
13232
13356
  * @returns {string} The hash of the encoded data.
13357
+ * @throws Will throw an error if the types declare more than `constants.TYPED_DATA_MAX_TYPES` types, if the data needs more than `constants.TYPED_DATA_MAX_HASHED_FELTS` felts to hash, or if a type refers to itself.
13233
13358
  *
13234
13359
  * @example
13235
13360
  * ```typescript
@@ -13253,6 +13378,7 @@ declare function getStructHash<T extends TypedData>(types: T['types'], type: str
13253
13378
  *
13254
13379
  * @returns {string} The hash of the message to sign.
13255
13380
  * @throws Will throw an error if the typedData does not match the JSON schema.
13381
+ * @throws Will throw an error if the typed data declares more than `constants.TYPED_DATA_MAX_TYPES` types, if the message needs more than `constants.TYPED_DATA_MAX_HASHED_FELTS` felts to hash, or if a type refers to itself.
13256
13382
  *
13257
13383
  * @example
13258
13384
  * ```typescript
@@ -13312,6 +13438,7 @@ declare function getMessageHash(typedData: TypedData, accountAddress: BigNumberi
13312
13438
  * @param {BigNumberish} fullPublicKey a number coded on 520 bits (from ec.getFullPublicKey()).
13313
13439
  * @param {BigNumberish} [accountAddress] address of the account that has signed the message. Not needed with a message hash is provided in `message`
13314
13440
  * @returns {boolean} true if the message is verified.
13441
+ * @throws Will throw an error if `message` is a TypedData that declares more than `constants.TYPED_DATA_MAX_TYPES` types, needs more than `constants.TYPED_DATA_MAX_HASHED_FELTS` felts to hash, or has a type which refers to itself.
13315
13442
  * @example
13316
13443
  * ```typescript
13317
13444
  * const myTypedMessage: TypedMessage = .... ;
@@ -18134,57 +18261,87 @@ declare function units(amount: string | bigint, simbol?: 'fri' | 'strk'): string
18134
18261
 
18135
18262
  /**
18136
18263
  * Request Permission for wallet account, return addresses that are allowed by user
18264
+ * @deprecated This function works only with get-starknet v4. Use
18265
+ * {@link walletV6.requestAccounts} (get-starknet v6) instead. The `wallet` namespace will be
18266
+ * removed in v12.
18137
18267
  * @param {boolean} [silent_mode=false] false: request user interaction allowance. true: return only pre-allowed
18138
18268
  * @returns allowed accounts addresses
18139
18269
  */
18140
18270
  declare function requestAccounts$2(swo: StarknetWindowObject, silent_mode?: boolean): Promise<Address[]>;
18141
18271
  /**
18142
18272
  * Request Permission for wallet account
18273
+ * @deprecated This function works only with get-starknet v4. Use
18274
+ * {@link walletV6.getPermissions} (get-starknet v6) instead. The `wallet` namespace will be
18275
+ * removed in v12.
18143
18276
  * @returns allowed accounts addresses
18144
18277
  */
18145
18278
  declare function getPermissions$2(swo: StarknetWindowObject): Promise<Permission[]>;
18146
18279
  /**
18147
18280
  * Request adding ERC20 Token to Wallet List
18281
+ * @deprecated This function works only with get-starknet v4. Use
18282
+ * {@link walletV6.watchAsset} (get-starknet v6) instead. The `wallet` namespace will be
18283
+ * removed in v12.
18148
18284
  * @param asset WatchAssetParameters
18149
18285
  * @returns boolean
18150
18286
  */
18151
18287
  declare function watchAsset$2(swo: StarknetWindowObject, asset: WatchAssetParameters): Promise<boolean>;
18152
18288
  /**
18153
18289
  * Request adding custom Starknet chain
18290
+ * @deprecated This function works only with get-starknet v4. Use
18291
+ * {@link walletV6.addStarknetChain} (get-starknet v6) instead. The `wallet` namespace will be
18292
+ * removed in v12.
18154
18293
  * @param chain AddStarknetChainParameters
18155
18294
  * @returns boolean
18156
18295
  */
18157
18296
  declare function addStarknetChain$2(swo: StarknetWindowObject, chain: AddStarknetChainParameters): Promise<boolean>;
18158
18297
  /**
18159
18298
  * Request Wallet Network change
18299
+ * @deprecated This function works only with get-starknet v4. Use
18300
+ * {@link walletV6.switchStarknetChain} (get-starknet v6) instead. The `wallet` namespace will be
18301
+ * removed in v12.
18160
18302
  * @param chainId StarknetChainId
18161
18303
  * @returns boolean
18162
18304
  */
18163
18305
  declare function switchStarknetChain$2(swo: StarknetWindowObject, chainId: ChainId): Promise<boolean>;
18164
18306
  /**
18165
18307
  * Request the current chain ID from the wallet.
18308
+ * @deprecated This function works only with get-starknet v4. Use
18309
+ * {@link walletV6.requestChainId} (get-starknet v6) instead. The `wallet` namespace will be
18310
+ * removed in v12.
18166
18311
  * @returns The current Starknet chain ID.
18167
18312
  */
18168
18313
  declare function requestChainId$2(swo: StarknetWindowObject): Promise<ChainId>;
18169
18314
  /**
18170
18315
  * Get deployment data for a contract.
18316
+ * @deprecated This function works only with get-starknet v4. Use
18317
+ * {@link walletV6.deploymentData} (get-starknet v6) instead. The `wallet` namespace will be
18318
+ * removed in v12.
18171
18319
  * @returns The deployment data result.
18172
18320
  */
18173
18321
  declare function deploymentData$2(swo: StarknetWindowObject): Promise<AccountDeploymentData>;
18174
18322
  /**
18175
18323
  * Add an invoke transaction to the wallet.
18324
+ * @deprecated This function works only with get-starknet v4. Use
18325
+ * {@link walletV6.addInvokeTransaction} (get-starknet v6) instead. The `wallet` namespace will be
18326
+ * removed in v12.
18176
18327
  * @param params The parameters required for the invoke transaction.
18177
18328
  * @returns The result of adding the invoke transaction.
18178
18329
  */
18179
18330
  declare function addInvokeTransaction$2(swo: StarknetWindowObject, params: AddInvokeTransactionParameters): Promise<AddInvokeTransactionResult>;
18180
18331
  /**
18181
18332
  * Add a declare transaction to the wallet.
18333
+ * @deprecated This function works only with get-starknet v4. Use
18334
+ * {@link walletV6.addDeclareTransaction} (get-starknet v6) instead. The `wallet` namespace will be
18335
+ * removed in v12.
18182
18336
  * @param params The parameters required for the declare transaction.
18183
18337
  * @returns The result of adding the declare transaction.
18184
18338
  */
18185
18339
  declare function addDeclareTransaction$2(swo: StarknetWindowObject, params: AddDeclareTransactionParameters): Promise<AddDeclareTransactionResult>;
18186
18340
  /**
18187
18341
  * Sign typed data using the wallet.
18342
+ * @deprecated This function works only with get-starknet v4. Use
18343
+ * {@link walletV6.signMessage} (get-starknet v6) instead. The `wallet` namespace will be
18344
+ * removed in v12.
18188
18345
  * @param swo the starknet (wallet) window object to request the signature.
18189
18346
  * @param typedData The typed data to sign.
18190
18347
  * @returns An array of signatures as strings.
@@ -18192,11 +18349,17 @@ declare function addDeclareTransaction$2(swo: StarknetWindowObject, params: AddD
18192
18349
  declare function signMessage$2(swo: StarknetWindowObject, typedData: TypedData): Promise<Signature$1>;
18193
18350
  /**
18194
18351
  * Get the list of supported specifications.
18352
+ * @deprecated This function works only with get-starknet v4. Use
18353
+ * {@link walletV6.supportedSpecs} (get-starknet v6) instead. The `wallet` namespace will be
18354
+ * removed in v12.
18195
18355
  * @returns An array of supported specification strings.
18196
18356
  */
18197
18357
  declare function supportedSpecs$2(swo: StarknetWindowObject): Promise<SpecVersion[]>;
18198
18358
  /**
18199
18359
  * Get the list of supported wallet API versions.
18360
+ * @deprecated This function works only with get-starknet v4. Use
18361
+ * {@link walletV6.supportedWalletApi} (get-starknet v6) instead. The `wallet` namespace will be
18362
+ * removed in v12.
18200
18363
  * @returns An array of supported wallet API version strings.
18201
18364
  */
18202
18365
  declare function supportedWalletApi$2(swo: StarknetWindowObject): Promise<API_VERSION$1[]>;
@@ -18204,6 +18367,9 @@ declare function supportedWalletApi$2(swo: StarknetWindowObject): Promise<API_VE
18204
18367
  * Attaches an event handler function to the "accountsChanged" event of a StarknetWindowObject.
18205
18368
  * When the accounts are changed, the specified callback function will be called.
18206
18369
  *
18370
+ * @deprecated This function works only with get-starknet v4. Use
18371
+ * {@link walletV6.subscribeWalletEvent} (get-starknet v6) instead. Its callback is called for a
18372
+ * change of account and for a change of network. The `wallet` namespace will be removed in v12.
18207
18373
  * @param {StarknetWindowObject} swo - The StarknetWindowObject to attach the event handler to.
18208
18374
  * @param {AccountChangeEventHandler} callback - The function to be called when the accounts are changed.
18209
18375
  * It will receive the changed accounts as a parameter.
@@ -18213,6 +18379,9 @@ declare function onAccountChange(swo: StarknetWindowObject, callback: AccountCha
18213
18379
  /**
18214
18380
  * Register a callback function to be called when the network is changed.
18215
18381
  *
18382
+ * @deprecated This function works only with get-starknet v4. Use
18383
+ * {@link walletV6.subscribeWalletEvent} (get-starknet v6) instead. Its callback is called for a
18384
+ * change of account and for a change of network. The `wallet` namespace will be removed in v12.
18216
18385
  * @param {StarknetWindowObject} swo - The StarknetWindowObject instance.
18217
18386
  * @param {NetworkChangeEventHandler} callback - The callback function to be called when the network is changed.
18218
18387
  * @return {void}