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/dist/index.mjs
CHANGED
|
@@ -18033,18 +18033,92 @@ var RpcProvider = class {
|
|
|
18033
18033
|
}
|
|
18034
18034
|
return { cairo: "0", compiler: "0" };
|
|
18035
18035
|
}
|
|
18036
|
+
/**
|
|
18037
|
+
* Estimates the fee for a given INVOKE transaction
|
|
18038
|
+
*
|
|
18039
|
+
* @param invocation the invocation object containing:
|
|
18040
|
+
* - contractAddress - the address of the contract
|
|
18041
|
+
* - entrypoint - (optional) the entrypoint of the contract
|
|
18042
|
+
* - calldata - (optional, defaults to []) the calldata
|
|
18043
|
+
* - signature - (optional, defaults to []) the signature
|
|
18044
|
+
* @param details - optional details containing:
|
|
18045
|
+
* - nonce - optional nonce
|
|
18046
|
+
* - version - optional version
|
|
18047
|
+
* @param blockIdentifier - (optional) block identifier
|
|
18048
|
+
* @param skipValidate - (optional) skip cairo __validate__ method
|
|
18049
|
+
* @returns the estimated fee
|
|
18050
|
+
* @deprecated This method only calls `getEstimateFeeBulk` with one transaction. Use
|
|
18051
|
+
* {@link RpcProvider.getEstimateFeeBulk | getEstimateFeeBulk} instead (see the example).
|
|
18052
|
+
* This method will be removed in a future major version, not before v13.
|
|
18053
|
+
* @example
|
|
18054
|
+
* ```typescript
|
|
18055
|
+
* const feeEstimate = await provider.getInvokeEstimateFee(invocation, details);
|
|
18056
|
+
* // Equivalent to:
|
|
18057
|
+
* const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: TransactionType.INVOKE, ...invocation, ...details }]);
|
|
18058
|
+
* ```
|
|
18059
|
+
* @remarks This method is an alias that calls getEstimateFeeBulk with a single transaction
|
|
18060
|
+
*/
|
|
18036
18061
|
async getInvokeEstimateFee(invocation, details, blockIdentifier, skipValidate) {
|
|
18037
18062
|
return (await this.getEstimateFeeBulk(
|
|
18038
18063
|
[{ type: api_exports.ETransactionType.INVOKE, ...invocation, ...details }],
|
|
18039
18064
|
{ blockIdentifier, skipValidate }
|
|
18040
18065
|
))[0];
|
|
18041
18066
|
}
|
|
18067
|
+
/**
|
|
18068
|
+
* Estimates the fee for a given DECLARE transaction
|
|
18069
|
+
*
|
|
18070
|
+
* @param invocation transaction payload to be declared containing:
|
|
18071
|
+
* - compiled contract code
|
|
18072
|
+
* - sender address
|
|
18073
|
+
* - signature - (defaults to []) the signature
|
|
18074
|
+
* @param details - optional details containing:
|
|
18075
|
+
* - nonce
|
|
18076
|
+
* - version - optional version
|
|
18077
|
+
* @param blockIdentifier - (optional) block identifier
|
|
18078
|
+
* @param skipValidate - (optional) skip cairo __validate__ method
|
|
18079
|
+
* @returns the estimated fee
|
|
18080
|
+
* @deprecated This method only calls `getEstimateFeeBulk` with one transaction. Use
|
|
18081
|
+
* {@link RpcProvider.getEstimateFeeBulk | getEstimateFeeBulk} instead (see the example).
|
|
18082
|
+
* This method will be removed in a future major version, not before v13.
|
|
18083
|
+
* @example
|
|
18084
|
+
* ```typescript
|
|
18085
|
+
* const feeEstimate = await provider.getDeclareEstimateFee(transaction, details);
|
|
18086
|
+
* // Equivalent to:
|
|
18087
|
+
* const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: TransactionType.DECLARE, ...transaction, ...details }]);
|
|
18088
|
+
* ```
|
|
18089
|
+
* @remarks This method is an alias that calls getEstimateFeeBulk with a single transaction
|
|
18090
|
+
*/
|
|
18042
18091
|
async getDeclareEstimateFee(invocation, details, blockIdentifier, skipValidate) {
|
|
18043
18092
|
return (await this.getEstimateFeeBulk(
|
|
18044
18093
|
[{ type: api_exports.ETransactionType.DECLARE, ...invocation, ...details }],
|
|
18045
18094
|
{ blockIdentifier, skipValidate }
|
|
18046
18095
|
))[0];
|
|
18047
18096
|
}
|
|
18097
|
+
/**
|
|
18098
|
+
* Estimates the fee for a given DEPLOY_ACCOUNT transaction
|
|
18099
|
+
*
|
|
18100
|
+
* @param invocation transaction payload to be deployed containing:
|
|
18101
|
+
* - classHash
|
|
18102
|
+
* - constructorCalldata
|
|
18103
|
+
* - addressSalt
|
|
18104
|
+
* - signature - (defaults to []) the signature
|
|
18105
|
+
* @param details - optional details containing:
|
|
18106
|
+
* - nonce
|
|
18107
|
+
* - version - optional version
|
|
18108
|
+
* @param blockIdentifier - (optional) block identifier
|
|
18109
|
+
* @param skipValidate - (optional) skip cairo __validate__ method
|
|
18110
|
+
* @returns the estimated fee
|
|
18111
|
+
* @deprecated This method only calls `getEstimateFeeBulk` with one transaction. Use
|
|
18112
|
+
* {@link RpcProvider.getEstimateFeeBulk | getEstimateFeeBulk} instead (see the example).
|
|
18113
|
+
* This method will be removed in a future major version, not before v13.
|
|
18114
|
+
* @example
|
|
18115
|
+
* ```typescript
|
|
18116
|
+
* const feeEstimate = await provider.getDeployAccountEstimateFee(transaction, details);
|
|
18117
|
+
* // Equivalent to:
|
|
18118
|
+
* const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: TransactionType.DEPLOY_ACCOUNT, ...transaction, ...details }]);
|
|
18119
|
+
* ```
|
|
18120
|
+
* @remarks This method is an alias that calls getEstimateFeeBulk with a single transaction
|
|
18121
|
+
*/
|
|
18048
18122
|
async getDeployAccountEstimateFee(invocation, details, blockIdentifier, skipValidate) {
|
|
18049
18123
|
return (await this.getEstimateFeeBulk(
|
|
18050
18124
|
[{ type: api_exports.ETransactionType.DEPLOY_ACCOUNT, ...invocation, ...details }],
|