starknet 7.1.0 → 7.3.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.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as RPCSPEC07 from 'starknet-types-07';
2
2
  import { STRUCT_EVENT, EVENT_FIELD, ENUM_EVENT, BlockHash, TransactionHash, StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision, StarknetWindowObject, Address, Permission, WatchAssetParameters as WatchAssetParameters$1, AddStarknetChainParameters as AddStarknetChainParameters$1, ChainId, AccountDeploymentData, AddInvokeTransactionParameters, AddInvokeTransactionResult, AddDeclareTransactionParameters, AddDeclareTransactionResult, Signature as Signature$2, SpecVersion, AccountChangeEventHandler as AccountChangeEventHandler$1, NetworkChangeEventHandler as NetworkChangeEventHandler$1 } from 'starknet-types-07';
3
3
  export { StarknetDomain, StarknetEnumType, StarknetMerkleType, StarknetType, TypedData, TypedDataRevision } from 'starknet-types-07';
4
4
  import * as RPCSPEC08 from 'starknet-types-08';
5
- import { EDataAvailabilityMode as EDataAvailabilityMode$1, SUBSCRIPTION_BLOCK_TAG, BLOCK_WITH_TX_HASHES, PENDING_BLOCK_WITH_TX_HASHES, BlockWithTxHashes as BlockWithTxHashes$1, TransactionReceipt as TransactionReceipt$1, IsSucceeded, IsReverted, IsType, ETransactionVersion as ETransactionVersion$1, ETransactionVersion2 as ETransactionVersion2$1, ETransactionVersion3 as ETransactionVersion3$1, SubscriptionReorgResponse, SubscriptionNewHeadsResponse, SubscriptionEventsResponse, SubscriptionTransactionsStatusResponse, SubscriptionPendingTransactionsResponse, SUBSCRIPTION_ID, WebSocketMethods, BLOCK_STATUS, BLOCK_HEADER, BLOCK_BODY_WITH_RECEIPTS, PENDING_BLOCK_HEADER, BlockTransactionsTraces, CONTRACT_STORAGE_KEYS, AccountChangeEventHandler, NetworkChangeEventHandler, WatchAssetParameters, AddStarknetChainParameters, Signature as Signature$1, EDAMode as EDAMode$1, PRICE_UNIT as PRICE_UNIT$1, EmittedEvent as EmittedEvent$1, Methods as Methods$1 } from 'starknet-types-08';
5
+ import { PAYMASTER_API, EDataAvailabilityMode as EDataAvailabilityMode$1, SUBSCRIPTION_BLOCK_TAG, BLOCK_WITH_TX_HASHES, PENDING_BLOCK_WITH_TX_HASHES, BlockWithTxHashes as BlockWithTxHashes$1, TransactionReceipt as TransactionReceipt$1, IsSucceeded, IsReverted, IsType, OutsideExecutionTypedData, ETransactionVersion as ETransactionVersion$1, ETransactionVersion2 as ETransactionVersion2$1, ETransactionVersion3 as ETransactionVersion3$1, SubscriptionReorgResponse, SubscriptionNewHeadsResponse, SubscriptionEventsResponse, SubscriptionTransactionsStatusResponse, SubscriptionPendingTransactionsResponse, SUBSCRIPTION_ID, WebSocketMethods, BLOCK_STATUS, BLOCK_HEADER, BLOCK_BODY_WITH_RECEIPTS, PENDING_BLOCK_HEADER, BlockTransactionsTraces, L1L2MessagesStatus, CONTRACT_STORAGE_KEYS, StorageProof, CASM_COMPILED_CONTRACT_CLASS, AccountChangeEventHandler, NetworkChangeEventHandler, WatchAssetParameters, AddStarknetChainParameters, Signature as Signature$1, EDAMode as EDAMode$1, PRICE_UNIT as PRICE_UNIT$1, EmittedEvent as EmittedEvent$1, Methods as Methods$1 } from 'starknet-types-08';
6
6
  import * as weierstrass from '@noble/curves/abstract/weierstrass';
7
7
  import { RecoveredSignatureType } from '@noble/curves/abstract/weierstrass';
8
8
  import { Abi as Abi$1, TypedContract } from 'abi-wan-kanabi';
@@ -68,6 +68,7 @@ declare namespace index$5 {
68
68
  var index$4 = /*#__PURE__*/_mergeNamespaces({
69
69
  __proto__: null,
70
70
  JRPC: index$5,
71
+ PAYMASTER_API: PAYMASTER_API,
71
72
  RPCSPEC07: RPCSPEC07,
72
73
  RPCSPEC08: RPCSPEC08
73
74
  }, [RPCSPEC08]);
@@ -828,6 +829,105 @@ type PendingStateUpdate = PENDING_STATE_UPDATE;
828
829
  */
829
830
  type ContractClassResponse = LegacyContractClass | Omit<CompiledSierra, 'sierra_program_debug_info'>;
830
831
 
832
+ interface PaymasterOptions extends PaymasterRpcOptions {
833
+ }
834
+ type PaymasterRpcOptions = {
835
+ nodeUrl?: string | _NetworkName;
836
+ default?: boolean;
837
+ headers?: object;
838
+ baseFetch?: WindowOrWorkerGlobalScope['fetch'];
839
+ };
840
+
841
+ /**
842
+ * Common interface response
843
+ * Intersection (sequencer response ∩ (∪ rpc responses))
844
+ */
845
+
846
+ type PaymasterFeeEstimate = {
847
+ gas_token_price_in_strk: BigNumberish;
848
+ estimated_fee_in_strk: BigNumberish;
849
+ estimated_fee_in_gas_token: BigNumberish;
850
+ suggested_max_fee_in_strk: BigNumberish;
851
+ suggested_max_fee_in_gas_token: BigNumberish;
852
+ };
853
+ type PreparedDeployTransaction = {
854
+ type: 'deploy';
855
+ deployment: PAYMASTER_API.ACCOUNT_DEPLOYMENT_DATA;
856
+ parameters: ExecutionParameters;
857
+ fee: PaymasterFeeEstimate;
858
+ };
859
+ type PreparedInvokeTransaction = {
860
+ type: 'invoke';
861
+ typed_data: OutsideExecutionTypedData;
862
+ parameters: ExecutionParameters;
863
+ fee: PaymasterFeeEstimate;
864
+ };
865
+ type PreparedDeployAndInvokeTransaction = {
866
+ type: 'deploy_and_invoke';
867
+ deployment: PAYMASTER_API.ACCOUNT_DEPLOYMENT_DATA;
868
+ typed_data: OutsideExecutionTypedData;
869
+ parameters: ExecutionParameters;
870
+ fee: PaymasterFeeEstimate;
871
+ };
872
+ type PreparedTransaction = PreparedDeployTransaction | PreparedInvokeTransaction | PreparedDeployAndInvokeTransaction;
873
+ interface TokenData {
874
+ token_address: string;
875
+ decimals: number;
876
+ priceInStrk: BigNumberish;
877
+ }
878
+ type DeployTransaction = {
879
+ type: 'deploy';
880
+ deployment: PAYMASTER_API.ACCOUNT_DEPLOYMENT_DATA;
881
+ };
882
+ type InvokeTransaction = {
883
+ type: 'invoke';
884
+ invoke: UserInvoke;
885
+ };
886
+ type UserInvoke = {
887
+ userAddress: string;
888
+ calls: Call[];
889
+ };
890
+ type DeployAndInvokeTransaction = {
891
+ type: 'deploy_and_invoke';
892
+ deployment: PAYMASTER_API.ACCOUNT_DEPLOYMENT_DATA;
893
+ invoke: UserInvoke;
894
+ };
895
+ type UserTransaction = DeployTransaction | InvokeTransaction | DeployAndInvokeTransaction;
896
+ type ExecutableDeployTransaction = {
897
+ type: 'deploy';
898
+ deployment: PAYMASTER_API.ACCOUNT_DEPLOYMENT_DATA;
899
+ };
900
+ type ExecutableInvokeTransaction = {
901
+ type: 'invoke';
902
+ invoke: ExecutableUserInvoke;
903
+ };
904
+ type ExecutableUserInvoke = {
905
+ userAddress: string;
906
+ typedData: OutsideExecutionTypedData;
907
+ signature: string[];
908
+ };
909
+ type ExecutableDeployAndInvokeTransaction = {
910
+ type: 'deploy_and_invoke';
911
+ deployment: PAYMASTER_API.ACCOUNT_DEPLOYMENT_DATA;
912
+ invoke: ExecutableUserInvoke;
913
+ };
914
+ type ExecutableUserTransaction = ExecutableDeployTransaction | ExecutableInvokeTransaction | ExecutableDeployAndInvokeTransaction;
915
+ type FeeMode = {
916
+ mode: 'sponsored';
917
+ } | {
918
+ mode: 'default';
919
+ gasToken: string;
920
+ };
921
+ type ExecutionParameters = {
922
+ version: '0x1';
923
+ feeMode: FeeMode;
924
+ timeBounds?: PaymasterTimeBounds;
925
+ };
926
+ interface PaymasterTimeBounds {
927
+ executeAfter?: Date;
928
+ executeBefore?: Date;
929
+ }
930
+
831
931
  interface EstimateFee extends EstimateFeeResponse {
832
932
  }
833
933
  type UniversalSuggestedFee = {
@@ -846,6 +946,7 @@ interface UniversalDetails {
846
946
  blockIdentifier?: BlockIdentifier;
847
947
  maxFee?: BigNumberish;
848
948
  tip?: BigNumberish;
949
+ paymaster?: PaymasterDetails;
849
950
  paymasterData?: BigNumberish[];
850
951
  accountDeploymentData?: BigNumberish[];
851
952
  nonceDataAvailabilityMode?: EDataAvailabilityMode$1;
@@ -854,6 +955,11 @@ interface UniversalDetails {
854
955
  resourceBounds?: ResourceBounds;
855
956
  skipValidate?: boolean;
856
957
  }
958
+ interface PaymasterDetails {
959
+ feeMode: FeeMode;
960
+ deploymentData?: PAYMASTER_API.AccountDeploymentData;
961
+ timeBounds?: PaymasterTimeBounds;
962
+ }
857
963
  interface EstimateFeeDetails extends UniversalDetails {
858
964
  }
859
965
  interface DeployContractResponse {
@@ -1018,6 +1124,17 @@ type RPC_ERROR_SET = {
1018
1124
  TOO_MANY_ADDRESSES_IN_FILTER: RPCSPEC08.TOO_MANY_ADDRESSES_IN_FILTER;
1019
1125
  TOO_MANY_BLOCKS_BACK: RPCSPEC08.TOO_MANY_BLOCKS_BACK;
1020
1126
  COMPILATION_ERROR: RPCSPEC08.COMPILATION_ERROR;
1127
+ INVALID_ADDRESS: PAYMASTER_API.INVALID_ADDRESS;
1128
+ TOKEN_NOT_SUPPORTED: PAYMASTER_API.TOKEN_NOT_SUPPORTED;
1129
+ INVALID_SIGNATURE: PAYMASTER_API.INVALID_SIGNATURE;
1130
+ MAX_AMOUNT_TOO_LOW: PAYMASTER_API.MAX_AMOUNT_TOO_LOW;
1131
+ CLASS_HASH_NOT_SUPPORTED: PAYMASTER_API.CLASS_HASH_NOT_SUPPORTED;
1132
+ PAYMASTER_TRANSACTION_EXECUTION_ERROR: PAYMASTER_API.TRANSACTION_EXECUTION_ERROR;
1133
+ INVALID_TIME_BOUNDS: PAYMASTER_API.INVALID_TIME_BOUNDS;
1134
+ INVALID_DEPLOYMENT_DATA: PAYMASTER_API.INVALID_DEPLOYMENT_DATA;
1135
+ INVALID_CLASS_HASH: PAYMASTER_API.INVALID_CLASS_HASH;
1136
+ INVALID_ID: PAYMASTER_API.INVALID_ID;
1137
+ UNKNOWN_ERROR: PAYMASTER_API.UNKNOWN_ERROR;
1021
1138
  };
1022
1139
  type RPC_ERROR = RPC_ERROR_SET[keyof RPC_ERROR_SET];
1023
1140
 
@@ -1219,8 +1336,10 @@ type index$3_DeployAccountContractPayload = DeployAccountContractPayload;
1219
1336
  type index$3_DeployAccountContractTransaction = DeployAccountContractTransaction;
1220
1337
  type index$3_DeployAccountSignerDetails = DeployAccountSignerDetails;
1221
1338
  type index$3_DeployAccountTransactionReceiptResponse = DeployAccountTransactionReceiptResponse;
1339
+ type index$3_DeployAndInvokeTransaction = DeployAndInvokeTransaction;
1222
1340
  type index$3_DeployContractResponse = DeployContractResponse;
1223
1341
  type index$3_DeployContractUDCResponse = DeployContractUDCResponse;
1342
+ type index$3_DeployTransaction = DeployTransaction;
1224
1343
  type index$3_DeployTransactionReceiptResponse = DeployTransactionReceiptResponse;
1225
1344
  type index$3_DeployedAccountTransaction = DeployedAccountTransaction;
1226
1345
  type index$3_Details = Details;
@@ -1244,10 +1363,17 @@ type index$3_EstimateFeeResponse = EstimateFeeResponse;
1244
1363
  type index$3_EstimateFeeResponseBulk = EstimateFeeResponseBulk;
1245
1364
  type index$3_EventEntry = EventEntry;
1246
1365
  type index$3_EventFilter = EventFilter;
1366
+ type index$3_ExecutableDeployAndInvokeTransaction = ExecutableDeployAndInvokeTransaction;
1367
+ type index$3_ExecutableDeployTransaction = ExecutableDeployTransaction;
1368
+ type index$3_ExecutableInvokeTransaction = ExecutableInvokeTransaction;
1369
+ type index$3_ExecutableUserInvoke = ExecutableUserInvoke;
1370
+ type index$3_ExecutableUserTransaction = ExecutableUserTransaction;
1371
+ type index$3_ExecutionParameters = ExecutionParameters;
1247
1372
  type index$3_FEE_ESTIMATE = FEE_ESTIMATE;
1248
1373
  type index$3_FELT = FELT;
1249
1374
  type index$3_FeeEstimate = FeeEstimate;
1250
1375
  type index$3_FeeMarginPercentage = FeeMarginPercentage;
1376
+ type index$3_FeeMode = FeeMode;
1251
1377
  type index$3_FunctionAbi = FunctionAbi;
1252
1378
  type index$3_GetBlockResponse = GetBlockResponse;
1253
1379
  type index$3_GetTransactionReceiptResponse = GetTransactionReceiptResponse;
@@ -1262,6 +1388,7 @@ type index$3_InvocationsDetailsWithNonce = InvocationsDetailsWithNonce;
1262
1388
  type index$3_InvocationsSignerDetails = InvocationsSignerDetails;
1263
1389
  type index$3_InvokeFunctionResponse = InvokeFunctionResponse;
1264
1390
  type index$3_InvokeOptions = InvokeOptions;
1391
+ type index$3_InvokeTransaction = InvokeTransaction;
1265
1392
  type index$3_InvokeTransactionReceiptResponse = InvokeTransactionReceiptResponse;
1266
1393
  type index$3_InvokedTransaction = InvokedTransaction;
1267
1394
  type index$3_L1HandlerTransactionReceiptResponse = L1HandlerTransactionReceiptResponse;
@@ -1294,9 +1421,18 @@ type index$3_PRICE_UNIT = PRICE_UNIT;
1294
1421
  type index$3_ParsedEvent = ParsedEvent;
1295
1422
  type index$3_ParsedEvents = ParsedEvents;
1296
1423
  type index$3_ParsedStruct = ParsedStruct;
1424
+ type index$3_PaymasterDetails = PaymasterDetails;
1425
+ type index$3_PaymasterFeeEstimate = PaymasterFeeEstimate;
1426
+ type index$3_PaymasterOptions = PaymasterOptions;
1427
+ type index$3_PaymasterRpcOptions = PaymasterRpcOptions;
1428
+ type index$3_PaymasterTimeBounds = PaymasterTimeBounds;
1297
1429
  type index$3_PendingBlock = PendingBlock;
1298
1430
  type index$3_PendingReceipt = PendingReceipt;
1299
1431
  type index$3_PendingStateUpdate = PendingStateUpdate;
1432
+ type index$3_PreparedDeployAndInvokeTransaction = PreparedDeployAndInvokeTransaction;
1433
+ type index$3_PreparedDeployTransaction = PreparedDeployTransaction;
1434
+ type index$3_PreparedInvokeTransaction = PreparedInvokeTransaction;
1435
+ type index$3_PreparedTransaction = PreparedTransaction;
1300
1436
  type index$3_Program = Program;
1301
1437
  type index$3_ProviderOptions = ProviderOptions;
1302
1438
  type index$3_PythonicHints = PythonicHints;
@@ -1343,6 +1479,7 @@ type index$3_TRANSACTION_TRACE = TRANSACTION_TRACE;
1343
1479
  type index$3_TXN_EXECUTION_STATUS = TXN_EXECUTION_STATUS;
1344
1480
  type index$3_TXN_HASH = TXN_HASH;
1345
1481
  type index$3_TXN_STATUS = TXN_STATUS;
1482
+ type index$3_TokenData = TokenData;
1346
1483
  type index$3_TransactionExecutionStatus = TransactionExecutionStatus;
1347
1484
  type index$3_TransactionFinalityStatus = TransactionFinalityStatus;
1348
1485
  type index$3_TransactionReceipt = TransactionReceipt;
@@ -1364,6 +1501,8 @@ type index$3_Uint512 = Uint512;
1364
1501
  type index$3_UniversalDeployerContractPayload = UniversalDeployerContractPayload;
1365
1502
  type index$3_UniversalDetails = UniversalDetails;
1366
1503
  type index$3_UniversalSuggestedFee = UniversalSuggestedFee;
1504
+ type index$3_UserInvoke = UserInvoke;
1505
+ type index$3_UserTransaction = UserTransaction;
1367
1506
  type index$3_V2DeclareSignerDetails = V2DeclareSignerDetails;
1368
1507
  type index$3_V2DeployAccountSignerDetails = V2DeployAccountSignerDetails;
1369
1508
  type index$3_V2InvocationsSignerDetails = V2InvocationsSignerDetails;
@@ -1380,7 +1519,7 @@ declare const index$3_isRPC08_FeeEstimate: typeof isRPC08_FeeEstimate;
1380
1519
  declare const index$3_isRPC08_ResourceBounds: typeof isRPC08_ResourceBounds;
1381
1520
  type index$3_waitForTransactionOptions = waitForTransactionOptions;
1382
1521
  declare namespace index$3 {
1383
- export { type index$3_Abi as Abi, type index$3_AbiEntry as AbiEntry, type index$3_AbiEnum as AbiEnum, type index$3_AbiEnums as AbiEnums, type index$3_AbiEvent as AbiEvent, type index$3_AbiEvents as AbiEvents, type index$3_AbiInterfaces as AbiInterfaces, type index$3_AbiStruct as AbiStruct, type index$3_AbiStructs as AbiStructs, type index$3_AccountInvocationItem as AccountInvocationItem, type index$3_AccountInvocations as AccountInvocations, type index$3_AccountInvocationsFactoryDetails as AccountInvocationsFactoryDetails, type index$3_AllowArray as AllowArray, type index$3_Args as Args, type index$3_ArgsOrCalldata as ArgsOrCalldata, type index$3_ArgsOrCalldataWithOptions as ArgsOrCalldataWithOptions, type index$3_ArraySignatureType as ArraySignatureType, type index$3_AsyncContractFunction as AsyncContractFunction, type index$3_BLOCK_HASH as BLOCK_HASH, type index$3_BLOCK_NUMBER as BLOCK_NUMBER, type index$3_BigNumberish as BigNumberish, type Block$1 as Block, type index$3_BlockIdentifier as BlockIdentifier, type index$3_BlockNumber as BlockNumber, type index$3_BlockStatus as BlockStatus, type index$3_BlockTag as BlockTag, type index$3_BlockWithTxHashes as BlockWithTxHashes, type index$3_Builtins as Builtins, type index$3_ByteArray as ByteArray, type index$3_ByteCode as ByteCode, type index$3_CairoAssembly as CairoAssembly, type index$3_CairoContract as CairoContract, type index$3_CairoEnum as CairoEnum, type index$3_CairoEvent as CairoEvent, type index$3_CairoEventDefinition as CairoEventDefinition, type index$3_CairoEventVariant as CairoEventVariant, type index$3_CairoVersion as CairoVersion, type index$3_Call as Call, type index$3_CallContractResponse as CallContractResponse, type index$3_CallDetails as CallDetails, type index$3_CallOptions as CallOptions, type index$3_Calldata as Calldata, type index$3_CompiledContract as CompiledContract, type index$3_CompiledSierra as CompiledSierra, type index$3_CompiledSierraCasm as CompiledSierraCasm, type index$3_CompilerVersion as CompilerVersion, type index$3_CompleteDeclareContractPayload as CompleteDeclareContractPayload, type index$3_CompressedProgram as CompressedProgram, type index$3_ContractClass as ContractClass, type index$3_ContractClassIdentifier as ContractClassIdentifier, type index$3_ContractClassPayload as ContractClassPayload, type index$3_ContractClassResponse as ContractClassResponse, type index$3_ContractEntryPointFields as ContractEntryPointFields, type index$3_ContractFunction as ContractFunction, type index$3_ContractOptions as ContractOptions, type index$3_ContractVersion as ContractVersion, type index$3_DeclareAndDeployContractPayload as DeclareAndDeployContractPayload, type index$3_DeclareContractPayload as DeclareContractPayload, type index$3_DeclareContractResponse as DeclareContractResponse, type index$3_DeclareContractTransaction as DeclareContractTransaction, type index$3_DeclareDeployUDCResponse as DeclareDeployUDCResponse, type index$3_DeclareSignerDetails as DeclareSignerDetails, type index$3_DeclareTransactionReceiptResponse as DeclareTransactionReceiptResponse, type index$3_DeclaredTransaction as DeclaredTransaction, type index$3_DeployAccountContractPayload as DeployAccountContractPayload, type index$3_DeployAccountContractTransaction as DeployAccountContractTransaction, type index$3_DeployAccountSignerDetails as DeployAccountSignerDetails, type index$3_DeployAccountTransactionReceiptResponse as DeployAccountTransactionReceiptResponse, type index$3_DeployContractResponse as DeployContractResponse, type index$3_DeployContractUDCResponse as DeployContractUDCResponse, type index$3_DeployTransactionReceiptResponse as DeployTransactionReceiptResponse, type index$3_DeployedAccountTransaction as DeployedAccountTransaction, type index$3_Details as Details, index$3_EDAMode as EDAMode, index$3_EDataAvailabilityMode as EDataAvailabilityMode, index$3_ETH_ADDRESS as ETH_ADDRESS, index$3_ETransactionExecutionStatus as ETransactionExecutionStatus, index$3_ETransactionStatus as ETransactionStatus, index$3_ETransactionVersion as ETransactionVersion, index$3_ETransactionVersion2 as ETransactionVersion2, index$3_ETransactionVersion3 as ETransactionVersion3, type index$3_EVENTS_CHUNK as EVENTS_CHUNK, type index$3_EmittedEvent as EmittedEvent, type index$3_EntryPointType as EntryPointType, type index$3_EntryPointsByType as EntryPointsByType, type index$3_EstimateFee as EstimateFee, type index$3_EstimateFeeAction as EstimateFeeAction, type index$3_EstimateFeeBulk as EstimateFeeBulk, type index$3_EstimateFeeDetails as EstimateFeeDetails, type index$3_EstimateFeeResponse as EstimateFeeResponse, type index$3_EstimateFeeResponseBulk as EstimateFeeResponseBulk, type Event$1 as Event, type index$3_EventEntry as EventEntry, type index$3_EventFilter as EventFilter, type index$3_FEE_ESTIMATE as FEE_ESTIMATE, type index$3_FELT as FELT, type index$3_FeeEstimate as FeeEstimate, type index$3_FeeMarginPercentage as FeeMarginPercentage, type index$3_FunctionAbi as FunctionAbi, type index$3_GetBlockResponse as GetBlockResponse, type index$3_GetTransactionReceiptResponse as GetTransactionReceiptResponse, type index$3_GetTransactionResponse as GetTransactionResponse, type index$3_GetTxReceiptResponseWithoutHelper as GetTxReceiptResponseWithoutHelper, type index$3_HexCalldata as HexCalldata, type index$3_InterfaceAbi as InterfaceAbi, type index$3_Invocation as Invocation, type index$3_Invocations as Invocations, type index$3_InvocationsDetails as InvocationsDetails, type index$3_InvocationsDetailsWithNonce as InvocationsDetailsWithNonce, type index$3_InvocationsSignerDetails as InvocationsSignerDetails, type index$3_InvokeFunctionResponse as InvokeFunctionResponse, type index$3_InvokeOptions as InvokeOptions, type index$3_InvokeTransactionReceiptResponse as InvokeTransactionReceiptResponse, type index$3_InvokedTransaction as InvokedTransaction, type index$3_L1HandlerTransactionReceiptResponse as L1HandlerTransactionReceiptResponse, type index$3_L1Message as L1Message, type index$3_L1_HANDLER_TXN as L1_HANDLER_TXN, type index$3_LedgerPathCalculation as LedgerPathCalculation, type index$3_LegacyCompiledContract as LegacyCompiledContract, type index$3_LegacyContractClass as LegacyContractClass, type index$3_LegacyEvent as LegacyEvent, type index$3_Literal as Literal, type index$3_Methods as Methods, type index$3_MultiDeployContractResponse as MultiDeployContractResponse, type index$3_MultiType as MultiType, index$3_NON_ZERO_PREFIX as NON_ZERO_PREFIX, type index$3_Nonce as Nonce, type index$3_OptionalPayload as OptionalPayload, type index$3_OutsideCall as OutsideCall, type index$3_OutsideExecution as OutsideExecution, type index$3_OutsideExecutionOptions as OutsideExecutionOptions, index$3_OutsideExecutionTypesV1 as OutsideExecutionTypesV1, index$3_OutsideExecutionTypesV2 as OutsideExecutionTypesV2, type index$3_OutsideExecutionVersion as OutsideExecutionVersion, type index$3_OutsideTransaction as OutsideTransaction, type index$3_PENDING_DECLARE_TXN_RECEIPT as PENDING_DECLARE_TXN_RECEIPT, type index$3_PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT as PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT, type index$3_PENDING_INVOKE_TXN_RECEIPT as PENDING_INVOKE_TXN_RECEIPT, type index$3_PENDING_L1_HANDLER_TXN_RECEIPT as PENDING_L1_HANDLER_TXN_RECEIPT, type index$3_PENDING_STATE_UPDATE as PENDING_STATE_UPDATE, type index$3_PRICE_UNIT as PRICE_UNIT, type index$3_ParsedEvent as ParsedEvent, type index$3_ParsedEvents as ParsedEvents, type index$3_ParsedStruct as ParsedStruct, type index$3_PendingBlock as PendingBlock, type index$3_PendingReceipt as PendingReceipt, type index$3_PendingStateUpdate as PendingStateUpdate, type index$3_Program as Program, type index$3_ProviderOptions as ProviderOptions, type index$3_PythonicHints as PythonicHints, type index$3_RESOURCE_PRICE as RESOURCE_PRICE, index$4 as RPC, type index$3_RPC_ERROR as RPC_ERROR, type index$3_RPC_ERROR_SET as RPC_ERROR_SET, type index$3_RawArgs as RawArgs, type index$3_RawArgsArray as RawArgsArray, type index$3_RawArgsObject as RawArgsObject, type index$3_RawCalldata as RawCalldata, type index$3_Receipt as Receipt, type index$3_RequiredKeysOf as RequiredKeysOf, type index$3_ResourceBounds as ResourceBounds, type index$3_ResourceBoundsOverhead as ResourceBoundsOverhead, type index$3_ResourceBoundsOverheadRPC07 as ResourceBoundsOverheadRPC07, type index$3_ResourceBoundsOverheadRPC08 as ResourceBoundsOverheadRPC08, type index$3_Result as Result, type index$3_RevertedTransactionReceiptResponse as RevertedTransactionReceiptResponse, type index$3_RpcProviderOptions as RpcProviderOptions, type index$3_SIMULATION_FLAG as SIMULATION_FLAG, type index$3_STATE_UPDATE as STATE_UPDATE, type index$3_SierraContractClass as SierraContractClass, type index$3_SierraContractEntryPointFields as SierraContractEntryPointFields, type index$3_SierraEntryPointsByType as SierraEntryPointsByType, type index$3_SierraProgramDebugInfo as SierraProgramDebugInfo, type index$3_Signature as Signature, type index$3_Simplify as Simplify, type index$3_SimulateTransaction as SimulateTransaction, type index$3_SimulateTransactionDetails as SimulateTransactionDetails, type index$3_SimulateTransactionResponse as SimulateTransactionResponse, type index$3_SimulatedTransaction as SimulatedTransaction, type index$3_SimulationFlags as SimulationFlags, type index$3_StarkProfile as StarkProfile, index$3_StarknetDomain as StarknetDomain, index$3_StarknetEnumType as StarknetEnumType, index$3_StarknetMerkleType as StarknetMerkleType, index$3_StarknetType as StarknetType, type index$3_StateUpdate as StateUpdate, type index$3_StateUpdateResponse as StateUpdateResponse, type index$3_Storage as Storage, type index$3_SubscriptionBlockIdentifier as SubscriptionBlockIdentifier, type index$3_SuccessfulTransactionReceiptResponse as SuccessfulTransactionReceiptResponse, type index$3_TRANSACTION_TRACE as TRANSACTION_TRACE, type index$3_TXN_EXECUTION_STATUS as TXN_EXECUTION_STATUS, type index$3_TXN_HASH as TXN_HASH, type index$3_TXN_STATUS as TXN_STATUS, type index$3_TransactionExecutionStatus as TransactionExecutionStatus, type index$3_TransactionFinalityStatus as TransactionFinalityStatus, type index$3_TransactionReceipt as TransactionReceipt, type index$3_TransactionReceiptCallbacks as TransactionReceiptCallbacks, type index$3_TransactionReceiptCallbacksDefault as TransactionReceiptCallbacksDefault, type index$3_TransactionReceiptCallbacksDefined as TransactionReceiptCallbacksDefined, type index$3_TransactionReceiptStatus as TransactionReceiptStatus, type index$3_TransactionReceiptValue as TransactionReceiptValue, type index$3_TransactionStatus as TransactionStatus, type index$3_TransactionStatusReceiptSets as TransactionStatusReceiptSets, type index$3_TransactionType as TransactionType, type index$3_TransactionWithHash as TransactionWithHash, type index$3_Tupled as Tupled, index$3_TypedData as TypedData, index$3_TypedDataRevision as TypedDataRevision, type index$3_Uint as Uint, type index$3_Uint256 as Uint256, type index$3_Uint512 as Uint512, type index$3_UniversalDeployerContractPayload as UniversalDeployerContractPayload, type index$3_UniversalDetails as UniversalDetails, type index$3_UniversalSuggestedFee as UniversalSuggestedFee, type index$3_V2DeclareSignerDetails as V2DeclareSignerDetails, type index$3_V2DeployAccountSignerDetails as V2DeployAccountSignerDetails, type index$3_V2InvocationsSignerDetails as V2InvocationsSignerDetails, type index$3_V3DeclareSignerDetails as V3DeclareSignerDetails, type index$3_V3DeployAccountSignerDetails as V3DeployAccountSignerDetails, type index$3_V3InvocationsSignerDetails as V3InvocationsSignerDetails, type index$3_V3TransactionDetails as V3TransactionDetails, type index$3_ValidateType as ValidateType, type index$3_WeierstrassSignatureType as WeierstrassSignatureType, type index$3_getContractVersionOptions as getContractVersionOptions, type index$3_getEstimateFeeBulkOptions as getEstimateFeeBulkOptions, type index$3_getSimulateTransactionOptions as getSimulateTransactionOptions, index$3_isRPC08_FeeEstimate as isRPC08_FeeEstimate, index$3_isRPC08_ResourceBounds as isRPC08_ResourceBounds, type index$3_waitForTransactionOptions as waitForTransactionOptions };
1522
+ export { type index$3_Abi as Abi, type index$3_AbiEntry as AbiEntry, type index$3_AbiEnum as AbiEnum, type index$3_AbiEnums as AbiEnums, type index$3_AbiEvent as AbiEvent, type index$3_AbiEvents as AbiEvents, type index$3_AbiInterfaces as AbiInterfaces, type index$3_AbiStruct as AbiStruct, type index$3_AbiStructs as AbiStructs, type index$3_AccountInvocationItem as AccountInvocationItem, type index$3_AccountInvocations as AccountInvocations, type index$3_AccountInvocationsFactoryDetails as AccountInvocationsFactoryDetails, type index$3_AllowArray as AllowArray, type index$3_Args as Args, type index$3_ArgsOrCalldata as ArgsOrCalldata, type index$3_ArgsOrCalldataWithOptions as ArgsOrCalldataWithOptions, type index$3_ArraySignatureType as ArraySignatureType, type index$3_AsyncContractFunction as AsyncContractFunction, type index$3_BLOCK_HASH as BLOCK_HASH, type index$3_BLOCK_NUMBER as BLOCK_NUMBER, type index$3_BigNumberish as BigNumberish, type Block$1 as Block, type index$3_BlockIdentifier as BlockIdentifier, type index$3_BlockNumber as BlockNumber, type index$3_BlockStatus as BlockStatus, type index$3_BlockTag as BlockTag, type index$3_BlockWithTxHashes as BlockWithTxHashes, type index$3_Builtins as Builtins, type index$3_ByteArray as ByteArray, type index$3_ByteCode as ByteCode, type index$3_CairoAssembly as CairoAssembly, type index$3_CairoContract as CairoContract, type index$3_CairoEnum as CairoEnum, type index$3_CairoEvent as CairoEvent, type index$3_CairoEventDefinition as CairoEventDefinition, type index$3_CairoEventVariant as CairoEventVariant, type index$3_CairoVersion as CairoVersion, type index$3_Call as Call, type index$3_CallContractResponse as CallContractResponse, type index$3_CallDetails as CallDetails, type index$3_CallOptions as CallOptions, type index$3_Calldata as Calldata, type index$3_CompiledContract as CompiledContract, type index$3_CompiledSierra as CompiledSierra, type index$3_CompiledSierraCasm as CompiledSierraCasm, type index$3_CompilerVersion as CompilerVersion, type index$3_CompleteDeclareContractPayload as CompleteDeclareContractPayload, type index$3_CompressedProgram as CompressedProgram, type index$3_ContractClass as ContractClass, type index$3_ContractClassIdentifier as ContractClassIdentifier, type index$3_ContractClassPayload as ContractClassPayload, type index$3_ContractClassResponse as ContractClassResponse, type index$3_ContractEntryPointFields as ContractEntryPointFields, type index$3_ContractFunction as ContractFunction, type index$3_ContractOptions as ContractOptions, type index$3_ContractVersion as ContractVersion, type index$3_DeclareAndDeployContractPayload as DeclareAndDeployContractPayload, type index$3_DeclareContractPayload as DeclareContractPayload, type index$3_DeclareContractResponse as DeclareContractResponse, type index$3_DeclareContractTransaction as DeclareContractTransaction, type index$3_DeclareDeployUDCResponse as DeclareDeployUDCResponse, type index$3_DeclareSignerDetails as DeclareSignerDetails, type index$3_DeclareTransactionReceiptResponse as DeclareTransactionReceiptResponse, type index$3_DeclaredTransaction as DeclaredTransaction, type index$3_DeployAccountContractPayload as DeployAccountContractPayload, type index$3_DeployAccountContractTransaction as DeployAccountContractTransaction, type index$3_DeployAccountSignerDetails as DeployAccountSignerDetails, type index$3_DeployAccountTransactionReceiptResponse as DeployAccountTransactionReceiptResponse, type index$3_DeployAndInvokeTransaction as DeployAndInvokeTransaction, type index$3_DeployContractResponse as DeployContractResponse, type index$3_DeployContractUDCResponse as DeployContractUDCResponse, type index$3_DeployTransaction as DeployTransaction, type index$3_DeployTransactionReceiptResponse as DeployTransactionReceiptResponse, type index$3_DeployedAccountTransaction as DeployedAccountTransaction, type index$3_Details as Details, index$3_EDAMode as EDAMode, index$3_EDataAvailabilityMode as EDataAvailabilityMode, index$3_ETH_ADDRESS as ETH_ADDRESS, index$3_ETransactionExecutionStatus as ETransactionExecutionStatus, index$3_ETransactionStatus as ETransactionStatus, index$3_ETransactionVersion as ETransactionVersion, index$3_ETransactionVersion2 as ETransactionVersion2, index$3_ETransactionVersion3 as ETransactionVersion3, type index$3_EVENTS_CHUNK as EVENTS_CHUNK, type index$3_EmittedEvent as EmittedEvent, type index$3_EntryPointType as EntryPointType, type index$3_EntryPointsByType as EntryPointsByType, type index$3_EstimateFee as EstimateFee, type index$3_EstimateFeeAction as EstimateFeeAction, type index$3_EstimateFeeBulk as EstimateFeeBulk, type index$3_EstimateFeeDetails as EstimateFeeDetails, type index$3_EstimateFeeResponse as EstimateFeeResponse, type index$3_EstimateFeeResponseBulk as EstimateFeeResponseBulk, type Event$1 as Event, type index$3_EventEntry as EventEntry, type index$3_EventFilter as EventFilter, type index$3_ExecutableDeployAndInvokeTransaction as ExecutableDeployAndInvokeTransaction, type index$3_ExecutableDeployTransaction as ExecutableDeployTransaction, type index$3_ExecutableInvokeTransaction as ExecutableInvokeTransaction, type index$3_ExecutableUserInvoke as ExecutableUserInvoke, type index$3_ExecutableUserTransaction as ExecutableUserTransaction, type index$3_ExecutionParameters as ExecutionParameters, type index$3_FEE_ESTIMATE as FEE_ESTIMATE, type index$3_FELT as FELT, type index$3_FeeEstimate as FeeEstimate, type index$3_FeeMarginPercentage as FeeMarginPercentage, type index$3_FeeMode as FeeMode, type index$3_FunctionAbi as FunctionAbi, type index$3_GetBlockResponse as GetBlockResponse, type index$3_GetTransactionReceiptResponse as GetTransactionReceiptResponse, type index$3_GetTransactionResponse as GetTransactionResponse, type index$3_GetTxReceiptResponseWithoutHelper as GetTxReceiptResponseWithoutHelper, type index$3_HexCalldata as HexCalldata, type index$3_InterfaceAbi as InterfaceAbi, type index$3_Invocation as Invocation, type index$3_Invocations as Invocations, type index$3_InvocationsDetails as InvocationsDetails, type index$3_InvocationsDetailsWithNonce as InvocationsDetailsWithNonce, type index$3_InvocationsSignerDetails as InvocationsSignerDetails, type index$3_InvokeFunctionResponse as InvokeFunctionResponse, type index$3_InvokeOptions as InvokeOptions, type index$3_InvokeTransaction as InvokeTransaction, type index$3_InvokeTransactionReceiptResponse as InvokeTransactionReceiptResponse, type index$3_InvokedTransaction as InvokedTransaction, type index$3_L1HandlerTransactionReceiptResponse as L1HandlerTransactionReceiptResponse, type index$3_L1Message as L1Message, type index$3_L1_HANDLER_TXN as L1_HANDLER_TXN, type index$3_LedgerPathCalculation as LedgerPathCalculation, type index$3_LegacyCompiledContract as LegacyCompiledContract, type index$3_LegacyContractClass as LegacyContractClass, type index$3_LegacyEvent as LegacyEvent, type index$3_Literal as Literal, type index$3_Methods as Methods, type index$3_MultiDeployContractResponse as MultiDeployContractResponse, type index$3_MultiType as MultiType, index$3_NON_ZERO_PREFIX as NON_ZERO_PREFIX, type index$3_Nonce as Nonce, type index$3_OptionalPayload as OptionalPayload, type index$3_OutsideCall as OutsideCall, type index$3_OutsideExecution as OutsideExecution, type index$3_OutsideExecutionOptions as OutsideExecutionOptions, index$3_OutsideExecutionTypesV1 as OutsideExecutionTypesV1, index$3_OutsideExecutionTypesV2 as OutsideExecutionTypesV2, type index$3_OutsideExecutionVersion as OutsideExecutionVersion, type index$3_OutsideTransaction as OutsideTransaction, type index$3_PENDING_DECLARE_TXN_RECEIPT as PENDING_DECLARE_TXN_RECEIPT, type index$3_PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT as PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT, type index$3_PENDING_INVOKE_TXN_RECEIPT as PENDING_INVOKE_TXN_RECEIPT, type index$3_PENDING_L1_HANDLER_TXN_RECEIPT as PENDING_L1_HANDLER_TXN_RECEIPT, type index$3_PENDING_STATE_UPDATE as PENDING_STATE_UPDATE, type index$3_PRICE_UNIT as PRICE_UNIT, type index$3_ParsedEvent as ParsedEvent, type index$3_ParsedEvents as ParsedEvents, type index$3_ParsedStruct as ParsedStruct, type index$3_PaymasterDetails as PaymasterDetails, type index$3_PaymasterFeeEstimate as PaymasterFeeEstimate, type index$3_PaymasterOptions as PaymasterOptions, type index$3_PaymasterRpcOptions as PaymasterRpcOptions, type index$3_PaymasterTimeBounds as PaymasterTimeBounds, type index$3_PendingBlock as PendingBlock, type index$3_PendingReceipt as PendingReceipt, type index$3_PendingStateUpdate as PendingStateUpdate, type index$3_PreparedDeployAndInvokeTransaction as PreparedDeployAndInvokeTransaction, type index$3_PreparedDeployTransaction as PreparedDeployTransaction, type index$3_PreparedInvokeTransaction as PreparedInvokeTransaction, type index$3_PreparedTransaction as PreparedTransaction, type index$3_Program as Program, type index$3_ProviderOptions as ProviderOptions, type index$3_PythonicHints as PythonicHints, type index$3_RESOURCE_PRICE as RESOURCE_PRICE, index$4 as RPC, type index$3_RPC_ERROR as RPC_ERROR, type index$3_RPC_ERROR_SET as RPC_ERROR_SET, type index$3_RawArgs as RawArgs, type index$3_RawArgsArray as RawArgsArray, type index$3_RawArgsObject as RawArgsObject, type index$3_RawCalldata as RawCalldata, type index$3_Receipt as Receipt, type index$3_RequiredKeysOf as RequiredKeysOf, type index$3_ResourceBounds as ResourceBounds, type index$3_ResourceBoundsOverhead as ResourceBoundsOverhead, type index$3_ResourceBoundsOverheadRPC07 as ResourceBoundsOverheadRPC07, type index$3_ResourceBoundsOverheadRPC08 as ResourceBoundsOverheadRPC08, type index$3_Result as Result, type index$3_RevertedTransactionReceiptResponse as RevertedTransactionReceiptResponse, type index$3_RpcProviderOptions as RpcProviderOptions, type index$3_SIMULATION_FLAG as SIMULATION_FLAG, type index$3_STATE_UPDATE as STATE_UPDATE, type index$3_SierraContractClass as SierraContractClass, type index$3_SierraContractEntryPointFields as SierraContractEntryPointFields, type index$3_SierraEntryPointsByType as SierraEntryPointsByType, type index$3_SierraProgramDebugInfo as SierraProgramDebugInfo, type index$3_Signature as Signature, type index$3_Simplify as Simplify, type index$3_SimulateTransaction as SimulateTransaction, type index$3_SimulateTransactionDetails as SimulateTransactionDetails, type index$3_SimulateTransactionResponse as SimulateTransactionResponse, type index$3_SimulatedTransaction as SimulatedTransaction, type index$3_SimulationFlags as SimulationFlags, type index$3_StarkProfile as StarkProfile, index$3_StarknetDomain as StarknetDomain, index$3_StarknetEnumType as StarknetEnumType, index$3_StarknetMerkleType as StarknetMerkleType, index$3_StarknetType as StarknetType, type index$3_StateUpdate as StateUpdate, type index$3_StateUpdateResponse as StateUpdateResponse, type index$3_Storage as Storage, type index$3_SubscriptionBlockIdentifier as SubscriptionBlockIdentifier, type index$3_SuccessfulTransactionReceiptResponse as SuccessfulTransactionReceiptResponse, type index$3_TRANSACTION_TRACE as TRANSACTION_TRACE, type index$3_TXN_EXECUTION_STATUS as TXN_EXECUTION_STATUS, type index$3_TXN_HASH as TXN_HASH, type index$3_TXN_STATUS as TXN_STATUS, type index$3_TokenData as TokenData, type index$3_TransactionExecutionStatus as TransactionExecutionStatus, type index$3_TransactionFinalityStatus as TransactionFinalityStatus, type index$3_TransactionReceipt as TransactionReceipt, type index$3_TransactionReceiptCallbacks as TransactionReceiptCallbacks, type index$3_TransactionReceiptCallbacksDefault as TransactionReceiptCallbacksDefault, type index$3_TransactionReceiptCallbacksDefined as TransactionReceiptCallbacksDefined, type index$3_TransactionReceiptStatus as TransactionReceiptStatus, type index$3_TransactionReceiptValue as TransactionReceiptValue, type index$3_TransactionStatus as TransactionStatus, type index$3_TransactionStatusReceiptSets as TransactionStatusReceiptSets, type index$3_TransactionType as TransactionType, type index$3_TransactionWithHash as TransactionWithHash, type index$3_Tupled as Tupled, index$3_TypedData as TypedData, index$3_TypedDataRevision as TypedDataRevision, type index$3_Uint as Uint, type index$3_Uint256 as Uint256, type index$3_Uint512 as Uint512, type index$3_UniversalDeployerContractPayload as UniversalDeployerContractPayload, type index$3_UniversalDetails as UniversalDetails, type index$3_UniversalSuggestedFee as UniversalSuggestedFee, type index$3_UserInvoke as UserInvoke, type index$3_UserTransaction as UserTransaction, type index$3_V2DeclareSignerDetails as V2DeclareSignerDetails, type index$3_V2DeployAccountSignerDetails as V2DeployAccountSignerDetails, type index$3_V2InvocationsSignerDetails as V2InvocationsSignerDetails, type index$3_V3DeclareSignerDetails as V3DeclareSignerDetails, type index$3_V3DeployAccountSignerDetails as V3DeployAccountSignerDetails, type index$3_V3InvocationsSignerDetails as V3InvocationsSignerDetails, type index$3_V3TransactionDetails as V3TransactionDetails, type index$3_ValidateType as ValidateType, type index$3_WeierstrassSignatureType as WeierstrassSignatureType, type index$3_getContractVersionOptions as getContractVersionOptions, type index$3_getEstimateFeeBulkOptions as getEstimateFeeBulkOptions, type index$3_getSimulateTransactionOptions as getSimulateTransactionOptions, index$3_isRPC08_FeeEstimate as isRPC08_FeeEstimate, index$3_isRPC08_ResourceBounds as isRPC08_ResourceBounds, type index$3_waitForTransactionOptions as waitForTransactionOptions };
1384
1523
  }
1385
1524
 
1386
1525
  declare const LogLevelIndex: {
@@ -1705,10 +1844,10 @@ type _TransactionHashPrefix = ValuesType<typeof _TransactionHashPrefix>;
1705
1844
  * dot format rpc versions
1706
1845
  */
1707
1846
  declare const _SupportedRpcVersion: {
1708
- readonly 0.7: "0.7";
1709
- readonly 0.8: "0.8";
1710
- readonly v07: "0.7";
1711
- readonly v08: "0.8";
1847
+ readonly '0.7.1': "0.7.1";
1848
+ readonly '0.8.1': "0.8.1";
1849
+ readonly v0_7_1: "0.7.1";
1850
+ readonly v0_8_1: "0.8.1";
1712
1851
  };
1713
1852
  type _SupportedRpcVersion = ValuesType<typeof _SupportedRpcVersion>;
1714
1853
 
@@ -1719,15 +1858,23 @@ declare const DEFAULT_GLOBAL_CONFIG: {
1719
1858
  rpcVersion: _SupportedRpcVersion;
1720
1859
  transactionVersion: SupportedTransactionVersion;
1721
1860
  feeMarginPercentage: FeeMarginPercentage;
1861
+ fetch: any;
1862
+ websocket: any;
1722
1863
  };
1723
1864
  declare const RPC_DEFAULT_NODES: {
1724
1865
  readonly SN_MAIN: readonly ["https://starknet-mainnet.public.blastapi.io/rpc/", "https://free-rpc.nethermind.io/mainnet-juno/"];
1725
1866
  readonly SN_SEPOLIA: readonly ["https://starknet-sepolia.public.blastapi.io/rpc/", "https://free-rpc.nethermind.io/sepolia-juno/"];
1726
1867
  };
1868
+ declare const PAYMASTER_RPC_NODES: {
1869
+ readonly SN_MAIN: readonly ["https://starknet.paymaster.avnu.fi"];
1870
+ readonly SN_SEPOLIA: readonly ["https://sepolia.paymaster.avnu.fi"];
1871
+ };
1727
1872
  declare const SYSTEM_MESSAGES: {
1728
1873
  legacyTxWarningMessage: string;
1729
1874
  legacyTxRPC08Message: string;
1730
1875
  SWOldV3: string;
1876
+ channelVersionMismatch: string;
1877
+ unsupportedSpecVersion: string;
1731
1878
  };
1732
1879
 
1733
1880
  declare const constants_ADDR_BOUND: typeof ADDR_BOUND;
@@ -1740,6 +1887,7 @@ declare const constants_MASK_250: typeof MASK_250;
1740
1887
  declare const constants_MASK_31: typeof MASK_31;
1741
1888
  declare const constants_MAX_STORAGE_ITEM_SIZE: typeof MAX_STORAGE_ITEM_SIZE;
1742
1889
  declare const constants_OutsideExecutionCallerAny: typeof OutsideExecutionCallerAny;
1890
+ declare const constants_PAYMASTER_RPC_NODES: typeof PAYMASTER_RPC_NODES;
1743
1891
  declare const constants_PRIME: typeof PRIME;
1744
1892
  declare const constants_RANGE_FELT: typeof RANGE_FELT;
1745
1893
  declare const constants_RANGE_I128: typeof RANGE_I128;
@@ -1754,11 +1902,15 @@ declare const constants_TRANSACTION_VERSION: typeof TRANSACTION_VERSION;
1754
1902
  declare const constants_UDC: typeof UDC;
1755
1903
  declare const constants_ZERO: typeof ZERO;
1756
1904
  declare namespace constants {
1757
- export { constants_ADDR_BOUND as ADDR_BOUND, constants_API_VERSION as API_VERSION, _BaseUrl as BaseUrl, constants_DEFAULT_GLOBAL_CONFIG as DEFAULT_GLOBAL_CONFIG, constants_HARDENING_4BYTES as HARDENING_4BYTES, constants_HARDENING_BYTE as HARDENING_BYTE, constants_IS_BROWSER as IS_BROWSER, constants_MASK_250 as MASK_250, constants_MASK_31 as MASK_31, constants_MAX_STORAGE_ITEM_SIZE as MAX_STORAGE_ITEM_SIZE, _NetworkName as NetworkName, constants_OutsideExecutionCallerAny as OutsideExecutionCallerAny, constants_PRIME as PRIME, constants_RANGE_FELT as RANGE_FELT, constants_RANGE_I128 as RANGE_I128, constants_RANGE_U128 as RANGE_U128, constants_RPC_DEFAULT_NODES as RPC_DEFAULT_NODES, constants_SNIP9_V1_INTERFACE_ID as SNIP9_V1_INTERFACE_ID, constants_SNIP9_V2_INTERFACE_ID as SNIP9_V2_INTERFACE_ID, constants_SYSTEM_MESSAGES as SYSTEM_MESSAGES, _StarknetChainId as StarknetChainId, _SupportedRpcVersion as SupportedRpcVersion, type constants_SupportedTransactionVersion as SupportedTransactionVersion, constants_TEXT_TO_FELT_MAX_LEN as TEXT_TO_FELT_MAX_LEN, constants_TRANSACTION_VERSION as TRANSACTION_VERSION, _TransactionHashPrefix as TransactionHashPrefix, constants_UDC as UDC, constants_ZERO as ZERO };
1905
+ export { constants_ADDR_BOUND as ADDR_BOUND, constants_API_VERSION as API_VERSION, _BaseUrl as BaseUrl, constants_DEFAULT_GLOBAL_CONFIG as DEFAULT_GLOBAL_CONFIG, constants_HARDENING_4BYTES as HARDENING_4BYTES, constants_HARDENING_BYTE as HARDENING_BYTE, constants_IS_BROWSER as IS_BROWSER, constants_MASK_250 as MASK_250, constants_MASK_31 as MASK_31, constants_MAX_STORAGE_ITEM_SIZE as MAX_STORAGE_ITEM_SIZE, _NetworkName as NetworkName, constants_OutsideExecutionCallerAny as OutsideExecutionCallerAny, constants_PAYMASTER_RPC_NODES as PAYMASTER_RPC_NODES, constants_PRIME as PRIME, constants_RANGE_FELT as RANGE_FELT, constants_RANGE_I128 as RANGE_I128, constants_RANGE_U128 as RANGE_U128, constants_RPC_DEFAULT_NODES as RPC_DEFAULT_NODES, constants_SNIP9_V1_INTERFACE_ID as SNIP9_V1_INTERFACE_ID, constants_SNIP9_V2_INTERFACE_ID as SNIP9_V2_INTERFACE_ID, constants_SYSTEM_MESSAGES as SYSTEM_MESSAGES, _StarknetChainId as StarknetChainId, _SupportedRpcVersion as SupportedRpcVersion, type constants_SupportedTransactionVersion as SupportedTransactionVersion, constants_TEXT_TO_FELT_MAX_LEN as TEXT_TO_FELT_MAX_LEN, constants_TRANSACTION_VERSION as TRANSACTION_VERSION, _TransactionHashPrefix as TransactionHashPrefix, constants_UDC as UDC, constants_ZERO as ZERO };
1758
1906
  }
1759
1907
 
1760
1908
  declare class RpcChannel$1 {
1761
- readonly id = "RPC07";
1909
+ readonly id = "RPC071";
1910
+ /**
1911
+ * RPC specification version this Channel class implements
1912
+ */
1913
+ readonly channelSpecVersion: _SupportedRpcVersion;
1762
1914
  nodeUrl: string;
1763
1915
  headers: object;
1764
1916
  requestId: number;
@@ -1766,12 +1918,15 @@ declare class RpcChannel$1 {
1766
1918
  readonly retries: number;
1767
1919
  readonly waitMode: boolean;
1768
1920
  private chainId?;
1921
+ /**
1922
+ * RPC specification version of the connected node
1923
+ */
1769
1924
  private specVersion?;
1770
1925
  private transactionRetryIntervalFallback?;
1771
1926
  private batchClient?;
1772
1927
  private baseFetch;
1773
1928
  constructor(optionsOrProvider?: RpcProviderOptions);
1774
- readSpecVersion(): "0.7" | "0.8" | undefined;
1929
+ readSpecVersion(): "0.7.1" | "0.8.1" | undefined;
1775
1930
  private get transactionRetryIntervalDefault();
1776
1931
  setChainId(chainId: _StarknetChainId): void;
1777
1932
  fetch(method: string, params?: object, id?: string | number): Promise<Response>;
@@ -1779,15 +1934,15 @@ declare class RpcChannel$1 {
1779
1934
  protected fetchEndpoint<T extends keyof RPCSPEC07.Methods>(method: T, params?: RPCSPEC07.Methods[T]['params']): Promise<RPCSPEC07.Methods[T]['result']>;
1780
1935
  getChainId(): Promise<"0x534e5f4d41494e" | "0x534e5f5345504f4c4941">;
1781
1936
  /**
1782
- * fetch if undefined else just return this.specVersion
1783
- * return this.specVersion as 'M.m'
1784
- * @example this.specVersion = "0.8"
1937
+ * fetch rpc node specVersion
1938
+ * @example this.specVersion = "0.7.1"
1785
1939
  */
1786
- getSpecVersion(): Promise<"0.7" | "0.8">;
1940
+ getSpecVersion(): Promise<string>;
1787
1941
  /**
1788
- * fetch spec version in extended format "M.m.p-?"
1942
+ * fetch if undefined test and set specVersion, else just return this.specVersion
1943
+ * @example this.specVersion = "0.7.1"
1789
1944
  */
1790
- getSpecificationVersion(): Promise<string>;
1945
+ setUpSpecVersion(): Promise<"0.7.1" | "0.8.1">;
1791
1946
  getNonceForAddress(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
1792
1947
  /**
1793
1948
  * Get the most recent accepted block hash and number
@@ -1849,12 +2004,16 @@ declare class RpcChannel$1 {
1849
2004
  buildTransaction(invocation: AccountInvocationItem, versionType?: 'fee' | 'transaction'): RPCSPEC07.BaseTransaction;
1850
2005
  }
1851
2006
 
1852
- declare namespace rpc_0_7 {
2007
+ declare namespace rpc_0_7_1 {
1853
2008
  export { RpcChannel$1 as RpcChannel };
1854
2009
  }
1855
2010
 
1856
2011
  declare class RpcChannel {
1857
- readonly id = "RPC08";
2012
+ readonly id = "RPC081";
2013
+ /**
2014
+ * RPC specification version this Channel class implements
2015
+ */
2016
+ readonly channelSpecVersion: _SupportedRpcVersion;
1858
2017
  nodeUrl: string;
1859
2018
  headers: object;
1860
2019
  requestId: number;
@@ -1862,12 +2021,15 @@ declare class RpcChannel {
1862
2021
  readonly retries: number;
1863
2022
  readonly waitMode: boolean;
1864
2023
  private chainId?;
2024
+ /**
2025
+ * RPC specification version of the connected node
2026
+ */
1865
2027
  private specVersion?;
1866
2028
  private transactionRetryIntervalFallback?;
1867
2029
  private batchClient?;
1868
2030
  private baseFetch;
1869
2031
  constructor(optionsOrProvider?: RpcProviderOptions);
1870
- readSpecVersion(): "0.7" | "0.8" | undefined;
2032
+ readSpecVersion(): "0.7.1" | "0.8.1" | undefined;
1871
2033
  private get transactionRetryIntervalDefault();
1872
2034
  setChainId(chainId: _StarknetChainId): void;
1873
2035
  fetch(method: string, params?: object, id?: string | number): Promise<Response>;
@@ -1875,22 +2037,22 @@ declare class RpcChannel {
1875
2037
  protected fetchEndpoint<T extends keyof RPCSPEC08.Methods>(method: T, params?: RPCSPEC08.Methods[T]['params']): Promise<RPCSPEC08.Methods[T]['result']>;
1876
2038
  getChainId(): Promise<"0x534e5f4d41494e" | "0x534e5f5345504f4c4941">;
1877
2039
  /**
1878
- * Given an l1 tx hash, returns the associated l1_handler tx hashes and statuses for all L1 -> L2 messages sent by the l1 transaction, ordered by the l1 tx sending order
2040
+ * fetch rpc node specVersion
2041
+ * @example this.specVersion = "0.7.1"
1879
2042
  */
1880
- getMessagesStatus(txHash: BigNumberish): Promise<RPCSPEC08.L1L2MessagesStatus>;
1881
- getStorageProof(classHashes?: BigNumberish[], contractAddresses?: BigNumberish[], contractsStorageKeys?: RPCSPEC08.CONTRACT_STORAGE_KEYS[], // TODO: allow BigNUmberish[] and fix formatting before request
1882
- blockIdentifier?: BlockIdentifier): Promise<RPCSPEC08.StorageProof>;
1883
- getCompiledCasm(classHash: BigNumberish): Promise<RPCSPEC08.CASM_COMPILED_CONTRACT_CLASS>;
2043
+ getSpecVersion(): Promise<string>;
1884
2044
  /**
1885
2045
  * fetch if undefined else just return this.specVersion
1886
- * return this.specVersion as 'M.m'
1887
- * @example this.specVersion = "0.8"
2046
+ * @example this.specVersion = "0.8.1"
1888
2047
  */
1889
- getSpecVersion(): Promise<"0.7" | "0.8">;
2048
+ setUpSpecVersion(): Promise<"0.7.1" | "0.8.1">;
1890
2049
  /**
1891
- * fetch spec version in extended format "M.m.p-?"
2050
+ * Given an l1 tx hash, returns the associated l1_handler tx hashes and statuses for all L1 -> L2 messages sent by the l1 transaction, ordered by the l1 tx sending order
1892
2051
  */
1893
- getSpecificationVersion(): Promise<string>;
2052
+ getMessagesStatus(txHash: BigNumberish): Promise<RPCSPEC08.L1L2MessagesStatus>;
2053
+ getStorageProof(classHashes?: BigNumberish[], contractAddresses?: BigNumberish[], contractsStorageKeys?: RPCSPEC08.CONTRACT_STORAGE_KEYS[], // TODO: allow BigNUmberish[] and fix formatting before request
2054
+ blockIdentifier?: BlockIdentifier): Promise<RPCSPEC08.StorageProof>;
2055
+ getCompiledCasm(classHash: BigNumberish): Promise<RPCSPEC08.CASM_COMPILED_CONTRACT_CLASS>;
1894
2056
  getNonceForAddress(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
1895
2057
  /**
1896
2058
  * Get the most recent accepted block hash and number
@@ -1985,10 +2147,10 @@ declare class RpcChannel {
1985
2147
  buildTransaction(invocation: AccountInvocationItem, versionType?: 'fee' | 'transaction'): RPCSPEC08.BaseTransaction;
1986
2148
  }
1987
2149
 
1988
- type rpc_0_8_RpcChannel = RpcChannel;
1989
- declare const rpc_0_8_RpcChannel: typeof RpcChannel;
1990
- declare namespace rpc_0_8 {
1991
- export { rpc_0_8_RpcChannel as RpcChannel };
2150
+ type rpc_0_8_1_RpcChannel = RpcChannel;
2151
+ declare const rpc_0_8_1_RpcChannel: typeof RpcChannel;
2152
+ declare namespace rpc_0_8_1 {
2153
+ export { rpc_0_8_1_RpcChannel as RpcChannel };
1992
2154
  }
1993
2155
 
1994
2156
  declare const WSSubscriptions: {
@@ -2005,9 +2167,10 @@ type WebSocketOptions = {
2005
2167
  */
2006
2168
  nodeUrl?: string;
2007
2169
  /**
2008
- * You can provide websocket object defined by protocol standard else library will use default 'isows'/'ws' package
2009
- * https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/WebSocket#protocols .
2010
- * https://www.rfc-editor.org/rfc/rfc6455.html#section-1 .
2170
+ * This parameter should be used when working in an environment without native WebSocket support by providing
2171
+ * an equivalent WebSocket object that conforms to the protocol, e.g. from the 'isows' and/or 'ws' modules
2172
+ * * https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/WebSocket#protocols .
2173
+ * * https://www.rfc-editor.org/rfc/rfc6455.html#section-1 .
2011
2174
  * @default WebSocket
2012
2175
  */
2013
2176
  websocket?: WebSocket;
@@ -2523,13 +2686,17 @@ declare class RpcProvider$1 implements ProviderInterface {
2523
2686
  fetch(method: string, params?: object, id?: string | number): Promise<Response>;
2524
2687
  getChainId(): Promise<"0x534e5f4d41494e" | "0x534e5f5345504f4c4941">;
2525
2688
  /**
2526
- * return spec version in format "M.m"
2689
+ * read channel spec version
2690
+ */
2691
+ readSpecVersion(): "0.7.1" | "0.8.1" | undefined;
2692
+ /**
2693
+ * get channel spec version
2527
2694
  */
2528
- getSpecVersion(): Promise<"0.7" | "0.8">;
2695
+ getSpecVersion(): Promise<string>;
2529
2696
  /**
2530
- * @returns return spec version in format 'M.m.p-rc'
2697
+ * setup channel spec version and return it
2531
2698
  */
2532
- getSpecificationVersion(): Promise<string>;
2699
+ setUpSpecVersion(): Promise<"0.7.1" | "0.8.1">;
2533
2700
  getNonceForAddress(contractAddress: BigNumberish, blockIdentifier?: BlockIdentifier): Promise<string>;
2534
2701
  getBlock(): Promise<PendingBlock>;
2535
2702
  getBlock(blockIdentifier: 'pending'): Promise<PendingBlock>;
@@ -2677,15 +2844,15 @@ declare class RpcProvider$1 implements ProviderInterface {
2677
2844
  /**
2678
2845
  * Given an l1 tx hash, returns the associated l1_handler tx hashes and statuses for all L1 -> L2 messages sent by the l1 transaction, ordered by the l1 tx sending order
2679
2846
  */
2680
- getL1MessagesStatus(transactionHash: BigNumberish): void;
2847
+ getL1MessagesStatus(transactionHash: BigNumberish): Promise<L1L2MessagesStatus>;
2681
2848
  /**
2682
2849
  * Get merkle paths in one of the state tries: global state, classes, individual contract
2683
2850
  */
2684
- getStorageProof(classHashes: BigNumberish[], contractAddresses: BigNumberish[], contractsStorageKeys: CONTRACT_STORAGE_KEYS[], blockIdentifier?: BlockIdentifier): void;
2851
+ getStorageProof(classHashes: BigNumberish[], contractAddresses: BigNumberish[], contractsStorageKeys: CONTRACT_STORAGE_KEYS[], blockIdentifier?: BlockIdentifier): Promise<StorageProof>;
2685
2852
  /**
2686
2853
  * Get the contract class definition in the given block associated with the given hash
2687
2854
  */
2688
- getCompiledCasm(classHash: BigNumberish): void;
2855
+ getCompiledCasm(classHash: BigNumberish): Promise<CASM_COMPILED_CONTRACT_CLASS>;
2689
2856
  }
2690
2857
 
2691
2858
  declare class StarknetId {
@@ -2716,7 +2883,7 @@ declare class RpcError<BaseErrorT extends RPC_ERROR = RPC_ERROR> extends Library
2716
2883
  params: any;
2717
2884
  };
2718
2885
  constructor(baseError: BaseErrorT, method: string, params: any);
2719
- get code(): 1 | 31 | 10 | 20 | 21 | 24 | 27 | 28 | 29 | 32 | 33 | 34 | 40 | 41 | 42 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 66 | 67 | 68 | 100;
2886
+ get code(): 1 | 31 | 10 | 66 | 20 | 32 | 21 | 24 | 27 | 28 | 29 | 33 | 34 | 40 | 41 | 42 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 67 | 68 | 100 | 150 | 151 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 163;
2720
2887
  /**
2721
2888
  * Verifies the underlying RPC error, also serves as a type guard for the _baseError_ property
2722
2889
  * @example
@@ -3290,6 +3457,167 @@ declare class LedgerSigner221<Transport extends Record<any, any> = any> extends
3290
3457
  */
3291
3458
  declare function getLedgerPathBuffer221(accountId: number, applicationName?: string): Uint8Array;
3292
3459
 
3460
+ /**
3461
+ * Signer for accounts using a Ledger Nano S+/X signature (Starknet Ledger APP version 2.3.1).
3462
+ *
3463
+ * The Ledger has to be connected, unlocked and the Starknet APP has to be selected prior of use of this class.
3464
+ */
3465
+ declare class LedgerSigner231<Transport extends Record<any, any> = any> extends LedgerSigner221 implements SignerInterface {
3466
+ /**
3467
+ * constructor of the LedgerSigner class.
3468
+ * @param {Transport} transport 5 transports are available to handle USB, bluetooth, Node, Web, Mobile.
3469
+ * See Guides for more details.
3470
+ * @param {number} accountID ID of Ledger Nano account (can handle 2**31 accounts).
3471
+ * @param {string} [eip2645application='LedgerW'] A wallet is defined by an ERC2645 derivation path (6 items).
3472
+ * One item is called `application` and can be customized.
3473
+ * Default value is `LedgerW`.
3474
+ * @param {LedgerPathCalculation} [pathFunction=getLedgerPathBuffer221]
3475
+ * defines the function that will calculate the path. By default `getLedgerPathBuffer221` is selected.
3476
+ *
3477
+ * If you are using APP v2.3.1 with an account created with the v1.1.1, you need to use :
3478
+ * ```typescript
3479
+ * const myLedgerSigner = new LedgerSigner231(myNodeTransport, 0, undefined, getLedgerPathBuffer111);
3480
+ * ```
3481
+ * @example
3482
+ * ```typescript
3483
+ * import TransportNodeHid from "@ledgerhq/hw-transport-node-hid";
3484
+ * const myNodeTransport = await TransportNodeHid.create();
3485
+ * const myLedgerSigner = new LedgerSigner231(myNodeTransport, 0);
3486
+ * ```
3487
+ */
3488
+ constructor(transport: Transport, accountID: number, eip2645application?: string, pathFunction?: LedgerPathCalculation);
3489
+ /**
3490
+ * Ask the Ledger Nano to display and sign a Starknet V1 transaction.
3491
+ * @param {V2InvocationsSignerDetails} txDetails All the details needed for a txV1.
3492
+ * @param {Call[]} calls array of Starknet invocations
3493
+ * @returns an object including the transaction Hash and the signature
3494
+ * @example
3495
+ * ```typescript
3496
+ * const calls: Call[] = [{contractAddress: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
3497
+ * entrypoint: "transfer",
3498
+ * calldata:["0x11f5fc2a92ac03434a7937fe982f5e5293b65ad438a989c5b78fb8f04a12016",
3499
+ * "0x9184e72a000", "0x0"]}];
3500
+ * const txDet: V2InvocationsSignerDetails = {
3501
+ * walletAddress: txDetails.accountAddress,
3502
+ * chainId: constants.StarknetChainId.SN_MAIN,
3503
+ * cairoVersion: "1", maxFee: txDetails.max_fee,
3504
+ * nonce: txDetails.nonce, version: "0x1"
3505
+ * };
3506
+ * const res = await myLedgerSigner.signTxV1(txDet, calls);
3507
+ * // res = {hash:
3508
+ * // signature:
3509
+ * // }
3510
+ * ```
3511
+ */
3512
+ signTxV1(txDetails: V2InvocationsSignerDetails, calls: Call[]): Promise<{
3513
+ hash: bigint;
3514
+ signature: Signature;
3515
+ }>;
3516
+ /**
3517
+ * Ask to the Ledger Nano to display and sign a Starknet V3 transaction (Rpc 0.7 & Rpc 0.8).
3518
+ * @param {V3InvocationsSignerDetails} txDetails All the details needed for a txV3.
3519
+ * @param {Call[]} calls array of Starknet invocations
3520
+ * @returns an object including the transaction Hash and the signature
3521
+ * @example
3522
+ * ```typescript
3523
+ * const calls: Call[] = [{contractAddress: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
3524
+ * entrypoint: "transfer",
3525
+ * calldata:["0x11f5fc2a92ac03434a7937fe982f5e5293b65ad438a989c5b78fb8f04a12016",
3526
+ * "0x9184e72a000", "0x0"]}];
3527
+ * const txDetailsV3: V3InvocationsSignerDetails = {
3528
+ * chainId: constants.StarknetChainId.SN_MAIN,
3529
+ * nonce: "28", accountDeploymentData: [],
3530
+ * paymasterData: [], cairoVersion: "1",
3531
+ * feeDataAvailabilityMode: "L1", nonceDataAvailabilityMode: "L1",
3532
+ * resourceBounds: {
3533
+ * l1_gas: { max_amount: "0x2a00", max_price_per_unit: "0x5c00000"
3534
+ * },
3535
+ * l2_gas: { max_amount: "0x00", max_price_per_unit: "0x00"},
3536
+ * }, tip: 0, version: "0x3", walletAddress: account0.address
3537
+ * }; // Rpc 0.7 transaction.
3538
+ * const res = await myLedgerSigner.signTxV3(txDetailsV3, calls);
3539
+ * // res = {hash:
3540
+ * // signature:
3541
+ * // }
3542
+ * ```
3543
+ */
3544
+ signTxV3(txDetails: V3InvocationsSignerDetails, calls: Call[]): Promise<{
3545
+ hash: bigint;
3546
+ signature: Signature;
3547
+ }>;
3548
+ /**
3549
+ * Ask the Ledger Nano to display and sign a Starknet V1 account deployment.
3550
+ * @param {V2DeployAccountSignerDetails} deployAccountDetail All the details needed for a V1 deploy account.
3551
+ * @returns an object including the transaction Hash and the signature
3552
+ * @example
3553
+ * ```typescript
3554
+ * const deployData: V2DeployAccountSignerDetails =
3555
+ * {
3556
+ * tip: 0, paymasterData: [], accountDeploymentData: [],
3557
+ * nonceDataAvailabilityMode: 'L1', feeDataAvailabilityMode: 'L1',
3558
+ * resourceBounds: {
3559
+ * l2_gas: { max_amount: '0x0', max_price_per_unit: '0x0' },
3560
+ * l1_gas: { max_amount: '0x0', max_price_per_unit: '0x0' }
3561
+ * },
3562
+ * classHash: '0x540d7f5ec7ecf317e68d48564934cb99259781b1ee3cedbbc37ec5337f8e688',
3563
+ * constructorCalldata: [
3564
+ * '89832696000889662999767022750851886674077821293893187900664573372145410755'
3565
+ * ],
3566
+ * contractAddress: '0x32c60fba64eb96831d064bbb2319375b7b7381543abe66da872e4344bcd72a0',
3567
+ * addressSalt: '0x0032d7efe2a9232f9b463e7206c68fdea4aeb13fec0cb308c6ba1d197d5922c3',
3568
+ * chainId: '0x534e5f5345504f4c4941', maxFee: 55050000000000n,
3569
+ * version: '0x1', nonce: 0n
3570
+ *}
3571
+ * const res = await myLedgerSigner.signDeployAccountV1(deployData);
3572
+ * // res = {hash:
3573
+ * // signature:
3574
+ * // }
3575
+ * ```
3576
+ */
3577
+ signDeployAccountV1(deployAccountDetail: V2DeployAccountSignerDetails): Promise<{
3578
+ hash: bigint;
3579
+ signature: Signature;
3580
+ }>;
3581
+ /**
3582
+ *Ask the Ledger Nano to display and sign a Starknet V3 account deployment (Rpc 0.7 & Rpc 0.8).
3583
+ * @param {V3DeployAccountSignerDetails} deployAccountDetail All the details needed for a V3 deploy account.
3584
+ * @returns an object including the transaction Hash and the signature
3585
+ * @example
3586
+ * ```typescript
3587
+ * const deployData: V3DeployAccountSignerDetails =
3588
+ * {
3589
+ * tip: 0, paymasterData: [], accountDeploymentData: [],
3590
+ * nonceDataAvailabilityMode: 'L1', feeDataAvailabilityMode: 'L1',
3591
+ * resourceBounds: {
3592
+ * l2_gas: { max_amount: '0x0', max_price_per_unit: '0x0' },
3593
+ * l1_gas: { max_amount: '0x226', max_price_per_unit: '0x22ecb25c00' }
3594
+ * },
3595
+ * classHash: '0x540d7f5ec7ecf317e68d48564934cb99259781b1ee3cedbbc37ec5337f8e688',
3596
+ * constructorCalldata: [
3597
+ * '3571125127744830445572285574469842579401255431821644822726857471463672199621'
3598
+ * ],
3599
+ * contractAddress: '0x4ca062add1cf12a107be1107af17981cf6e544a24d987693230ea481d3d5e34',
3600
+ * addressSalt: '0x07e52f68e3160e1ef698211cdf6d3792368fe347e7e2d4a8ace14d9b248f39c5',
3601
+ * chainId: '0x534e5f5345504f4c4941', maxFee: 0,
3602
+ * version: '0x3', nonce: 0n
3603
+ *} // Rpc 0.7 transaction.
3604
+ * const res = await myLedgerSigner.signDeployAccountV3(deployData);
3605
+ * // res = {hash:
3606
+ * // signature:
3607
+ * // }
3608
+ * ```
3609
+ */
3610
+ signDeployAccountV3(deployAccountDetail: V3DeployAccountSignerDetails): Promise<{
3611
+ hash: bigint;
3612
+ signature: Signature;
3613
+ }>;
3614
+ /** Internal function to convert a Call to an array of Uint8Array.
3615
+ * @param {Call} call A Call to convert.
3616
+ * @return {Uint8Array[]} Call encoded in an array of Uint8Array (each containing 7 u256).
3617
+ */
3618
+ protected encodeCall(call: Call): Uint8Array[];
3619
+ }
3620
+
3293
3621
  declare abstract class AccountInterface extends ProviderInterface {
3294
3622
  abstract address: string;
3295
3623
  abstract signer: SignerInterface;
@@ -3558,12 +3886,65 @@ declare abstract class AccountInterface extends ProviderInterface {
3558
3886
  abstract getNonce(blockIdentifier?: BlockIdentifier): Promise<Nonce>;
3559
3887
  }
3560
3888
 
3889
+ declare abstract class PaymasterInterface {
3890
+ abstract nodeUrl: string;
3891
+ abstract headers: object;
3892
+ abstract readonly baseFetch: NonNullable<RpcProviderOptions['baseFetch']>;
3893
+ /**
3894
+ * Returns the status of the paymaster service
3895
+ *
3896
+ * @returns If the paymaster service is correctly functioning, return true. Else, return false
3897
+ */
3898
+ abstract isAvailable(): Promise<boolean>;
3899
+ /**
3900
+ * Receives the transaction the user wants to execute. Returns the typed data along with
3901
+ * the estimated gas cost and the maximum gas cost suggested to ensure execution
3902
+ *
3903
+ * @param transaction Transaction to be executed by the paymaster
3904
+ * @param parameters Execution parameters to be used when executing the transaction
3905
+ * @returns The transaction data required for execution along with an estimation of the fee
3906
+ */
3907
+ abstract buildTransaction(transaction: UserTransaction, parameters: ExecutionParameters): Promise<PreparedTransaction>;
3908
+ /**
3909
+ * Sends the signed typed data to the paymaster service for execution
3910
+ *
3911
+ * @param transaction Typed data build by calling paymaster_buildTransaction signed by the user to be executed by the paymaster service
3912
+ * @param parameters Execution parameters to be used when executing the transaction
3913
+ * @returns The hash of the transaction broadcasted by the paymaster and the tracking ID corresponding to the user `execute` request
3914
+ */
3915
+ abstract executeTransaction(transaction: ExecutableUserTransaction, parameters: ExecutionParameters): Promise<PAYMASTER_API.ExecuteResponse>;
3916
+ /**
3917
+ * Get a list of the tokens that the paymaster supports, together with their prices in STRK
3918
+ *
3919
+ * @returns An array of token data
3920
+ */
3921
+ abstract getSupportedTokens(): Promise<TokenData[]>;
3922
+ }
3923
+
3924
+ declare class PaymasterRpc implements PaymasterInterface {
3925
+ nodeUrl: string;
3926
+ headers: object;
3927
+ readonly baseFetch: NonNullable<RpcProviderOptions['baseFetch']>;
3928
+ requestId: number;
3929
+ constructor(options?: PaymasterOptions | PaymasterInterface | PaymasterRpc);
3930
+ fetch(method: string, params?: object, id?: string | number): Promise<Response>;
3931
+ protected errorHandler(method: string, params: any, rpcError?: Error$1, otherError?: any): void;
3932
+ protected fetchEndpoint<T extends keyof PAYMASTER_API.Methods>(method: T, params?: PAYMASTER_API.Methods[T]['params']): Promise<PAYMASTER_API.Methods[T]['result']>;
3933
+ isAvailable(): Promise<boolean>;
3934
+ buildTransaction(transaction: UserTransaction, parameters: ExecutionParameters): Promise<PreparedTransaction>;
3935
+ executeTransaction(transaction: ExecutableUserTransaction, parameters: ExecutionParameters): Promise<PAYMASTER_API.ExecuteResponse>;
3936
+ getSupportedTokens(): Promise<TokenData[]>;
3937
+ }
3938
+
3939
+ declare const defaultPaymaster: PaymasterRpc;
3940
+
3561
3941
  declare class Account extends RpcProvider implements AccountInterface {
3562
3942
  signer: SignerInterface;
3563
3943
  address: string;
3564
3944
  cairoVersion: CairoVersion;
3565
3945
  readonly transactionVersion: typeof ETransactionVersion.V2 | typeof ETransactionVersion.V3;
3566
- constructor(providerOrOptions: ProviderOptions | ProviderInterface, address: string, pkOrSigner: Uint8Array | string | SignerInterface, cairoVersion?: CairoVersion, transactionVersion?: SupportedTransactionVersion);
3946
+ paymaster: PaymasterInterface;
3947
+ constructor(providerOrOptions: ProviderOptions | ProviderInterface, address: string, pkOrSigner: Uint8Array | string | SignerInterface, cairoVersion?: CairoVersion, transactionVersion?: SupportedTransactionVersion, paymaster?: PaymasterOptions | PaymasterInterface);
3567
3948
  /** @deprecated @hidden */
3568
3949
  static create(): Promise<never>;
3569
3950
  protected getPreferredVersion(type12: ETransactionVersion, type3: ETransactionVersion): RPCSPEC08.ETransactionVersion;
@@ -3582,6 +3963,9 @@ declare class Account extends RpcProvider implements AccountInterface {
3582
3963
  estimateFeeBulk(invocations: Invocations, details?: UniversalDetails): Promise<EstimateFeeBulk>;
3583
3964
  simulateTransaction(invocations: Invocations, details?: SimulateTransactionDetails): Promise<SimulateTransactionResponse>;
3584
3965
  execute(transactions: AllowArray<Call>, transactionsDetail?: UniversalDetails): Promise<InvokeFunctionResponse>;
3966
+ private buildPaymasterTransaction;
3967
+ estimatePaymasterTransactionFee(calls: Call[], paymasterDetails: PaymasterDetails): Promise<PaymasterFeeEstimate>;
3968
+ executePaymasterTransaction(calls: Call[], paymasterDetails: PaymasterDetails, maxFee?: BigNumberish): Promise<InvokeFunctionResponse>;
3585
3969
  /**
3586
3970
  * First check if contract is already declared, if not declare it
3587
3971
  * If contract already declared returned transaction_hash is ''.
@@ -3692,7 +4076,7 @@ interface StarknetWalletProvider extends StarknetWindowObject {
3692
4076
 
3693
4077
  declare class WalletAccount extends Account implements AccountInterface {
3694
4078
  walletProvider: StarknetWalletProvider;
3695
- constructor(providerOrOptions: ProviderOptions | ProviderInterface, walletProvider: StarknetWalletProvider, address: string, cairoVersion?: CairoVersion);
4079
+ constructor(providerOrOptions: ProviderOptions | ProviderInterface, walletProvider: StarknetWalletProvider, address: string, cairoVersion?: CairoVersion, paymaster?: PaymasterOptions | PaymasterInterface);
3696
4080
  /**
3697
4081
  * WALLET EVENTS
3698
4082
  */
@@ -3709,12 +4093,14 @@ declare class WalletAccount extends Account implements AccountInterface {
3709
4093
  /**
3710
4094
  * ACCOUNT METHODS
3711
4095
  */
3712
- execute(calls: AllowArray<Call>): Promise<RPCSPEC07.AddInvokeTransactionResult>;
4096
+ execute(calls: AllowArray<Call>, arg2?: Abi[] | UniversalDetails, transactionsDetail?: UniversalDetails): Promise<{
4097
+ transaction_hash: string;
4098
+ }>;
3713
4099
  declare(payload: DeclareContractPayload): Promise<RPCSPEC07.AddDeclareTransactionResult>;
3714
4100
  deploy(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[]): Promise<MultiDeployContractResponse>;
3715
4101
  signMessage(typedData: TypedData): Promise<Signature$1>;
3716
- static connect(provider: ProviderInterface, walletProvider: StarknetWalletProvider, cairoVersion?: CairoVersion, silentMode?: boolean): Promise<WalletAccount>;
3717
- static connectSilent(provider: ProviderInterface, walletProvider: StarknetWalletProvider, cairoVersion?: CairoVersion): Promise<WalletAccount>;
4102
+ static connect(provider: ProviderInterface, walletProvider: StarknetWalletProvider, cairoVersion?: CairoVersion, paymaster?: PaymasterOptions | PaymasterInterface, silentMode?: boolean): Promise<WalletAccount>;
4103
+ static connectSilent(provider: ProviderInterface, walletProvider: StarknetWalletProvider, cairoVersion?: CairoVersion, paymaster?: PaymasterOptions | PaymasterInterface): Promise<WalletAccount>;
3718
4104
  }
3719
4105
 
3720
4106
  declare module 'abi-wan-kanabi' {
@@ -5060,12 +5446,12 @@ declare function estimatedFeeToMaxFee(estimatedFee: BigNumberish, overhead?: num
5060
5446
  * @returns {ResourceBounds} The resource bounds with overhead.
5061
5447
  * @throws {Error} If the estimate object is undefined or does not have the required properties.
5062
5448
  */
5063
- declare function estimateFeeToBounds(estimate: FeeEstimate | 0n, overhead?: ResourceBoundsOverhead, specVersion?: string): ResourceBounds;
5449
+ declare function estimateFeeToBounds(estimate: FeeEstimate | 0n, overhead?: ResourceBoundsOverhead, specVersion?: _SupportedRpcVersion): ResourceBounds;
5064
5450
  type feeOverhead = ResourceBounds;
5065
5451
  /**
5066
5452
  * Mock zero fee response
5067
5453
  */
5068
- declare function ZEROFee(specVersion: string): {
5454
+ declare function ZEROFee(specVersion: _SupportedRpcVersion): {
5069
5455
  l1_gas_consumed: bigint;
5070
5456
  l1_gas_price: bigint;
5071
5457
  l1_data_gas_consumed: bigint;
@@ -5940,6 +6326,19 @@ declare namespace starknetId {
5940
6326
  export { starknetId_StarknetIdContract as StarknetIdContract, starknetId_StarknetIdIdentityContract as StarknetIdIdentityContract, starknetId_StarknetIdMulticallContract as StarknetIdMulticallContract, starknetId_StarknetIdPfpContract as StarknetIdPfpContract, starknetId_StarknetIdPopContract as StarknetIdPopContract, starknetId_StarknetIdVerifierContract as StarknetIdVerifierContract, starknetId_dynamicCallData as dynamicCallData, starknetId_dynamicFelt as dynamicFelt, starknetId_execution as execution, starknetId_getStarknetIdContract as getStarknetIdContract, starknetId_getStarknetIdIdentityContract as getStarknetIdIdentityContract, starknetId_getStarknetIdMulticallContract as getStarknetIdMulticallContract, starknetId_getStarknetIdPfpContract as getStarknetIdPfpContract, starknetId_getStarknetIdPopContract as getStarknetIdPopContract, starknetId_getStarknetIdVerifierContract as getStarknetIdVerifierContract, starknetId_isStarkDomain as isStarkDomain, starknetId_useDecoded as useDecoded, starknetId_useEncoded as useEncoded };
5941
6327
  }
5942
6328
 
6329
+ /**
6330
+ * Return randomly select available public paymaster node url
6331
+ * @param {NetworkName} networkName NetworkName
6332
+ * @param {boolean} mute mute public node warning
6333
+ * @returns {string} default node url
6334
+ */
6335
+ declare const getDefaultPaymasterNodeUrl: (networkName?: _NetworkName, mute?: boolean) => string;
6336
+
6337
+ declare const paymaster_getDefaultPaymasterNodeUrl: typeof getDefaultPaymasterNodeUrl;
6338
+ declare namespace paymaster {
6339
+ export { paymaster_getDefaultPaymasterNodeUrl as getDefaultPaymasterNodeUrl };
6340
+ }
6341
+
5943
6342
  /**
5944
6343
  * Helper - Async Sleep for 'delay' time
5945
6344
  *
@@ -6086,96 +6485,17 @@ declare class Block {
6086
6485
  valueOf: () => BlockIdentifier;
6087
6486
  toString: () => BlockIdentifier;
6088
6487
  }
6089
- /**
6090
- * Check if the given transaction details is a V3 transaction.
6091
- *
6092
- * @param {InvocationsDetailsWithNonce} details The transaction details to be checked.
6093
- * @return {boolean} Returns true if the transaction is a V3 transaction, otherwise false.
6094
- * @example
6095
- * ```typescript
6096
- * const invocation: InvocationsDetailsWithNonce = {
6097
- * nonce: 1,
6098
- * version: 3,
6099
- * maxFee: 10 ** 15,
6100
- * feeDataAvailabilityMode: RPC.EDataAvailabilityMode.L1,
6101
- * tip: 10 ** 13,
6102
- * paymasterData: [],
6103
- * resourceBounds: {
6104
- * l1_gas: { max_amount: num.toHex(10 ** 14), max_price_per_unit: num.toHex(50) },
6105
- * l2_gas: { max_amount: num.toHex(0), max_price_per_unit: num.toHex(0) }}};
6106
- * const result = provider.isV3Tx(invocation);
6107
- * // result = true
6108
- * ```
6109
- */
6110
- declare function isV3Tx(details: InvocationsDetailsWithNonce): details is V3TransactionDetails;
6111
- /**
6112
- * Determines if the given response matches the specified version.
6113
- *
6114
- * @param {SupportedRpcVersion} version The version to compare against the response.
6115
- * @param {string} response The response to check against the version.
6116
- * @returns {boolean} True if the response matches the version, false otherwise.
6117
- * @example
6118
- * ``` typescript
6119
- * const result = provider.isVersion("0.7","0_7");
6120
- * // result = false
6121
- * ```
6122
- */
6123
- declare function isVersion(version: _SupportedRpcVersion, response: string): boolean;
6124
- declare function stringToSpecVersion(version: string): _SupportedRpcVersion;
6125
- /**
6126
- * Guard Pending Block
6127
- * @param {GetBlockResponse} response answer of myProvider.getBlock()
6128
- * @return {boolean} true if block is the pending block
6129
- * @example
6130
- * ```typescript
6131
- * const block = await myProvider.getBlock("pending");
6132
- * const result = provider.isPendingBlock(block);
6133
- * // result = true
6134
- * ```
6135
- */
6136
- declare function isPendingBlock(response: GetBlockResponse): response is PendingBlock;
6137
- /**
6138
- * Guard Pending Transaction
6139
- * @param {GetTransactionReceiptResponse} response transaction Receipt
6140
- * @return {boolean} true if the transaction is part of the pending block
6141
- * @example
6142
- * ```typescript
6143
- * const block = await myProvider.getBlockWithTxs("pending");
6144
- * const txR = await myProvider.getTransactionReceipt(block.transactions[0].transaction_hash);
6145
- * const result = provider.isPendingTransaction(txR);
6146
- * // result = true
6147
- * ```
6148
- */
6149
- declare function isPendingTransaction(response: GetTransactionReceiptResponse): boolean;
6150
- /**
6151
- * Guard Pending State Update
6152
- * @param {StateUpdateResponse} response State of a block
6153
- * @return {boolean} true if the block is pending
6154
- * @example
6155
- * ```typescript
6156
- * const state: StateUpdateResponse = await myProvider.getStateUpdate("pending");
6157
- * const result = provider.isPendingStateUpdate(state);
6158
- * // result = true
6159
- * ```
6160
- */
6161
- declare function isPendingStateUpdate(response: StateUpdateResponse): response is PendingStateUpdate;
6162
6488
 
6163
6489
  type provider_Block = Block;
6164
6490
  declare const provider_Block: typeof Block;
6165
6491
  declare const provider_createSierraContractClass: typeof createSierraContractClass;
6166
6492
  declare const provider_getDefaultNodeUrl: typeof getDefaultNodeUrl;
6167
6493
  declare const provider_getDefaultNodes: typeof getDefaultNodes;
6168
- declare const provider_isPendingBlock: typeof isPendingBlock;
6169
- declare const provider_isPendingStateUpdate: typeof isPendingStateUpdate;
6170
- declare const provider_isPendingTransaction: typeof isPendingTransaction;
6171
- declare const provider_isV3Tx: typeof isV3Tx;
6172
- declare const provider_isVersion: typeof isVersion;
6173
6494
  declare const provider_parseContract: typeof parseContract;
6174
- declare const provider_stringToSpecVersion: typeof stringToSpecVersion;
6175
6495
  declare const provider_validBlockTags: typeof validBlockTags;
6176
6496
  declare const provider_wait: typeof wait;
6177
6497
  declare namespace provider {
6178
- export { provider_Block as Block, provider_createSierraContractClass as createSierraContractClass, provider_getDefaultNodeUrl as getDefaultNodeUrl, provider_getDefaultNodes as getDefaultNodes, provider_isPendingBlock as isPendingBlock, provider_isPendingStateUpdate as isPendingStateUpdate, provider_isPendingTransaction as isPendingTransaction, provider_isV3Tx as isV3Tx, provider_isVersion as isVersion, provider_parseContract as parseContract, provider_stringToSpecVersion as stringToSpecVersion, provider_validBlockTags as validBlockTags, provider_wait as wait };
6498
+ export { provider_Block as Block, provider_createSierraContractClass as createSierraContractClass, provider_getDefaultNodeUrl as getDefaultNodeUrl, provider_getDefaultNodes as getDefaultNodes, provider_parseContract as parseContract, provider_validBlockTags as validBlockTags, provider_wait as wait };
6179
6499
  }
6180
6500
 
6181
6501
  /**
@@ -6385,6 +6705,94 @@ declare namespace src5 {
6385
6705
  export { src5_supportsInterface as supportsInterface };
6386
6706
  }
6387
6707
 
6708
+ /**
6709
+ * Check if the given transaction details is a V3 transaction.
6710
+ *
6711
+ * @param {InvocationsDetailsWithNonce} details The transaction details to be checked.
6712
+ * @return {boolean} Returns true if the transaction is a V3 transaction, otherwise false.
6713
+ * @example
6714
+ * ```typescript
6715
+ * const invocation: InvocationsDetailsWithNonce = {
6716
+ * nonce: 1,
6717
+ * version: 3,
6718
+ * maxFee: 10 ** 15,
6719
+ * feeDataAvailabilityMode: RPC.EDataAvailabilityMode.L1,
6720
+ * tip: 10 ** 13,
6721
+ * paymasterData: [],
6722
+ * resourceBounds: {
6723
+ * l1_gas: { max_amount: num.toHex(10 ** 14), max_price_per_unit: num.toHex(50) },
6724
+ * l2_gas: { max_amount: num.toHex(0), max_price_per_unit: num.toHex(0) }}};
6725
+ * const result = provider.isV3Tx(invocation);
6726
+ * // result = true
6727
+ * ```
6728
+ */
6729
+ declare function isV3Tx(details: InvocationsDetailsWithNonce): details is V3TransactionDetails;
6730
+ /**
6731
+ * Determines if the provided version matches the specified version.
6732
+ * Version must be formatted "major.minor.patch" using dot delimiters.
6733
+ * Use wildcard * or unspecified to match 'any' value on the position.
6734
+ * ex. 7.3.* == 7.3.15, * == 1.1.1, 0.8 == 0.8.5. '' != 0.8.5
6735
+ *
6736
+ *
6737
+ * @param {string} expected version.
6738
+ * @param {string} provided to check against the expected version.
6739
+ * @returns {boolean} True if the response matches the version, false otherwise.
6740
+ * @example
6741
+ * ``` typescript
6742
+ * const result = provider.isVersion("0.7","0.7.1");
6743
+ * // result = true
6744
+ * ```
6745
+ */
6746
+ declare function isVersion(expected: string, provided: string): boolean;
6747
+ /**
6748
+ * Define if provided version is SDK supported rpc specification version
6749
+ */
6750
+ declare function isSupportedSpecVersion(version: string, options?: {
6751
+ allowAnyPatchVersion: boolean;
6752
+ }): version is _SupportedRpcVersion;
6753
+ /**
6754
+ * Convert fixed version to any patch version.
6755
+ * ex. 0.8.1 -> 0.8.*
6756
+ */
6757
+ declare function toAnyPatchVersion(version: string): string;
6758
+ /**
6759
+ * Guard Pending Block
6760
+ * @param {GetBlockResponse} response answer of myProvider.getBlock()
6761
+ * @return {boolean} true if block is the pending block
6762
+ * @example
6763
+ * ```typescript
6764
+ * const block = await myProvider.getBlock("pending");
6765
+ * const result = provider.isPendingBlock(block);
6766
+ * // result = true
6767
+ * ```
6768
+ */
6769
+ declare function isPendingBlock(response: GetBlockResponse): response is PendingBlock;
6770
+ /**
6771
+ * Guard Pending Transaction
6772
+ * @param {GetTransactionReceiptResponse} response transaction Receipt
6773
+ * @return {boolean} true if the transaction is part of the pending block
6774
+ * @example
6775
+ * ```typescript
6776
+ * const block = await myProvider.getBlockWithTxs("pending");
6777
+ * const txR = await myProvider.getTransactionReceipt(block.transactions[0].transaction_hash);
6778
+ * const result = provider.isPendingTransaction(txR);
6779
+ * // result = true
6780
+ * ```
6781
+ */
6782
+ declare function isPendingTransaction(response: GetTransactionReceiptResponse): boolean;
6783
+ /**
6784
+ * Guard Pending State Update
6785
+ * @param {StateUpdateResponse} response State of a block
6786
+ * @return {boolean} true if the block is pending
6787
+ * @example
6788
+ * ```typescript
6789
+ * const state: StateUpdateResponse = await myProvider.getStateUpdate("pending");
6790
+ * const result = provider.isPendingStateUpdate(state);
6791
+ * // result = true
6792
+ * ```
6793
+ */
6794
+ declare function isPendingStateUpdate(response: StateUpdateResponse): response is PendingStateUpdate;
6795
+
6388
6796
  type BatchClientOptions = {
6389
6797
  nodeUrl: string;
6390
6798
  headers: object;
@@ -7421,4 +7829,4 @@ declare class Logger {
7421
7829
  */
7422
7830
  declare const logger: Logger;
7423
7831
 
7424
- 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 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, type CairoContract, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, type CairoEvent, type CairoEventDefinition, type CairoEventVariant, CairoFixedArray, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoUint256, CairoUint512, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, 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 DeclaredTransaction, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransactionReceiptResponse, type DeployedAccountTransaction, type Details, EDAMode, EDataAvailabilityMode, ETH_ADDRESS, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion2, ETransactionVersion3, type EVENTS_CHUNK, type EmittedEvent, EntryPointType, type EntryPointsByType, type EstimateFee, type EstimateFeeAction, type EstimateFeeBulk, type EstimateFeeDetails, type EstimateFeeResponse, type EstimateFeeResponseBulk, EthSigner, type Event$1 as Event, type EventEntry, type EventFilter, type FEE_ESTIMATE, type FELT, type FeeEstimate, type FeeMarginPercentage, 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 InvokedTransaction, type L1HandlerTransactionReceiptResponse, type L1Message, type L1_HANDLER_TXN, type LedgerPathCalculation, LedgerSigner111 as LedgerSigner, LedgerSigner111, LedgerSigner221, 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 PRICE_UNIT, type ParsedEvent, type ParsedEvents, type ParsedStruct, type PendingBlock, type PendingReceipt, type PendingStateUpdate, type Program, RpcProvider as Provider, ProviderInterface, type ProviderOptions, type PythonicHints, type RESOURCE_PRICE, index$4 as RPC, rpc_0_7 as RPC07, rpc_0_8 as RPC08, RPCResponseParser, type RPC_ERROR, type RPC_ERROR_SET, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, type Receipt, ReceiptTx, type RequiredKeysOf, type ResourceBounds, type ResourceBoundsOverhead, type ResourceBoundsOverheadRPC07, type ResourceBoundsOverheadRPC08, ResponseParser, type Result, type RevertedTransactionReceiptResponse, 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 SimulateTransactionResponse, type SimulatedTransaction, type SimulationFlags, type StarkProfile, type StateUpdate, type StateUpdateResponse, type Storage, type SubscriptionBlockIdentifier, type SuccessfulTransactionReceiptResponse, type TRANSACTION_TRACE, type TXN_EXECUTION_STATUS, type TXN_HASH, type TXN_STATUS, TransactionExecutionStatus, TransactionFinalityStatus, type TransactionReceipt, type TransactionReceiptCallbacks, type TransactionReceiptCallbacksDefault, type TransactionReceiptCallbacksDefined, type TransactionReceiptStatus, type TransactionReceiptValue, type TransactionStatus, type TransactionStatusReceiptSets, 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 UniversalSuggestedFee, type V2DeclareSignerDetails, type V2DeployAccountSignerDetails, type V2InvocationsSignerDetails, type V3DeclareSignerDetails, type V3DeployAccountSignerDetails, type V3InvocationsSignerDetails, type V3TransactionDetails, ValidateType, WSSubscriptions, WalletAccount, WebSocketChannel, type WebSocketOptions, type WeierstrassSignatureType, addAddressPadding, byteArray, cairo, config, constants, contractClassResponseToLegacyCompiledContract, defaultProvider, ec, encode, eth, index as events, extractContractHashes, fixProto, fixStack, getCalldata, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getLedgerPathBuffer111 as getLedgerPathBuffer, getLedgerPathBuffer111, getLedgerPathBuffer221, type getSimulateTransactionOptions, index$2 as hash, isRPC08_FeeEstimate, isRPC08_ResourceBounds, isSierra, json, logger, merkle, num, outsideExecution, parseCalldataField, provider, selector, shortString, src5, index$1 as stark, starknetId, transaction, typedData, index$3 as types, uint256$1 as uint256, units, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, type waitForTransactionOptions, connect as wallet };
7832
+ 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 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, type CairoContract, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, type CairoEvent, type CairoEventDefinition, type CairoEventVariant, CairoFixedArray, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoUint256, CairoUint512, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, 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 DeclaredTransaction, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployAndInvokeTransaction, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransaction, type DeployTransactionReceiptResponse, type DeployedAccountTransaction, type Details, EDAMode, EDataAvailabilityMode, ETH_ADDRESS, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion2, ETransactionVersion3, type EVENTS_CHUNK, type EmittedEvent, EntryPointType, type EntryPointsByType, type EstimateFee, type EstimateFeeAction, type EstimateFeeBulk, type EstimateFeeDetails, type EstimateFeeResponse, type EstimateFeeResponseBulk, EthSigner, type Event$1 as Event, type EventEntry, type EventFilter, type ExecutableDeployAndInvokeTransaction, type ExecutableDeployTransaction, type ExecutableInvokeTransaction, type ExecutableUserInvoke, type ExecutableUserTransaction, type ExecutionParameters, type FEE_ESTIMATE, type FELT, type FeeEstimate, type FeeMarginPercentage, type FeeMode, 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 InvokeTransaction, type InvokeTransactionReceiptResponse, type InvokedTransaction, type L1HandlerTransactionReceiptResponse, type L1Message, 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 PRICE_UNIT, type ParsedEvent, type ParsedEvents, type ParsedStruct, type PaymasterDetails, type PaymasterFeeEstimate, PaymasterInterface, type PaymasterOptions, PaymasterRpc, type PaymasterRpcOptions, type PaymasterTimeBounds, type PendingBlock, type PendingReceipt, type PendingStateUpdate, type PreparedDeployAndInvokeTransaction, type PreparedDeployTransaction, type PreparedInvokeTransaction, type PreparedTransaction, type Program, RpcProvider as Provider, ProviderInterface, type ProviderOptions, type PythonicHints, type RESOURCE_PRICE, index$4 as RPC, rpc_0_7_1 as RPC07, rpc_0_8_1 as RPC08, RPCResponseParser, type RPC_ERROR, type RPC_ERROR_SET, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, type Receipt, ReceiptTx, type RequiredKeysOf, type ResourceBounds, type ResourceBoundsOverhead, type ResourceBoundsOverheadRPC07, type ResourceBoundsOverheadRPC08, ResponseParser, type Result, type RevertedTransactionReceiptResponse, 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 SimulateTransactionResponse, type SimulatedTransaction, type SimulationFlags, type StarkProfile, type StateUpdate, type StateUpdateResponse, type Storage, type SubscriptionBlockIdentifier, type SuccessfulTransactionReceiptResponse, type TRANSACTION_TRACE, type TXN_EXECUTION_STATUS, type TXN_HASH, type TXN_STATUS, type TokenData, TransactionExecutionStatus, TransactionFinalityStatus, type TransactionReceipt, type TransactionReceiptCallbacks, type TransactionReceiptCallbacksDefault, type TransactionReceiptCallbacksDefined, type TransactionReceiptStatus, type TransactionReceiptValue, type TransactionStatus, type TransactionStatusReceiptSets, 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 UniversalSuggestedFee, type UserInvoke, type UserTransaction, type V2DeclareSignerDetails, type V2DeployAccountSignerDetails, type V2InvocationsSignerDetails, type V3DeclareSignerDetails, type V3DeployAccountSignerDetails, type V3InvocationsSignerDetails, type V3TransactionDetails, ValidateType, WSSubscriptions, WalletAccount, WebSocketChannel, type WebSocketOptions, type WeierstrassSignatureType, addAddressPadding, byteArray, cairo, config, constants, contractClassResponseToLegacyCompiledContract, defaultPaymaster, defaultProvider, ec, encode, eth, index as events, extractContractHashes, fixProto, fixStack, getCalldata, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getLedgerPathBuffer111 as getLedgerPathBuffer, getLedgerPathBuffer111, getLedgerPathBuffer221, type getSimulateTransactionOptions, index$2 as hash, isPendingBlock, isPendingStateUpdate, isPendingTransaction, isRPC08_FeeEstimate, isRPC08_ResourceBounds, isSierra, isSupportedSpecVersion, isV3Tx, isVersion, json, logger, merkle, num, outsideExecution, parseCalldataField, paymaster, provider, selector, shortString, src5, index$1 as stark, starknetId, toAnyPatchVersion, transaction, typedData, index$3 as types, uint256$1 as uint256, units, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, type waitForTransactionOptions, connect as wallet };