starknet 10.7.0 → 10.7.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
+ ## [10.7.1](https://github.com/starknet-io/starknet.js/compare/v10.7.0...v10.7.1) (2026-08-21)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **provider:** accept pre-release RPC spec versions ([436f433](https://github.com/starknet-io/starknet.js/commit/436f433e57039f3ae12c651c937d6b7e21592de1))
6
+
1
7
  # [10.7.0](https://github.com/starknet-io/starknet.js/compare/v10.6.8...v10.7.0) (2026-08-13)
2
8
 
3
9
  ### Features
package/dist/index.d.ts CHANGED
@@ -9421,6 +9421,22 @@ declare function isSupportedSpecVersion(version: string, options?: {
9421
9421
  * ex. 0.8.1 -> 0.8.*
9422
9422
  */
9423
9423
  declare function toAnyPatchVersion(version: string): string;
9424
+ /**
9425
+ * Strip the semver pre-release and build metadata suffixes from a version.
9426
+ * A node can report a pre-release of a spec version (ex. Pathfinder reporting '0.10.3-rc.0');
9427
+ * the SDK handles it as the release it is a candidate for.
9428
+ * Input that is not a semver version is returned unchanged.
9429
+ * ex. '0.10.3-rc.0' -> '0.10.3', '0.10.3+build.1' -> '0.10.3', '0.10.2' -> '0.10.2'
9430
+ *
9431
+ * @param {string} version
9432
+ * @returns {string} the version without its pre-release and build metadata suffixes
9433
+ * @example
9434
+ * ```typescript
9435
+ * const result = toReleaseVersion('0.10.3-rc.0');
9436
+ * // result = '0.10.3'
9437
+ * ```
9438
+ */
9439
+ declare function toReleaseVersion(version: string): string;
9424
9440
  /**
9425
9441
  * Convert version to API format.
9426
9442
  * ex. '0.8.1' -> 'v0_8', '0.8' -> 'v0_8'
@@ -9432,6 +9448,8 @@ declare function toApiVersion(version: string): string;
9432
9448
  * Compare two semantic version strings segment by segment.
9433
9449
  * This function safely compares versions without collision risk between
9434
9450
  * versions like '0.0.1000' and '0.1.0'.
9451
+ * Pre-release and build metadata suffixes are ignored, so a version is compared as
9452
+ * the release it is a candidate for: '0.14.1-rc.0' compares equal to '0.14.1'.
9435
9453
  *
9436
9454
  * @param {string} a First version string (e.g., '0.0.9')
9437
9455
  * @param {string} b Second version string (e.g., '0.0.10')
@@ -10843,4 +10861,4 @@ declare class Logger {
10843
10861
  */
10844
10862
  declare const logger: Logger;
10845
10863
 
10846
- 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, type AccountHooks, 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 BlockTransactionTrace, type BlockTransactionsTracesWithInitialReads, type BlockWithTxHashes, BrotherIdImpl, type BrotherIdProviderMethods, type BrotherProfile, 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, ESubscriptionTag, ETH_ADDRESS, ETraceFlag, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion2, ETransactionVersion3, ETxnResponseFlag, 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 FastExecuteAccountMethods, type FastExecuteProviderMethods, type FastExecuteResponse, type FastWaitForTransactionOptions, type FeeEstimate, type FeeMode, type FormatResponse, type FunctionAbi, type GasPrices, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type Hint, type INITIAL_READS, 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 LoadedContract, 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 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 PluginConfig, PluginManager, type PreConfirmedBlock, type PreConfirmedStateUpdate, type PreparedDeployAndInvokeTransaction, type PreparedDeployTransaction, type PreparedInvokeTransaction, type PreparedTransaction, type Program, RpcProvider as Provider, type ProviderHooks, ProviderInterface, type ProviderOptions, type ProviderOrAccount, type PythonicHints, type RESOURCE_PRICE, index$4 as RPC, rpc_0_10_2 as RPC0102, rpc_0_10_3 as RPC0103, 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 STRK20_ACTION, type STRK20_CALL_AND_PROOF, type STRK20_SHADOW_ACCOUNT_INVOKE_ACTION, 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 StarknetIdAccountMethods, StarknetIdImpl, type StarknetIdProviderMethods, type StarknetPlugin, type StateUpdate, type StateUpdateResponse, type StorageResponse, 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, WalletAccountV5, WalletAccountV6, WebSocketChannel, type WebSocketModule, WebSocketNotConnectedError, type WebSocketOptions, type WeierstrassSignatureType, type WithOptions, addAddressPadding, brotherId, byteArray, cairo, compareVersions, config, constants, contractClassResponseToLegacyCompiledContract, contractLoader, createAbiParser, createTransactionReceipt, defaultDeployer, defaultPlugins, ec, encode, eth, index as events, extractContractHashes, fastExecute, fastParsingStrategy, getAbiVersion, type getBlockTransactionsTracesOptions, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getGasPrices, getLedgerPathBuffer111 as getLedgerPathBuffer, getLedgerPathBuffer111, getLedgerPathBuffer221, type getSimulateTransactionOptions, getTipStatsFromBlocks, index$3 as hash, hdParsingStrategy, isAccount, isFileSystemAvailable, isNoConstructorValid, isPreConfirmedBlock, isPreConfirmedStateUpdate, isPreConfirmedTransaction, 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, starknetId$1 as starknetIdPlugin, 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, connectV5 as walletV5, connectV6 as walletV6 };
10864
+ 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, type AccountHooks, 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 BlockTransactionTrace, type BlockTransactionsTracesWithInitialReads, type BlockWithTxHashes, BrotherIdImpl, type BrotherIdProviderMethods, type BrotherProfile, 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, ESubscriptionTag, ETH_ADDRESS, ETraceFlag, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion2, ETransactionVersion3, ETxnResponseFlag, 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 FastExecuteAccountMethods, type FastExecuteProviderMethods, type FastExecuteResponse, type FastWaitForTransactionOptions, type FeeEstimate, type FeeMode, type FormatResponse, type FunctionAbi, type GasPrices, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type Hint, type INITIAL_READS, 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 LoadedContract, 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 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 PluginConfig, PluginManager, type PreConfirmedBlock, type PreConfirmedStateUpdate, type PreparedDeployAndInvokeTransaction, type PreparedDeployTransaction, type PreparedInvokeTransaction, type PreparedTransaction, type Program, RpcProvider as Provider, type ProviderHooks, ProviderInterface, type ProviderOptions, type ProviderOrAccount, type PythonicHints, type RESOURCE_PRICE, index$4 as RPC, rpc_0_10_2 as RPC0102, rpc_0_10_3 as RPC0103, 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 STRK20_ACTION, type STRK20_CALL_AND_PROOF, type STRK20_SHADOW_ACCOUNT_INVOKE_ACTION, 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 StarknetIdAccountMethods, StarknetIdImpl, type StarknetIdProviderMethods, type StarknetPlugin, type StateUpdate, type StateUpdateResponse, type StorageResponse, 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, WalletAccountV5, WalletAccountV6, WebSocketChannel, type WebSocketModule, WebSocketNotConnectedError, type WebSocketOptions, type WeierstrassSignatureType, type WithOptions, addAddressPadding, brotherId, byteArray, cairo, compareVersions, config, constants, contractClassResponseToLegacyCompiledContract, contractLoader, createAbiParser, createTransactionReceipt, defaultDeployer, defaultPlugins, ec, encode, eth, index as events, extractContractHashes, fastExecute, fastParsingStrategy, getAbiVersion, type getBlockTransactionsTracesOptions, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getGasPrices, getLedgerPathBuffer111 as getLedgerPathBuffer, getLedgerPathBuffer111, getLedgerPathBuffer221, type getSimulateTransactionOptions, getTipStatsFromBlocks, index$3 as hash, hdParsingStrategy, isAccount, isFileSystemAvailable, isNoConstructorValid, isPreConfirmedBlock, isPreConfirmedStateUpdate, isPreConfirmedTransaction, 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, starknetId$1 as starknetIdPlugin, toAnyPatchVersion, toApiVersion, toReleaseVersion, index$2 as transaction, typedData, uint256$1 as uint256, units, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, verifyMessageInStarknet, type waitForTransactionOptions, connect as wallet, connectV5 as walletV5, connectV6 as walletV6 };
@@ -207,6 +207,7 @@ var starknet = (() => {
207
207
  starknetIdPlugin: () => starknetId,
208
208
  toAnyPatchVersion: () => toAnyPatchVersion,
209
209
  toApiVersion: () => toApiVersion,
210
+ toReleaseVersion: () => toReleaseVersion,
210
211
  transaction: () => transaction_exports,
211
212
  typedData: () => typedData_exports,
212
213
  uint256: () => uint256_exports,
@@ -10134,13 +10135,16 @@ ${indent}}` : "}";
10134
10135
  }
10135
10136
  return `${parts[0]}.${parts[1]}.*`;
10136
10137
  }
10138
+ function toReleaseVersion(version) {
10139
+ return version.split(/[-+]/)[0];
10140
+ }
10137
10141
  function toApiVersion(version) {
10138
10142
  const [major, minor] = version.replace(/^v/, "").split(".");
10139
10143
  return `v${major}_${minor}`;
10140
10144
  }
10141
10145
  function compareVersions(a, b) {
10142
- const aParts = a.split(".").map(Number);
10143
- const bParts = b.split(".").map(Number);
10146
+ const aParts = toReleaseVersion(a).split(".").map(Number);
10147
+ const bParts = toReleaseVersion(b).split(".").map(Number);
10144
10148
  const maxLen = Math.max(aParts.length, bParts.length);
10145
10149
  for (let i = 0; i < maxLen; i += 1) {
10146
10150
  const aNum = aParts[i] || 0;
@@ -11230,7 +11234,7 @@ ${indent}}` : "}";
11230
11234
  this.chainId = chainId;
11231
11235
  this.headers = { ...channelDefaults.options.headers, ...headers };
11232
11236
  this.retries = retries ?? channelDefaults.options.retries;
11233
- this.specVersion = specVersion;
11237
+ this.specVersion = specVersion ? toReleaseVersion(specVersion) : void 0;
11234
11238
  this.transactionRetryIntervalFallback = transactionRetryIntervalFallback ?? channelDefaults.options.transactionRetryIntervalFallback;
11235
11239
  this.waitMode = waitMode ?? false;
11236
11240
  this.requestId = 0;
@@ -11318,18 +11322,19 @@ ${indent}}` : "}";
11318
11322
  */
11319
11323
  async setUpSpecVersion() {
11320
11324
  if (!this.specVersion) {
11321
- const unknownSpecVersion = await this.fetchEndpoint("starknet_specVersion");
11322
- if (!isVersion(this.channelSpecVersion, unknownSpecVersion)) {
11325
+ const nodeSpecVersion = await this.fetchEndpoint("starknet_specVersion");
11326
+ const specVersion = toReleaseVersion(nodeSpecVersion);
11327
+ if (!isVersion(this.channelSpecVersion, specVersion)) {
11323
11328
  logger.error(SYSTEM_MESSAGES.channelVersionMismatch, {
11324
11329
  channelId: this.id,
11325
11330
  channelSpecVersion: this.channelSpecVersion,
11326
- nodeSpecVersion: this.specVersion
11331
+ nodeSpecVersion
11327
11332
  });
11328
11333
  }
11329
- if (!isSupportedSpecVersion(unknownSpecVersion)) {
11334
+ if (!isSupportedSpecVersion(specVersion)) {
11330
11335
  throw new LibraryError(`${SYSTEM_MESSAGES.unsupportedSpecVersion}, channelId: ${this.id}`);
11331
11336
  }
11332
- this.specVersion = unknownSpecVersion;
11337
+ this.specVersion = specVersion;
11333
11338
  }
11334
11339
  return this.specVersion;
11335
11340
  }
@@ -11875,7 +11880,7 @@ ${indent}}` : "}";
11875
11880
  this.chainId = chainId;
11876
11881
  this.headers = { ...channelDefaults.options.headers, ...headers };
11877
11882
  this.retries = retries ?? channelDefaults.options.retries;
11878
- this.specVersion = specVersion;
11883
+ this.specVersion = specVersion ? toReleaseVersion(specVersion) : void 0;
11879
11884
  this.transactionRetryIntervalFallback = transactionRetryIntervalFallback ?? channelDefaults.options.transactionRetryIntervalFallback;
11880
11885
  this.waitMode = waitMode ?? false;
11881
11886
  this.requestId = 0;
@@ -11963,18 +11968,19 @@ ${indent}}` : "}";
11963
11968
  */
11964
11969
  async setUpSpecVersion() {
11965
11970
  if (!this.specVersion) {
11966
- const unknownSpecVersion = await this.fetchEndpoint("starknet_specVersion");
11967
- if (!isVersion("0.10", unknownSpecVersion)) {
11971
+ const nodeSpecVersion = await this.fetchEndpoint("starknet_specVersion");
11972
+ const specVersion = toReleaseVersion(nodeSpecVersion);
11973
+ if (!isVersion("0.10", specVersion)) {
11968
11974
  logger.error(SYSTEM_MESSAGES.channelVersionMismatch, {
11969
11975
  channelId: this.id,
11970
11976
  channelSpecVersion: this.channelSpecVersion,
11971
- nodeSpecVersion: this.specVersion
11977
+ nodeSpecVersion
11972
11978
  });
11973
11979
  }
11974
- if (!isSupportedSpecVersion(unknownSpecVersion)) {
11980
+ if (!isSupportedSpecVersion(specVersion)) {
11975
11981
  throw new LibraryError(`${SYSTEM_MESSAGES.unsupportedSpecVersion}, channelId: ${this.id}`);
11976
11982
  }
11977
- this.specVersion = unknownSpecVersion;
11983
+ this.specVersion = specVersion;
11978
11984
  }
11979
11985
  return this.specVersion;
11980
11986
  }
@@ -14928,16 +14934,17 @@ ${indent}}` : "}";
14928
14934
  static async create(optionsOrProvider) {
14929
14935
  const channel = new rpc_0_9_0_exports.RpcChannel({ ...optionsOrProvider });
14930
14936
  const spec = await channel.getSpecVersion();
14931
- if (!isSupportedSpecVersion(spec)) {
14937
+ const specVersion = toReleaseVersion(spec);
14938
+ if (!isSupportedSpecVersion(specVersion)) {
14932
14939
  logger.warn(`Using incompatible node spec version ${spec}`);
14933
14940
  }
14934
- if (isVersion("0.9", spec)) {
14941
+ if (isVersion("0.9", specVersion)) {
14935
14942
  return new this({
14936
14943
  ...optionsOrProvider,
14937
14944
  specVersion: _SupportedRpcVersion.v0_9_0
14938
14945
  });
14939
14946
  }
14940
- if (isVersion("0.10", spec)) {
14947
+ if (isVersion("0.10", specVersion)) {
14941
14948
  return new this({
14942
14949
  ...optionsOrProvider,
14943
14950
  specVersion: _SupportedRpcVersion.v0_10_3