Skip to main content
Version: Next

Starknet.js API - v5.19.5

Namespaces

Enumerations

Classes

References

RPC

Re-exports RPC


CallL1Handler

Re-exports CallL1Handler


DeployedContractItem

Re-exports DeployedContractItem


ExecutionResources

Re-exports ExecutionResources


FunctionInvocation

Re-exports FunctionInvocation


GetContractAddressesResponse

Re-exports GetContractAddressesResponse


GetTransactionStatusResponse

Re-exports GetTransactionStatusResponse


SequencerIdentifier

Re-exports SequencerIdentifier


Sequencer

Re-exports Sequencer


EstimateFee

Re-exports EstimateFee


EstimateFeeBulk

Re-exports EstimateFeeBulk


AccountInvocationsFactoryDetails

Re-exports AccountInvocationsFactoryDetails


EstimateFeeDetails

Re-exports EstimateFeeDetails


DeployContractResponse

Re-exports DeployContractResponse


MultiDeployContractResponse

Re-exports MultiDeployContractResponse


DeployContractUDCResponse

Re-exports DeployContractUDCResponse


DeclareDeployUDCResponse

Re-exports DeclareDeployUDCResponse


SimulateTransactionDetails

Re-exports SimulateTransactionDetails


SIMULATION_FLAG

Re-exports SIMULATION_FLAG


ValidateType

Re-exports ValidateType


Uint

Re-exports Uint


Litteral

Re-exports Litteral


AsyncContractFunction

Re-exports AsyncContractFunction


ContractFunction

Re-exports ContractFunction


Result

Re-exports Result


ArgsOrCalldata

Re-exports ArgsOrCalldata


ArgsOrCalldataWithOptions

Re-exports ArgsOrCalldataWithOptions


ContractOptions

Re-exports ContractOptions


CallOptions

Re-exports CallOptions


InvokeOptions

Re-exports InvokeOptions


ParsedEvent

Re-exports ParsedEvent


ParsedEvents

Re-exports ParsedEvents


WeierstrassSignatureType

Re-exports WeierstrassSignatureType


ArraySignatureType

Re-exports ArraySignatureType


Signature

Re-exports Signature


BigNumberish

Re-exports BigNumberish


Calldata

Re-exports Calldata


Uint256

Re-exports Uint256


RawCalldata

Re-exports RawCalldata


HexCalldata

Re-exports HexCalldata


AllowArray

Re-exports AllowArray


OptionalPayload

Re-exports OptionalPayload


RawArgs

Re-exports RawArgs


RawArgsObject

Re-exports RawArgsObject


RawArgsArray

Re-exports RawArgsArray


MultiType

Re-exports MultiType


UniversalDeployerContractPayload

Re-exports UniversalDeployerContractPayload


DeployAccountContractPayload

Re-exports DeployAccountContractPayload


DeployAccountContractTransaction

Re-exports DeployAccountContractTransaction


DeclareContractPayload

Re-exports DeclareContractPayload


CompleteDeclareContractPayload

Re-exports CompleteDeclareContractPayload


DeclareAndDeployContractPayload

Re-exports DeclareAndDeployContractPayload


DeclareContractTransaction

Re-exports DeclareContractTransaction


CallDetails

Re-exports CallDetails


Invocation

Re-exports Invocation


Call

Re-exports Call


CairoVersion

Re-exports CairoVersion


InvocationsDetails

Re-exports InvocationsDetails


Details

Re-exports Details


InvocationsDetailsWithNonce

Re-exports InvocationsDetailsWithNonce


TransactionType

Re-exports TransactionType


TransactionStatus

Re-exports TransactionStatus


TransactionFinalityStatus

Re-exports TransactionFinalityStatus


TransactionExecutionStatus

Re-exports TransactionExecutionStatus


BlockStatus

Re-exports BlockStatus


BlockTag

Re-exports BlockTag


BlockNumber

Re-exports BlockNumber


BlockIdentifier

Re-exports BlockIdentifier


AccountInvocationItem

Re-exports AccountInvocationItem


AccountInvocations

Re-exports AccountInvocations


Invocations

Re-exports Invocations


Tupled

Re-exports Tupled


Args

Re-exports Args


ParsedStruct

Re-exports ParsedStruct


waitForTransactionOptions

Re-exports waitForTransactionOptions


getSimulateTransactionOptions

Re-exports getSimulateTransactionOptions


getEstimateFeeBulkOptions

Re-exports getEstimateFeeBulkOptions


CallStruct

Re-exports CallStruct


ContractClass

Re-exports ContractClass


CompiledContract

Re-exports CompiledContract


CairoContract

Re-exports CairoContract


EntryPointType

Re-exports EntryPointType


Abi

Re-exports Abi


AbiEntry

Re-exports AbiEntry


EventEntry

Re-exports EventEntry


FunctionAbi

Re-exports FunctionAbi


AbiStructs

Re-exports AbiStructs


StructAbi

Re-exports StructAbi


AbiEnums

Re-exports AbiEnums


EnumAbi

Re-exports EnumAbi


AbiEvents

Re-exports AbiEvents


EventAbi

Re-exports EventAbi


Cairo1Event

Re-exports Cairo1Event


LegacyEvent

Re-exports LegacyEvent


LegacyContractClass

Re-exports LegacyContractClass


LegacyCompiledContract

Re-exports LegacyCompiledContract


Builtins

Re-exports Builtins


CompressedProgram

Re-exports CompressedProgram


EntryPointsByType

Re-exports EntryPointsByType


ContractEntryPointFields

Re-exports ContractEntryPointFields


Program

Re-exports Program


CairoAssembly

Re-exports CairoAssembly


CompiledSierra

Re-exports CompiledSierra


SierraContractClass

Re-exports SierraContractClass


CompiledSierraCasm

Re-exports CompiledSierraCasm


ByteCode

Re-exports ByteCode


PythonicHints

Re-exports PythonicHints


SierraProgramDebugInfo

Re-exports SierraProgramDebugInfo


SierraEntryPointsByType

Re-exports SierraEntryPointsByType


SierraContractEntryPointFields

Re-exports SierraContractEntryPointFields


ProviderOptions

Re-exports ProviderOptions


RpcProviderOptions

Re-exports RpcProviderOptions


SequencerHttpMethod

Re-exports SequencerHttpMethod


SequencerProviderOptions

Re-exports SequencerProviderOptions


GetBlockResponse

Re-exports GetBlockResponse


GetCodeResponse

Re-exports GetCodeResponse


ContractEntryPoint

Re-exports ContractEntryPoint


GetTransactionResponse

Re-exports GetTransactionResponse


CommonTransactionResponse

Re-exports CommonTransactionResponse


InvokeTransactionResponse

Re-exports InvokeTransactionResponse


DeclareTransactionResponse

Re-exports DeclareTransactionResponse


MessageToL1

Re-exports MessageToL1


Event

Re-exports Event


MessageToL2

Re-exports MessageToL2


RejectedTransactionResponse

Re-exports RejectedTransactionResponse


GetTransactionReceiptResponse

Re-exports GetTransactionReceiptResponse


SuccessfulTransactionReceiptResponse

Re-exports SuccessfulTransactionReceiptResponse


InvokeTransactionReceiptResponse

Re-exports InvokeTransactionReceiptResponse


DeclareTransactionReceiptResponse

Re-exports DeclareTransactionReceiptResponse


DeployTransactionReceiptResponse

Re-exports DeployTransactionReceiptResponse


RejectedTransactionReceiptResponse

Re-exports RejectedTransactionReceiptResponse


RevertedTransactionReceiptResponse

Re-exports RevertedTransactionReceiptResponse


EstimateFeeResponse

Re-exports EstimateFeeResponse


InvokeFunctionResponse

Re-exports InvokeFunctionResponse


DeclareContractResponse

Re-exports DeclareContractResponse


CallContractResponse

Re-exports CallContractResponse


EstimateFeeAction

Re-exports EstimateFeeAction


EstimateFeeResponseBulk

Re-exports EstimateFeeResponseBulk


Storage

Re-exports Storage


Nonce

Re-exports Nonce


SimulationFlags

Re-exports SimulationFlags


SimulatedTransaction

Re-exports SimulatedTransaction


SimulateTransactionResponse

Re-exports SimulateTransactionResponse


StateUpdateResponse

Re-exports StateUpdateResponse


ContractClassResponse

Re-exports ContractClassResponse


InvocationsSignerDetails

Re-exports InvocationsSignerDetails


DeclareSignerDetails

Re-exports DeclareSignerDetails


DeployAccountSignerDetails

Re-exports DeployAccountSignerDetails


StarkNetMerkleType

Re-exports StarkNetMerkleType


StarkNetType

Re-exports StarkNetType


StarkNetDomain

Re-exports StarkNetDomain


TypedData

Re-exports TypedData


CairoEnum

Re-exports CairoEnum

Type Aliases

TypedContract

Ƭ TypedContract<TAbi>: AbiWanTypedContract<TAbi> & ContractInterface

Type parameters

NameType
TAbiextends AbiKanabi

Defined in

src/contract/interface.ts:21


ContractFactoryParams

Ƭ ContractFactoryParams: Object

Type declaration

NameType
compiledContractCompiledContract
accountany
casm?CairoAssembly
classHash?string
compiledClassHash?string
abi?Abi

Defined in

src/contract/contractFactory.ts:13


CairoEnumRaw

Ƭ CairoEnumRaw: Object

Index signature

[key: string]: any

Defined in

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

Variables

number

Const number: num = num

Deprecated

prefer the 'num' naming

Defined in

src/index.ts:46


defaultProvider

Const defaultProvider: Provider

Defined in

src/provider/index.ts:9

Functions

getCalldata

getCalldata(args, callback): Calldata

Parameters

NameType
argsRawArgs
callbackFunction

Returns

Calldata

Defined in

src/contract/default.ts:108


splitArgsAndOptions

splitArgsAndOptions(args): { args: ArgsOrCalldata ; options: ContractOptions } | { args: ArgsOrCalldata ; options?: undefined }

Parameters

NameType
argsArgsOrCalldataWithOptions

Returns

{ args: ArgsOrCalldata ; options: ContractOptions } | { args: ArgsOrCalldata ; options?: undefined }

Defined in

src/contract/default.ts:35


fixStack

fixStack(target, fn?): void

Parameters

NameTypeDefault value
targetErrorundefined
fnFunctiontarget.constructor

Returns

void

Defined in

src/provider/errors.ts:2


fixProto

fixProto(target, prototype): void

Parameters

NameType
targetError
prototypeObject

Returns

void

Defined in

src/provider/errors.ts:8


addAddressPadding

addAddressPadding(address): string

Parameters

NameType
addressBigNumberish

Returns

string

Defined in

src/utils/address.ts:10


validateAndParseAddress

validateAndParseAddress(address): string

Parameters

NameType
addressBigNumberish

Returns

string

Defined in

src/utils/address.ts:14


getChecksumAddress

getChecksumAddress(address): string

Parameters

NameType
addressBigNumberish

Returns

string

Defined in

src/utils/address.ts:27


validateChecksumAddress

validateChecksumAddress(address): boolean

Parameters

NameType
addressstring

Returns

boolean

Defined in

src/utils/address.ts:44


isUrl

isUrl(s?): boolean

Loosely validate a URL string.

Parameters

NameType
s?string

Returns

boolean

Defined in

src/utils/url.ts:20


buildUrl

buildUrl(baseUrl, defaultPath, urlOrPath?): string

Parameters

NameType
baseUrlstring
defaultPathstring
urlOrPath?string

Returns

string

Defined in

src/utils/url.ts:49


isSierra

isSierra(contract): contract is CompiledSierra | SierraContractClass

Parameters

NameType
contractstring | CairoContract

Returns

contract is CompiledSierra | SierraContractClass

Defined in

src/utils/contract.ts:14


extractContractHashes

extractContractHashes(payload): CompleteDeclareContractPayload

Parameters

NameType
payloadDeclareContractPayload

Returns

CompleteDeclareContractPayload

Defined in

src/utils/contract.ts:21


contractClassResponseToLegacyCompiledContract

contractClassResponseToLegacyCompiledContract(ccr): LegacyCompiledContract

Helper to redeclare response Cairo0 contract

Parameters

NameType
ccrContractClassResponse

Returns

LegacyCompiledContract

Defined in

src/utils/contract.ts:46


parseUDCEvent

parseUDCEvent(txReceipt): Object

Parse Transaction Receipt Event from UDC invoke transaction and create DeployContractResponse compatible response with addition of the UDC Event data

Parameters

NameType
txReceiptInvokeTransactionReceiptResponse

Returns

Object

DeployContractResponse | UDC Event Response data

NameType
transaction_hashstring
contract_addressany
addressany
deployerany
uniqueany
classHashany
calldata_lenany
calldataany
saltany

Defined in

src/utils/events.ts:11