starknet 11.5.1 → 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 +6 -0
- package/dist/index.d.ts +131 -7
- package/dist/index.global.js +74 -0
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +74 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +74 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
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
|
+
|
|
1
7
|
## [11.5.1](https://github.com/starknet-io/starknet.js/compare/v11.5.0...v11.5.1) (2026-11-04)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
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
|
|
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:
|
|
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
|
|
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:
|
|
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
|
|
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:
|
|
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
|
|
@@ -9580,8 +9587,82 @@ declare class RpcProvider implements ProviderInterface {
|
|
|
9580
9587
|
getClassAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>;
|
|
9581
9588
|
getContractVersion(contractAddress: BigNumberish, classHash?: undefined, options?: getContractVersionOptions): Promise<ContractVersion>;
|
|
9582
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
|
+
*/
|
|
9583
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
|
+
*/
|
|
9584
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
|
+
*/
|
|
9585
9666
|
getDeployAccountEstimateFee(invocation: DeployAccountContractTransaction, details: InvocationsDetailsWithNonce, blockIdentifier?: BlockIdentifier, skipValidate?: boolean): Promise<EstimateFeeResponseOverhead>;
|
|
9586
9667
|
getEstimateFeeBulk(invocations: AccountInvocations, options?: getEstimateFeeBulkOptions): Promise<EstimateFeeResponseBulkOverhead>;
|
|
9587
9668
|
invokeFunction(functionInvocation: Invocation, details: InvocationsDetailsWithNonce): Promise<{
|
|
@@ -9987,7 +10068,7 @@ type WalletAccountV6Options = {
|
|
|
9987
10068
|
|
|
9988
10069
|
/**
|
|
9989
10070
|
* @deprecated Use {@link WalletAccountV6} (get-starknet v6) instead. This class is kept only for
|
|
9990
|
-
* DAPPs that are still on get-starknet v4.
|
|
10071
|
+
* DAPPs that are still on get-starknet v4. It will be removed in v12.
|
|
9991
10072
|
*
|
|
9992
10073
|
* @remarks
|
|
9993
10074
|
* Account that lets a wallet sign and send the transactions, using get-starknet v4.
|
|
@@ -12211,6 +12292,7 @@ declare function toCairoBool(value: boolean): string;
|
|
|
12211
12292
|
* @param {string} str hex-string
|
|
12212
12293
|
* @returns {Uint8Array} array containing the converted elements
|
|
12213
12294
|
* @throws str must be a hex-string
|
|
12295
|
+
* @see {@link encode.buf2hex} Does the inverse conversion: `Uint8Array` to hex-string.
|
|
12214
12296
|
* @example
|
|
12215
12297
|
* ```typescript
|
|
12216
12298
|
* let result;
|
|
@@ -18179,57 +18261,87 @@ declare function units(amount: string | bigint, simbol?: 'fri' | 'strk'): string
|
|
|
18179
18261
|
|
|
18180
18262
|
/**
|
|
18181
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.
|
|
18182
18267
|
* @param {boolean} [silent_mode=false] false: request user interaction allowance. true: return only pre-allowed
|
|
18183
18268
|
* @returns allowed accounts addresses
|
|
18184
18269
|
*/
|
|
18185
18270
|
declare function requestAccounts$2(swo: StarknetWindowObject, silent_mode?: boolean): Promise<Address[]>;
|
|
18186
18271
|
/**
|
|
18187
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.
|
|
18188
18276
|
* @returns allowed accounts addresses
|
|
18189
18277
|
*/
|
|
18190
18278
|
declare function getPermissions$2(swo: StarknetWindowObject): Promise<Permission[]>;
|
|
18191
18279
|
/**
|
|
18192
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.
|
|
18193
18284
|
* @param asset WatchAssetParameters
|
|
18194
18285
|
* @returns boolean
|
|
18195
18286
|
*/
|
|
18196
18287
|
declare function watchAsset$2(swo: StarknetWindowObject, asset: WatchAssetParameters): Promise<boolean>;
|
|
18197
18288
|
/**
|
|
18198
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.
|
|
18199
18293
|
* @param chain AddStarknetChainParameters
|
|
18200
18294
|
* @returns boolean
|
|
18201
18295
|
*/
|
|
18202
18296
|
declare function addStarknetChain$2(swo: StarknetWindowObject, chain: AddStarknetChainParameters): Promise<boolean>;
|
|
18203
18297
|
/**
|
|
18204
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.
|
|
18205
18302
|
* @param chainId StarknetChainId
|
|
18206
18303
|
* @returns boolean
|
|
18207
18304
|
*/
|
|
18208
18305
|
declare function switchStarknetChain$2(swo: StarknetWindowObject, chainId: ChainId): Promise<boolean>;
|
|
18209
18306
|
/**
|
|
18210
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.
|
|
18211
18311
|
* @returns The current Starknet chain ID.
|
|
18212
18312
|
*/
|
|
18213
18313
|
declare function requestChainId$2(swo: StarknetWindowObject): Promise<ChainId>;
|
|
18214
18314
|
/**
|
|
18215
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.
|
|
18216
18319
|
* @returns The deployment data result.
|
|
18217
18320
|
*/
|
|
18218
18321
|
declare function deploymentData$2(swo: StarknetWindowObject): Promise<AccountDeploymentData>;
|
|
18219
18322
|
/**
|
|
18220
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.
|
|
18221
18327
|
* @param params The parameters required for the invoke transaction.
|
|
18222
18328
|
* @returns The result of adding the invoke transaction.
|
|
18223
18329
|
*/
|
|
18224
18330
|
declare function addInvokeTransaction$2(swo: StarknetWindowObject, params: AddInvokeTransactionParameters): Promise<AddInvokeTransactionResult>;
|
|
18225
18331
|
/**
|
|
18226
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.
|
|
18227
18336
|
* @param params The parameters required for the declare transaction.
|
|
18228
18337
|
* @returns The result of adding the declare transaction.
|
|
18229
18338
|
*/
|
|
18230
18339
|
declare function addDeclareTransaction$2(swo: StarknetWindowObject, params: AddDeclareTransactionParameters): Promise<AddDeclareTransactionResult>;
|
|
18231
18340
|
/**
|
|
18232
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.
|
|
18233
18345
|
* @param swo the starknet (wallet) window object to request the signature.
|
|
18234
18346
|
* @param typedData The typed data to sign.
|
|
18235
18347
|
* @returns An array of signatures as strings.
|
|
@@ -18237,11 +18349,17 @@ declare function addDeclareTransaction$2(swo: StarknetWindowObject, params: AddD
|
|
|
18237
18349
|
declare function signMessage$2(swo: StarknetWindowObject, typedData: TypedData): Promise<Signature$1>;
|
|
18238
18350
|
/**
|
|
18239
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.
|
|
18240
18355
|
* @returns An array of supported specification strings.
|
|
18241
18356
|
*/
|
|
18242
18357
|
declare function supportedSpecs$2(swo: StarknetWindowObject): Promise<SpecVersion[]>;
|
|
18243
18358
|
/**
|
|
18244
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.
|
|
18245
18363
|
* @returns An array of supported wallet API version strings.
|
|
18246
18364
|
*/
|
|
18247
18365
|
declare function supportedWalletApi$2(swo: StarknetWindowObject): Promise<API_VERSION$1[]>;
|
|
@@ -18249,6 +18367,9 @@ declare function supportedWalletApi$2(swo: StarknetWindowObject): Promise<API_VE
|
|
|
18249
18367
|
* Attaches an event handler function to the "accountsChanged" event of a StarknetWindowObject.
|
|
18250
18368
|
* When the accounts are changed, the specified callback function will be called.
|
|
18251
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.
|
|
18252
18373
|
* @param {StarknetWindowObject} swo - The StarknetWindowObject to attach the event handler to.
|
|
18253
18374
|
* @param {AccountChangeEventHandler} callback - The function to be called when the accounts are changed.
|
|
18254
18375
|
* It will receive the changed accounts as a parameter.
|
|
@@ -18258,6 +18379,9 @@ declare function onAccountChange(swo: StarknetWindowObject, callback: AccountCha
|
|
|
18258
18379
|
/**
|
|
18259
18380
|
* Register a callback function to be called when the network is changed.
|
|
18260
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.
|
|
18261
18385
|
* @param {StarknetWindowObject} swo - The StarknetWindowObject instance.
|
|
18262
18386
|
* @param {NetworkChangeEventHandler} callback - The callback function to be called when the network is changed.
|
|
18263
18387
|
* @return {void}
|
package/dist/index.global.js
CHANGED
|
@@ -23794,18 +23794,92 @@ ${indent}}` : "}";
|
|
|
23794
23794
|
}
|
|
23795
23795
|
return { cairo: "0", compiler: "0" };
|
|
23796
23796
|
}
|
|
23797
|
+
/**
|
|
23798
|
+
* Estimates the fee for a given INVOKE transaction
|
|
23799
|
+
*
|
|
23800
|
+
* @param invocation the invocation object containing:
|
|
23801
|
+
* - contractAddress - the address of the contract
|
|
23802
|
+
* - entrypoint - (optional) the entrypoint of the contract
|
|
23803
|
+
* - calldata - (optional, defaults to []) the calldata
|
|
23804
|
+
* - signature - (optional, defaults to []) the signature
|
|
23805
|
+
* @param details - optional details containing:
|
|
23806
|
+
* - nonce - optional nonce
|
|
23807
|
+
* - version - optional version
|
|
23808
|
+
* @param blockIdentifier - (optional) block identifier
|
|
23809
|
+
* @param skipValidate - (optional) skip cairo __validate__ method
|
|
23810
|
+
* @returns the estimated fee
|
|
23811
|
+
* @deprecated This method only calls `getEstimateFeeBulk` with one transaction. Use
|
|
23812
|
+
* {@link RpcProvider.getEstimateFeeBulk | getEstimateFeeBulk} instead (see the example).
|
|
23813
|
+
* This method will be removed in a future major version, not before v13.
|
|
23814
|
+
* @example
|
|
23815
|
+
* ```typescript
|
|
23816
|
+
* const feeEstimate = await provider.getInvokeEstimateFee(invocation, details);
|
|
23817
|
+
* // Equivalent to:
|
|
23818
|
+
* const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: TransactionType.INVOKE, ...invocation, ...details }]);
|
|
23819
|
+
* ```
|
|
23820
|
+
* @remarks This method is an alias that calls getEstimateFeeBulk with a single transaction
|
|
23821
|
+
*/
|
|
23797
23822
|
async getInvokeEstimateFee(invocation, details, blockIdentifier, skipValidate) {
|
|
23798
23823
|
return (await this.getEstimateFeeBulk(
|
|
23799
23824
|
[{ type: ETransactionType2.INVOKE, ...invocation, ...details }],
|
|
23800
23825
|
{ blockIdentifier, skipValidate }
|
|
23801
23826
|
))[0];
|
|
23802
23827
|
}
|
|
23828
|
+
/**
|
|
23829
|
+
* Estimates the fee for a given DECLARE transaction
|
|
23830
|
+
*
|
|
23831
|
+
* @param invocation transaction payload to be declared containing:
|
|
23832
|
+
* - compiled contract code
|
|
23833
|
+
* - sender address
|
|
23834
|
+
* - signature - (defaults to []) the signature
|
|
23835
|
+
* @param details - optional details containing:
|
|
23836
|
+
* - nonce
|
|
23837
|
+
* - version - optional version
|
|
23838
|
+
* @param blockIdentifier - (optional) block identifier
|
|
23839
|
+
* @param skipValidate - (optional) skip cairo __validate__ method
|
|
23840
|
+
* @returns the estimated fee
|
|
23841
|
+
* @deprecated This method only calls `getEstimateFeeBulk` with one transaction. Use
|
|
23842
|
+
* {@link RpcProvider.getEstimateFeeBulk | getEstimateFeeBulk} instead (see the example).
|
|
23843
|
+
* This method will be removed in a future major version, not before v13.
|
|
23844
|
+
* @example
|
|
23845
|
+
* ```typescript
|
|
23846
|
+
* const feeEstimate = await provider.getDeclareEstimateFee(transaction, details);
|
|
23847
|
+
* // Equivalent to:
|
|
23848
|
+
* const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: TransactionType.DECLARE, ...transaction, ...details }]);
|
|
23849
|
+
* ```
|
|
23850
|
+
* @remarks This method is an alias that calls getEstimateFeeBulk with a single transaction
|
|
23851
|
+
*/
|
|
23803
23852
|
async getDeclareEstimateFee(invocation, details, blockIdentifier, skipValidate) {
|
|
23804
23853
|
return (await this.getEstimateFeeBulk(
|
|
23805
23854
|
[{ type: ETransactionType2.DECLARE, ...invocation, ...details }],
|
|
23806
23855
|
{ blockIdentifier, skipValidate }
|
|
23807
23856
|
))[0];
|
|
23808
23857
|
}
|
|
23858
|
+
/**
|
|
23859
|
+
* Estimates the fee for a given DEPLOY_ACCOUNT transaction
|
|
23860
|
+
*
|
|
23861
|
+
* @param invocation transaction payload to be deployed containing:
|
|
23862
|
+
* - classHash
|
|
23863
|
+
* - constructorCalldata
|
|
23864
|
+
* - addressSalt
|
|
23865
|
+
* - signature - (defaults to []) the signature
|
|
23866
|
+
* @param details - optional details containing:
|
|
23867
|
+
* - nonce
|
|
23868
|
+
* - version - optional version
|
|
23869
|
+
* @param blockIdentifier - (optional) block identifier
|
|
23870
|
+
* @param skipValidate - (optional) skip cairo __validate__ method
|
|
23871
|
+
* @returns the estimated fee
|
|
23872
|
+
* @deprecated This method only calls `getEstimateFeeBulk` with one transaction. Use
|
|
23873
|
+
* {@link RpcProvider.getEstimateFeeBulk | getEstimateFeeBulk} instead (see the example).
|
|
23874
|
+
* This method will be removed in a future major version, not before v13.
|
|
23875
|
+
* @example
|
|
23876
|
+
* ```typescript
|
|
23877
|
+
* const feeEstimate = await provider.getDeployAccountEstimateFee(transaction, details);
|
|
23878
|
+
* // Equivalent to:
|
|
23879
|
+
* const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: TransactionType.DEPLOY_ACCOUNT, ...transaction, ...details }]);
|
|
23880
|
+
* ```
|
|
23881
|
+
* @remarks This method is an alias that calls getEstimateFeeBulk with a single transaction
|
|
23882
|
+
*/
|
|
23809
23883
|
async getDeployAccountEstimateFee(invocation, details, blockIdentifier, skipValidate) {
|
|
23810
23884
|
return (await this.getEstimateFeeBulk(
|
|
23811
23885
|
[{ type: ETransactionType2.DEPLOY_ACCOUNT, ...invocation, ...details }],
|