starknet 6.18.0 → 6.18.1

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,9 @@
1
+ ## [6.18.1](https://github.com/starknet-io/starknet.js/compare/v6.18.0...v6.18.1) (2024-11-25)
2
+
3
+ ### Bug Fixes
4
+
5
+ - expose BatchClient class ([8d3a0de](https://github.com/starknet-io/starknet.js/commit/8d3a0de85230e6f08edebf67b6581d6e79ea191a))
6
+
1
7
  # [6.18.0](https://github.com/starknet-io/starknet.js/compare/v6.17.0...v6.18.0) (2024-11-18)
2
8
 
3
9
  ### Features
package/README.md CHANGED
@@ -59,7 +59,7 @@ Play with [Code Examples](https://github.com/PhilippeR26/starknet.js-workshop-ty
59
59
 
60
60
  If you consider to contribute to this project please read [CONTRIBUTING.md](https://github.com/starknet-io/starknet.js/blob/main/CONTRIBUTING.md) first.
61
61
 
62
- You can also join our dedicated channel for [Starknet.js](https://discord.com/channels/793094838509764618/927918707613786162) on the [Starknet Discord](https://discord.com/invite/YgsdxEx3)
62
+ You can also join our dedicated channel for [Starknet.js](https://discord.com/channels/793094838509764618/1270119831559078061) on the [Starknet Discord](https://discord.com/invite/Ft6Xtzdg)
63
63
 
64
64
  ## ❤️ Special Thanks
65
65
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as RPCSPEC07 from 'starknet-types-07';
2
- import { ETransactionVersion as ETransactionVersion$1, STRUCT_EVENT as STRUCT_EVENT$1, ENUM_EVENT as ENUM_EVENT$1, EVENT_FIELD as EVENT_FIELD$1, ResourceBounds as ResourceBounds$2, EDataAvailabilityMode as EDataAvailabilityMode$1, Errors, ETransactionVersion2 as ETransactionVersion2$1, ETransactionVersion3 as ETransactionVersion3$1, StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision, BlockWithTxReceipts, InvokedTransaction as InvokedTransaction$2, DeclaredTransaction as DeclaredTransaction$2, DeployedAccountTransaction as DeployedAccountTransaction$1, L1Message as L1Message$1, EventFilter as EventFilter$1, StarknetWindowObject, AccountChangeEventHandler, NetworkChangeEventHandler, WatchAssetParameters, AddStarknetChainParameters, Signature as Signature$1, EDAMode as EDAMode$1, Event as Event$1, Address, Permission, ChainId as ChainId$1, AccountDeploymentData, AddInvokeTransactionParameters, AddInvokeTransactionResult, AddDeclareTransactionParameters, AddDeclareTransactionResult, SpecVersion } from 'starknet-types-07';
2
+ import { ETransactionVersion as ETransactionVersion$1, STRUCT_EVENT as STRUCT_EVENT$1, ENUM_EVENT as ENUM_EVENT$1, EVENT_FIELD as EVENT_FIELD$1, ResourceBounds as ResourceBounds$2, EDataAvailabilityMode as EDataAvailabilityMode$1, Errors, ETransactionVersion2 as ETransactionVersion2$1, ETransactionVersion3 as ETransactionVersion3$1, StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision, BlockWithTxReceipts, InvokedTransaction as InvokedTransaction$2, DeclaredTransaction as DeclaredTransaction$2, DeployedAccountTransaction as DeployedAccountTransaction$1, L1Message as L1Message$1, EventFilter as EventFilter$1, StarknetWindowObject, AccountChangeEventHandler, NetworkChangeEventHandler, WatchAssetParameters, AddStarknetChainParameters, Signature as Signature$1, EDAMode as EDAMode$1, Event as Event$1, Methods as Methods$1, Address, Permission, ChainId as ChainId$1, AccountDeploymentData, AddInvokeTransactionParameters, AddInvokeTransactionResult, AddDeclareTransactionParameters, AddDeclareTransactionResult, SpecVersion } from 'starknet-types-07';
3
3
  export { StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision } from 'starknet-types-07';
4
4
  import * as weierstrass from '@noble/curves/abstract/weierstrass';
5
5
  import { RecoveredSignatureType } from '@noble/curves/abstract/weierstrass';
@@ -6919,6 +6919,38 @@ declare namespace src5 {
6919
6919
  export { src5_supportsInterface as supportsInterface };
6920
6920
  }
6921
6921
 
6922
+ type BatchClientOptions = {
6923
+ nodeUrl: string;
6924
+ headers: object;
6925
+ interval: number;
6926
+ };
6927
+ declare class BatchClient {
6928
+ nodeUrl: string;
6929
+ headers: object;
6930
+ interval: number;
6931
+ requestId: number;
6932
+ private pendingRequests;
6933
+ private batchPromises;
6934
+ private delayTimer?;
6935
+ private delayPromise?;
6936
+ private delayPromiseResolve?;
6937
+ constructor(options: BatchClientOptions);
6938
+ private wait;
6939
+ private addPendingRequest;
6940
+ private sendBatch;
6941
+ /**
6942
+ * Automatically batches and fetches JSON-RPC calls in a single request.
6943
+ * @param method Method to call
6944
+ * @param params Method parameters
6945
+ * @param id JSON-RPC Request ID
6946
+ * @returns JSON-RPC Response
6947
+ */
6948
+ fetch<T extends keyof Methods$1, TResponse extends ResponseBody & {
6949
+ result?: Methods$1[T]['result'];
6950
+ error?: Error$1;
6951
+ }>(method: T, params?: Methods$1[T]['params'], id?: string | number): Promise<TResponse>;
6952
+ }
6953
+
6922
6954
  /**
6923
6955
  * Singular class handling cairo u512 data type
6924
6956
  */
@@ -7624,4 +7656,4 @@ declare namespace connect {
7624
7656
  /** @deprecated prefer the 'num' naming */
7625
7657
  declare const number: typeof num;
7626
7658
 
7627
- export { type Abi, type AbiEntry, type AbiEnum, type AbiEnums, type AbiEvent, type AbiEvents, type AbiInterfaces, type AbiStruct, type AbiStructs, Account, AccountInterface, type AccountInvocationItem, type AccountInvocations, type AccountInvocationsFactoryDetails, type AllowArray, type Args, type ArgsOrCalldata, type ArgsOrCalldataWithOptions, type ArraySignatureType, type AsyncContractFunction, type BigNumberish, type Block$1 as Block, type BlockIdentifier, type BlockNumber, BlockStatus, BlockTag, type BlockWithTxHashes, type Builtins, type ByteArray, type ByteCode, type CairoAssembly, type CairoContract, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, type CairoEvent, type CairoEventDefinition, type CairoEventVariant, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoUint256, CairoUint512, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, type CallStruct, type Calldata, type CompiledContract, type CompiledSierra, type CompiledSierraCasm, type CompilerVersion, type CompleteDeclareContractPayload, type CompressedProgram, Contract, type ContractClass, type ContractClassIdentifier, type ContractClassPayload, type ContractClassResponse, type ContractEntryPointFields, ContractFactory, type ContractFactoryParams, type ContractFunction, ContractInterface, type ContractOptions, type ContractVersion, CustomError, type DeclareAndDeployContractPayload, type DeclareContractPayload, type DeclareContractResponse, type DeclareContractTransaction, type DeclareDeployUDCResponse, type DeclareSignerDetails, type DeclareTransactionReceiptResponse, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransactionReceiptResponse, type Details, ETH_ADDRESS, EntryPointType, type EntryPointsByType, type EstimateFee, type EstimateFeeAction, type EstimateFeeBulk, type EstimateFeeDetails, type EstimateFeeResponse, type EstimateFeeResponseBulk, EthSigner, type EventEntry, type FeeEstimate, type FunctionAbi, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type InterfaceAbi, type Invocation, type Invocations, type InvocationsDetails, type InvocationsDetailsWithNonce, type InvocationsSignerDetails, type InvokeFunctionResponse, type InvokeOptions, type InvokeTransactionReceiptResponse, type L1HandlerTransactionReceiptResponse, LedgerSigner, type LegacyCompiledContract, type LegacyContractClass, type LegacyEvent, LibraryError, Literal, type MessageToL1, type MultiDeployContractResponse, type MultiType, NON_ZERO_PREFIX, type Nonce, type OptionalPayload, type OutsideCall, type OutsideExecution, type OutsideExecutionOptions, OutsideExecutionTypesV1, OutsideExecutionTypesV2, OutsideExecutionVersion, type OutsideTransaction, type ParsedEvent, type ParsedEvents, type ParsedStruct, type PendingBlock, type PendingStateUpdate, type Program, RpcProvider as Provider, ProviderInterface, type ProviderOptions, type PythonicHints, index$3 as RPC, rpc_0_6 as RPC06, rpc_0_7 as RPC07, RPCResponseParser, type RPC_ERROR, type RPC_ERROR_SET, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, ReceiptTx, type RejectedTransactionReceiptResponse, ResponseParser, type Result, type RevertedTransactionReceiptResponse, RpcChannel, RpcError, RpcProvider, type RpcProviderOptions, type SIMULATION_FLAG, type SierraContractClass, type SierraContractEntryPointFields, type SierraEntryPointsByType, type SierraProgramDebugInfo, type Signature, Signer, SignerInterface, type SimulateTransactionDetails, type SimulateTransactionResponse, type SimulatedTransaction, type SimulationFlags, type StarkProfile, type StateUpdate, type StateUpdateResponse, type Storage, type SuccessfulTransactionReceiptResponse, TransactionExecutionStatus, TransactionFinalityStatus, type TransactionReceipt, type TransactionReceiptCallbacks, type TransactionReceiptCallbacksDefault, type TransactionReceiptCallbacksDefined, type TransactionReceiptStatus, type TransactionReceiptUtilityInterface, type TransactionReceiptValue, TransactionStatus, type TransactionStatusReceiptSets, TransactionType, 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 UniversalSuggestedFee, type V2DeclareSignerDetails, type V2DeployAccountSignerDetails, type V2InvocationsSignerDetails, type V3DeclareSignerDetails, type V3DeployAccountSignerDetails, type V3InvocationsSignerDetails, type V3TransactionDetails, ValidateType, WalletAccount, type WeierstrassSignatureType, addAddressPadding, byteArray, cairo, constants, contractClassResponseToLegacyCompiledContract, defaultProvider, ec, encode, eth, index as events, extractContractHashes, fixProto, fixStack, getCalldata, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getLedgerPathBuffer, type getSimulateTransactionOptions, index$1 as hash, isSierra, json, merkle, num, number, outsideExecution, parseCalldataField, provider, selector, shortString, splitArgsAndOptions, src5, stark, starknetId, transaction, typedData, index$2 as types, uint256$1 as uint256, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, type waitForTransactionOptions, connect as wallet };
7659
+ export { type Abi, type AbiEntry, type AbiEnum, type AbiEnums, type AbiEvent, type AbiEvents, type AbiInterfaces, type AbiStruct, type AbiStructs, Account, AccountInterface, type AccountInvocationItem, type AccountInvocations, type AccountInvocationsFactoryDetails, type AllowArray, type Args, type ArgsOrCalldata, type ArgsOrCalldataWithOptions, type ArraySignatureType, type AsyncContractFunction, 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, type CairoContract, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, type CairoEvent, type CairoEventDefinition, type CairoEventVariant, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoUint256, CairoUint512, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, type CallStruct, type Calldata, type CompiledContract, type CompiledSierra, type CompiledSierraCasm, type CompilerVersion, type CompleteDeclareContractPayload, type CompressedProgram, Contract, type ContractClass, type ContractClassIdentifier, type ContractClassPayload, type ContractClassResponse, type ContractEntryPointFields, ContractFactory, type ContractFactoryParams, type ContractFunction, ContractInterface, type ContractOptions, type ContractVersion, CustomError, type DeclareAndDeployContractPayload, type DeclareContractPayload, type DeclareContractResponse, type DeclareContractTransaction, type DeclareDeployUDCResponse, type DeclareSignerDetails, type DeclareTransactionReceiptResponse, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransactionReceiptResponse, type Details, ETH_ADDRESS, EntryPointType, type EntryPointsByType, type EstimateFee, type EstimateFeeAction, type EstimateFeeBulk, type EstimateFeeDetails, type EstimateFeeResponse, type EstimateFeeResponseBulk, EthSigner, type EventEntry, type FeeEstimate, type FunctionAbi, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type InterfaceAbi, type Invocation, type Invocations, type InvocationsDetails, type InvocationsDetailsWithNonce, type InvocationsSignerDetails, type InvokeFunctionResponse, type InvokeOptions, type InvokeTransactionReceiptResponse, type L1HandlerTransactionReceiptResponse, LedgerSigner, type LegacyCompiledContract, type LegacyContractClass, type LegacyEvent, LibraryError, Literal, type MessageToL1, type MultiDeployContractResponse, type MultiType, NON_ZERO_PREFIX, type Nonce, type OptionalPayload, type OutsideCall, type OutsideExecution, type OutsideExecutionOptions, OutsideExecutionTypesV1, OutsideExecutionTypesV2, OutsideExecutionVersion, type OutsideTransaction, type ParsedEvent, type ParsedEvents, type ParsedStruct, type PendingBlock, type PendingStateUpdate, type Program, RpcProvider as Provider, ProviderInterface, type ProviderOptions, type PythonicHints, index$3 as RPC, rpc_0_6 as RPC06, rpc_0_7 as RPC07, RPCResponseParser, type RPC_ERROR, type RPC_ERROR_SET, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, ReceiptTx, type RejectedTransactionReceiptResponse, ResponseParser, type Result, type RevertedTransactionReceiptResponse, RpcChannel, RpcError, RpcProvider, type RpcProviderOptions, type SIMULATION_FLAG, type SierraContractClass, type SierraContractEntryPointFields, type SierraEntryPointsByType, type SierraProgramDebugInfo, type Signature, Signer, SignerInterface, type SimulateTransactionDetails, type SimulateTransactionResponse, type SimulatedTransaction, type SimulationFlags, type StarkProfile, type StateUpdate, type StateUpdateResponse, type Storage, type SuccessfulTransactionReceiptResponse, TransactionExecutionStatus, TransactionFinalityStatus, type TransactionReceipt, type TransactionReceiptCallbacks, type TransactionReceiptCallbacksDefault, type TransactionReceiptCallbacksDefined, type TransactionReceiptStatus, type TransactionReceiptUtilityInterface, type TransactionReceiptValue, TransactionStatus, type TransactionStatusReceiptSets, TransactionType, 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 UniversalSuggestedFee, type V2DeclareSignerDetails, type V2DeployAccountSignerDetails, type V2InvocationsSignerDetails, type V3DeclareSignerDetails, type V3DeployAccountSignerDetails, type V3InvocationsSignerDetails, type V3TransactionDetails, ValidateType, WalletAccount, type WeierstrassSignatureType, addAddressPadding, byteArray, cairo, constants, contractClassResponseToLegacyCompiledContract, defaultProvider, ec, encode, eth, index as events, extractContractHashes, fixProto, fixStack, getCalldata, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getLedgerPathBuffer, type getSimulateTransactionOptions, index$1 as hash, isSierra, json, merkle, num, number, outsideExecution, parseCalldataField, provider, selector, shortString, splitArgsAndOptions, src5, stark, starknetId, transaction, typedData, index$2 as types, uint256$1 as uint256, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, type waitForTransactionOptions, connect as wallet };
@@ -12584,6 +12584,7 @@ var starknet = (() => {
12584
12584
  __export(src_exports, {
12585
12585
  Account: () => Account,
12586
12586
  AccountInterface: () => AccountInterface,
12587
+ BatchClient: () => BatchClient,
12587
12588
  BlockStatus: () => BlockStatus,
12588
12589
  BlockTag: () => BlockTag,
12589
12590
  CairoCustomEnum: () => CairoCustomEnum,