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/dist/index.js CHANGED
@@ -18241,18 +18241,92 @@ var RpcProvider = class {
18241
18241
  }
18242
18242
  return { cairo: "0", compiler: "0" };
18243
18243
  }
18244
+ /**
18245
+ * Estimates the fee for a given INVOKE transaction
18246
+ *
18247
+ * @param invocation the invocation object containing:
18248
+ * - contractAddress - the address of the contract
18249
+ * - entrypoint - (optional) the entrypoint of the contract
18250
+ * - calldata - (optional, defaults to []) the calldata
18251
+ * - signature - (optional, defaults to []) the signature
18252
+ * @param details - optional details containing:
18253
+ * - nonce - optional nonce
18254
+ * - version - optional version
18255
+ * @param blockIdentifier - (optional) block identifier
18256
+ * @param skipValidate - (optional) skip cairo __validate__ method
18257
+ * @returns the estimated fee
18258
+ * @deprecated This method only calls `getEstimateFeeBulk` with one transaction. Use
18259
+ * {@link RpcProvider.getEstimateFeeBulk | getEstimateFeeBulk} instead (see the example).
18260
+ * This method will be removed in a future major version, not before v13.
18261
+ * @example
18262
+ * ```typescript
18263
+ * const feeEstimate = await provider.getInvokeEstimateFee(invocation, details);
18264
+ * // Equivalent to:
18265
+ * const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: TransactionType.INVOKE, ...invocation, ...details }]);
18266
+ * ```
18267
+ * @remarks This method is an alias that calls getEstimateFeeBulk with a single transaction
18268
+ */
18244
18269
  async getInvokeEstimateFee(invocation, details, blockIdentifier, skipValidate) {
18245
18270
  return (await this.getEstimateFeeBulk(
18246
18271
  [{ type: api_exports.ETransactionType.INVOKE, ...invocation, ...details }],
18247
18272
  { blockIdentifier, skipValidate }
18248
18273
  ))[0];
18249
18274
  }
18275
+ /**
18276
+ * Estimates the fee for a given DECLARE transaction
18277
+ *
18278
+ * @param invocation transaction payload to be declared containing:
18279
+ * - compiled contract code
18280
+ * - sender address
18281
+ * - signature - (defaults to []) the signature
18282
+ * @param details - optional details containing:
18283
+ * - nonce
18284
+ * - version - optional version
18285
+ * @param blockIdentifier - (optional) block identifier
18286
+ * @param skipValidate - (optional) skip cairo __validate__ method
18287
+ * @returns the estimated fee
18288
+ * @deprecated This method only calls `getEstimateFeeBulk` with one transaction. Use
18289
+ * {@link RpcProvider.getEstimateFeeBulk | getEstimateFeeBulk} instead (see the example).
18290
+ * This method will be removed in a future major version, not before v13.
18291
+ * @example
18292
+ * ```typescript
18293
+ * const feeEstimate = await provider.getDeclareEstimateFee(transaction, details);
18294
+ * // Equivalent to:
18295
+ * const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: TransactionType.DECLARE, ...transaction, ...details }]);
18296
+ * ```
18297
+ * @remarks This method is an alias that calls getEstimateFeeBulk with a single transaction
18298
+ */
18250
18299
  async getDeclareEstimateFee(invocation, details, blockIdentifier, skipValidate) {
18251
18300
  return (await this.getEstimateFeeBulk(
18252
18301
  [{ type: api_exports.ETransactionType.DECLARE, ...invocation, ...details }],
18253
18302
  { blockIdentifier, skipValidate }
18254
18303
  ))[0];
18255
18304
  }
18305
+ /**
18306
+ * Estimates the fee for a given DEPLOY_ACCOUNT transaction
18307
+ *
18308
+ * @param invocation transaction payload to be deployed containing:
18309
+ * - classHash
18310
+ * - constructorCalldata
18311
+ * - addressSalt
18312
+ * - signature - (defaults to []) the signature
18313
+ * @param details - optional details containing:
18314
+ * - nonce
18315
+ * - version - optional version
18316
+ * @param blockIdentifier - (optional) block identifier
18317
+ * @param skipValidate - (optional) skip cairo __validate__ method
18318
+ * @returns the estimated fee
18319
+ * @deprecated This method only calls `getEstimateFeeBulk` with one transaction. Use
18320
+ * {@link RpcProvider.getEstimateFeeBulk | getEstimateFeeBulk} instead (see the example).
18321
+ * This method will be removed in a future major version, not before v13.
18322
+ * @example
18323
+ * ```typescript
18324
+ * const feeEstimate = await provider.getDeployAccountEstimateFee(transaction, details);
18325
+ * // Equivalent to:
18326
+ * const [feeEstimate] = await provider.getEstimateFeeBulk([{ type: TransactionType.DEPLOY_ACCOUNT, ...transaction, ...details }]);
18327
+ * ```
18328
+ * @remarks This method is an alias that calls getEstimateFeeBulk with a single transaction
18329
+ */
18256
18330
  async getDeployAccountEstimateFee(invocation, details, blockIdentifier, skipValidate) {
18257
18331
  return (await this.getEstimateFeeBulk(
18258
18332
  [{ type: api_exports.ETransactionType.DEPLOY_ACCOUNT, ...invocation, ...details }],