starknet 8.3.1 → 8.5.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,15 @@
1
+ # [8.5.0](https://github.com/starknet-io/starknet.js/compare/v8.4.0...v8.5.0) (2025-08-18)
2
+
3
+ ### Features
4
+
5
+ - **provider:** Add Brother ID domain resolution support ([#1313](https://github.com/starknet-io/starknet.js/issues/1313)) ([0bea966](https://github.com/starknet-io/starknet.js/commit/0bea966d29b51b026c6ed5d9916d9039d5fd6a17))
6
+
7
+ # [8.4.0](https://github.com/starknet-io/starknet.js/compare/v8.3.1...v8.4.0) (2025-08-15)
8
+
9
+ ### Features
10
+
11
+ - fast execute ([#1463](https://github.com/starknet-io/starknet.js/issues/1463)) ([d76fb63](https://github.com/starknet-io/starknet.js/commit/d76fb6321782b87a9bfc18c9ac859d21acb4f47e))
12
+
1
13
  ## [8.3.1](https://github.com/starknet-io/starknet.js/compare/v8.3.0...v8.3.1) (2025-08-15)
2
14
 
3
15
  ### Bug Fixes
package/dist/index.d.ts CHANGED
@@ -833,6 +833,10 @@ type waitForTransactionOptions = {
833
833
  successStates?: Array<TransactionFinalityStatus | TransactionExecutionStatus>;
834
834
  errorStates?: Array<TransactionFinalityStatus | TransactionExecutionStatus>;
835
835
  };
836
+ type fastWaitForTransactionOptions = {
837
+ retries?: number;
838
+ retryInterval?: number;
839
+ };
836
840
  type getSimulateTransactionOptions = {
837
841
  blockIdentifier?: BlockIdentifier;
838
842
  skipValidate?: boolean;
@@ -2524,6 +2528,10 @@ type StarkProfile = {
2524
2528
  github?: string;
2525
2529
  proofOfPersonhood?: boolean;
2526
2530
  };
2531
+ type fastExecuteResponse = {
2532
+ txResult: InvokeFunctionResponse;
2533
+ isReady: boolean;
2534
+ };
2527
2535
 
2528
2536
  declare const ValidateType: {
2529
2537
  readonly DEPLOY: "DEPLOY";
@@ -4172,6 +4180,7 @@ declare class RpcChannel {
4172
4180
  */
4173
4181
  simulateTransaction(invocations: AccountInvocations, simulateTransactionOptions?: getSimulateTransactionOptions): Promise<RPC.SimulateTransactionResponse>;
4174
4182
  waitForTransaction(txHash: BigNumberish, options?: waitForTransactionOptions): Promise<RPC.TXN_RECEIPT>;
4183
+ fastWaitForTransaction(txHash: BigNumberish, address: string, initNonceBN: BigNumberish, options?: fastWaitForTransactionOptions): Promise<boolean>;
4175
4184
  getStorageAt(contractAddress: BigNumberish, key: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
4176
4185
  getClassHashAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
4177
4186
  getClass(classHash: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<(RPC.CONTRACT_CLASS & {
@@ -4740,6 +4749,20 @@ declare class RpcProvider$1 implements ProviderInterface {
4740
4749
  getTransactionStatus(transactionHash: BigNumberish): Promise<RPCSPEC08.TXN_STATUS_RESULT | TXN_STATUS_RESULT>;
4741
4750
  getSimulateTransaction(invocations: AccountInvocations, options?: getSimulateTransactionOptions): Promise<SimulateTransactionOverheadResponse>;
4742
4751
  waitForTransaction(txHash: BigNumberish, options?: waitForTransactionOptions): Promise<GetTransactionReceiptResponse>;
4752
+ /**
4753
+ * Wait up until a new transaction is possible with same the account.
4754
+ * This method is fast, but Events and transaction report are not yet
4755
+ * available. Useful for gaming activity.
4756
+ * - only rpc 0.9 and onwards.
4757
+ * @param {BigNumberish} txHash - transaction hash
4758
+ * @param {string} address - address of the account
4759
+ * @param {BigNumberish} initNonce - initial nonce of the account (before the transaction).
4760
+ * @param {fastWaitForTransactionOptions} [options={retries: 50, retryInterval: 500}] - options to scan the network for the next possible transaction. `retries` is the number of times to retry.
4761
+ * @returns {Promise<boolean>} Returns true if the next transaction is possible,
4762
+ * false if the timeout has been reached,
4763
+ * throw an error in case of provider communication.
4764
+ */
4765
+ fastWaitForTransaction(txHash: BigNumberish, address: string, initNonce: BigNumberish, options?: fastWaitForTransactionOptions): Promise<boolean>;
4743
4766
  getStorageAt(contractAddress: BigNumberish, key: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
4744
4767
  getClassHashAt(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
4745
4768
  getClassByHash(classHash: BigNumberish): Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>;
@@ -4789,7 +4812,78 @@ declare class StarknetId {
4789
4812
  static getStarkProfile(provider: ProviderInterface, address: BigNumberish, StarknetIdContract?: string, StarknetIdIdentityContract?: string, StarknetIdVerifierContract?: string, StarknetIdPfpContract?: string, StarknetIdPopContract?: string, StarknetIdMulticallContract?: string): Promise<StarkProfile>;
4790
4813
  }
4791
4814
 
4792
- declare const RpcProvider_base: ts_mixer_dist_types_types.Class<any[], RpcProvider$1 & StarknetId, typeof RpcProvider$1 & typeof StarknetId>;
4815
+ /**
4816
+ * Interface representing a Brother domain profile
4817
+ * @property name - The domain name without .brother suffix
4818
+ * @property resolver - The address that resolves to this domain
4819
+ * @property tokenId - The unique identifier of the domain NFT
4820
+ * @property expiryDate - Unix timestamp when the domain expires
4821
+ * @property lastTransferTime - Unix timestamp of the last transfer
4822
+ */
4823
+ interface BrotherProfile {
4824
+ name: string;
4825
+ resolver: string;
4826
+ tokenId: string;
4827
+ expiryDate: number;
4828
+ lastTransferTime: number;
4829
+ }
4830
+ /**
4831
+ * Class providing methods to interact with Brother Identity contracts.
4832
+ *
4833
+ * This implementation uses the same domain encoding and decoding logic as StarknetId,
4834
+ * allowing for consistent handling of domain names between the two systems.
4835
+ * The encoding/decoding functions (encodeBrotherDomain/decodeBrotherDomain) are direct
4836
+ * adaptations of StarknetId's useEncoded/useDecoded functions to work with .brother domains.
4837
+ */
4838
+ declare class BrotherId {
4839
+ /**
4840
+ * Gets the primary Brother domain name for an address
4841
+ * @param address - The address to get the domain for
4842
+ * @param BrotherIdContract - Optional contract address
4843
+ * @returns The domain name with .brother suffix
4844
+ */
4845
+ getBrotherName(address: BigNumberish, BrotherIdContract?: string): Promise<string>;
4846
+ /**
4847
+ * Gets the address associated with a Brother domain name
4848
+ * @param name - The domain name (with or without .brother suffix)
4849
+ * @param BrotherIdContract - Optional contract address
4850
+ * @returns The resolver address for the domain
4851
+ */
4852
+ getAddressFromBrotherName(name: string, BrotherIdContract?: string): Promise<string>;
4853
+ /**
4854
+ * Gets the complete profile information for a Brother domain
4855
+ * @param address - The address to get the profile for
4856
+ * @param BrotherIdContract - Optional contract address
4857
+ * @returns The complete Brother profile information
4858
+ */
4859
+ getBrotherProfile(address: BigNumberish, BrotherIdContract?: string): Promise<BrotherProfile>;
4860
+ /**
4861
+ * Static implementation of getBrotherName
4862
+ * @param provider - The provider interface
4863
+ * @param address - The address to get the domain for
4864
+ * @param BrotherIdContract - Optional contract address
4865
+ * @returns The domain name with .brother suffix
4866
+ */
4867
+ static getBrotherName(provider: ProviderInterface, address: BigNumberish, BrotherIdContract?: string): Promise<string>;
4868
+ /**
4869
+ * Static implementation of getAddressFromBrotherName
4870
+ * @param provider - The provider interface
4871
+ * @param name - The domain name
4872
+ * @param BrotherIdContract - Optional contract address
4873
+ * @returns The resolver address
4874
+ */
4875
+ static getAddressFromBrotherName(provider: ProviderInterface, name: string, BrotherIdContract?: string): Promise<string>;
4876
+ /**
4877
+ * Static implementation of getBrotherProfile
4878
+ * @param provider - The provider interface
4879
+ * @param address - The address to get the profile for
4880
+ * @param BrotherIdContract - Optional contract address
4881
+ * @returns The complete Brother profile
4882
+ */
4883
+ static getBrotherProfile(provider: ProviderInterface, address: BigNumberish, BrotherIdContract?: string): Promise<BrotherProfile>;
4884
+ }
4885
+
4886
+ declare const RpcProvider_base: ts_mixer_dist_types_types.Class<any[], RpcProvider$1 & StarknetId & BrotherId, typeof RpcProvider$1 & typeof StarknetId & typeof BrotherId>;
4793
4887
  declare class RpcProvider extends RpcProvider_base {
4794
4888
  }
4795
4889
 
@@ -4847,6 +4941,29 @@ declare class Account extends RpcProvider implements AccountInterface {
4847
4941
  estimateFeeBulk(invocations: Invocations, details?: UniversalDetails): Promise<EstimateFeeBulk>;
4848
4942
  simulateTransaction(invocations: Invocations, details?: SimulateTransactionDetails): Promise<SimulateTransactionOverheadResponse>;
4849
4943
  execute(transactions: AllowArray<Call>, transactionsDetail?: UniversalDetails): Promise<InvokeFunctionResponse>;
4944
+ /**
4945
+ * Execute one or multiple calls through the account contract,
4946
+ * responding as soon as a new transaction is possible with the same account.
4947
+ * Useful for gaming usage.
4948
+ * - This method requires the provider to be initialized with `pre_confirmed` blockIdentifier option.
4949
+ * - Rpc 0.9 minimum.
4950
+ * - In a normal myAccount.execute() call, followed by myProvider.waitForTransaction(), you have an immediate access to the events and to the transaction report. Here, we are processing consecutive transactions faster, but events & transaction reports are not available immediately.
4951
+ * - As a consequence of the previous point, do not use contract/account deployment with this method.
4952
+ * @param {AllowArray<Call>} transactions - Single call or array of calls to execute
4953
+ * @param {UniversalDetails} [transactionsDetail] - Transaction execution options
4954
+ * @param {fastWaitForTransactionOptions} [waitDetail={retries: 50, retryInterval: 500}] - options to scan the network for the next possible transaction. `retries` is the number of times to retry, `retryInterval` is the time in ms between retries.
4955
+ * @returns {Promise<fastExecuteResponse>} Response containing the transaction result and status for the next transaction. If `isReady` is true, you can execute the next transaction. If false, timeout has been reached before the next transaction was possible.
4956
+ * @example
4957
+ * ```typescript
4958
+ * const myProvider = new RpcProvider({ nodeUrl: url, blockIdentifier: BlockTag.PRE_CONFIRMED });
4959
+ * const myAccount = new Account({ provider: myProvider, address: accountAddress0, signer: privateKey0 });
4960
+ * const resp = await myAccount.fastExecute(
4961
+ * call, { tip: recommendedTip},
4962
+ * { retries: 30, retryInterval: 500 });
4963
+ * // if resp.isReady is true, you can launch immediately a new tx.
4964
+ * ```
4965
+ */
4966
+ fastExecute(transactions: AllowArray<Call>, transactionsDetail?: UniversalDetails, waitDetail?: fastWaitForTransactionOptions): Promise<fastExecuteResponse>;
4850
4967
  /**
4851
4968
  * First check if contract is already declared, if not declare it
4852
4969
  * If contract already declared returned transaction_hash is ''.
@@ -8406,6 +8523,12 @@ declare class CairoBytes31 {
8406
8523
  static factoryFromApiResponse(responseIterator: Iterator<string>): CairoBytes31;
8407
8524
  }
8408
8525
 
8526
+ /**
8527
+ * @deprecated use the CairoFelt252 class instead, this one is limited to ASCII strings
8528
+ * Create felt Cairo type (cairo type helper)
8529
+ * @returns format: felt-string
8530
+ */
8531
+ declare function CairoFelt(it: BigNumberish): string;
8409
8532
  /**
8410
8533
  * felt252 is the basic field element used in Cairo.
8411
8534
  * It corresponds to an integer in the range 0 ≤ x < P where P is a very large prime number currently equal to 2^251 + 17⋅2^192 + 1.
@@ -9249,4 +9372,4 @@ declare class Logger {
9249
9372
  */
9250
9373
  declare const logger: Logger;
9251
9374
 
9252
- export { type Abi, type AbiEntry, type AbiEntryType, type AbiEnum, type AbiEnums, type AbiEvent, type AbiEvents, type AbiInterfaces, AbiParser1, AbiParser2, AbiParserInterface, type AbiStruct, type AbiStructs, Account, AccountInterface, type AccountInvocationItem, type AccountInvocations, type AccountInvocationsFactoryDetails, type AccountOptions, type AllowArray, type ApiEstimateFeeResponse, type Args, type ArgsOrCalldata, type ArgsOrCalldataWithOptions, type ArraySignatureType, type AsyncContractFunction, type BLOCK_HASH, type BLOCK_NUMBER, BatchClient, type BatchClientOptions, type BigNumberish, type Block$1 as Block, type BlockIdentifier, type BlockNumber, BlockStatus, BlockTag, type BlockWithTxHashes, type Builtins, type ByteArray, type ByteCode, type CairoAssembly, CairoByteArray, type CairoContract, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, type CairoEvent, type CairoEventDefinition, type CairoEventVariant, CairoFixedArray, CairoInt128, CairoInt16, CairoInt32, CairoInt64, CairoInt8, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoUint128, CairoUint16, CairoUint256, CairoUint512, CairoUint64, CairoUint8, CairoUint96, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, type CallResult, type Calldata, type CommonContractOptions, type CompiledContract, type CompiledSierra, type CompiledSierraCasm, type CompilerVersion, type CompleteDeclareContractPayload, type CompressedProgram, Contract, type ContractClass, type ContractClassIdentifier, type ContractClassPayload, type ContractClassResponse, type ContractEntryPointFields, type ContractFunction, ContractInterface, type ContractOptions, type ContractVersion, type DeclareAndDeployContractPayload, type DeclareContractPayload, type DeclareContractResponse, type DeclareContractTransaction, type DeclareDeployUDCResponse, type DeclareSignerDetails, type DeclareTransactionReceiptResponse, type DeclaredTransaction, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployAndInvokeTransaction, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransaction, type DeployTransactionReceiptResponse, type DeployedAccountTransaction, Deployer, type DeployerCall, DeployerInterface, type Details, EDAMode, EDataAvailabilityMode, ETH_ADDRESS, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion2, ETransactionVersion3, type EVENTS_CHUNK, type EmittedEvent, EntryPointType, type EntryPointsByType, type ErrorReceiptResponseHelper, type EstimateFeeBulk, type EstimateFeeResponseBulkOverhead, type EstimateFeeResponseOverhead, EthSigner, type Event$1 as Event, type EventEntry, type EventFilter, type ExecutableDeployAndInvokeTransaction, type ExecutableDeployTransaction, type ExecutableInvokeTransaction, type ExecutableUserInvoke, type ExecutableUserTransaction, type ExecuteOptions, type ExecutionParameters, type FEE_ESTIMATE, type FELT, type FactoryParams, type FeeEstimate, type FeeMode, type FormatResponse, type FunctionAbi, type GasPrices, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type Hint, Int, type InterfaceAbi, type Invocation, type Invocations, type InvocationsDetails, type InvocationsDetailsWithNonce, type InvocationsSignerDetails, type InvokeFunctionResponse, type InvokeTransaction, type InvokeTransactionReceiptResponse, type InvokedTransaction, type L1HandlerTransactionReceiptResponse, type L1_HANDLER_TXN, type LedgerPathCalculation, LedgerSigner111 as LedgerSigner, LedgerSigner111, LedgerSigner221, LedgerSigner231, type LegacyCompiledContract, type LegacyContractClass, type LegacyEvent, LibraryError, Literal, type LogLevel, LogLevelIndex, type Methods, type MultiDeployContractResponse, type MultiType, NON_ZERO_PREFIX, type Nonce, type OptionalPayload, type OutsideCall, type OutsideExecution, type OutsideExecutionOptions, OutsideExecutionTypesV1, OutsideExecutionTypesV2, OutsideExecutionVersion, type OutsideTransaction, type PENDING_DECLARE_TXN_RECEIPT, type PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT, type PENDING_INVOKE_TXN_RECEIPT, type PENDING_L1_HANDLER_TXN_RECEIPT, type PENDING_STATE_UPDATE, type PRE_CONFIRMED_STATE_UPDATE, type PRICE_UNIT, type ParsedEvent, type ParsedEvents, type ParsedStruct, type ParsingStrategy, type PaymasterDetails, type PaymasterFeeEstimate, PaymasterInterface, type PaymasterOptions, PaymasterRpc, type PaymasterRpcOptions, type PaymasterTimeBounds, type PendingBlock, type PendingReceipt, type PendingStateUpdate, type PreConfirmedStateUpdate, type PreparedDeployAndInvokeTransaction, type PreparedDeployTransaction, type PreparedInvokeTransaction, type PreparedTransaction, type Program, RpcProvider as Provider, ProviderInterface, type ProviderOptions, type ProviderOrAccount, type PythonicHints, type RESOURCE_PRICE, index$4 as RPC, rpc_0_8_1 as RPC08, rpc_0_9_0 as RPC09, RPCResponseParser, type RPC_ERROR, type RPC_ERROR_SET, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, type Receipt, ReceiptTx, type ReconnectOptions, type RequiredKeysOf, type ResourceBounds, type ResourceBoundsBN, type ResourceBoundsOverhead, ResponseParser, type RevertedTransactionReceiptResponse, type RevertedTransactionReceiptResponseHelper, RpcChannel, RpcError, RpcProvider, type RpcProviderOptions, type SIMULATION_FLAG, type STATE_UPDATE, type SierraContractClass, type SierraContractEntryPointFields, type SierraEntryPointsByType, type SierraProgramDebugInfo, type Signature, Signer, SignerInterface, type Simplify, type SimulateTransaction, type SimulateTransactionDetails, type SimulateTransactionOverhead, type SimulateTransactionOverheadResponse, type SimulateTransactionResponse, type SimulationFlags, type StarkProfile, type StateUpdate, type StateUpdateResponse, type Storage, type SubscribeEventsParams, type SubscribeNewHeadsParams, type SubscribeNewTransactionReceiptsParams, type SubscribeNewTransactionsParams, type SubscribeTransactionStatusParams, Subscription, type SubscriptionBlockIdentifier, type SubscriptionNewHeadsEvent, type SubscriptionNewTransactionEvent, type SubscriptionNewTransactionReceiptsEvent, type SubscriptionOptions, type SubscriptionStarknetEventsEvent, type SubscriptionTransactionStatusEvent, type SuccessfulTransactionReceiptResponse, type SuccessfulTransactionReceiptResponseHelper, type TXN_EXECUTION_STATUS, type TXN_HASH, type TXN_STATUS, TimeoutError, type TipAnalysisOptions, type TipEstimate, type TipType, type TokenData, TransactionExecutionStatus, TransactionFinalityStatus, type TransactionReceipt, type TransactionReceiptCallbacks, type TransactionReceiptCallbacksDefault, type TransactionReceiptCallbacksDefined, type TransactionReceiptStatus, type TransactionReceiptValue, type TransactionStatus, type TransactionStatusReceiptSets, type TransactionTrace, TransactionType, type TransactionWithHash, type Tupled, type TypedContractV2, UINT_128_MAX, UINT_128_MIN, UINT_256_HIGH_MAX, UINT_256_HIGH_MIN, UINT_256_LOW_MAX, UINT_256_LOW_MIN, UINT_256_MAX, UINT_256_MIN, UINT_512_MAX, UINT_512_MIN, Uint, type Uint256, type Uint512, type UniversalDeployerContractPayload, type UniversalDetails, type UserInvoke, type UserTransaction, type V3DeclareSignerDetails, type V3DeployAccountSignerDetails, type V3InvocationsSignerDetails, type V3TransactionDetails, ValidateType, WalletAccount, WebSocketChannel, type WebSocketModule, WebSocketNotConnectedError, type WebSocketOptions, type WeierstrassSignatureType, type WithOptions, addAddressPadding, byteArray, cairo, config, constants, contractClassResponseToLegacyCompiledContract, createAbiParser, createTransactionReceipt, defaultDeployer, defaultPaymaster, defaultProvider, ec, encode, eth, index as events, extractContractHashes, fastParsingStrategy, getAbiVersion, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getGasPrices, getLedgerPathBuffer111 as getLedgerPathBuffer, getLedgerPathBuffer111, getLedgerPathBuffer221, type getSimulateTransactionOptions, getTipStatsFromBlocks, index$3 as hash, hdParsingStrategy, isAccount, isNoConstructorValid, isPendingBlock, isPendingStateUpdate, isPendingTransaction, isRPC08Plus_ResourceBounds, isRPC08Plus_ResourceBoundsBN, isSierra, isSupportedSpecVersion, isV3Tx, isVersion, json, legacyDeployer, logger, merkle, num, outsideExecution, parseCalldataField, paymaster, provider, selector, shortString, src5, index$1 as stark, starknetId, toAnyPatchVersion, toApiVersion, index$2 as transaction, typedData, uint256$1 as uint256, units, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, verifyMessageInStarknet, type waitForTransactionOptions, connect as wallet };
9375
+ export { type Abi, type AbiEntry, type AbiEntryType, type AbiEnum, type AbiEnums, type AbiEvent, type AbiEvents, type AbiInterfaces, AbiParser1, AbiParser2, AbiParserInterface, type AbiStruct, type AbiStructs, Account, AccountInterface, type AccountInvocationItem, type AccountInvocations, type AccountInvocationsFactoryDetails, type AccountOptions, type AllowArray, type ApiEstimateFeeResponse, type Args, type ArgsOrCalldata, type ArgsOrCalldataWithOptions, type ArraySignatureType, type AsyncContractFunction, type BLOCK_HASH, type BLOCK_NUMBER, BatchClient, type BatchClientOptions, type BigNumberish, type Block$1 as Block, type BlockIdentifier, type BlockNumber, BlockStatus, BlockTag, type BlockWithTxHashes, type Builtins, type ByteArray, type ByteCode, type CairoAssembly, CairoByteArray, CairoBytes31, type CairoContract, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, type CairoEvent, type CairoEventDefinition, type CairoEventVariant, CairoFelt, CairoFelt252, CairoFixedArray, CairoInt128, CairoInt16, CairoInt32, CairoInt64, CairoInt8, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoUint128, CairoUint16, CairoUint256, CairoUint32, CairoUint512, CairoUint64, CairoUint8, CairoUint96, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, type CallResult, type Calldata, type CommonContractOptions, type CompiledContract, type CompiledSierra, type CompiledSierraCasm, type CompilerVersion, type CompleteDeclareContractPayload, type CompressedProgram, Contract, type ContractClass, type ContractClassIdentifier, type ContractClassPayload, type ContractClassResponse, type ContractEntryPointFields, type ContractFunction, ContractInterface, type ContractOptions, type ContractVersion, type DeclareAndDeployContractPayload, type DeclareContractPayload, type DeclareContractResponse, type DeclareContractTransaction, type DeclareDeployUDCResponse, type DeclareSignerDetails, type DeclareTransactionReceiptResponse, type DeclaredTransaction, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployAndInvokeTransaction, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransaction, type DeployTransactionReceiptResponse, type DeployedAccountTransaction, Deployer, type DeployerCall, DeployerInterface, type Details, EDAMode, EDataAvailabilityMode, ETH_ADDRESS, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion2, ETransactionVersion3, type EVENTS_CHUNK, type EmittedEvent, EntryPointType, type EntryPointsByType, type ErrorReceiptResponseHelper, type EstimateFeeBulk, type EstimateFeeResponseBulkOverhead, type EstimateFeeResponseOverhead, EthSigner, type Event$1 as Event, type EventEntry, type EventFilter, type ExecutableDeployAndInvokeTransaction, type ExecutableDeployTransaction, type ExecutableInvokeTransaction, type ExecutableUserInvoke, type ExecutableUserTransaction, type ExecuteOptions, type ExecutionParameters, type FEE_ESTIMATE, type FELT, type FactoryParams, type FeeEstimate, type FeeMode, type FormatResponse, type FunctionAbi, type GasPrices, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type Hint, Int, type InterfaceAbi, type Invocation, type Invocations, type InvocationsDetails, type InvocationsDetailsWithNonce, type InvocationsSignerDetails, type InvokeFunctionResponse, type InvokeTransaction, type InvokeTransactionReceiptResponse, type InvokedTransaction, type L1HandlerTransactionReceiptResponse, type L1_HANDLER_TXN, type LedgerPathCalculation, LedgerSigner111 as LedgerSigner, LedgerSigner111, LedgerSigner221, LedgerSigner231, type LegacyCompiledContract, type LegacyContractClass, type LegacyEvent, LibraryError, Literal, type LogLevel, LogLevelIndex, type Methods, type MultiDeployContractResponse, type MultiType, NON_ZERO_PREFIX, type Nonce, type OptionalPayload, type OutsideCall, type OutsideExecution, type OutsideExecutionOptions, OutsideExecutionTypesV1, OutsideExecutionTypesV2, OutsideExecutionVersion, type OutsideTransaction, type PENDING_DECLARE_TXN_RECEIPT, type PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT, type PENDING_INVOKE_TXN_RECEIPT, type PENDING_L1_HANDLER_TXN_RECEIPT, type PENDING_STATE_UPDATE, type PRE_CONFIRMED_STATE_UPDATE, type PRICE_UNIT, type ParsedEvent, type ParsedEvents, type ParsedStruct, type ParsingStrategy, type PaymasterDetails, type PaymasterFeeEstimate, PaymasterInterface, type PaymasterOptions, PaymasterRpc, type PaymasterRpcOptions, type PaymasterTimeBounds, type PendingBlock, type PendingReceipt, type PendingStateUpdate, type PreConfirmedStateUpdate, type PreparedDeployAndInvokeTransaction, type PreparedDeployTransaction, type PreparedInvokeTransaction, type PreparedTransaction, type Program, RpcProvider as Provider, ProviderInterface, type ProviderOptions, type ProviderOrAccount, type PythonicHints, type RESOURCE_PRICE, index$4 as RPC, rpc_0_8_1 as RPC08, rpc_0_9_0 as RPC09, RPCResponseParser, type RPC_ERROR, type RPC_ERROR_SET, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, type Receipt, ReceiptTx, type ReconnectOptions, type RequiredKeysOf, type ResourceBounds, type ResourceBoundsBN, type ResourceBoundsOverhead, ResponseParser, type RevertedTransactionReceiptResponse, type RevertedTransactionReceiptResponseHelper, RpcChannel, RpcError, RpcProvider, type RpcProviderOptions, type SIMULATION_FLAG, type STATE_UPDATE, type SierraContractClass, type SierraContractEntryPointFields, type SierraEntryPointsByType, type SierraProgramDebugInfo, type Signature, Signer, SignerInterface, type Simplify, type SimulateTransaction, type SimulateTransactionDetails, type SimulateTransactionOverhead, type SimulateTransactionOverheadResponse, type SimulateTransactionResponse, type SimulationFlags, type StarkProfile, type StateUpdate, type StateUpdateResponse, type Storage, type SubscribeEventsParams, type SubscribeNewHeadsParams, type SubscribeNewTransactionReceiptsParams, type SubscribeNewTransactionsParams, type SubscribeTransactionStatusParams, Subscription, type SubscriptionBlockIdentifier, type SubscriptionNewHeadsEvent, type SubscriptionNewTransactionEvent, type SubscriptionNewTransactionReceiptsEvent, type SubscriptionOptions, type SubscriptionStarknetEventsEvent, type SubscriptionTransactionStatusEvent, type SuccessfulTransactionReceiptResponse, type SuccessfulTransactionReceiptResponseHelper, type TXN_EXECUTION_STATUS, type TXN_HASH, type TXN_STATUS, TimeoutError, type TipAnalysisOptions, type TipEstimate, type TipType, type TokenData, TransactionExecutionStatus, TransactionFinalityStatus, type TransactionReceipt, type TransactionReceiptCallbacks, type TransactionReceiptCallbacksDefault, type TransactionReceiptCallbacksDefined, type TransactionReceiptStatus, type TransactionReceiptValue, type TransactionStatus, type TransactionStatusReceiptSets, type TransactionTrace, TransactionType, type TransactionWithHash, type Tupled, type TypedContractV2, UINT_128_MAX, UINT_128_MIN, UINT_256_HIGH_MAX, UINT_256_HIGH_MIN, UINT_256_LOW_MAX, UINT_256_LOW_MIN, UINT_256_MAX, UINT_256_MIN, UINT_512_MAX, UINT_512_MIN, Uint, type Uint256, type Uint512, type UniversalDeployerContractPayload, type UniversalDetails, type UserInvoke, type UserTransaction, type V3DeclareSignerDetails, type V3DeployAccountSignerDetails, type V3InvocationsSignerDetails, type V3TransactionDetails, ValidateType, WalletAccount, WebSocketChannel, type WebSocketModule, WebSocketNotConnectedError, type WebSocketOptions, type WeierstrassSignatureType, type WithOptions, addAddressPadding, byteArray, cairo, config, constants, contractClassResponseToLegacyCompiledContract, createAbiParser, createTransactionReceipt, defaultDeployer, defaultPaymaster, defaultProvider, ec, encode, eth, index as events, extractContractHashes, type fastExecuteResponse, fastParsingStrategy, type fastWaitForTransactionOptions, getAbiVersion, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getGasPrices, getLedgerPathBuffer111 as getLedgerPathBuffer, getLedgerPathBuffer111, getLedgerPathBuffer221, type getSimulateTransactionOptions, getTipStatsFromBlocks, index$3 as hash, hdParsingStrategy, isAccount, isNoConstructorValid, isPendingBlock, isPendingStateUpdate, isPendingTransaction, isRPC08Plus_ResourceBounds, isRPC08Plus_ResourceBoundsBN, isSierra, isSupportedSpecVersion, isV3Tx, isVersion, json, legacyDeployer, logger, merkle, num, outsideExecution, parseCalldataField, paymaster, provider, selector, shortString, src5, index$1 as stark, starknetId, toAnyPatchVersion, toApiVersion, index$2 as transaction, typedData, uint256$1 as uint256, units, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, verifyMessageInStarknet, type waitForTransactionOptions, connect as wallet };
@@ -30,7 +30,10 @@ var starknet = (() => {
30
30
  BlockStatus: () => BlockStatus,
31
31
  BlockTag: () => BlockTag,
32
32
  CairoByteArray: () => CairoByteArray,
33
+ CairoBytes31: () => CairoBytes31,
33
34
  CairoCustomEnum: () => CairoCustomEnum,
35
+ CairoFelt: () => CairoFelt,
36
+ CairoFelt252: () => CairoFelt252,
34
37
  CairoFixedArray: () => CairoFixedArray,
35
38
  CairoInt128: () => CairoInt128,
36
39
  CairoInt16: () => CairoInt16,
@@ -44,6 +47,7 @@ var starknet = (() => {
44
47
  CairoUint128: () => CairoUint128,
45
48
  CairoUint16: () => CairoUint16,
46
49
  CairoUint256: () => CairoUint256,
50
+ CairoUint32: () => CairoUint32,
47
51
  CairoUint512: () => CairoUint512,
48
52
  CairoUint64: () => CairoUint64,
49
53
  CairoUint8: () => CairoUint8,
@@ -257,7 +261,6 @@ var starknet = (() => {
257
261
  STATUS_PRE_CONFIRMED: () => STATUS_PRE_CONFIRMED,
258
262
  STATUS_PRE_CONFIRMED_LOWERCASE: () => STATUS_PRE_CONFIRMED_LOWERCASE,
259
263
  STATUS_RECEIVED: () => STATUS_RECEIVED2,
260
- STATUS_REJECTED: () => STATUS_REJECTED2,
261
264
  STATUS_REVERTED: () => STATUS_REVERTED2,
262
265
  STATUS_SUCCEEDED: () => STATUS_SUCCEEDED2,
263
266
  STRUCT_ABI_TYPE: () => STRUCT_ABI_TYPE2,
@@ -530,7 +533,6 @@ var starknet = (() => {
530
533
  STATUS_PRE_CONFIRMED: () => STATUS_PRE_CONFIRMED,
531
534
  STATUS_PRE_CONFIRMED_LOWERCASE: () => STATUS_PRE_CONFIRMED_LOWERCASE,
532
535
  STATUS_RECEIVED: () => STATUS_RECEIVED2,
533
- STATUS_REJECTED: () => STATUS_REJECTED2,
534
536
  STATUS_REVERTED: () => STATUS_REVERTED2,
535
537
  STATUS_SUCCEEDED: () => STATUS_SUCCEEDED2,
536
538
  STRUCT_ABI_TYPE: () => STRUCT_ABI_TYPE2,
@@ -576,7 +578,6 @@ var starknet = (() => {
576
578
  STATUS_PRE_CONFIRMED: () => STATUS_PRE_CONFIRMED,
577
579
  STATUS_PRE_CONFIRMED_LOWERCASE: () => STATUS_PRE_CONFIRMED_LOWERCASE,
578
580
  STATUS_RECEIVED: () => STATUS_RECEIVED2,
579
- STATUS_REJECTED: () => STATUS_REJECTED2,
580
581
  STATUS_REVERTED: () => STATUS_REVERTED2,
581
582
  STATUS_SUCCEEDED: () => STATUS_SUCCEEDED2,
582
583
  STRUCT_ABI_TYPE: () => STRUCT_ABI_TYPE2,
@@ -595,7 +596,6 @@ var starknet = (() => {
595
596
  var STATUS_ACCEPTED_ON_L12 = "ACCEPTED_ON_L1";
596
597
  var STATUS_SUCCEEDED2 = "SUCCEEDED";
597
598
  var STATUS_REVERTED2 = "REVERTED";
598
- var STATUS_REJECTED2 = "REJECTED";
599
599
  var STATUS_RECEIVED2 = "RECEIVED";
600
600
  var STATUS_CANDIDATE = "CANDIDATE";
601
601
  var STATUS_PRE_CONFIRMED = "PRE_CONFIRMED";
@@ -15014,6 +15014,48 @@ ${indent}}` : "}";
15014
15014
  }
15015
15015
  return txReceipt;
15016
15016
  }
15017
+ async fastWaitForTransaction(txHash, address, initNonceBN, options) {
15018
+ const initNonce = BigInt(initNonceBN);
15019
+ let retries = options?.retries ?? 50;
15020
+ const retryInterval = options?.retryInterval ?? 500;
15021
+ const errorStates = [esm_exports2.ETransactionExecutionStatus.REVERTED];
15022
+ const successStates = [
15023
+ esm_exports2.ETransactionFinalityStatus.ACCEPTED_ON_L2,
15024
+ esm_exports2.ETransactionFinalityStatus.ACCEPTED_ON_L1,
15025
+ esm_exports2.ETransactionFinalityStatus.PRE_CONFIRMED
15026
+ ];
15027
+ let txStatus;
15028
+ const start = (/* @__PURE__ */ new Date()).getTime();
15029
+ while (retries > 0) {
15030
+ await wait(retryInterval);
15031
+ txStatus = await this.getTransactionStatus(txHash);
15032
+ logger.info(
15033
+ `${retries} ${JSON.stringify(txStatus)} ${((/* @__PURE__ */ new Date()).getTime() - start) / 1e3}s.`
15034
+ );
15035
+ const executionStatus = txStatus.execution_status ?? "";
15036
+ const finalityStatus = txStatus.finality_status;
15037
+ if (errorStates.includes(executionStatus)) {
15038
+ const message = `${executionStatus}: ${finalityStatus}`;
15039
+ const error = new Error(message);
15040
+ error.response = txStatus;
15041
+ throw error;
15042
+ } else if (successStates.includes(finalityStatus)) {
15043
+ let currentNonce = initNonce;
15044
+ while (currentNonce === initNonce && retries > 0) {
15045
+ currentNonce = BigInt(await this.getNonceForAddress(address, BlockTag.PRE_CONFIRMED));
15046
+ logger.info(
15047
+ `${retries} Checking new nonce ${currentNonce} ${((/* @__PURE__ */ new Date()).getTime() - start) / 1e3}s.`
15048
+ );
15049
+ if (currentNonce !== initNonce) return true;
15050
+ await wait(retryInterval);
15051
+ retries -= 1;
15052
+ }
15053
+ return false;
15054
+ }
15055
+ retries -= 1;
15056
+ }
15057
+ return false;
15058
+ }
15017
15059
  getStorageAt(contractAddress, key, blockIdentifier = this.blockIdentifier) {
15018
15060
  const contract_address = toHex(contractAddress);
15019
15061
  const parsedKey = toStorageKey(key);
@@ -16861,6 +16903,31 @@ ${indent}}` : "}";
16861
16903
  );
16862
16904
  return createTransactionReceipt(receiptWoHelper);
16863
16905
  }
16906
+ /**
16907
+ * Wait up until a new transaction is possible with same the account.
16908
+ * This method is fast, but Events and transaction report are not yet
16909
+ * available. Useful for gaming activity.
16910
+ * - only rpc 0.9 and onwards.
16911
+ * @param {BigNumberish} txHash - transaction hash
16912
+ * @param {string} address - address of the account
16913
+ * @param {BigNumberish} initNonce - initial nonce of the account (before the transaction).
16914
+ * @param {fastWaitForTransactionOptions} [options={retries: 50, retryInterval: 500}] - options to scan the network for the next possible transaction. `retries` is the number of times to retry.
16915
+ * @returns {Promise<boolean>} Returns true if the next transaction is possible,
16916
+ * false if the timeout has been reached,
16917
+ * throw an error in case of provider communication.
16918
+ */
16919
+ async fastWaitForTransaction(txHash, address, initNonce, options) {
16920
+ if (this.channel instanceof rpc_0_9_0_exports.RpcChannel) {
16921
+ const isSuccess = await this.channel.fastWaitForTransaction(
16922
+ txHash,
16923
+ address,
16924
+ initNonce,
16925
+ options
16926
+ );
16927
+ return isSuccess;
16928
+ }
16929
+ throw new Error("Unsupported channel type");
16930
+ }
16864
16931
  async getStorageAt(contractAddress, key, blockIdentifier) {
16865
16932
  return this.channel.getStorageAt(contractAddress, key, blockIdentifier);
16866
16933
  }
@@ -17662,8 +17729,181 @@ ${indent}}` : "}";
17662
17729
  }
17663
17730
  };
17664
17731
 
17732
+ // src/provider/extensions/brotherId.ts
17733
+ function isBrotherDomain(domain) {
17734
+ return domain.endsWith(".brother");
17735
+ }
17736
+ function encodeBrotherDomain(domain) {
17737
+ const brotherName = domain.endsWith(".brother") ? domain.replace(".brother", "") : domain;
17738
+ return useEncoded(brotherName);
17739
+ }
17740
+ function decodeBrotherDomain(encoded) {
17741
+ const decoded = useDecoded([encoded]);
17742
+ if (decoded.endsWith(".stark")) {
17743
+ return decoded.replace(".stark", ".brother");
17744
+ }
17745
+ return decoded ? `${decoded}.brother` : decoded;
17746
+ }
17747
+ function getBrotherIdContract(chainId) {
17748
+ switch (chainId) {
17749
+ case _StarknetChainId.SN_MAIN:
17750
+ return "0x0212f1c57700f5a3913dd11efba540196aad4cf67772f7090c62709dd804fa74";
17751
+ default:
17752
+ return "0x0212f1c57700f5a3913dd11efba540196aad4cf67772f7090c62709dd804fa74";
17753
+ }
17754
+ }
17755
+ var BrotherId = class _BrotherId {
17756
+ /**
17757
+ * Gets the primary Brother domain name for an address
17758
+ * @param address - The address to get the domain for
17759
+ * @param BrotherIdContract - Optional contract address
17760
+ * @returns The domain name with .brother suffix
17761
+ */
17762
+ async getBrotherName(address, BrotherIdContract) {
17763
+ return _BrotherId.getBrotherName(
17764
+ // After Mixin, this is ProviderInterface
17765
+ this,
17766
+ address,
17767
+ BrotherIdContract
17768
+ );
17769
+ }
17770
+ /**
17771
+ * Gets the address associated with a Brother domain name
17772
+ * @param name - The domain name (with or without .brother suffix)
17773
+ * @param BrotherIdContract - Optional contract address
17774
+ * @returns The resolver address for the domain
17775
+ */
17776
+ async getAddressFromBrotherName(name, BrotherIdContract) {
17777
+ return _BrotherId.getAddressFromBrotherName(
17778
+ // After Mixin, this is ProviderInterface
17779
+ this,
17780
+ name,
17781
+ BrotherIdContract
17782
+ );
17783
+ }
17784
+ /**
17785
+ * Gets the complete profile information for a Brother domain
17786
+ * @param address - The address to get the profile for
17787
+ * @param BrotherIdContract - Optional contract address
17788
+ * @returns The complete Brother profile information
17789
+ */
17790
+ async getBrotherProfile(address, BrotherIdContract) {
17791
+ return _BrotherId.getBrotherProfile(
17792
+ // After Mixin, this is ProviderInterface
17793
+ this,
17794
+ address,
17795
+ BrotherIdContract
17796
+ );
17797
+ }
17798
+ /**
17799
+ * Static implementation of getBrotherName
17800
+ * @param provider - The provider interface
17801
+ * @param address - The address to get the domain for
17802
+ * @param BrotherIdContract - Optional contract address
17803
+ * @returns The domain name with .brother suffix
17804
+ */
17805
+ static async getBrotherName(provider, address, BrotherIdContract) {
17806
+ const chainId = await provider.getChainId();
17807
+ const contract = BrotherIdContract ?? getBrotherIdContract(chainId);
17808
+ try {
17809
+ const primaryDomain = await provider.callContract({
17810
+ contractAddress: contract,
17811
+ entrypoint: "getPrimary",
17812
+ calldata: CallData.compile({
17813
+ user: address
17814
+ })
17815
+ });
17816
+ if (!primaryDomain[0] || primaryDomain[0] === "0x0") {
17817
+ throw Error("Brother name not found");
17818
+ }
17819
+ const encodedDomain = BigInt(primaryDomain[0]);
17820
+ return decodeBrotherDomain(encodedDomain);
17821
+ } catch (e) {
17822
+ if (e instanceof Error && e.message === "Brother name not found") {
17823
+ throw e;
17824
+ }
17825
+ throw Error("Could not get brother name");
17826
+ }
17827
+ }
17828
+ /**
17829
+ * Static implementation of getAddressFromBrotherName
17830
+ * @param provider - The provider interface
17831
+ * @param name - The domain name
17832
+ * @param BrotherIdContract - Optional contract address
17833
+ * @returns The resolver address
17834
+ */
17835
+ static async getAddressFromBrotherName(provider, name, BrotherIdContract) {
17836
+ const brotherName = name.endsWith(".brother") ? name : `${name}.brother`;
17837
+ if (!isBrotherDomain(brotherName)) {
17838
+ throw new Error("Invalid domain, must be a valid .brother domain");
17839
+ }
17840
+ const chainId = await provider.getChainId();
17841
+ const contract = BrotherIdContract ?? getBrotherIdContract(chainId);
17842
+ try {
17843
+ const domainDetails = await provider.callContract({
17844
+ contractAddress: contract,
17845
+ entrypoint: "get_details_by_domain",
17846
+ calldata: CallData.compile({
17847
+ domain: encodeBrotherDomain(brotherName)
17848
+ })
17849
+ });
17850
+ if (!domainDetails[0] || domainDetails[1] === "0x0") {
17851
+ throw Error("Could not get address from brother name");
17852
+ }
17853
+ return domainDetails[1];
17854
+ } catch {
17855
+ throw Error("Could not get address from brother name");
17856
+ }
17857
+ }
17858
+ /**
17859
+ * Static implementation of getBrotherProfile
17860
+ * @param provider - The provider interface
17861
+ * @param address - The address to get the profile for
17862
+ * @param BrotherIdContract - Optional contract address
17863
+ * @returns The complete Brother profile
17864
+ */
17865
+ static async getBrotherProfile(provider, address, BrotherIdContract) {
17866
+ const chainId = await provider.getChainId();
17867
+ const contract = BrotherIdContract ?? getBrotherIdContract(chainId);
17868
+ try {
17869
+ const primaryDomain = await provider.callContract({
17870
+ contractAddress: contract,
17871
+ entrypoint: "getPrimary",
17872
+ calldata: CallData.compile({
17873
+ user: address
17874
+ })
17875
+ });
17876
+ if (!primaryDomain[0] || primaryDomain[0] === "0x0") {
17877
+ throw Error("Brother profile not found");
17878
+ }
17879
+ const encodedDomain = BigInt(primaryDomain[0]);
17880
+ const decodedDomain = decodeBrotherDomain(encodedDomain);
17881
+ const domain = decodedDomain.replace(".brother", "");
17882
+ const domainDetails = await provider.callContract({
17883
+ contractAddress: contract,
17884
+ entrypoint: "get_details_by_domain",
17885
+ calldata: CallData.compile({
17886
+ domain: encodeBrotherDomain(domain)
17887
+ })
17888
+ });
17889
+ return {
17890
+ name: domain,
17891
+ resolver: domainDetails[1],
17892
+ tokenId: domainDetails[2],
17893
+ expiryDate: parseInt(domainDetails[3], 16),
17894
+ lastTransferTime: parseInt(domainDetails[4], 16)
17895
+ };
17896
+ } catch (e) {
17897
+ if (e instanceof Error && e.message === "Brother profile not found") {
17898
+ throw e;
17899
+ }
17900
+ throw Error("Could not get brother profile");
17901
+ }
17902
+ }
17903
+ };
17904
+
17665
17905
  // src/provider/extensions/default.ts
17666
- var RpcProvider2 = class extends Mixin(RpcProvider, StarknetId) {
17906
+ var RpcProvider2 = class extends Mixin(RpcProvider, StarknetId, BrotherId) {
17667
17907
  };
17668
17908
 
17669
17909
  // src/provider/interface.ts
@@ -19485,6 +19725,50 @@ ${indent}}` : "}";
19485
19725
  }
19486
19726
  );
19487
19727
  }
19728
+ /**
19729
+ * Execute one or multiple calls through the account contract,
19730
+ * responding as soon as a new transaction is possible with the same account.
19731
+ * Useful for gaming usage.
19732
+ * - This method requires the provider to be initialized with `pre_confirmed` blockIdentifier option.
19733
+ * - Rpc 0.9 minimum.
19734
+ * - In a normal myAccount.execute() call, followed by myProvider.waitForTransaction(), you have an immediate access to the events and to the transaction report. Here, we are processing consecutive transactions faster, but events & transaction reports are not available immediately.
19735
+ * - As a consequence of the previous point, do not use contract/account deployment with this method.
19736
+ * @param {AllowArray<Call>} transactions - Single call or array of calls to execute
19737
+ * @param {UniversalDetails} [transactionsDetail] - Transaction execution options
19738
+ * @param {fastWaitForTransactionOptions} [waitDetail={retries: 50, retryInterval: 500}] - options to scan the network for the next possible transaction. `retries` is the number of times to retry, `retryInterval` is the time in ms between retries.
19739
+ * @returns {Promise<fastExecuteResponse>} Response containing the transaction result and status for the next transaction. If `isReady` is true, you can execute the next transaction. If false, timeout has been reached before the next transaction was possible.
19740
+ * @example
19741
+ * ```typescript
19742
+ * const myProvider = new RpcProvider({ nodeUrl: url, blockIdentifier: BlockTag.PRE_CONFIRMED });
19743
+ * const myAccount = new Account({ provider: myProvider, address: accountAddress0, signer: privateKey0 });
19744
+ * const resp = await myAccount.fastExecute(
19745
+ * call, { tip: recommendedTip},
19746
+ * { retries: 30, retryInterval: 500 });
19747
+ * // if resp.isReady is true, you can launch immediately a new tx.
19748
+ * ```
19749
+ */
19750
+ async fastExecute(transactions, transactionsDetail = {}, waitDetail = {}) {
19751
+ assert(
19752
+ this.channel instanceof rpc_0_9_0_exports.RpcChannel,
19753
+ "Wrong Rpc version in Provider. At least Rpc v0.9 required."
19754
+ );
19755
+ assert(
19756
+ this.channel.blockIdentifier === BlockTag.PRE_CONFIRMED,
19757
+ "Provider needs to be initialized with `pre_confirmed` blockIdentifier option."
19758
+ );
19759
+ const initNonce = BigInt(
19760
+ transactionsDetail.nonce ?? await this.getNonceForAddress(this.address, BlockTag.PRE_CONFIRMED)
19761
+ );
19762
+ const details = { ...transactionsDetail, nonce: initNonce };
19763
+ const resultTx = await this.execute(transactions, details);
19764
+ const resultWait = await this.fastWaitForTransaction(
19765
+ resultTx.transaction_hash,
19766
+ this.address,
19767
+ initNonce,
19768
+ waitDetail
19769
+ );
19770
+ return { txResult: resultTx, isReady: resultWait };
19771
+ }
19488
19772
  /**
19489
19773
  * First check if contract is already declared, if not declare it
19490
19774
  * If contract already declared returned transaction_hash is ''.