Skip to main content
Version: 9.2.1

Starknet.js API - v9.2.1

Namespaces​

Classes​

Interfaces​

References​

RpcProvider​

Renames and re-exports Provider


LedgerSigner​

Renames and re-exports LedgerSigner111


getLedgerPathBuffer​

Renames and re-exports getLedgerPathBuffer111


RpcChannel​

Re-exports RpcChannel


TypedDataRevision​

Re-exports TypedDataRevision


StarknetEnumType​

Re-exports StarknetEnumType


StarknetMerkleType​

Re-exports StarknetMerkleType


StarknetType​

Re-exports StarknetType


StarknetDomain​

Re-exports StarknetDomain


TypedData​

Re-exports TypedData

Type Aliases​

TypedContractV2​

Ƭ TypedContractV2<TAbi>: AbiWanTypedContract<TAbi> & Contract

Type parameters​

NameType
TAbiextends AbiKanabi

Defined in​

src/contract/default.ts:47


TipEstimate​

Ƭ TipEstimate: Object

Result of provider.getTipStatsFromBlocks().

Param

minimum tip encountered in the analyzed blocks.

Param

maximum tip encountered in the analyzed blocks.

Param

average tip encountered in the analyzed blocks.

Param

median (middle value) tip encountered in the analyzed blocks.

Param

mode (most frequent) tip encountered in the analyzed blocks.

Param

suggested tip amount (median tip) for optimal inclusion probability.

Param

90th percentile tip (90% of tips are below this value).

Param

95th percentile tip (95% of tips are below this value).

Param

Optional performance metrics for the analysis.

Type declaration​

NameType
minTipbigint
maxTipbigint
averageTipbigint
medianTipbigint
modeTipbigint
recommendedTipbigint
p90Tipbigint
p95Tipbigint
metrics?{ blocksAnalyzed: number ; transactionsTipsFound: bigint[] }
metrics.blocksAnalyzednumber
metrics.transactionsTipsFoundbigint[]

Defined in​

src/provider/modules/tip.ts:22


TipType​

Ƭ TipType: Exclude<keyof TipEstimate, "metrics">

Defined in​

src/provider/modules/tip.ts:37


TipAnalysisOptions​

Ƭ TipAnalysisOptions: Object

Options for customizing tip analysis behavior.

Type declaration​

NameTypeDescription
maxBlocks?numberMaximum number of blocks to analyze going backwards from the starting block. Default ts 3
minTxsNecessary?numberMinimum number of transactions required to generate reliable statistics. Default ts 10
includeZeroTips?booleanWhether to include transactions with zero tips in the analysis. Default ts true

Defined in​

src/provider/modules/tip.ts:42


SubscriptionNewHeadsEvent​

Ƭ SubscriptionNewHeadsEvent: Subscription<NewHeadsEvent["result"]>

Defined in​

src/channel/ws/ws_0_10.ts:56


SubscriptionStarknetEventsEvent​

Ƭ SubscriptionStarknetEventsEvent: Subscription<StarknetEventsEvent["result"]>

Defined in​

src/channel/ws/ws_0_10.ts:57


SubscriptionTransactionStatusEvent​

Ƭ SubscriptionTransactionStatusEvent: Subscription<TransactionsStatusEvent["result"]>

Defined in​

src/channel/ws/ws_0_10.ts:58


SubscriptionNewTransactionReceiptsEvent​

Ƭ SubscriptionNewTransactionReceiptsEvent: Subscription<NewTransactionReceiptsEvent["result"]>

Defined in​

src/channel/ws/ws_0_10.ts:59


SubscriptionNewTransactionEvent​

Ƭ SubscriptionNewTransactionEvent: Subscription<NewTransactionEvent["result"]>

Defined in​

src/channel/ws/ws_0_10.ts:62


ReconnectOptions​

Ƭ ReconnectOptions: Object

Options for configuring the automatic reconnection behavior of the WebSocketChannel.

Type declaration​

NameTypeDescription
retries?numberThe number of retries to attempt before giving up. Default ts 5
delay?numberThe initial delay in milliseconds before the first retry. Default ts 2000
exponential?number | booleanWhether to use the exponential backoff (delay being doubled for each subsequent retry). Default ts true

Defined in​

src/channel/ws/ws_0_10.ts:67


WebSocketModule​

Ƭ WebSocketModule: (nodeUrl: string) => WebSocket

The type of the WebSocket implementation.

Type declaration​

• new WebSocketModule(nodeUrl): WebSocket

Parameters​
NameType
nodeUrlstring
Returns​

WebSocket

Defined in​

src/channel/ws/ws_0_10.ts:88


WebSocketOptions​

Ƭ WebSocketOptions: Object

Options for configuring the WebSocketChannel.

Type declaration​

NameTypeDescription
nodeUrlstringThe URL of the WebSocket endpoint of the Starknet node. Example ts 'ws://localhost:9545'
websocket?WebSocketModuleThis parameter can be used to provide a custom WebSocket implementation. This is useful in environments where the global WebSocket object is not available (e.g., Node.js). Example typescript import WebSocket from 'ws'; const channel = new WebSocketChannel({ nodeUrl: '...', websocket: WebSocket });
maxBufferSize?numberThe maximum number of events to buffer per subscription when no handler is attached. Default ts 1000
autoReconnect?booleanWhether to automatically reconnect when the connection is lost. Default ts true
reconnectOptions?ReconnectOptionsOptions for the automatic reconnection behavior.
requestTimeout?numberThe timeout in milliseconds for a sendReceive call. Default ts 60000

Defined in​

src/channel/ws/ws_0_10.ts:93


SubscriptionOptions​

Ƭ SubscriptionOptions: Object

Options for creating a new Subscription instance

Type declaration​

NameTypeDescription
channelWebSocketChannelThe containing WebSocketChannel instance
methodstringThe JSON-RPC method used to create this subscription
params?objectThe parameters used to create this subscription (optional, defaults to empty object)
idSUBSCRIPTION_IDThe unique identifier for this subscription
maxBufferSizenumberThe maximum number of events to buffer

Defined in​

src/channel/ws/subscription.ts:16


WeierstrassSignatureType​

Ƭ WeierstrassSignatureType: SignatureType

Defined in​

src/types/lib/index.ts:13


ArraySignatureType​

Ƭ ArraySignatureType: string[]

Defined in​

src/types/lib/index.ts:14


Signature​

Ƭ Signature: ArraySignatureType | WeierstrassSignatureType

Defined in​

src/types/lib/index.ts:15


BigNumberish​

Ƭ BigNumberish: string | number | bigint

Defined in​

src/types/lib/index.ts:17


ByteArray​

Ƭ ByteArray: Object

Type declaration​

NameType
dataBigNumberish[]
pending_wordBigNumberish
pending_word_lenBigNumberish

Defined in​

src/types/lib/index.ts:19


Calldata​

Ƭ Calldata: string[] & { __compiled__?: true }

Compiled calldata ready to be sent

decimal-string array

Defined in​

src/types/lib/index.ts:30


AbiEntryType​

Ƭ AbiEntryType: AbiEntry["type"]

"Abi Entry type"

Example

'core::bytes_31::bytes31';
'core::bool';
'core::felt';
'core::uint256';
'core::uint512';

Defined in​

src/types/lib/index.ts:41


RawCalldata​

Ƭ RawCalldata: BigNumberish[]

BigNumberish array

use CallData.compile() to convert to Calldata

Defined in​

src/types/lib/index.ts:70


HexCalldata​

Ƭ HexCalldata: string[]

Hexadecimal-string array

Defined in​

src/types/lib/index.ts:75


AllowArray​

Ƭ AllowArray<T>: T | T[]

Type parameters​

Name
T

Defined in​

src/types/lib/index.ts:77


OptionalPayload​

Ƭ OptionalPayload<T>: { payload: T } | T

Type parameters​

Name
T

Defined in​

src/types/lib/index.ts:79


RawArgs​

Ƭ RawArgs: RawArgsObject | RawArgsArray

Defined in​

src/types/lib/index.ts:81


RawArgsObject​

Ƭ RawArgsObject: Object

Index signature​

▪ [inputName: string]: MultiType | MultiType[] | RawArgs

Defined in​

src/types/lib/index.ts:83


RawArgsArray​

Ƭ RawArgsArray: (MultiType | MultiType[] | RawArgs)[]

Defined in​

src/types/lib/index.ts:87


MultiType​

Ƭ MultiType: BigNumberish | Uint256 | object | boolean | CairoEnum

Defined in​

src/types/lib/index.ts:89


UniversalDeployerContractPayload​

Ƭ UniversalDeployerContractPayload: Object

Type declaration​

NameType
classHashBigNumberish
salt?string
unique?boolean
constructorCalldata?RawArgs
abi?Abi

Defined in​

src/types/lib/index.ts:91


DeployAccountContractPayload​

Ƭ DeployAccountContractPayload: Object

Type declaration​

NameType
classHashstring
constructorCalldata?RawArgs
addressSalt?BigNumberish
contractAddress?string

Defined in​

src/types/lib/index.ts:99


DeployAccountContractTransaction​

Ƭ DeployAccountContractTransaction: Omit<DeployAccountContractPayload, "contractAddress"> & { signature?: Signature }

Defined in​

src/types/lib/index.ts:106


DeclareContractPayload​

Ƭ DeclareContractPayload: DeclareWithCasm | DeclareWithCompiledClassHash

Payload for declaring a contract on Starknet. Either provide CASM code, or a pre-computed compiledClassHash for optimization.

Defined in​

src/types/lib/index.ts:150


ContractClassIdentifier​

Ƭ ContractClassIdentifier: DeclareContractPayload | { classHash: string }

DeclareContractPayload with classHash or contract defined

Defined in​

src/types/lib/index.ts:155


CompleteDeclareContractPayload​

Ƭ CompleteDeclareContractPayload: Object

Type declaration​

NameType
contractCompiledContract | string
classHashstring
casm?CompiledSierraCasm
compiledClassHashstring

Defined in​

src/types/lib/index.ts:157


DeclareAndDeployContractPayload​

Ƭ DeclareAndDeployContractPayload: Omit<UniversalDeployerContractPayload, "classHash"> & DeclareContractPayload

Defined in​

src/types/lib/index.ts:164


DeclareContractTransaction​

Ƭ DeclareContractTransaction: Object

Type declaration​

NameType
contractContractClass
senderAddressstring
signature?Signature
compiledClassHash?string

Defined in​

src/types/lib/index.ts:167


CallDetails​

Ƭ CallDetails: Object

Type declaration​

NameType
contractAddressstring
calldata?RawArgs | Calldata

Defined in​

src/types/lib/index.ts:174


Invocation​

Ƭ Invocation: CallDetails & { signature?: Signature }

Defined in​

src/types/lib/index.ts:179


Call​

Ƭ Call: CallDetails & { entrypoint: string }

Defined in​

src/types/lib/index.ts:181


CairoVersion​

Ƭ CairoVersion: "0" | "1" | undefined

Defined in​

src/types/lib/index.ts:183


CompilerVersion​

Ƭ CompilerVersion: "0" | "1" | "2" | undefined

Defined in​

src/types/lib/index.ts:184


InvocationsDetails​

Ƭ InvocationsDetails: { nonce?: BigNumberish ; maxFee?: BigNumberish ; version?: BigNumberish } & Partial<V3TransactionDetails>

Defined in​

src/types/lib/index.ts:186


V3TransactionDetails​

Ƭ V3TransactionDetails: Object

Type declaration​

NameType
nonceBigNumberish
versionBigNumberish
resourceBoundsResourceBoundsBN
tipBigNumberish
paymasterDataBigNumberish[]
accountDeploymentDataBigNumberish[]
nonceDataAvailabilityModeEDataAvailabilityMode
feeDataAvailabilityModeEDataAvailabilityMode

Defined in​

src/types/lib/index.ts:192


Details​

Ƭ Details: Object

Contain all additional details params

Type declaration​

NameType
nonceBigNumberish
maxFeeBigNumberish
versionBigNumberish
chainIdStarknetChainId

Defined in​

src/types/lib/index.ts:206


InvocationsDetailsWithNonce​

Ƭ InvocationsDetailsWithNonce: InvocationsDetails & { nonce: BigNumberish } | V3TransactionDetails

Defined in​

src/types/lib/index.ts:213


BlockNumber​

Ƭ BlockNumber: BlockTag | null | number

new statuses are defined by props: finality_status and execution_status to be #deprecated

Defined in​

src/types/lib/index.ts:262


BlockIdentifier​

Ƭ BlockIdentifier: BlockNumber | BigNumberish

hex string and BigInt are detected as block hashes

decimal string and number are detected as block numbers

text string are detected as block tag

null return 'latest' block tag

Defined in​

src/types/lib/index.ts:273


SubscriptionBlockIdentifier​

Ƭ SubscriptionBlockIdentifier: SubscriptionBlockTag | string & {} | number | bigint

Defined in​

src/types/lib/index.ts:275


AccountInvocationItem​

Ƭ AccountInvocationItem: { type: typeof DECLARE } & DeclareContractTransaction | { type: typeof DEPLOY_ACCOUNT } & DeployAccountContractTransaction | { type: typeof INVOKE } & Invocation & InvocationsDetailsWithNonce

items used by AccountInvocations

Defined in​

src/types/lib/index.ts:280


AccountInvocations​

Ƭ AccountInvocations: AccountInvocationItem[]

Complete invocations array with account details (internal type from account -> provider)

Defined in​

src/types/lib/index.ts:290


Invocations​

Ƭ Invocations: ({ type: typeof DECLARE } & OptionalPayload<DeclareContractPayload> | { type: typeof DEPLOY } & OptionalPayload<AllowArray<UniversalDeployerContractPayload>> | { type: typeof DEPLOY_ACCOUNT } & OptionalPayload<DeployAccountContractPayload> | { type: typeof INVOKE } & OptionalPayload<AllowArray<Call>>)[]

Invocations array user provide to bulk method (simulate)

Defined in​

src/types/lib/index.ts:295


Tupled​

Ƭ Tupled: Object

Type declaration​

NameType
elementany
typestring

Defined in​

src/types/lib/index.ts:306


Args​

Ƭ Args: Object

Index signature​

▪ [inputName: string]: BigNumberish | BigNumberish[] | ParsedStruct | ParsedStruct[]

Defined in​

src/types/lib/index.ts:308


ParsedStruct​

Ƭ ParsedStruct: Object

Index signature​

▪ [key: string]: BigNumberish | BigNumberish[] | ParsedStruct | Uint256

Defined in​

src/types/lib/index.ts:311


waitForTransactionOptions​

Ƭ waitForTransactionOptions: Object

Type declaration​

NameTypeDescription
lifeCycleRetries?numberDefine the number of retries before throwing an error for the transaction life cycle when the transaction is not found after it had a valid status. This is useful for nodes that are not fully synced yet when connecting to service that rotate nodes.
retries?numberDefine the number of retries before throwing an error
retryInterval?numberDefine the time interval between retries in milliseconds
successStates?(TransactionFinalityStatus | TransactionExecutionStatus)[]Define which states are considered as successful
errorStates?(TransactionFinalityStatus | TransactionExecutionStatus)[]Define which states are considered as errors

Defined in​

src/types/lib/index.ts:315


fastWaitForTransactionOptions​

Ƭ fastWaitForTransactionOptions: Object

Type declaration​

NameType
retries?number
retryInterval?number

Defined in​

src/types/lib/index.ts:339


getSimulateTransactionOptions​

Ƭ getSimulateTransactionOptions: Object

Type declaration​

NameType
blockIdentifier?BlockIdentifier
skipValidate?boolean
skipExecute?boolean
skipFeeCharge?boolean

Defined in​

src/types/lib/index.ts:344


getContractVersionOptions​

Ƭ getContractVersionOptions: Object

Type declaration​

NameType
blockIdentifier?BlockIdentifier
compiler?boolean

Defined in​

src/types/lib/index.ts:351


getEstimateFeeBulkOptions​

Ƭ getEstimateFeeBulkOptions: Object

Type declaration​

NameType
blockIdentifier?BlockIdentifier
skipValidate?boolean

Defined in​

src/types/lib/index.ts:356


ContractVersion​

Ƭ ContractVersion: Object

Represent Contract version

Type declaration​

NameTypeDescription
cairoCairoVersionversion of the cairo language
compilerCompilerVersionversion of the cairo compiler used to compile the contract

Defined in​

src/types/lib/index.ts:364


ContractClass​

Ƭ ContractClass: LegacyContractClass | SierraContractClass

format produced after compressing compiled contract

CompressedCompiledContract

Defined in​

src/types/lib/contract/index.ts:11


CompiledContract​

Ƭ CompiledContract: LegacyCompiledContract | CompiledSierra

format produced after compile .cairo to .json

Defined in​

src/types/lib/contract/index.ts:16


CairoContract​

Ƭ CairoContract: ContractClass | CompiledContract

Compressed or decompressed Cairo0 or Cairo1 Contract

Defined in​

src/types/lib/contract/index.ts:21


EntryPointType​

Ƭ EntryPointType: ValuesType<typeof EntryPointType>

Defined in​

src/types/lib/contract/index.ts:24

src/types/lib/contract/index.ts:30


Abi​

Ƭ Abi: ReadonlyArray<FunctionAbi | AbiEvent | AbiStruct | InterfaceAbi | any>

ABI

Defined in​

src/types/lib/contract/abi.ts:6


AbiEntry​

Ƭ AbiEntry: Object

Type declaration​

NameType
namestring
type"felt" | "felt*" | "event" | string

Defined in​

src/types/lib/contract/abi.ts:9


EventEntry​

Ƭ EventEntry: Object

Type declaration​

NameType
namestring
type"felt" | "felt*" | string
kind"key" | "data"

Defined in​

src/types/lib/contract/abi.ts:11


FunctionAbi​

Ƭ FunctionAbi: Object

Type declaration​

NameType
inputsAbiEntry[]
namestring
outputsAbiEntry[]
stateMutability?"view"
state_mutability?string
typeFunctionAbiType

Defined in​

src/types/lib/contract/abi.ts:16


AbiStructs​

Ƭ AbiStructs: Object

Index signature​

▪ [name: string]: AbiStruct

Defined in​

src/types/lib/contract/abi.ts:25


AbiStruct​

Ƭ AbiStruct: Object

Type declaration​

NameType
membersAbiEntry & { offset: number }[]
namestring
sizenumber
type"struct"

Defined in​

src/types/lib/contract/abi.ts:27


AbiInterfaces​

Ƭ AbiInterfaces: Object

Index signature​

▪ [name: string]: InterfaceAbi

Defined in​

src/types/lib/contract/abi.ts:34


InterfaceAbi​

Ƭ InterfaceAbi: Object

Type declaration​

NameType
itemsFunctionAbi[]
namestring
type"interface"

Defined in​

src/types/lib/contract/abi.ts:35


AbiEnums​

Ƭ AbiEnums: Object

Index signature​

▪ [name: string]: AbiEnum

Defined in​

src/types/lib/contract/abi.ts:41


AbiEnum​

Ƭ AbiEnum: Object

Type declaration​

NameType
variantsAbiEntry & { offset: number }[]
namestring
sizenumber
type"enum"

Defined in​

src/types/lib/contract/abi.ts:42


AbiEvents​

Ƭ AbiEvents: Object

Index signature​

▪ [hash: string]: AbiEvent

Defined in​

src/types/lib/contract/abi.ts:55


AbiEvent​

Ƭ AbiEvent: CairoEvent | LegacyEvent

Defined in​

src/types/lib/contract/abi.ts:59


CairoEvent​

Ƭ CairoEvent: CairoEventDefinition | AbiEvents

Defined in​

src/types/lib/contract/abi.ts:62


CairoEventDefinition​

Ƭ CairoEventDefinition: STRUCT_EVENT & { name: string ; type: "event" }

Defined in​

src/types/lib/contract/abi.ts:64


CairoEventVariant​

Ƭ CairoEventVariant: ENUM_EVENT & { name: string ; type: string }

Defined in​

src/types/lib/contract/abi.ts:69


LegacyEvent​

Ƭ LegacyEvent: Object

Type declaration​

NameType
namestring
type"event"
dataEVENT_FIELD[]
keysEVENT_FIELD[]

Defined in​

src/types/lib/contract/abi.ts:74


LegacyContractClass​

Ƭ LegacyContractClass: Object

format produced after compressing 'program' property

Type declaration​

NameType
programCompressedProgram
entry_points_by_typeEntryPointsByType
abiAbi

Defined in​

src/types/lib/contract/legacy.ts:7


LegacyCompiledContract​

Ƭ LegacyCompiledContract: Omit<LegacyContractClass, "program"> & { program: Program }

format produced after compiling .cairo to .json

Defined in​

src/types/lib/contract/legacy.ts:16


Builtins​

Ƭ Builtins: string[]

SUBTYPES

Defined in​

src/types/lib/contract/legacy.ts:21


CompressedProgram​

Ƭ CompressedProgram: string

Defined in​

src/types/lib/contract/legacy.ts:22


Hint​

Ƭ Hint: Record<string, unknown>

Defined in​

src/types/lib/contract/legacy.ts:23


EntryPointsByType​

Ƭ EntryPointsByType: Object

Type declaration​

NameType
CONSTRUCTORContractEntryPointFields[]
EXTERNALContractEntryPointFields[]
L1_HANDLERContractEntryPointFields[]

Defined in​

src/types/lib/contract/legacy.ts:25


ContractEntryPointFields​

Ƭ ContractEntryPointFields: Object

Type declaration​

NameType
selectorstring
offsetstring | number
builtins?Builtins

Defined in​

src/types/lib/contract/legacy.ts:31


CairoAssembly​

Ƭ CairoAssembly: Object

Cairo Assembly .casm

Type declaration​

NameType
primestring
compiler_versionstring
bytecodeByteCode
hintsany[]
pythonic_hints?PythonicHints
bytecode_segment_lengths?number[]
entry_points_by_typeEntryPointsByType

Defined in​

src/types/lib/contract/sierra.ts:5


CompiledSierra​

Ƭ CompiledSierra: Object

format produced after starknet-compile .cairo to .json

sierra_program is hex array

Type declaration​

NameType
sierra_programByteCode
sierra_program_debug_info?SierraProgramDebugInfo
contract_class_versionstring
entry_points_by_typeSierraEntryPointsByType
abiAbi

Defined in​

src/types/lib/contract/sierra.ts:21


SierraContractClass​

Ƭ SierraContractClass: Omit<CompiledSierra, "abi" | "sierra_program" | "sierra_program_debug_info"> & { sierra_program: string ; abi: string }

format produced after compressing 'sierra_program', stringifies 'abi' property and omit sierra_program_debug_info

CompressedCompiledSierra

Defined in​

src/types/lib/contract/sierra.ts:34


CompiledSierraCasm​

Ƭ CompiledSierraCasm: CairoAssembly

Defined in​

src/types/lib/contract/sierra.ts:42


ByteCode​

Ƭ ByteCode: string[]

SUBTYPES

Defined in​

src/types/lib/contract/sierra.ts:45


PythonicHints​

Ƭ PythonicHints: [number, string[]][]

Defined in​

src/types/lib/contract/sierra.ts:46


SierraProgramDebugInfo​

Ƭ SierraProgramDebugInfo: Object

Type declaration​

NameType
type_names[number, string][]
libfunc_names[number, string][]
user_func_names[number, string][]

Defined in​

src/types/lib/contract/sierra.ts:48


SierraEntryPointsByType​

Ƭ SierraEntryPointsByType: Object

Type declaration​

NameType
CONSTRUCTORSierraContractEntryPointFields[]
EXTERNALSierraContractEntryPointFields[]
L1_HANDLERSierraContractEntryPointFields[]

Defined in​

src/types/lib/contract/sierra.ts:54


SierraContractEntryPointFields​

Ƭ SierraContractEntryPointFields: Object

Type declaration​

NameType
selectorstring
function_idxnumber

Defined in​

src/types/lib/contract/sierra.ts:60


RpcProviderOptions​

Ƭ RpcProviderOptions: Object

Type declaration​

NameTypeDescription
nodeUrl?string | NetworkName-
retries?waitForTransactionOptions["retries"]Define the number of retries for waitForTransaction
transactionRetryIntervalFallback?numberDefine the time interval between retries in milliseconds
headers?objectDefine the headers
blockIdentifier?BlockIdentifier-
chainId?StarknetChainId-
specVersion?SupportedRpcVersion-
default?boolean-
waitMode?boolean-
baseFetch?WindowOrWorkerGlobalScope["fetch"]-
resourceBoundsOverhead?ResourceBoundsOverhead | false-
batch?false | number-

Defined in​

src/provider/types/configuration.type.ts:7


Block​

Ƭ Block: Simplify<BLOCK_WITH_TX_HASHES>

Defined in​

src/provider/types/response.type.ts:31


PreConfirmedBlock​

Ƭ PreConfirmedBlock: Simplify<PRE_CONFIRMED_BLOCK_WITH_TX_HASHES>

Defined in​

src/provider/types/response.type.ts:32


GetBlockResponse​

Ƭ GetBlockResponse: Simplify<BlockWithTxHashes>

Defined in​

src/provider/types/response.type.ts:33


GetTxReceiptResponseWithoutHelper​

Ƭ GetTxReceiptResponseWithoutHelper: TransactionReceipt

Defined in​

src/provider/types/response.type.ts:35


SuccessfulTransactionReceiptResponse​

Ƭ SuccessfulTransactionReceiptResponse: IsSucceeded<TransactionReceipt>

Defined in​

src/provider/types/response.type.ts:37


RevertedTransactionReceiptResponse​

Ƭ RevertedTransactionReceiptResponse: IsReverted<TransactionReceipt>

Defined in​

src/provider/types/response.type.ts:38


InvokeTransactionReceiptResponse​

Ƭ InvokeTransactionReceiptResponse: IsType<TransactionReceipt, "INVOKE">

Defined in​

src/provider/types/response.type.ts:39


DeployTransactionReceiptResponse​

Ƭ DeployTransactionReceiptResponse: InvokeTransactionReceiptResponse

Defined in​

src/provider/types/response.type.ts:40


DeclareTransactionReceiptResponse​

Ƭ DeclareTransactionReceiptResponse: IsType<TransactionReceipt, "DECLARE">

Defined in​

src/provider/types/response.type.ts:41


DeployAccountTransactionReceiptResponse​

Ƭ DeployAccountTransactionReceiptResponse: IsType<TransactionReceipt, "DEPLOY_ACCOUNT">

Defined in​

src/provider/types/response.type.ts:42


L1HandlerTransactionReceiptResponse​

Ƭ L1HandlerTransactionReceiptResponse: IsType<TransactionReceipt, "L1_HANDLER">

Defined in​

src/provider/types/response.type.ts:43


GetTransactionResponse​

Ƭ GetTransactionResponse: TransactionWithHash

Defined in​

src/provider/types/response.type.ts:45


EstimateFeeResponseOverhead​

Ƭ EstimateFeeResponseOverhead: Object

Estimate fee response with overhead

Type declaration​

NameType
resourceBoundsResourceBoundsBN
overall_feebigint
unitPRICE_UNIT

Defined in​

src/provider/types/response.type.ts:50


EstimateFeeResponseBulkOverhead​

Ƭ EstimateFeeResponseBulkOverhead: EstimateFeeResponseOverhead[]

Defined in​

src/provider/types/response.type.ts:56


InvokeFunctionResponse​

Ƭ InvokeFunctionResponse: InvokedTransaction

Defined in​

src/provider/types/response.type.ts:58


DeclareContractResponse​

Ƭ DeclareContractResponse: DeclaredTransaction

Defined in​

src/provider/types/response.type.ts:60


CallContractResponse​

Ƭ CallContractResponse: string[]

Defined in​

src/provider/types/response.type.ts:62


Storage​

Ƭ Storage: FELT

Defined in​

src/provider/types/response.type.ts:64


Nonce​

Ƭ Nonce: string

Defined in​

src/provider/types/response.type.ts:66


SimulationFlags​

Ƭ SimulationFlags: SIMULATION_FLAG[]

Defined in​

src/provider/types/response.type.ts:69


SimulateTransactionOverhead​

Ƭ SimulateTransactionOverhead: { transaction_trace: TransactionTrace } & EstimateFeeResponseOverhead

Defined in​

src/provider/types/response.type.ts:71


SimulateTransactionOverheadResponse​

Ƭ SimulateTransactionOverheadResponse: SimulateTransactionOverhead[]

Defined in​

src/provider/types/response.type.ts:75


PreConfirmedStateUpdate​

Ƭ PreConfirmedStateUpdate: PRE_CONFIRMED_STATE_UPDATE

Defined in​

src/provider/types/response.type.ts:77


StateUpdate​

Ƭ StateUpdate: STATE_UPDATE

Defined in​

src/provider/types/response.type.ts:78


StateUpdateResponse​

Ƭ StateUpdateResponse: StateUpdate | PreConfirmedStateUpdate

Defined in​

src/provider/types/response.type.ts:79


ContractClassResponse​

Ƭ ContractClassResponse: LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">

Standardized type

Cairo0 program compressed and Cairo1 sierra_program decompressed

abi Abi

CompiledSierra without '.sierra_program_debug_info'

Defined in​

src/provider/types/response.type.ts:90


GasPrices​

Ƭ GasPrices: Object

Result of provider.getGasPrices().

Param

price in fri of the layer 1 data gas price.

Param

price in fri of the layer 1 gas price.

Param

price in fri of the layer 2 gas price.

Type declaration​

NameType
l1DataGasPricebigint
l1GasPricebigint
l2GasPricebigint

Defined in​

src/provider/types/gasPrice.type.ts:7


Simplify​

Ƭ Simplify<T>: { [K in keyof T]: T[K] } & {}

Type parameters​

Name
T

Defined in​

src/provider/types/spec.type.ts:7


RequiredKeysOf​

Ƭ RequiredKeysOf<T>: Exclude<{ [K in keyof T]: T extends Record<K, T[K]> ? K : never }[keyof T], undefined>

Type parameters​

NameType
Textends object

Defined in​

src/provider/types/spec.type.ts:10


ETransactionVersion​

Ƭ ETransactionVersion: ETransactionVersion

Defined in​

src/provider/types/spec.type.ts:55

src/provider/types/spec.type.ts:56


ETransactionVersion2​

Ƭ ETransactionVersion2: ETransactionVersion2

Defined in​

src/provider/types/spec.type.ts:58

src/provider/types/spec.type.ts:59


ETransactionVersion3​

Ƭ ETransactionVersion3: ETransactionVersion3

Defined in​

src/provider/types/spec.type.ts:61

src/provider/types/spec.type.ts:62


BLOCK_HASH​

Ƭ BLOCK_HASH: Merge<BLOCK_HASH, BLOCK_HASH>

Defined in​

src/provider/types/spec.type.ts:65


BLOCK_NUMBER​

Ƭ BLOCK_NUMBER: Merge<BLOCK_NUMBER, BLOCK_NUMBER>

Defined in​

src/provider/types/spec.type.ts:66


FELT​

Ƭ FELT: Merge<FELT, FELT>

Defined in​

src/provider/types/spec.type.ts:67


TXN_HASH​

Ƭ TXN_HASH: Merge<TXN_HASH, TXN_HASH>

Defined in​

src/provider/types/spec.type.ts:68


PRICE_UNIT​

Ƭ PRICE_UNIT: Merge<PRICE_UNIT, PRICE_UNIT>

Defined in​

src/provider/types/spec.type.ts:70


RESOURCE_PRICE​

Ƭ RESOURCE_PRICE: Merge<RESOURCE_PRICE, RESOURCE_PRICE>

Defined in​

src/provider/types/spec.type.ts:71


SIMULATION_FLAG​

Ƭ SIMULATION_FLAG: Merge<SIMULATION_FLAG, SIMULATION_FLAG>

Defined in​

src/provider/types/spec.type.ts:72


STATE_UPDATE​

Ƭ STATE_UPDATE: Merge<STATE_UPDATE, STATE_UPDATE>

Defined in​

src/provider/types/spec.type.ts:74


PRE_CONFIRMED_STATE_UPDATE​

Ƭ PRE_CONFIRMED_STATE_UPDATE: Merge<PRE_CONFIRMED_STATE_UPDATE, PRE_CONFIRMED_STATE_UPDATE>

Defined in​

src/provider/types/spec.type.ts:79


BlockWithTxHashes​

Ƭ BlockWithTxHashes: Merge<BlockWithTxHashes, BlockWithTxHashes>

Defined in​

src/provider/types/spec.type.ts:105


ContractClassPayload​

Ƭ ContractClassPayload: Merge<ContractClass, ContractClass>

Defined in​

src/provider/types/spec.type.ts:106


DeclaredTransaction​

Ƭ DeclaredTransaction: Merge<DeclaredTransaction, DeclaredTransaction>

Defined in​

src/provider/types/spec.type.ts:107


InvokedTransaction​

Ƭ InvokedTransaction: Merge<InvokedTransaction, InvokedTransaction>

Defined in​

src/provider/types/spec.type.ts:111


DeployedAccountTransaction​

Ƭ DeployedAccountTransaction: Merge<DeployedAccountTransaction, DeployedAccountTransaction>

Defined in​

src/provider/types/spec.type.ts:112


L1_HANDLER_TXN​

Ƭ L1_HANDLER_TXN: L1_HANDLER_TXN

Defined in​

src/provider/types/spec.type.ts:117


EDataAvailabilityMode​

Ƭ EDataAvailabilityMode: EDataAvailabilityMode

Defined in​

src/provider/types/spec.type.ts:118

src/provider/types/spec.type.ts:119


EDAMode​

Ƭ EDAMode: EDAMode

Defined in​

src/provider/types/spec.type.ts:120

src/provider/types/spec.type.ts:121


EmittedEvent​

Ƭ EmittedEvent: Merge<EmittedEvent, EmittedEvent>

Defined in​

src/provider/types/spec.type.ts:122


Event​

Ƭ Event: Merge<Event, Event>

Defined in​

src/provider/types/spec.type.ts:123


Receipt​

Ƭ Receipt: Merge<TransactionReceiptProductionBlock, TransactionReceiptProductionBlock>

Defined in​

src/provider/types/spec.type.ts:129


FeeEstimate​

Ƭ FeeEstimate: Merge<FEE_ESTIMATE, FEE_ESTIMATE>

original response from estimate fee without parsing

Defined in​

src/provider/types/spec.type.ts:137


ApiEstimateFeeResponse​

Ƭ ApiEstimateFeeResponse: FeeEstimate[]

Defined in​

src/provider/types/spec.type.ts:138


ResourceBounds​

Ƭ ResourceBounds: Merge<ResourceBounds, ResourceBounds>

Defined in​

src/provider/types/spec.type.ts:150


EventFilter​

Ƭ EventFilter: EventFilter

Defined in​

src/provider/types/spec.type.ts:152


ResourceBoundsOverhead​

Ƭ ResourceBoundsOverhead: { [K in keyof ResourceBounds]: ResourceBounds[K] extends object ? { [P in keyof ResourceBounds[K]]: number } : number }

Represents percentage overhead for each resource bound numerical 50 means 50% overhead

Defined in​

src/provider/types/spec.type.ts:158


ResourceBoundsBN​

Ƭ ResourceBoundsBN: { [K in keyof ResourceBounds]: ResourceBounds[K] extends object ? { [P in keyof ResourceBounds[K]]: bigint } : number }

Resource bounds in big number format

Defined in​

src/provider/types/spec.type.ts:169


SimulateTransaction​

Ƭ SimulateTransaction: SimpleOneOf<SimulateTransaction, SimulateTransaction>

Defined in​

src/provider/types/spec.type.ts:177


SimulateTransactionResponse​

Ƭ SimulateTransactionResponse: SimpleOneOf<SimulateTransactionResponse, SimulateTransactionResponse>

Defined in​

src/provider/types/spec.type.ts:181


TransactionTrace​

Ƭ TransactionTrace: SimpleOneOf<TRANSACTION_TRACE, TRANSACTION_TRACE>

Defined in​

src/provider/types/spec.type.ts:186


TransactionWithHash​

Ƭ TransactionWithHash: Merge<TransactionWithHash, TransactionWithHash>

Defined in​

src/provider/types/spec.type.ts:191


TransactionReceipt​

Ƭ TransactionReceipt: Merge<TransactionReceipt, TransactionReceipt>

Defined in​

src/provider/types/spec.type.ts:196


Methods​

Ƭ Methods: Methods

Defined in​

src/provider/types/spec.type.ts:197


TXN_STATUS​

Ƭ TXN_STATUS: Merge<TXN_STATUS, TXN_STATUS>

Defined in​

src/provider/types/spec.type.ts:198


TXN_EXECUTION_STATUS​

Ƭ TXN_EXECUTION_STATUS: Merge<TXN_EXECUTION_STATUS, TXN_EXECUTION_STATUS>

Defined in​

src/provider/types/spec.type.ts:199


TransactionStatus​

Ƭ TransactionStatus: Merge<TransactionStatus, TransactionStatus>

Defined in​

src/provider/types/spec.type.ts:203


ETransactionStatus​

Ƭ ETransactionStatus: ETransactionStatus

Defined in​

src/provider/types/spec.type.ts:204

src/provider/types/spec.type.ts:205


ETransactionExecutionStatus​

Ƭ ETransactionExecutionStatus: ETransactionExecutionStatus

Defined in​

src/provider/types/spec.type.ts:206

src/provider/types/spec.type.ts:207


FEE_ESTIMATE​

Ƭ FEE_ESTIMATE: Merge<FEE_ESTIMATE, FEE_ESTIMATE>

Defined in​

src/provider/types/spec.type.ts:209


EVENTS_CHUNK​

Ƭ EVENTS_CHUNK: Merge<EVENTS_CHUNK, EVENTS_CHUNK>

Defined in​

src/provider/types/spec.type.ts:210


TransactionType​

Ƭ TransactionType: ETransactionType

Defined in​

src/provider/types/spec.type.ts:212

src/provider/types/spec.type.ts:213


BlockStatus​

Ƭ BlockStatus: EBlockStatus

Defined in​

src/provider/types/spec.type.ts:215

src/provider/types/spec.type.ts:216


TransactionFinalityStatus​

Ƭ TransactionFinalityStatus: ETransactionFinalityStatus

Defined in​

src/provider/types/spec.type.ts:218

src/provider/types/spec.type.ts:219


TransactionExecutionStatus​

Ƭ TransactionExecutionStatus: ETransactionExecutionStatus

Defined in​

src/provider/types/spec.type.ts:221

src/provider/types/spec.type.ts:222


BlockTag​

Ƭ BlockTag: EBlockTag

Defined in​

src/provider/types/spec.type.ts:224

src/provider/types/spec.type.ts:225


AccountOptions​

Ƭ AccountOptions: Object

Configuration options for creating an Account instance

Type declaration​

NameTypeDescription
providerProviderOptions | ProviderInterfaceProvider instance or configuration for blockchain interaction
addressstringAccount address on the Starknet network
signerUint8Array | string | SignerInterfacePrivate key or Signer Class instance for signing transactions
cairoVersion?CairoVersionCairo version to use for this account (optional, auto-detected if not provided)
transactionVersion?SupportedTransactionVersionTransaction version to use for sending transactions (optional)
paymaster?PaymasterOptions | PaymasterInterfacePaymaster configuration for sponsored transactions (optional)
deployer?DeployerInterfaceUse of a custom account deployer contract (optional)
defaultTipType?TipTypeDefault tip type to use for sending transactions (optional) Default ts 'recommendedTip'

Defined in​

src/account/types/index.type.ts:31


EstimateFeeBulk​

Ƭ EstimateFeeBulk: EstimateFeeResponseOverhead[]

Defined in​

src/account/types/index.type.ts:53


AccountInvocationsFactoryDetails​

Ƭ AccountInvocationsFactoryDetails: { versions: `${ETransactionVersion3}`[] ; nonce?: BigNumberish ; blockIdentifier?: BlockIdentifier ; skipValidate?: boolean } & Partial<V3TransactionDetails>

Defined in​

src/account/types/index.type.ts:56


MultiDeployContractResponse​

Ƭ MultiDeployContractResponse: Object

Type declaration​

NameType
contract_addressstring[]
transaction_hashstring

Defined in​

src/account/types/index.type.ts:87


DeclareDeployUDCResponse​

Ƭ DeclareDeployUDCResponse: Object

Type declaration​

NameType
declare{ class_hash: BigNumberish } & Partial<DeclareTransactionReceiptResponse>
deployDeployContractUDCResponse

Defined in​

src/account/types/index.type.ts:92


SimulateTransactionDetails​

Ƭ SimulateTransactionDetails: { nonce?: BigNumberish ; blockIdentifier?: BlockIdentifier ; skipValidate?: boolean ; skipExecute?: boolean } & Partial<V3TransactionDetails>

Defined in​

src/account/types/index.type.ts:99


StarkProfile​

Ƭ StarkProfile: Object

Type declaration​

NameType
name?string
profilePicture?string
discord?string
twitter?string
github?string
proofOfPersonhood?boolean

Defined in​

src/account/types/index.type.ts:106


fastExecuteResponse​

Ƭ fastExecuteResponse: Object

Type declaration​

NameType
txResultInvokeFunctionResponse
isReadyboolean

Defined in​

src/account/types/index.type.ts:115


CairoEnum​

Ƭ CairoEnum: CairoCustomEnum | CairoOption<any> | CairoResult<any, any>

Defined in​

src/types/cairoEnum.ts:3


ValidateType​

Ƭ ValidateType: ValuesType<typeof ValidateType>

Defined in​

src/types/calldata.ts:3

src/types/calldata.ts:9


Uint​

Ƭ Uint: ValuesType<typeof Uint>

Defined in​

src/types/calldata.ts:11

src/types/calldata.ts:22


Int​

Ƭ Int: ValuesType<typeof Int>

Defined in​

src/types/calldata.ts:24

src/types/calldata.ts:32


Literal​

Ƭ Literal: ValuesType<typeof Literal>

Defined in​

src/types/calldata.ts:34

src/types/calldata.ts:41


AsyncContractFunction​

Ƭ AsyncContractFunction<T>: (...args: ArgsOrCalldataWithOptions) => Promise<T>

Type parameters​

NameType
Tany

Type declaration​

▸ (...args): Promise<T>

Parameters​
NameType
...argsArgsOrCalldataWithOptions
Returns​

Promise<T>

Defined in​

src/contract/types/index.type.ts:19


ContractFunction​

Ƭ ContractFunction: (...args: ArgsOrCalldataWithOptions) => any

Type declaration​

▸ (...args): any

Parameters​
NameType
...argsArgsOrCalldataWithOptions
Returns​

any

Defined in​

src/contract/types/index.type.ts:20


CallResult​

Ƭ CallResult: { [key: string]: any; } | CallResult[] | bigint | string | boolean | CairoEnum

Defined in​

src/contract/types/index.type.ts:22


ArgsOrCalldata​

Ƭ ArgsOrCalldata: RawArgsArray | [Calldata] | Calldata

Defined in​

src/contract/types/index.type.ts:36


ArgsOrCalldataWithOptions​

Ƭ ArgsOrCalldataWithOptions: [...RawArgsArray] | [...RawArgsArray, ContractOptions] | [Calldata] | [Calldata, ContractOptions] | [...Calldata] | [...Calldata, ContractOptions]

Defined in​

src/contract/types/index.type.ts:47


CommonContractOptions​

Ƭ CommonContractOptions: Object

Type declaration​

NameTypeDescription
parseRequest?booleancompile and validate arguments Default ts true
parseResponse?booleanParse elements of the response array and structuring them into response object Default ts true
parsingStrategy?ParsingStrategyCustom parsing strategy for request/response processing

Defined in​

src/contract/types/index.type.ts:63


ContractOptions​

Ƭ ContractOptions: { abi: Abi ; address: string ; providerOrAccount?: ProviderOrAccount ; classHash?: string } & CommonContractOptions

Defined in​

src/contract/types/index.type.ts:82


ExecuteOptions​

Ƭ ExecuteOptions: Pick<CommonContractOptions, "parseRequest"> & { signature?: Signature ; salt?: string ; paymasterDetails?: PaymasterDetails ; maxFeeInGasToken?: BigNumberish ; waitForTransaction?: boolean } & Partial<UniversalDetails>

Defined in​

src/contract/types/index.type.ts:98


CallOptions​

Ƭ CallOptions: CommonContractOptions & { formatResponse?: FormatResponse } & Pick<UniversalDetails, "blockIdentifier" | "version">

Defined in​

src/contract/types/index.type.ts:116


WithOptions​

Ƭ WithOptions: ExecuteOptions & CallOptions

Defined in​

src/contract/types/index.type.ts:120


ParsedEvent​

Ƭ ParsedEvent: { [name: string]: ParsedStruct; } & { transaction_hash?: TransactionHash ; transaction_index?: number ; event_index?: number ; block_hash?: BlockHash ; block_number?: BlockNumber }

Defined in​

src/contract/types/index.type.ts:122


ParsedEvents​

Ƭ ParsedEvents: ParsedEvent[] & { getByPath?: (path: string) => null | ParsedStruct }

Defined in​

src/contract/types/index.type.ts:130


FormatResponse​

Ƭ FormatResponse: Object

Advance formatting used to get js types data as result

Description

https://starknet-js.com/docs/guides/contracts/define_call_message/#formatresponse

Example

// assign custom or existing method to resulting data
formatResponse: { balance: uint256ToBN },

Example

// define resulting data js types
const formatAnswer = { id: 'number', description: 'string' };

Index signature​

▪ [key: string]: any

Defined in​

src/contract/types/index.type.ts:149


ProviderOrAccount​

Ƭ ProviderOrAccount: ProviderInterface | AccountInterface

Defined in​

src/contract/types/index.type.ts:151


FactoryParams​

Ƭ FactoryParams: DeclareAndDeployParams | DeployOnlyParams & CommonContractOptions

Defined in​

src/contract/types/index.type.ts:184


RPC_ERROR_SET​

Ƭ RPC_ERROR_SET: Object

Type declaration​

NameType
FAILED_TO_RECEIVE_TXNFAILED_TO_RECEIVE_TXN
NO_TRACE_AVAILABLENO_TRACE_AVAILABLE
CONTRACT_NOT_FOUNDCONTRACT_NOT_FOUND
ENTRYPOINT_NOT_FOUNDENTRYPOINT_NOT_FOUND
BLOCK_NOT_FOUNDBLOCK_NOT_FOUND
INVALID_TXN_INDEXINVALID_TXN_INDEX
CLASS_HASH_NOT_FOUNDCLASS_HASH_NOT_FOUND
TXN_HASH_NOT_FOUNDTXN_HASH_NOT_FOUND
PAGE_SIZE_TOO_BIGPAGE_SIZE_TOO_BIG
NO_BLOCKSNO_BLOCKS
INVALID_CONTINUATION_TOKENINVALID_CONTINUATION_TOKEN
TOO_MANY_KEYS_IN_FILTERTOO_MANY_KEYS_IN_FILTER
CONTRACT_ERRORCONTRACT_ERROR
TRANSACTION_EXECUTION_ERRORTRANSACTION_EXECUTION_ERROR
STORAGE_PROOF_NOT_SUPPORTEDSTORAGE_PROOF_NOT_SUPPORTED
CLASS_ALREADY_DECLAREDCLASS_ALREADY_DECLARED
INVALID_TRANSACTION_NONCEINVALID_TRANSACTION_NONCE
INSUFFICIENT_RESOURCES_FOR_VALIDATEINSUFFICIENT_RESOURCES_FOR_VALIDATE
INSUFFICIENT_ACCOUNT_BALANCEINSUFFICIENT_ACCOUNT_BALANCE
VALIDATION_FAILUREVALIDATION_FAILURE
COMPILATION_FAILEDCOMPILATION_FAILED
CONTRACT_CLASS_SIZE_IS_TOO_LARGECONTRACT_CLASS_SIZE_IS_TOO_LARGE
NON_ACCOUNTNON_ACCOUNT
DUPLICATE_TXDUPLICATE_TX
COMPILED_CLASS_HASH_MISMATCHCOMPILED_CLASS_HASH_MISMATCH
UNSUPPORTED_TX_VERSIONUNSUPPORTED_TX_VERSION
UNSUPPORTED_CONTRACT_CLASS_VERSIONUNSUPPORTED_CONTRACT_CLASS_VERSION
UNEXPECTED_ERRORUNEXPECTED_ERROR
REPLACEMENT_TRANSACTION_UNDERPRICEDREPLACEMENT_TRANSACTION_UNDERPRICED
FEE_BELOW_MINIMUMFEE_BELOW_MINIMUM
INVALID_SUBSCRIPTION_IDINVALID_SUBSCRIPTION_ID
TOO_MANY_ADDRESSES_IN_FILTERTOO_MANY_ADDRESSES_IN_FILTER
TOO_MANY_BLOCKS_BACKTOO_MANY_BLOCKS_BACK
COMPILATION_ERRORCOMPILATION_ERROR
INVALID_ADDRESSINVALID_ADDRESS
TOKEN_NOT_SUPPORTEDTOKEN_NOT_SUPPORTED
INVALID_SIGNATUREINVALID_SIGNATURE
MAX_AMOUNT_TOO_LOWMAX_AMOUNT_TOO_LOW
CLASS_HASH_NOT_SUPPORTEDCLASS_HASH_NOT_SUPPORTED
PAYMASTER_TRANSACTION_EXECUTION_ERRORTRANSACTION_EXECUTION_ERROR
INVALID_TIME_BOUNDSINVALID_TIME_BOUNDS
INVALID_DEPLOYMENT_DATAINVALID_DEPLOYMENT_DATA
INVALID_CLASS_HASHINVALID_CLASS_HASH
INVALID_IDINVALID_ID
UNKNOWN_ERRORUNKNOWN_ERROR

Defined in​

src/types/errors.ts:5


RPC_ERROR​

Ƭ RPC_ERROR: RPC_ERROR_SET[keyof RPC_ERROR_SET]

Defined in​

src/types/errors.ts:54


OutsideExecutionVersion​

Ƭ OutsideExecutionVersion: ValuesType<typeof OutsideExecutionVersion>

Defined in​

src/types/outsideExecution.ts:78

src/types/outsideExecution.ts:83


InvocationsSignerDetails​

Ƭ InvocationsSignerDetails: V3InvocationsSignerDetails & { version: `${ETransactionVersion}` ; skipValidate?: boolean }

Defined in​

src/types/signer.ts:10


V3InvocationsSignerDetails​

Ƭ V3InvocationsSignerDetails: V3TransactionDetails & { walletAddress: string ; cairoVersion: CairoVersion ; chainId: StarknetChainId ; version: `${ETransactionVersion3}` }

Defined in​

src/types/signer.ts:15


DeclareSignerDetails​

Ƭ DeclareSignerDetails: V3DeclareSignerDetails & { version: `${ETransactionVersion}` }

Defined in​

src/types/signer.ts:22


V3DeclareSignerDetails​

Ƭ V3DeclareSignerDetails: V3TransactionDetails & { classHash: string ; compiledClassHash: string ; senderAddress: string ; chainId: StarknetChainId ; version: `${ETransactionVersion3}` }

Defined in​

src/types/signer.ts:26


DeployAccountSignerDetails​

Ƭ DeployAccountSignerDetails: V3DeployAccountSignerDetails

Defined in​

src/types/signer.ts:34


V3DeployAccountSignerDetails​

Ƭ V3DeployAccountSignerDetails: Required<DeployAccountContractPayload> & V3TransactionDetails & { contractAddress: BigNumberish ; chainId: StarknetChainId ; version: `${ETransactionVersion3}` }

Defined in​

src/types/signer.ts:36


LedgerPathCalculation​

Ƭ LedgerPathCalculation: (accountId: number, applicationName: string) => Uint8Array

Type declaration​

▸ (accountId, applicationName): Uint8Array

Parameters​
NameType
accountIdnumber
applicationNamestring
Returns​

Uint8Array

Defined in​

src/types/signer.ts:43


TransactionStatusReceiptSets​

Ƭ TransactionStatusReceiptSets: Object

Type declaration​

NameType
SUCCEEDEDSuccessfulTransactionReceiptResponse
REVERTEDRevertedTransactionReceiptResponse
ERRORError

Defined in​

src/utils/transactionReceipt/transactionReceipt.type.ts:7


TransactionReceiptStatus​

Ƭ TransactionReceiptStatus: keyof TransactionStatusReceiptSets

Defined in​

src/utils/transactionReceipt/transactionReceipt.type.ts:13


TransactionReceiptValue​

Ƭ TransactionReceiptValue: TransactionStatusReceiptSets[TransactionReceiptStatus]

Defined in​

src/utils/transactionReceipt/transactionReceipt.type.ts:15


TransactionReceiptCallbacksDefined​

Ƭ TransactionReceiptCallbacksDefined: { [key in TransactionReceiptStatus]: Function }

Defined in​

src/utils/transactionReceipt/transactionReceipt.type.ts:17


TransactionReceiptCallbacksDefault​

Ƭ TransactionReceiptCallbacksDefault: Partial<TransactionReceiptCallbacksDefined> & { _: () => void }

Defined in​

src/utils/transactionReceipt/transactionReceipt.type.ts:21


TransactionReceiptCallbacks​

Ƭ TransactionReceiptCallbacks: TransactionReceiptCallbacksDefined | TransactionReceiptCallbacksDefault

Defined in​

src/utils/transactionReceipt/transactionReceipt.type.ts:25


SuccessfulTransactionReceiptResponseHelper​

Ƭ SuccessfulTransactionReceiptResponseHelper: SuccessfulTransactionReceiptResponse & { statusReceipt: "SUCCEEDED" ; value: SuccessfulTransactionReceiptResponse ; match: (callbacks: TransactionReceiptCallbacks) => void ; isSuccess: () => this is SuccessfulTransactionReceiptResponseHelper ; isReverted: () => this is RevertedTransactionReceiptResponseHelper ; isError: () => this is ErrorReceiptResponseHelper }

Defined in​

src/utils/transactionReceipt/transactionReceipt.type.ts:30


RevertedTransactionReceiptResponseHelper​

Ƭ RevertedTransactionReceiptResponseHelper: RevertedTransactionReceiptResponse & { statusReceipt: "REVERTED" ; value: RevertedTransactionReceiptResponse ; match: (callbacks: TransactionReceiptCallbacks) => void ; isSuccess: () => this is SuccessfulTransactionReceiptResponseHelper ; isReverted: () => this is RevertedTransactionReceiptResponseHelper ; isError: () => this is ErrorReceiptResponseHelper }

Defined in​

src/utils/transactionReceipt/transactionReceipt.type.ts:42


ErrorReceiptResponseHelper​

Ƭ ErrorReceiptResponseHelper: Object

Type declaration​

NameType
statusReceipt"ERROR"
valueError
match(callbacks: TransactionReceiptCallbacks) => void
isSuccess() => this is SuccessfulTransactionReceiptResponseHelper
isReverted() => this is RevertedTransactionReceiptResponseHelper
isError() => this is ErrorReceiptResponseHelper

Defined in​

src/utils/transactionReceipt/transactionReceipt.type.ts:54


GetTransactionReceiptResponse​

Ƭ GetTransactionReceiptResponse: SuccessfulTransactionReceiptResponseHelper | RevertedTransactionReceiptResponseHelper | ErrorReceiptResponseHelper

Defined in​

src/utils/transactionReceipt/transactionReceipt.type.ts:66


PaymasterRpcOptions​

Ƭ PaymasterRpcOptions: Object

Type declaration​

NameType
nodeUrl?string | NetworkName
default?boolean
headers?object
baseFetch?WindowOrWorkerGlobalScope["fetch"]

Defined in​

src/paymaster/types/configuration.type.ts:5


PaymasterFeeEstimate​

Ƭ PaymasterFeeEstimate: Object

Type declaration​

NameType
gas_token_price_in_strkBigNumberish
estimated_fee_in_strkBigNumberish
estimated_fee_in_gas_tokenBigNumberish
suggested_max_fee_in_strkBigNumberish
suggested_max_fee_in_gas_tokenBigNumberish

Defined in​

src/paymaster/types/response.type.ts:9


PreparedDeployTransaction​

Ƭ PreparedDeployTransaction: Object

Type declaration​

NameType
type"deploy"
deploymentACCOUNT_DEPLOYMENT_DATA
parametersExecutionParameters
feePaymasterFeeEstimate

Defined in​

src/paymaster/types/response.type.ts:17


PreparedInvokeTransaction​

Ƭ PreparedInvokeTransaction: Object

Type declaration​

NameType
type"invoke"
typed_dataOutsideExecutionTypedData
parametersExecutionParameters
feePaymasterFeeEstimate

Defined in​

src/paymaster/types/response.type.ts:23


PreparedDeployAndInvokeTransaction​

Ƭ PreparedDeployAndInvokeTransaction: Object

Type declaration​

NameType
type"deploy_and_invoke"
deploymentACCOUNT_DEPLOYMENT_DATA
typed_dataOutsideExecutionTypedData
parametersExecutionParameters
feePaymasterFeeEstimate

Defined in​

src/paymaster/types/response.type.ts:29


PreparedTransaction​

Ƭ PreparedTransaction: PreparedDeployTransaction | PreparedInvokeTransaction | PreparedDeployAndInvokeTransaction

Defined in​

src/paymaster/types/response.type.ts:36


DeployTransaction​

Ƭ DeployTransaction: Object

Type declaration​

NameType
type"deploy"
deploymentACCOUNT_DEPLOYMENT_DATA

Defined in​

src/paymaster/types/response.type.ts:47


InvokeTransaction​

Ƭ InvokeTransaction: Object

Type declaration​

NameType
type"invoke"
invokeUserInvoke

Defined in​

src/paymaster/types/response.type.ts:51


UserInvoke​

Ƭ UserInvoke: Object

Type declaration​

NameType
userAddressstring
callsCall[]

Defined in​

src/paymaster/types/response.type.ts:55


DeployAndInvokeTransaction​

Ƭ DeployAndInvokeTransaction: Object

Type declaration​

NameType
type"deploy_and_invoke"
deploymentACCOUNT_DEPLOYMENT_DATA
invokeUserInvoke

Defined in​

src/paymaster/types/response.type.ts:59


UserTransaction​

Ƭ UserTransaction: DeployTransaction | InvokeTransaction | DeployAndInvokeTransaction

Defined in​

src/paymaster/types/response.type.ts:64


ExecutableDeployTransaction​

Ƭ ExecutableDeployTransaction: Object

Type declaration​

NameType
type"deploy"
deploymentACCOUNT_DEPLOYMENT_DATA

Defined in​

src/paymaster/types/response.type.ts:66


ExecutableInvokeTransaction​

Ƭ ExecutableInvokeTransaction: Object

Type declaration​

NameType
type"invoke"
invokeExecutableUserInvoke

Defined in​

src/paymaster/types/response.type.ts:70


ExecutableUserInvoke​

Ƭ ExecutableUserInvoke: Object

Type declaration​

NameType
userAddressstring
typedDataOutsideExecutionTypedData
signaturestring[]

Defined in​

src/paymaster/types/response.type.ts:74


ExecutableDeployAndInvokeTransaction​

Ƭ ExecutableDeployAndInvokeTransaction: Object

Type declaration​

NameType
type"deploy_and_invoke"
deploymentACCOUNT_DEPLOYMENT_DATA
invokeExecutableUserInvoke

Defined in​

src/paymaster/types/response.type.ts:79


ExecutableUserTransaction​

Ƭ ExecutableUserTransaction: ExecutableDeployTransaction | ExecutableInvokeTransaction | ExecutableDeployAndInvokeTransaction

Defined in​

src/paymaster/types/response.type.ts:84


FeeMode​

Ƭ FeeMode: { mode: "sponsored" } | { mode: "default" ; gasToken: string }

Defined in​

src/paymaster/types/response.type.ts:89


ExecutionParameters​

Ƭ ExecutionParameters: Object

Type declaration​

NameType
version"0x1"
feeModeFeeMode
timeBounds?PaymasterTimeBounds

Defined in​

src/paymaster/types/response.type.ts:90


DeployerCall​

Ƭ DeployerCall: Object

Interface for Deployer contract payload

Type declaration​

NameTypeDescription
callsCall[]an array of Call
addressesstring[]an array of addresses made of hex string

Defined in​

src/deployer/types/index.type.ts:6


DeployContractUDCResponse​

Ƭ DeployContractUDCResponse: Object

Type declaration​

NameType
contract_addressstring
transaction_hashstring
addressstring
deployerstring
uniquestring
classHashstring
calldata_lenstring
calldatastring[]
saltstring

Defined in​

src/deployer/types/index.type.ts:13


BatchClientOptions​

Ƭ BatchClientOptions<T>: Object

Type parameters​

NameType
Textends Object

Type declaration​

NameType
nodeUrlstring
headersobject
intervalnumber
baseFetchNonNullable<RpcProviderOptions["baseFetch"]>
rpcMethodsT

Defined in​

src/utils/batch/index.ts:5


ParsingStrategy​

Ƭ ParsingStrategy: Object

Parsing map for parser, request and response parsers are separated Configure parsing strategy for each abi type

Type declaration​

NameType
requestRecord<AbiEntryType, (val: unknown) => any>
responseRecord<AbiEntryType, (responseIterator: Iterator<string>) => any>

Defined in​

src/utils/calldata/parser/parsingStrategy.ts:24


CairoEnumRaw​

Ƭ CairoEnumRaw: Record<string, any>

Defined in​

src/utils/calldata/enum/CairoCustomEnum.ts:3


CairoOptionVariant​

Ƭ CairoOptionVariant: ValuesType<typeof CairoOptionVariant>

Defined in​

src/utils/calldata/enum/CairoOption.ts:4

src/utils/calldata/enum/CairoOption.ts:9


CairoResultVariant​

Ƭ CairoResultVariant: ValuesType<typeof CairoResultVariant>

Defined in​

src/utils/calldata/enum/CairoResult.ts:4

src/utils/calldata/enum/CairoResult.ts:9


LogLevelIndex​

Ƭ LogLevelIndex: ValuesType<typeof LogLevelIndex>

Defined in​

src/global/logger.type.ts:3

src/global/logger.type.ts:12


LogLevel​

Ƭ LogLevel: keyof typeof LogLevelIndex

Defined in​

src/global/logger.type.ts:14

Variables​

defaultDeployer​

• Const defaultDeployer: Deployer

Defined in​

src/deployer/index.ts:6


legacyDeployer​

• Const legacyDeployer: Deployer

Defined in​

src/deployer/index.ts:7


defaultPaymaster​

• Const defaultPaymaster: PaymasterRpc

Defined in​

src/paymaster/index.ts:6


defaultProvider​

• Const defaultProvider: RpcProvider

Defined in​

src/provider/index.ts:9


EntryPointType​

• Const EntryPointType: Object

Type declaration​

NameType
EXTERNAL"EXTERNAL"
L1_HANDLER"L1_HANDLER"
CONSTRUCTOR"CONSTRUCTOR"

Defined in​

src/types/lib/contract/index.ts:24

src/types/lib/contract/index.ts:30


ETransactionVersion​

• ETransactionVersion: Object

Type declaration​

NameTypeDescription
V0"0x0"Deprecated Starknet 0.14 will not support this transaction
V1"0x1"Deprecated Starknet 0.14 will not support this transaction
V2"0x2"Deprecated Starknet 0.14 will not support this transaction
V3"0x3"-
F0"0x100000000000000000000000000000000"Deprecated Starknet 0.14 will not support this transaction
F1"0x100000000000000000000000000000001"Deprecated Starknet 0.14 will not support this transaction
F2"0x100000000000000000000000000000002"Deprecated Starknet 0.14 will not support this transaction
F3"0x100000000000000000000000000000003"-

Defined in​

src/provider/types/spec.type.ts:55

src/provider/types/spec.type.ts:56


ETransactionVersion2​

• ETransactionVersion2: Object

Type declaration​

NameType
V0"0x0"
V1"0x1"
V2"0x2"
F0"0x100000000000000000000000000000000"
F1"0x100000000000000000000000000000001"
F2"0x100000000000000000000000000000002"

Defined in​

src/provider/types/spec.type.ts:58

src/provider/types/spec.type.ts:59


ETransactionVersion3​

• ETransactionVersion3: Object

Type declaration​

NameType
V3"0x3"
F3"0x100000000000000000000000000000003"

Defined in​

src/provider/types/spec.type.ts:61

src/provider/types/spec.type.ts:62


EDataAvailabilityMode​

• EDataAvailabilityMode: Object

Type declaration​

NameType
L1"L1"
L2"L2"

Defined in​

src/provider/types/spec.type.ts:118

src/provider/types/spec.type.ts:119


EDAMode​

• EDAMode: Object

Type declaration​

NameType
L10
L21

Defined in​

src/provider/types/spec.type.ts:120

src/provider/types/spec.type.ts:121


ETransactionStatus​

• ETransactionStatus: Object

Type declaration​

NameType
RECEIVED"RECEIVED"
CANDIDATE"CANDIDATE"
PRE_CONFIRMED"PRE_CONFIRMED"
ACCEPTED_ON_L2"ACCEPTED_ON_L2"
ACCEPTED_ON_L1"ACCEPTED_ON_L1"

Defined in​

src/provider/types/spec.type.ts:204

src/provider/types/spec.type.ts:205


ETransactionExecutionStatus​

• ETransactionExecutionStatus: Object

Type declaration​

NameType
SUCCEEDED"SUCCEEDED"
REVERTED"REVERTED"

Defined in​

src/provider/types/spec.type.ts:206

src/provider/types/spec.type.ts:207


TransactionType​

• TransactionType: Object

Type declaration​

NameType
DECLARE"DECLARE"
DEPLOY"DEPLOY"
DEPLOY_ACCOUNT"DEPLOY_ACCOUNT"
INVOKE"INVOKE"
L1_HANDLER"L1_HANDLER"

Defined in​

src/provider/types/spec.type.ts:212

src/provider/types/spec.type.ts:213


BlockStatus​

• BlockStatus: Object

Type declaration​

NameType
PRE_CONFIRMED"PRE_CONFIRMED"
ACCEPTED_ON_L2"ACCEPTED_ON_L2"
ACCEPTED_ON_L1"ACCEPTED_ON_L1"

Defined in​

src/provider/types/spec.type.ts:215

src/provider/types/spec.type.ts:216


TransactionFinalityStatus​

• TransactionFinalityStatus: Object

Type declaration​

NameType
PRE_CONFIRMED"PRE_CONFIRMED"
ACCEPTED_ON_L2"ACCEPTED_ON_L2"
ACCEPTED_ON_L1"ACCEPTED_ON_L1"

Defined in​

src/provider/types/spec.type.ts:218

src/provider/types/spec.type.ts:219


TransactionExecutionStatus​

• TransactionExecutionStatus: Object

Type declaration​

NameType
SUCCEEDED"SUCCEEDED"
REVERTED"REVERTED"

Defined in​

src/provider/types/spec.type.ts:221

src/provider/types/spec.type.ts:222


BlockTag​

• BlockTag: Object

Type declaration​

NameTypeDescription
LATEST"latest"Tag latest refers to the latest Starknet block finalized by the consensus on L2.
PRE_CONFIRMED"pre_confirmed"Tag pre_confirmed refers to the block which is currently being built by the block proposer in height latest + 1.
L1_ACCEPTED"l1_accepted"Tag l1_accepted refers to the latest Starknet block which was included in a state update on L1 and finalized by the consensus on L1.

Defined in​

src/provider/types/spec.type.ts:224

src/provider/types/spec.type.ts:225


ValidateType​

• Const ValidateType: Object

Type declaration​

NameType
DEPLOY"DEPLOY"
CALL"CALL"
INVOKE"INVOKE"

Defined in​

src/types/calldata.ts:3

src/types/calldata.ts:9


Uint​

• Const Uint: Object

Type declaration​

NameType
u8"core::integer::u8"
u16"core::integer::u16"
u32"core::integer::u32"
u64"core::integer::u64"
u96"core::integer::u96"
u128"core::integer::u128"
u256"core::integer::u256"
u512"core::integer::u512"

Defined in​

src/types/calldata.ts:11

src/types/calldata.ts:22


Int​

• Const Int: Object

Type declaration​

NameType
i8"core::integer::i8"
i16"core::integer::i16"
i32"core::integer::i32"
i64"core::integer::i64"
i128"core::integer::i128"

Defined in​

src/types/calldata.ts:24

src/types/calldata.ts:32


Literal​

• Const Literal: Object

Type declaration​

NameType
ClassHash"core::starknet::class_hash::ClassHash"
ContractAddress"core::starknet::contract_address::ContractAddress"
Secp256k1Point"core::starknet::secp256k1::Secp256k1Point"
U96"core::internal::bounded_int::BoundedInt::<0, 79228162514264337593543950335>"

Defined in​

src/types/calldata.ts:34

src/types/calldata.ts:41


ETH_ADDRESS​

• Const ETH_ADDRESS: "core::starknet::eth_address::EthAddress"

Defined in​

src/types/calldata.ts:43


NON_ZERO_PREFIX​

• Const NON_ZERO_PREFIX: "core::zeroable::NonZero::"

Defined in​

src/types/calldata.ts:44


OutsideExecutionTypesV1​

• Const OutsideExecutionTypesV1: Object

Type declaration​

NameType
StarkNetDomain{ name: string = 'name'; type: string = 'felt' }[]
OutsideExecution{ name: string = 'caller'; type: string = 'felt' }[]
OutsideCall{ name: string = 'to'; type: string = 'felt' }[]

Defined in​

src/types/outsideExecution.ts:34


OutsideExecutionTypesV2​

• Const OutsideExecutionTypesV2: Object

Type declaration​

NameType
StarknetDomain{ name: string = 'name'; type: string = 'shortstring' }[]
OutsideExecution{ name: string = 'Caller'; type: string = 'ContractAddress' }[]
Call{ name: string = 'To'; type: string = 'ContractAddress' }[]

Defined in​

src/types/outsideExecution.ts:56


OutsideExecutionVersion​

• Const OutsideExecutionVersion: Object

Type declaration​

NameType
UNSUPPORTED"0"
V1"1"
V2"2"

Defined in​

src/types/outsideExecution.ts:78

src/types/outsideExecution.ts:83


UINT_128_MAX​

• Const UINT_128_MAX: bigint

Defined in​

src/utils/cairoDataTypes/uint256.ts:13


UINT_256_MAX​

• Const UINT_256_MAX: bigint

Defined in​

src/utils/cairoDataTypes/uint256.ts:14


UINT_256_MIN​

• Const UINT_256_MIN: 0n

Defined in​

src/utils/cairoDataTypes/uint256.ts:15


UINT_256_LOW_MAX​

• Const UINT_256_LOW_MAX: 340282366920938463463374607431768211455n

Defined in​

src/utils/cairoDataTypes/uint256.ts:16


UINT_256_HIGH_MAX​

• Const UINT_256_HIGH_MAX: 340282366920938463463374607431768211455n

Defined in​

src/utils/cairoDataTypes/uint256.ts:17


UINT_256_LOW_MIN​

• Const UINT_256_LOW_MIN: 0n

Defined in​

src/utils/cairoDataTypes/uint256.ts:18


UINT_256_HIGH_MIN​

• Const UINT_256_HIGH_MIN: 0n

Defined in​

src/utils/cairoDataTypes/uint256.ts:19


UINT_512_MAX​

• Const UINT_512_MAX: bigint

Defined in​

src/utils/cairoDataTypes/uint512.ts:14


UINT_512_MIN​

• Const UINT_512_MIN: 0n

Defined in​

src/utils/cairoDataTypes/uint512.ts:15


UINT_128_MIN​

• Const UINT_128_MIN: 0n

Defined in​

src/utils/cairoDataTypes/uint512.ts:16


hdParsingStrategy​

• Const hdParsingStrategy: Object

More robust parsing strategy Configuration mapping - data-driven approach Configure parsing strategy for each abi type

Type declaration​

NameType
request{ core::bytes_31::bytes31: (val: unknown) => string[] ; core::byte_array::ByteArray: (val: unknown) => string[] ; core::felt252: (val: unknown) => string[] ; core::integer::u256: (val: unknown) => string[] }
request.core::bytes_31::bytes31(val: unknown) => string[]
request.core::byte_array::ByteArray(val: unknown) => string[]
request.core::felt252(val: unknown) => string[]
request.core::integer::u256(val: unknown) => string[]
response{ core::bytes_31::bytes31: (responseIterator: Iterator<string, any, undefined>) => string ; core::byte_array::ByteArray: (responseIterator: Iterator<string, any, undefined>) => string ; core::felt252: (responseIterator: Iterator<string, any, undefined>) => bigint ; core::integer::u256: (responseIterator: Iterator<string, any, undefined>) => bigint }
response.core::bytes_31::bytes31(responseIterator: Iterator<string, any, undefined>) => string
response.core::byte_array::ByteArray(responseIterator: Iterator<string, any, undefined>) => string
response.core::felt252(responseIterator: Iterator<string, any, undefined>) => bigint
response.core::integer::u256(responseIterator: Iterator<string, any, undefined>) => bigint

Defined in​

src/utils/calldata/parser/parsingStrategy.ts:36


fastParsingStrategy​

• Const fastParsingStrategy: ParsingStrategy

Faster parsing strategy Configuration mapping - data-driven approach Configure parsing strategy for each abi type

Defined in​

src/utils/calldata/parser/parsingStrategy.ts:139


CairoOptionVariant​

• Const CairoOptionVariant: Object

Type declaration​

NameType
Some0
None1

Defined in​

src/utils/calldata/enum/CairoOption.ts:4

src/utils/calldata/enum/CairoOption.ts:9


CairoResultVariant​

• Const CairoResultVariant: Object

Type declaration​

NameType
Ok0
Err1

Defined in​

src/utils/calldata/enum/CairoResult.ts:4

src/utils/calldata/enum/CairoResult.ts:9


config​

• Const config: Configuration

Defined in​

src/global/config.ts:116


logger​

• Const logger: Logger

Logger instance, use for the system logging. Higher the logger level index, higher the LogLevel required to display log. Default should be INFO

DEBUG: 5, INFO: 4, WARN: 3, ERROR: 2, FATAL: 1,

Defined in​

src/global/logger.ts:166


LogLevelIndex​

• Const LogLevelIndex: Object

Type declaration​

NameType
DEBUGnumber
INFOnumber
WARNnumber
ERRORnumber
FATALnumber
OFFnumber

Defined in​

src/global/logger.type.ts:3

src/global/logger.type.ts:12

Functions​

getTipStatsFromBlocks​

▸ getTipStatsFromBlocks(provider, blockIdentifier?, options?): Promise<TipEstimate>

Analyzes tip statistics from recent blocks to help determine optimal tip amounts.

This function examines V3 invoke transactions across multiple recent blocks to calculate minimum, maximum, and average tip amounts. This data can be used to determine an appropriate tip for new transactions.

Performance Notes:

  • Automatically detects if your provider has batching enabled
  • When batching is enabled, all block requests are made in parallel and automatically batched into a single HTTP request for maximum efficiency
  • When batching is not enabled, requests are made sequentially with early exit capability

Parameters​

NameTypeDefault valueDescription
providerProviderInterfaceundefinedRPC provider for blockchain communication
blockIdentifierBlockIdentifierBlockTag.LATESTStarting block for analysis (goes backwards from this block)
optionsTipAnalysisOptions{}Configuration options for the analysis

Returns​

Promise<TipEstimate>

Promise resolving to TipEstimate object

Throws

When invalid parameters are provided

Throws

When RPC calls fail, data is invalid, or insufficient transaction data is found

Example

import { RpcProvider } from 'starknet';

// Create provider with batching for optimal performance
const provider = new RpcProvider({
nodeUrl: 'your_node_url',
batch: 50, // 50ms batch interval - automatically detected and used
});

// Basic usage - automatically uses best strategy
const tipStats = await getTipStatsFromBlocks(provider, 'latest');
console.log(`Recommended tip (median): ${tipStats.recommendedTip}`);
console.log(`90th percentile tip: ${tipStats.p90Tip}`);
console.log(`95th percentile tip: ${tipStats.p95Tip}`);

// Advanced usage with custom options
const tipStats = await getTipStatsFromBlocks(provider, 'latest', {
maxBlocks: 10,
minTxsNecessary: 5,
includeZeroTips: true,
});

// Check if we have sufficient data
if (tipStats.recommendedTip === 0n) {
console.log('Insufficient transaction data for reliable tip estimation');
} else {
console.log(`Recommended tip: ${tipStats.recommendedTip}`);
console.log(`Average tip: ${tipStats.averageTip}`);
console.log(`Median tip: ${tipStats.medianTip}`);
console.log(`Mode tip: ${tipStats.modeTip}`);
console.log(`Min tip: ${tipStats.minTip}, Max tip: ${tipStats.maxTip}`);
console.log(`P90 tip: ${tipStats.p90Tip} (90% of tips are below this)`);
console.log(`P95 tip: ${tipStats.p95Tip} (95% of tips are below this)`);

// Access performance metrics if available
if (tipStats.metrics) {
console.log(`Analyzed ${tipStats.metrics.transactionsFound} transactions`);
console.log(`Across ${tipStats.metrics.blocksAnalyzed} blocks`);
}
}

// Using specific block number
const blockNumber = 650000;
const historicalTips = await getTipStatsFromBlocks(provider, blockNumber);

Defined in​

src/provider/modules/tip.ts:482


verifyMessageInStarknet​

▸ verifyMessageInStarknet(provider, message, signature, accountAddress, signatureVerificationFunctionName?, signatureVerificationResponse?): Promise<boolean>

Verify in Starknet a signature of a TypedData object or of a given hash.

Parameters​

NameTypeDescription
providerProviderInterfaceThe provider to use for the verification.
messageTypedData | BigNumberishTypedData object to be verified, or message hash to be verified.
signatureSignaturesignature of the message.
accountAddressBigNumberishaddress of the account that has signed the message.
signatureVerificationFunctionName?stringif account contract with non standard account verification function name.
signatureVerificationResponse?Objectif account contract with non standard response of verification function.
signatureVerificationResponse.okResponsestring[]-
signatureVerificationResponse.nokResponsestring[]-
signatureVerificationResponse.errorstring[]-

Returns​

Promise<boolean>

const myTypedMessage: TypedMessage = .... ;
const messageHash = typedData.getMessageHash(myTypedMessage,accountAddress);
const sign: WeierstrassSignatureType = ec.starkCurve.sign(messageHash, privateKey);
const accountAddress = "0x43b7240d227aa2fb8434350b3321c40ac1b88c7067982549e7609870621b535";
const result1 = await myRpcProvider.verifyMessageInStarknet(myTypedMessage, sign, accountAddress);
const result2 = await myRpcProvider.verifyMessageInStarknet(messageHash, sign, accountAddress);
// result1 = result2 = true

Defined in​

src/provider/modules/verifyMessageInStarknet.ts:27


getGasPrices​

▸ getGasPrices(channel, blockIdentifier?): Promise<GasPrices>

Parameters​

NameTypeDefault value
channelRpcChannel | RpcChannelundefined
blockIdentifierBlockIdentifierchannel.blockIdentifier

Returns​

Promise<GasPrices>

Defined in​

src/provider/modules/getGasPrices.ts:4


getLedgerPathBuffer111​

▸ getLedgerPathBuffer111(accountId, applicationName?): Uint8Array

Format the Ledger wallet path to an Uint8Array for a Ledger Starknet DAPP v1.1.1.

EIP2645 path = 2645'/starknet/application/0/accountId/0

Parameters​

NameTypeDefault valueDescription
accountIdnumberundefinedId of account. < 2**31.
applicationName?string'LedgerW'utf8 string of application name.

Returns​

Uint8Array

an Uint8array of 24 bytes.

Example

const result = getLedgerPathBuffer111(0);
// result = Uint8Array(24) [
128, 0, 10, 85, 71, 65, 233, 201,
43, 206, 231, 219, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0
]

Defined in​

src/signer/ledgerSigner111.ts:337


getLedgerPathBuffer221​

▸ getLedgerPathBuffer221(accountId, applicationName?): Uint8Array

Format the Ledger wallet path to an Uint8Array. for a Ledger Starknet DAPP v2.2.0 EIP2645 path = 2645'/starknet'/application'/0'/accountId'/0

Parameters​

NameTypeDefault valueDescription
accountIdnumberundefinedId of account. < 2**31.
applicationName?string'LedgerW'utf8 string of application name.

Returns​

Uint8Array

an Uint8array of 24 bytes.

Example

const result = getLedgerPathBuffer211(0);
// result = Uint8Array(24) [
128, 0, 10, 85, 199, 65, 233, 201,
171, 206, 231, 219, 128, 0, 0, 0,
128, 0, 0, 0, 0, 0, 0, 0
]

Defined in​

src/signer/ledgerSigner221.ts:460


isRPC08Plus_ResourceBounds​

▸ isRPC08Plus_ResourceBounds(entry): entry is RESOURCE_BOUNDS_MAPPING

Parameters​

NameType
entryObject
entry.l1_gasObject
entry.l1_gas.max_amountstring
entry.l1_gas.max_price_per_unitstring
entry.l1_data_gasObject
entry.l1_data_gas.max_amountstring
entry.l1_data_gas.max_price_per_unitstring
entry.l2_gasObject
entry.l2_gas.max_amountstring
entry.l2_gas.max_price_per_unitstring

Returns​

entry is RESOURCE_BOUNDS_MAPPING

Defined in​

src/provider/types/spec.type.ts:140


isRPC08Plus_ResourceBoundsBN​

▸ isRPC08Plus_ResourceBoundsBN(entry): entry is ResourceBoundsBN

Parameters​

NameType
entryResourceBoundsBN

Returns​

entry is ResourceBoundsBN

Defined in​

src/provider/types/spec.type.ts:146


isAccount​

▸ isAccount(providerOrAccount): providerOrAccount is AccountInterface

Type guard to narrow ProviderOrAccount to AccountInterface

Parameters​

NameTypeDescription
providerOrAccountProviderOrAccountThe object to check

Returns​

providerOrAccount is AccountInterface

true if the object is an AccountInterface

Defined in​

src/contract/types/index.type.ts:158


isV3Tx​

▸ isV3Tx(details): details is V3TransactionDetails

Check if the given transaction details is a V3 transaction.

Parameters​

NameTypeDescription
detailsInvocationsDetailsWithNonceThe transaction details to be checked.

Returns​

details is V3TransactionDetails

Returns true if the transaction is a V3 transaction, otherwise false.

Example

const invocation: InvocationsDetailsWithNonce = {
nonce: 1,
version: 3,
maxFee: 10 ** 15,
feeDataAvailabilityMode: RPC.EDataAvailabilityMode.L1,
tip: 10 ** 13,
paymasterData: [],
resourceBounds: {
l1_gas: { max_amount: num.toHex(10 ** 14), max_price_per_unit: num.toHex(50) },
l2_gas: { max_amount: num.toHex(0), max_price_per_unit: num.toHex(0) },
},
};
const result = provider.isV3Tx(invocation);
// result = true

Defined in​

src/utils/resolve.ts:36


isVersion​

▸ isVersion(expected, provided): boolean

Determines if the provided version matches the specified version. Version must be formatted "major.minor.patch" using dot delimiters. Use wildcard _ or unspecified to match 'any' value on the position. ex. 7.3._ == 7.3.15, * == 1.1.1, 0.8 == 0.8.5. '' != 0.8.5

Parameters​

NameTypeDescription
expectedstringversion.
providedstringto check against the expected version.

Returns​

boolean

True if the response matches the version, false otherwise.

Example

const result = provider.isVersion('0.9', '0.9.0');
// result = true

Defined in​

src/utils/resolve.ts:57


isSupportedSpecVersion​

▸ isSupportedSpecVersion(version, options?): version is "0.9.0" | "0.10.0"

Define if provided version is SDK supported rpc specification version

Parameters​

NameType
versionstring
optionsObject
options.allowAnyPatchVersionboolean

Returns​

version is "0.9.0" | "0.10.0"

Defined in​

src/utils/resolve.ts:67


toAnyPatchVersion​

▸ toAnyPatchVersion(version): string

Convert fixed version to any patch version. ex. 0.8.1 -> 0.8.*

Parameters​

NameType
versionstring

Returns​

string

Defined in​

src/utils/resolve.ts:80


toApiVersion​

▸ toApiVersion(version): string

Convert version to API format. ex. '0.8.1' -> 'v0_8', '0.8' -> 'v0_8'

Parameters​

NameType
versionstring

Returns​

string

Defined in​

src/utils/resolve.ts:94


compareVersions​

▸ compareVersions(a, b): number

Compare two semantic version strings segment by segment. This function safely compares versions without collision risk between versions like '0.0.1000' and '0.1.0'.

Parameters​

NameTypeDescription
astringFirst version string (e.g., '0.0.9')
bstringSecond version string (e.g., '0.0.10')

Returns​

number

-1 if a < b, 0 if a === b, 1 if a > b

Example

const result1 = compareVersions('0.0.9', '0.0.10');
// result1 = -1 (0.0.9 < 0.0.10)

const result2 = compareVersions('0.1.0', '0.0.1000');
// result2 = 1 (0.1.0 > 0.0.1000, correctly different!)

const result3 = compareVersions('1.2.3', '1.2.3');
// result3 = 0 (equal versions)

// Usage for version checks:
if (compareVersions(specVersion, '0.14.1') >= 0) {
// Use Blake2s hash for version >= 0.14.1
}

Defined in​

src/utils/resolve.ts:124


isPreConfirmedBlock​

▸ isPreConfirmedBlock(response): response is Object

Guard Pre Confirmed Block

Parameters​

NameTypeDescription
responseGetBlockResponseanswer of myProvider.getBlock()

Returns​

response is Object

true if block is the pre confirmed block

Example

const block = await myProvider.getBlock('pre_confirmed');
const result = provider.isPreConfirmedBlock(block);
// result = true

Defined in​

src/utils/resolve.ts:152


isPreConfirmedTransaction​

▸ isPreConfirmedTransaction(response): boolean

Guard Pre Confirmed Transaction

Parameters​

NameTypeDescription
responseGetTransactionReceiptResponsetransaction Receipt

Returns​

boolean

true if the transaction is part of the pre confirmed block

Example

const block = await myProvider.getBlockWithTxs('pre_confirmed');
const txR = await myProvider.getTransactionReceipt(block.transactions[0].transaction_hash);
const result = provider.isPreConfirmedTransaction(txR);
// result = true

Defined in​

src/utils/resolve.ts:168


isPreConfirmedStateUpdate​

▸ isPreConfirmedStateUpdate(response): response is Object

Guard Pre Confirmed State Update

Parameters​

NameTypeDescription
responseStateUpdateResponseState of a block

Returns​

response is Object

true if the block is pre confirmed

Example

const state: StateUpdateResponse = await myProvider.getStateUpdate('pre_confirmed');
const result = provider.isPreConfirmedStateUpdate(state);
// result = true

Defined in​

src/utils/resolve.ts:183


CairoFelt​

▸ CairoFelt(it): string

Parameters​

NameType
itBigNumberish

Returns​

string

format: felt-string

Deprecated

use the CairoFelt252 class instead, this one is limited to ASCII strings Create felt Cairo type (cairo type helper)

Defined in​

src/utils/cairoDataTypes/felt.ts:23


addAddressPadding​

▸ addAddressPadding(address): string

Format a hex number to '0x' and 64 characters, adding leading zeros if necessary.

Parameters​

NameType
addressBigNumberish

Returns​

string

Hex string: 0x followed by 64 characters. No upper case characters in the response.

Example

const result = [
31,
0x1f,
'31',
'0x1f',
'0x90591d9fa3efc87067d95a643f8455e0b8190eb8cb7bfd39e4fb7571fdf',
].map(addAddressPadding);
// result = [
// '0x000000000000000000000000000000000000000000000000000000000000001f',
// '0x000000000000000000000000000000000000000000000000000000000000001f',
// '0x0000000000000000000000000000000000000000000000000000000000000031',
// '0x000000000000000000000000000000000000000000000000000000000000001f',
// '0x0000090591d9fa3efc87067d95a643f8455e0b8190eb8cb7bfd39e4fb7571fdf'
// ]

Defined in​

src/utils/address.ts:28


validateAndParseAddress​

▸ validateAndParseAddress(address): string

Check the validity of a Starknet address, and format it as a hex number: '0x' and 64 characters, adding leading zeros if necessary.

Parameters​

NameType
addressBigNumberish

Returns​

string

Hex string: 0x followed by 64 characters. No upper case characters in the response.

Throws

address argument must be a valid address inside the address range bound

Example

const result = [
31,
0x1f,
'31',
'0x1f',
'0x90591d9fa3efc87067d95a643f8455e0b8190eb8cb7bfd39e4fb7571fdf',
].map(addAddressPadding);
// result = [
// '0x000000000000000000000000000000000000000000000000000000000000001f',
// '0x000000000000000000000000000000000000000000000000000000000000001f',
// '0x0000000000000000000000000000000000000000000000000000000000000031',
// '0x000000000000000000000000000000000000000000000000000000000000001f',
// '0x0000090591d9fa3efc87067d95a643f8455e0b8190eb8cb7bfd39e4fb7571fdf'
// ]

Defined in​

src/utils/address.ts:52


getChecksumAddress​

▸ getChecksumAddress(address): string

Convert an address to her checksum representation which uses a specific pattern of uppercase and lowercase letters within a given address to reduce the risk of errors introduced from typing an address or cut and paste issues.

Parameters​

NameType
addressBigNumberish

Returns​

string

Hex string : 0x followed by 64 characters. Mix of uppercase and lowercase

Example

const address = '0x90591d9fa3efc87067d95a643f8455e0b8190eb8cb7bfd39e4fb7571fdf';
const result = getChecksumAddress(address);
// result = "0x0000090591D9fA3EfC87067d95a643f8455E0b8190eb8Cb7bFd39e4fb7571fDF"

Defined in​

src/utils/address.ts:77


validateChecksumAddress​

▸ validateChecksumAddress(address): boolean

If the casing of an address is mixed, it is a Checksum Address, which uses a specific pattern of uppercase and lowercase letters within a given address to reduce the risk of errors introduced from typing an address or cut and paste issues.

Parameters​

NameTypeDescription
addressstringstring

Returns​

boolean

true if the ChecksumAddress is valid

Example

const address = '0x0000090591D9fA3EfC87067d95a643f8455E0b8190eb8Cb7bFd39e4fb7571fDF';
const result = validateChecksumAddress(address);
// result = true

Defined in​

src/utils/address.ts:107


parseCalldataField​

▸ parseCalldataField(«destructured»): string | string[]

Parse one field of the calldata by using input field from the abi for that method

Parameters​

NameType
«destructured»Object
› argsIteratorIterator<any, any, undefined>
› inputAbiEntry
› structsAbiStructs
› enumsAbiEnums
› parserAbiParserInterface

Returns​

string | string[]

  • parsed arguments in format that contract is expecting

Example

const abiEntry = { name: 'test', type: 'struct' };
const abiStructs: AbiStructs = {
struct: {
members: [
{
name: 'test_name',
type: 'test_type',
offset: 1,
},
],
size: 2,
name: 'cairo__struct',
type: 'struct',
},
};

const abiEnums: AbiEnums = {
enum: {
variants: [
{
name: 'test_name',
type: 'cairo_struct_variant',
offset: 1,
},
],
size: 2,
name: 'test_cairo',
type: 'enum',
},
};

const args = [{ test_name: 'test' }];
const argsIterator = args[Symbol.iterator]();
const parsedField = parseCalldataField(argsIterator, abiEntry, abiStructs, abiEnums);
// parsedField === ['1952805748']

Defined in​

src/utils/calldata/requestParser.ts:416


createAbiParser​

▸ createAbiParser(abi, parsingStrategy?): AbiParserInterface

Creates ABI parser

Parameters​

NameType
abiAbi
parsingStrategy?ParsingStrategy

Returns​

AbiParserInterface

abi parser interface

Example

const abiParser2 = createAbiParser([getInterfaceAbi('struct')]);
// abiParser2 instanceof AbiParser2 === true

const abiParser1 = createAbiParser([getFunctionAbi('struct')]);
// abiParser1 instanceof AbiParser1 === true

Defined in​

src/utils/calldata/parser/index.ts:26


getAbiVersion​

▸ getAbiVersion(abi): 1 | 2 | 0

Retrieves ABI version

Parameters​

NameType
abiAbi

Returns​

1 | 2 | 0

abi 1, 2 or 0 version

Example

// Example 1: Return ABI version 2
const version = getAbiVersion([getInterfaceAbi()]);
// version === 2

// Example 2: Return ABI version 1
const version = getAbiVersion([getInterfaceAbi('core::bool')]);
// version === 1

// Example 3: Return ABI version 0
const version = getAbiVersion([getInterfaceAbi('felt')]);
// version === 0

Defined in​

src/utils/calldata/parser/index.ts:56


isNoConstructorValid​

▸ isNoConstructorValid(method, argsCalldata, abiMethod?): boolean

Checks if no constructor valid

Parameters​

NameType
methodstring
argsCalldataRawArgs
abiMethod?FunctionAbi

Returns​

boolean

boolean

Example

const result1 = isNoConstructorValid('constructor', []);
// result1 === true
const result2 = isNoConstructorValid('test', ['test']);
// result2 === false

Defined in​

src/utils/calldata/parser/index.ts:76


isSierra​

▸ isSierra(contract): contract is CompiledSierra | SierraContractClass

Checks if a given contract is in Sierra (Safe Intermediate Representation) format.

Parameters​

NameTypeDescription
contractstring | CairoContractThe contract to check. Can be either a CairoContract object or a string representation of the contract.

Returns​

contract is CompiledSierra | SierraContractClass

  • Returns true if the contract is a Sierra contract, otherwise false.

Example

const result = isSierra(contract);
// result = true | false

Defined in​

src/utils/contract.ts:26


extractContractHashes​

▸ extractContractHashes(payload, starknetVersion?): CompleteDeclareContractPayload

Extracts contract hashes from DeclareContractPayload.

Parameters​

NameTypeDescription
payloadDeclareContractPayloadThe payload containing contract information.
starknetVersion?string-

Returns​

CompleteDeclareContractPayload

  • The CompleteDeclareContractPayload with extracted contract hashes.

Throws

  • If extraction of compiledClassHash or classHash fails.

Example

const result = extractContractHashes(contract);
// result = {
// contract: ...,
// classHash: ...,
// casm: ...,
// compiledClassHash: ...,
// }

Defined in​

src/utils/contract.ts:50


contractClassResponseToLegacyCompiledContract​

▸ contractClassResponseToLegacyCompiledContract(ccr): LegacyCompiledContract

Helper to redeclare response Cairo0 contract

Parameters​

NameType
ccrContractClassResponse

Returns​

LegacyCompiledContract

Defined in​

src/utils/contract.ts:76


createTransactionReceipt​

▸ createTransactionReceipt(receipt): GetTransactionReceiptResponse

Creates a transaction receipt response object with helpers

Parameters​

NameTypeDescription
receiptTXN_RECEIPT_WITH_BLOCK_INFOThe transaction receipt response from the provider

Returns​

GetTransactionReceiptResponse

A transaction receipt response object with helpers

Defined in​

src/utils/transactionReceipt/transactionReceipt.ts:149


units​

▸ units(amount, simbol?): string

Convert strk to fri or fri to strk

Parameters​

NameTypeDefault value
amountstring | bigintundefined
simbol"fri" | "strk"'fri'

Returns​

string

Example

units(1000n, 'fri'); // '0.000000000000001' strk
units('1', 'strk'); // '1000000000000000000' fri

Defined in​

src/utils/units.ts:12