Skip to main content
Version: 5.14.1

Starknet.js API - v5.14.1

Namespaces​

Classes​

References​

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


AsyncContractFunction​

Re-exports AsyncContractFunction


ContractFunction​

Re-exports ContractFunction


Result​

Re-exports Result


Calldata​

Re-exports Calldata


ArgsOrCalldata​

Re-exports ArgsOrCalldata


ArgsOrCalldataWithOptions​

Re-exports ArgsOrCalldataWithOptions


ContractOptions​

Re-exports ContractOptions


CallOptions​

Re-exports CallOptions


InvokeOptions​

Re-exports InvokeOptions


WeierstrassSignatureType​

Re-exports WeierstrassSignatureType


ArraySignatureType​

Re-exports ArraySignatureType


Signature​

Re-exports Signature


BigNumberish​

Re-exports BigNumberish


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


DeployContractPayload​

Re-exports DeployContractPayload


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


TransactionStatus​

Re-exports TransactionStatus


AccountInvocationItem​

Re-exports AccountInvocationItem


AccountInvocations​

Re-exports AccountInvocations


Invocations​

Re-exports Invocations


Status​

Re-exports Status


TransactionType​

Re-exports TransactionType


Tupled​

Re-exports Tupled


BlockTag​

Re-exports BlockTag


BlockNumber​

Re-exports BlockNumber


BlockIdentifier​

Re-exports BlockIdentifier


Struct​

Re-exports Struct


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


FunctionAbi​

Re-exports FunctionAbi


AbiStructs​

Re-exports AbiStructs


StructAbi​

Re-exports StructAbi


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


GetTransactionResponse​

Re-exports GetTransactionResponse


CommonTransactionResponse​

Re-exports CommonTransactionResponse


InvokeTransactionResponse​

Re-exports InvokeTransactionResponse


ContractEntryPoint​

Re-exports ContractEntryPoint


DeclareTransactionResponse​

Re-exports DeclareTransactionResponse


GetTransactionReceiptResponse​

Re-exports GetTransactionReceiptResponse


CommonTransactionReceiptResponse​

Re-exports CommonTransactionReceiptResponse


MessageToL1​

Re-exports MessageToL1


Event​

Re-exports Event


MessageToL2​

Re-exports MessageToL2


InvokeTransactionReceiptResponse​

Re-exports InvokeTransactionReceiptResponse


DeclareTransactionReceiptResponse​

Re-exports DeclareTransactionReceiptResponse


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


GetTransactionStatusResponse​

Re-exports GetTransactionStatusResponse


GetContractAddressesResponse​

Re-exports GetContractAddressesResponse


FunctionInvocation​

Re-exports FunctionInvocation


ExecutionResources​

Re-exports ExecutionResources


CallL1Handler​

Re-exports CallL1Handler


DeployedContractItem​

Re-exports DeployedContractItem


SequencerIdentifier​

Re-exports SequencerIdentifier


Sequencer​

Re-exports Sequencer


RPC​

Re-exports RPC

Variables​

number​

• Const number: num = num

Deprecated

prefer the 'num' naming

Defined in​

src/index.ts:44


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:98


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:25


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:22


buildUrl​

â–¸ buildUrl(baseUrl, defaultPath, urlOrPath?): string

Parameters​

NameType
baseUrlstring
defaultPathstring
urlOrPath?string

Returns​

string

Defined in​

src/utils/url.ts:51


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​

NameTypeDescription
ccrContractClassResponseContractClassResponse

Returns​

LegacyCompiledContract

LegacyCompiledContract

Defined in​

src/utils/contract.ts:48


parseUDCEvent​

â–¸ parseUDCEvent(txReceipt): Object

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

Parameters​

NameType
txReceiptInvokeTransactionReceiptResponse

Returns​

Object

DeployContractResponse | UDC Event Response data

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

Defined in​

src/utils/events.ts:12