@0xknwn/starknet-modular-account / Exports / SmartrAccount

Class: SmartrAccount

Represents a SmartrAccount.

Hierarchy

  • Account

    SmartrAccount

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SmartrAccount(providerOrOptions, address, pkOrSigner, module?, cairoVersion?, transactionVersion?): SmartrAccount

Parameters

NameTypeDefault value
providerOrOptionsProviderInterface | ProviderOptionsundefined
addressstringundefined
pkOrSignerstring | Uint8Array | SignerInterfaceundefined
moduleundefined | AccountModuleInterfaceundefined
cairoVersion?CairoVersionundefined
transactionVersionanyRPC.ETransactionVersion.V2

Returns

SmartrAccount

Overrides

Account.constructor

Defined in

sdks/account/src/smartr_account.ts:76

Properties

address

address: string

Inherited from

Account.address

Defined in

node_modules/starknet/dist/index.d.ts:3738


cairoVersion

cairoVersion: CairoVersion

Inherited from

Account.cairoVersion

Defined in

node_modules/starknet/dist/index.d.ts:3739


channel

channel: RpcChannel | RpcChannel$1

Inherited from

Account.channel

Defined in

node_modules/starknet/dist/index.d.ts:3196


deploySelf

deploySelf: (__namedParameters: DeployAccountContractPayload, details?: UniversalDetails) => Promise<DeployContractResponse>

Type declaration

▸ («destructured», details?): Promise<DeployContractResponse>

Parameters
NameType
«destructured»DeployAccountContractPayload
details?UniversalDetails
Returns

Promise<DeployContractResponse>

Inherited from

Account.deploySelf

Defined in

node_modules/starknet/dist/index.d.ts:3770


getStateUpdate

getStateUpdate: () => Promise<{ block_hash: never ; old_root: string ; state_diff: { declared_classes: { class_hash: string ; compiled_class_hash: string }[] ; deployed_contracts: { address: string ; class_hash: string }[] ; deprecated_declared_classes: string[] ; nonces: { contract_address: string ; nonce: string }[] ; replaced_classes: { class_hash: string ; contract_address: string }[] ; storage_diffs: { address: string ; storage_entries: { key: string ; value: string }[] }[] } }>(blockIdentifier: "pending") => Promise<{ block_hash: never ; old_root: string ; state_diff: { declared_classes: { class_hash: string ; compiled_class_hash: string }[] ; deployed_contracts: { address: string ; class_hash: string }[] ; deprecated_declared_classes: string[] ; nonces: { contract_address: string ; nonce: string }[] ; replaced_classes: { class_hash: string ; contract_address: string }[] ; storage_diffs: { address: string ; storage_entries: { key: string ; value: string }[] }[] } }>(blockIdentifier: "latest") => Promise<{ block_hash: string ; new_root: string ; old_root: string ; state_diff: { declared_classes: { class_hash: string ; compiled_class_hash: string }[] ; deployed_contracts: { address: string ; class_hash: string }[] ; deprecated_declared_classes: string[] ; nonces: { contract_address: string ; nonce: string }[] ; replaced_classes: { class_hash: string ; contract_address: string }[] ; storage_diffs: { address: string ; storage_entries: { key: string ; value: string }[] }[] } }>(blockIdentifier?: BlockIdentifier) => Promise<StateUpdateResponse>

Type declaration

▸ (): Promise<{ block_hash: never ; old_root: string ; state_diff: { declared_classes: { class_hash: string ; compiled_class_hash: string }[] ; deployed_contracts: { address: string ; class_hash: string }[] ; deprecated_declared_classes: string[] ; nonces: { contract_address: string ; nonce: string }[] ; replaced_classes: { class_hash: string ; contract_address: string }[] ; storage_diffs: { address: string ; storage_entries: { key: string ; value: string }[] }[] } }>

Returns

Promise<{ block_hash: never ; old_root: string ; state_diff: { declared_classes: { class_hash: string ; compiled_class_hash: string }[] ; deployed_contracts: { address: string ; class_hash: string }[] ; deprecated_declared_classes: string[] ; nonces: { contract_address: string ; nonce: string }[] ; replaced_classes: { class_hash: string ; contract_address: string }[] ; storage_diffs: { address: string ; storage_entries: { key: string ; value: string }[] }[] } }>

▸ (blockIdentifier): Promise<{ block_hash: never ; old_root: string ; state_diff: { declared_classes: { class_hash: string ; compiled_class_hash: string }[] ; deployed_contracts: { address: string ; class_hash: string }[] ; deprecated_declared_classes: string[] ; nonces: { contract_address: string ; nonce: string }[] ; replaced_classes: { class_hash: string ; contract_address: string }[] ; storage_diffs: { address: string ; storage_entries: { key: string ; value: string }[] }[] } }>

Parameters
NameType
blockIdentifier"pending"
Returns

Promise<{ block_hash: never ; old_root: string ; state_diff: { declared_classes: { class_hash: string ; compiled_class_hash: string }[] ; deployed_contracts: { address: string ; class_hash: string }[] ; deprecated_declared_classes: string[] ; nonces: { contract_address: string ; nonce: string }[] ; replaced_classes: { class_hash: string ; contract_address: string }[] ; storage_diffs: { address: string ; storage_entries: { key: string ; value: string }[] }[] } }>

▸ (blockIdentifier): Promise<{ block_hash: string ; new_root: string ; old_root: string ; state_diff: { declared_classes: { class_hash: string ; compiled_class_hash: string }[] ; deployed_contracts: { address: string ; class_hash: string }[] ; deprecated_declared_classes: string[] ; nonces: { contract_address: string ; nonce: string }[] ; replaced_classes: { class_hash: string ; contract_address: string }[] ; storage_diffs: { address: string ; storage_entries: { key: string ; value: string }[] }[] } }>

Parameters
NameType
blockIdentifier"latest"
Returns

Promise<{ block_hash: string ; new_root: string ; old_root: string ; state_diff: { declared_classes: { class_hash: string ; compiled_class_hash: string }[] ; deployed_contracts: { address: string ; class_hash: string }[] ; deprecated_declared_classes: string[] ; nonces: { contract_address: string ; nonce: string }[] ; replaced_classes: { class_hash: string ; contract_address: string }[] ; storage_diffs: { address: string ; storage_entries: { key: string ; value: string }[] }[] } }>

▸ (blockIdentifier?): Promise<StateUpdateResponse>

Parameters
NameType
blockIdentifier?BlockIdentifier
Returns

Promise<StateUpdateResponse>

Inherited from

Account.getStateUpdate

Defined in

node_modules/starknet/dist/index.d.ts:3233


module

module: undefined | AccountModuleInterface

Defined in

sdks/account/src/smartr_account.ts:74


signer

signer: SignerInterface

Inherited from

Account.signer

Defined in

node_modules/starknet/dist/index.d.ts:3737


transactionVersion

Readonly transactionVersion: V2 | V3

Inherited from

Account.transactionVersion

Defined in

node_modules/starknet/dist/index.d.ts:3740

Methods

accountInvocationsFactory

accountInvocationsFactory(invocations, details): Promise<AccountInvocations>

Parameters

NameType
invocationsInvocations
detailsAccountInvocationsFactoryDetails

Returns

Promise<AccountInvocations>

Inherited from

Account.accountInvocationsFactory

Defined in

node_modules/starknet/dist/index.d.ts:3793


addModule

addModule(class_hash, execute?): Promise<{ transaction_hash: string }>

Add a module to an account.

Parameters

NameTypeDescription
class_hashstringthe module to add
execute?trueIf true, the transaction is executed, otherwise it is built and returned so that it can be used in a multicall.

Returns

Promise<{ transaction_hash: string }>

A promise that resolves to the transaction receipt if executes is true, otherwise it returns the transaction call.

Defined in

sdks/account/src/smartr_account.ts:428

addModule(class_hash, execute): Promise<Call[]>

Parameters

NameType
class_hashstring
executefalse

Returns

Promise<Call[]>

Defined in

sdks/account/src/smartr_account.ts:432


buildAccountDeployPayload

buildAccountDeployPayload(«destructured», details): Promise<DeployAccountContractTransaction>

Parameters

NameType
«destructured»DeployAccountContractPayload
detailsInvocationsSignerDetails

Returns

Promise<DeployAccountContractTransaction>

Inherited from

Account.buildAccountDeployPayload

Defined in

node_modules/starknet/dist/index.d.ts:3791


buildDeclarePayload

buildDeclarePayload(payload, details): Promise<DeclareContractTransaction>

Parameters

NameType
payloadDeclareContractPayload
detailsInvocationsSignerDetails

Returns

Promise<DeclareContractTransaction>

Inherited from

Account.buildDeclarePayload

Defined in

node_modules/starknet/dist/index.d.ts:3790


buildInvocation

buildInvocation(call, details): Promise<Invocation>

Parameters

NameType
callCall[]
detailsInvocationsSignerDetails

Returns

Promise<Invocation>

Inherited from

Account.buildInvocation

Defined in

node_modules/starknet/dist/index.d.ts:3789


buildUDCContractPayload

buildUDCContractPayload(payload): Call[]

Parameters

NameType
payloadUniversalDeployerContractPayload | UniversalDeployerContractPayload[]

Returns

Call[]

Inherited from

Account.buildUDCContractPayload

Defined in

node_modules/starknet/dist/index.d.ts:3792


callContract

callContract(call, blockIdentifier?): Promise<string[]>

Parameters

NameType
callCall
blockIdentifier?BlockIdentifier

Returns

Promise<string[]>

Inherited from

Account.callContract

Defined in

node_modules/starknet/dist/index.d.ts:3287


callOnModule

callOnModule(module_class_hash, module_entrypoint, calldata): Promise<BigNumberish[]>

Call an entrypoint on the module account.

Parameters

NameTypeDescription
module_class_hashstringThe installed module class_hash.
module_entrypointstringThe module entrypoint to call.
calldatastring[]The entrypoint calldata.

Returns

Promise<BigNumberish[]>

A promise that resolves to the call output.

Defined in

sdks/account/src/smartr_account.ts:374


declare

declare(payload, details?): Promise<{ class_hash: string ; transaction_hash: string }>

Parameters

NameType
payloadDeclareContractPayload
details?UniversalDetails

Returns

Promise<{ class_hash: string ; transaction_hash: string }>

Inherited from

Account.declare

Defined in

node_modules/starknet/dist/index.d.ts:3766


declareAndDeploy

declareAndDeploy(payload, details?): Promise<DeclareDeployUDCResponse>

Parameters

NameType
payloadDeclareAndDeployContractPayload
details?UniversalDetails

Returns

Promise<DeclareDeployUDCResponse>

Inherited from

Account.declareAndDeploy

Defined in

node_modules/starknet/dist/index.d.ts:3769


declareContract

declareContract(transaction, details): Promise<DeclaredTransaction>

Parameters

NameType
transactionDeclareContractTransaction
detailsInvocationsDetailsWithNonce

Returns

Promise<DeclaredTransaction>

Inherited from

Account.declareContract

Defined in

node_modules/starknet/dist/index.d.ts:3285


declareIfNot

declareIfNot(payload, transactionsDetail?): Promise<{ class_hash: string ; transaction_hash: string }>

First check if contract is already declared, if not declare it If contract already declared returned transaction_hash is ''. Method will pass even if contract is already declared

Parameters

NameTypeDescription
payloadDeclareContractPayload-
transactionsDetail?UniversalDetails(optional)

Returns

Promise<{ class_hash: string ; transaction_hash: string }>

Inherited from

Account.declareIfNot

Defined in

node_modules/starknet/dist/index.d.ts:3765


deploy

deploy(payload, details?): Promise<MultiDeployContractResponse>

Parameters

NameType
payloadUniversalDeployerContractPayload | UniversalDeployerContractPayload[]
details?UniversalDetails

Returns

Promise<MultiDeployContractResponse>

Inherited from

Account.deploy

Defined in

node_modules/starknet/dist/index.d.ts:3767


deployAccount

deployAccount(«destructured», details?): Promise<DeployContractResponse>

Parameters

NameType
«destructured»DeployAccountContractPayload
details?UniversalDetails

Returns

Promise<DeployContractResponse>

Inherited from

Account.deployAccount

Defined in

node_modules/starknet/dist/index.d.ts:3771


deployAccountContract

deployAccountContract(transaction, details): Promise<DeployedAccountTransaction>

Parameters

NameType
transactionDeployAccountContractTransaction
detailsInvocationsDetailsWithNonce

Returns

Promise<DeployedAccountTransaction>

Inherited from

Account.deployAccountContract

Defined in

node_modules/starknet/dist/index.d.ts:3286


deployContract

deployContract(payload, details?): Promise<DeployContractUDCResponse>

Parameters

NameType
payloadUniversalDeployerContractPayload | UniversalDeployerContractPayload[]
details?UniversalDetails

Returns

Promise<DeployContractUDCResponse>

Inherited from

Account.deployContract

Defined in

node_modules/starknet/dist/index.d.ts:3768


estimateAccountDeployFee

estimateAccountDeployFee(«destructured», details?): Promise<EstimateFee>

Parameters

NameType
«destructured»DeployAccountContractPayload
details?UniversalDetails

Returns

Promise<EstimateFee>

Inherited from

Account.estimateAccountDeployFee

Defined in

node_modules/starknet/dist/index.d.ts:3753


estimateDeclareFee

estimateDeclareFee(payload, details?): Promise<EstimateFee>

Parameters

NameType
payloadDeclareContractPayload
details?UniversalDetails

Returns

Promise<EstimateFee>

Inherited from

Account.estimateDeclareFee

Defined in

node_modules/starknet/dist/index.d.ts:3752


estimateDeployFee

estimateDeployFee(payload, details?): Promise<EstimateFee>

Parameters

NameType
payloadUniversalDeployerContractPayload | UniversalDeployerContractPayload[]
details?UniversalDetails

Returns

Promise<EstimateFee>

Inherited from

Account.estimateDeployFee

Defined in

node_modules/starknet/dist/index.d.ts:3754


estimateFee

estimateFee(calls, estimateFeeDetails?): Promise<EstimateFee>

Parameters

NameType
callsAllowArray<Call>
estimateFeeDetails?UniversalDetails

Returns

Promise<EstimateFee>

Inherited from

Account.estimateFee

Defined in

node_modules/starknet/dist/index.d.ts:3750


estimateFeeBulk

estimateFeeBulk(invocations, details?): Promise<EstimateFeeBulk>

Parameters

NameType
invocationsInvocations
details?UniversalDetails

Returns

Promise<EstimateFeeBulk>

Inherited from

Account.estimateFeeBulk

Defined in

node_modules/starknet/dist/index.d.ts:3755


estimateInvokeFee

estimateInvokeFee(calls, details?): Promise<EstimateFee>

Parameters

NameType
callsAllowArray<Call>
details?UniversalDetails

Returns

Promise<EstimateFee>

Inherited from

Account.estimateInvokeFee

Defined in

node_modules/starknet/dist/index.d.ts:3751


estimateMessageFee

estimateMessageFee(message, blockIdentifier?): Promise<FEE_ESTIMATE>

NEW: Estimate the fee for a message from L1

Parameters

NameTypeDescription
messageMSG_FROM_L1Message From L1
blockIdentifier?BlockIdentifier-

Returns

Promise<FEE_ESTIMATE>

Inherited from

Account.estimateMessageFee

Defined in

node_modules/starknet/dist/index.d.ts:3292


execute

execute(transactions, transactionsDetail?): Promise<{ transaction_hash: string }>

Executes a set of transactions on the StarkNet network.

Parameters

NameTypeDescription
transactionsAllowArray<Call>An array of transactions to be executed.
transactionsDetail?UniversalDetailsOptional object containing additional details for the transactions.

Returns

Promise<{ transaction_hash: string }>

A Promise that resolves to an InvokeFunctionResponse object representing the result of the execution.

Overrides

Account.execute

Defined in

sdks/account/src/smartr_account.ts:236

execute(transactions, abis?, transactionsDetail?): Promise<{ transaction_hash: string }>

Executes a set of transactions on the StarkNet network.

Parameters

NameTypeDescription
transactionsAllowArray<Call>An array of transactions to be executed.
abis?Abi[]Optional argument that can be an array of ABIs.
transactionsDetail?UniversalDetailsOptional object containing additional details for the transactions.

Returns

Promise<{ transaction_hash: string }>

A Promise that resolves to an InvokeFunctionResponse object representing the result of the execution.

Overrides

Account.execute

Defined in

sdks/account/src/smartr_account.ts:249


executeMultisig

executeMultisig(transactions, details, signature): Promise<{ transaction_hash: string }>

Executes a set of transactions, assuming they have been signed by all parties.

Parameters

NameTypeDescription
transactionsCall[]An array of transactions to be executed.
detailsInvocationsDetailsWithNonceOptional object containing additional details for the transactions.
signatureArraySignatureTypeThe signature of the transactions.

Returns

Promise<{ transaction_hash: string }>

A Promise that resolves to the transactions invocation response.

Defined in

sdks/account/src/smartr_account.ts:195


executeOnModule

executeOnModule(module_class_hash, module_entrypoint, calldata, execute?): Promise<{ transaction_hash: string }>

Execute or build a transaction on the module account.

Parameters

NameTypeDescription
module_class_hashstringThe installed module class_hash.
module_entrypointstringThe module entrypoint to execute.
calldatastring[]The entrypoint calldata.
execute?trueIf true, the transaction is executed, otherwise it is built and returned so that it can be used in a multicall.

Returns

Promise<{ transaction_hash: string }>

A promise that resolves to the transaction receipt if executes is true, otherwise it returns the transaction call.

Defined in

sdks/account/src/smartr_account.ts:329

executeOnModule(module_class_hash, module_entrypoint, calldata, execute): Promise<Call[]>

Parameters

NameType
module_class_hashstring
module_entrypointstring
calldatastring[]
executefalse

Returns

Promise<Call[]>

Defined in

sdks/account/src/smartr_account.ts:335


fetch

fetch(method, params?, id?): Promise<Response>

Parameters

NameType
methodstring
params?object
id?string | number

Returns

Promise<Response>

Inherited from

Account.fetch

Defined in

node_modules/starknet/dist/index.d.ts:3198


getAddressFromStarkName

getAddressFromStarkName(name, StarknetIdContract?): Promise<string>

Parameters

NameType
namestring
StarknetIdContract?string

Returns

Promise<string>

Inherited from

Account.getAddressFromStarkName

Defined in

node_modules/starknet/dist/index.d.ts:3307


getBlock

getBlock(): Promise<PendingBlock>

Returns

Promise<PendingBlock>

Inherited from

Account.getBlock

Defined in

node_modules/starknet/dist/index.d.ts:3202

getBlock(blockIdentifier): Promise<PendingBlock>

Parameters

NameType
blockIdentifier"pending"

Returns

Promise<PendingBlock>

Inherited from

Account.getBlock

Defined in

node_modules/starknet/dist/index.d.ts:3203

getBlock(blockIdentifier): Promise<Block$1>

Parameters

NameType
blockIdentifier"latest"

Returns

Promise<Block$1>

Inherited from

Account.getBlock

Defined in

node_modules/starknet/dist/index.d.ts:3204

getBlock(blockIdentifier?): Promise<GetBlockResponse>

Parameters

NameType
blockIdentifier?BlockIdentifier

Returns

Promise<GetBlockResponse>

Inherited from

Account.getBlock

Defined in

node_modules/starknet/dist/index.d.ts:3205


getBlockLatestAccepted

getBlockLatestAccepted(): Promise<BlockHashAndNumber>

Get the most recent accepted block hash and number

Returns

Promise<BlockHashAndNumber>

Inherited from

Account.getBlockLatestAccepted

Defined in

node_modules/starknet/dist/index.d.ts:3209


getBlockNumber

getBlockNumber(): Promise<number>

Get the most recent accepted block number redundant use getBlockLatestAccepted();

Returns

Promise<number>

Number of the latest block

Inherited from

Account.getBlockNumber

Defined in

node_modules/starknet/dist/index.d.ts:3215


getBlockStateUpdate

getBlockStateUpdate(): Promise<{ block_hash: never ; old_root: string ; state_diff: { declared_classes: { class_hash: string ; compiled_class_hash: string }[] ; deployed_contracts: { address: string ; class_hash: string }[] ; deprecated_declared_classes: string[] ; nonces: { contract_address: string ; nonce: string }[] ; replaced_classes: { class_hash: string ; contract_address: string }[] ; storage_diffs: { address: string ; storage_entries: { key: string ; value: string }[] }[] } }>

Returns

Promise<{ block_hash: never ; old_root: string ; state_diff: { declared_classes: { class_hash: string ; compiled_class_hash: string }[] ; deployed_contracts: { address: string ; class_hash: string }[] ; deprecated_declared_classes: string[] ; nonces: { contract_address: string ; nonce: string }[] ; replaced_classes: { class_hash: string ; contract_address: string }[] ; storage_diffs: { address: string ; storage_entries: { key: string ; value: string }[] }[] } }>

Inherited from

Account.getBlockStateUpdate

Defined in

node_modules/starknet/dist/index.d.ts:3239

getBlockStateUpdate(blockIdentifier): Promise<{ block_hash: never ; old_root: string ; state_diff: { declared_classes: { class_hash: string ; compiled_class_hash: string }[] ; deployed_contracts: { address: string ; class_hash: string }[] ; deprecated_declared_classes: string[] ; nonces: { contract_address: string ; nonce: string }[] ; replaced_classes: { class_hash: string ; contract_address: string }[] ; storage_diffs: { address: string ; storage_entries: { key: string ; value: string }[] }[] } }>

Parameters

NameType
blockIdentifier"pending"

Returns

Promise<{ block_hash: never ; old_root: string ; state_diff: { declared_classes: { class_hash: string ; compiled_class_hash: string }[] ; deployed_contracts: { address: string ; class_hash: string }[] ; deprecated_declared_classes: string[] ; nonces: { contract_address: string ; nonce: string }[] ; replaced_classes: { class_hash: string ; contract_address: string }[] ; storage_diffs: { address: string ; storage_entries: { key: string ; value: string }[] }[] } }>

Inherited from

Account.getBlockStateUpdate

Defined in

node_modules/starknet/dist/index.d.ts:3240

getBlockStateUpdate(blockIdentifier): Promise<{ block_hash: string ; new_root: string ; old_root: string ; state_diff: { declared_classes: { class_hash: string ; compiled_class_hash: string }[] ; deployed_contracts: { address: string ; class_hash: string }[] ; deprecated_declared_classes: string[] ; nonces: { contract_address: string ; nonce: string }[] ; replaced_classes: { class_hash: string ; contract_address: string }[] ; storage_diffs: { address: string ; storage_entries: { key: string ; value: string }[] }[] } }>

Parameters

NameType
blockIdentifier"latest"

Returns

Promise<{ block_hash: string ; new_root: string ; old_root: string ; state_diff: { declared_classes: { class_hash: string ; compiled_class_hash: string }[] ; deployed_contracts: { address: string ; class_hash: string }[] ; deprecated_declared_classes: string[] ; nonces: { contract_address: string ; nonce: string }[] ; replaced_classes: { class_hash: string ; contract_address: string }[] ; storage_diffs: { address: string ; storage_entries: { key: string ; value: string }[] }[] } }>

Inherited from

Account.getBlockStateUpdate

Defined in

node_modules/starknet/dist/index.d.ts:3241

getBlockStateUpdate(blockIdentifier?): Promise<StateUpdateResponse>

Parameters

NameType
blockIdentifier?BlockIdentifier

Returns

Promise<StateUpdateResponse>

Inherited from

Account.getBlockStateUpdate

Defined in

node_modules/starknet/dist/index.d.ts:3242


getBlockTransactionCount

getBlockTransactionCount(blockIdentifier?): Promise<number>

Parameters

NameType
blockIdentifier?BlockIdentifier

Returns

Promise<number>

Inherited from

Account.getBlockTransactionCount

Defined in

node_modules/starknet/dist/index.d.ts:3244


getBlockTransactionsTraces

getBlockTransactionsTraces(blockIdentifier?): Promise<BlockTransactionsTraces>

Parameters

NameType
blockIdentifier?BlockIdentifier

Returns

Promise<BlockTransactionsTraces>

Inherited from

Account.getBlockTransactionsTraces

Defined in

node_modules/starknet/dist/index.d.ts:3243


getBlockWithReceipts

getBlockWithReceipts(blockIdentifier?): Promise<BlockWithTxReceipts>

Parameters

NameType
blockIdentifier?BlockIdentifier

Returns

Promise<BlockWithTxReceipts>

Inherited from

Account.getBlockWithReceipts

Defined in

node_modules/starknet/dist/index.d.ts:3232


getBlockWithTxHashes

getBlockWithTxHashes(blockIdentifier?): Promise<BlockWithTxHashes$1>

Parameters

NameType
blockIdentifier?BlockIdentifier

Returns

Promise<BlockWithTxHashes$1>

Inherited from

Account.getBlockWithTxHashes

Defined in

node_modules/starknet/dist/index.d.ts:3216


getBlockWithTxs

getBlockWithTxs(blockIdentifier?): Promise<BlockWithTxs>

Parameters

NameType
blockIdentifier?BlockIdentifier

Returns

Promise<BlockWithTxs>

Inherited from

Account.getBlockWithTxs

Defined in

node_modules/starknet/dist/index.d.ts:3217


getCairoVersion

getCairoVersion(classHash?): Promise<CairoVersion>

Retrieves the Cairo version from the network and sets cairoVersion if not already set in the constructor.

Parameters

NameTypeDescription
classHash?stringif provided detects Cairo version from classHash, otherwise from the account address

Returns

Promise<CairoVersion>

Inherited from

Account.getCairoVersion

Defined in

node_modules/starknet/dist/index.d.ts:3749


getChainId

getChainId(): Promise<StarknetChainId>

Returns

Promise<StarknetChainId>

Inherited from

Account.getChainId

Defined in

node_modules/starknet/dist/index.d.ts:3199


getClass

getClass(classHash, blockIdentifier?): Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>

Parameters

NameType
classHashBigNumberish
blockIdentifier?BlockIdentifier

Returns

Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>

Inherited from

Account.getClass

Defined in

node_modules/starknet/dist/index.d.ts:3272


getClassAt

getClassAt(contractAddress, blockIdentifier?): Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>

Parameters

NameType
contractAddressBigNumberish
blockIdentifier?BlockIdentifier

Returns

Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>

Inherited from

Account.getClassAt

Defined in

node_modules/starknet/dist/index.d.ts:3273


getClassByHash

getClassByHash(classHash): Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>

Parameters

NameType
classHashBigNumberish

Returns

Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>

Inherited from

Account.getClassByHash

Defined in

node_modules/starknet/dist/index.d.ts:3271


getClassHashAt

getClassHashAt(contractAddress, blockIdentifier?): Promise<string>

Parameters

NameType
contractAddressBigNumberish
blockIdentifier?BlockIdentifier

Returns

Promise<string>

Inherited from

Account.getClassHashAt

Defined in

node_modules/starknet/dist/index.d.ts:3270


getContractVersion

getContractVersion(contractAddress, classHash?, options?): Promise<ContractVersion>

Parameters

NameType
contractAddressBigNumberish
classHash?undefined
options?getContractVersionOptions

Returns

Promise<ContractVersion>

Inherited from

Account.getContractVersion

Defined in

node_modules/starknet/dist/index.d.ts:3274

getContractVersion(contractAddress, classHash, options?): Promise<ContractVersion>

Parameters

NameType
contractAddressundefined
classHashBigNumberish
options?getContractVersionOptions

Returns

Promise<ContractVersion>

Inherited from

Account.getContractVersion

Defined in

node_modules/starknet/dist/index.d.ts:3275


getDeclareEstimateFee

getDeclareEstimateFee(invocation, details, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponse>

Parameters

NameType
invocationDeclareContractTransaction
detailsInvocationsDetailsWithNonce
blockIdentifier?BlockIdentifier
skipValidate?boolean

Returns

Promise<EstimateFeeResponse>

Inherited from

Account.getDeclareEstimateFee

Defined in

node_modules/starknet/dist/index.d.ts:3281


getDeployAccountEstimateFee

getDeployAccountEstimateFee(invocation, details, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponse>

Parameters

NameType
invocationDeployAccountContractTransaction
detailsInvocationsDetailsWithNonce
blockIdentifier?BlockIdentifier
skipValidate?boolean

Returns

Promise<EstimateFeeResponse>

Inherited from

Account.getDeployAccountEstimateFee

Defined in

node_modules/starknet/dist/index.d.ts:3282


getEstimateFee

getEstimateFee(invocation, invocationDetails, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponse>

Parameters

NameType
invocationInvocation
invocationDetailsInvocationsDetailsWithNonce
blockIdentifier?BlockIdentifier
skipValidate?boolean

Returns

Promise<EstimateFeeResponse>

Deprecated

use gettypeEstimateFee (will be refactored based on type after sequencer deprecation)

Inherited from

Account.getEstimateFee

Defined in

node_modules/starknet/dist/index.d.ts:3279


getEstimateFeeBulk

getEstimateFeeBulk(invocations, options): Promise<EstimateFeeResponseBulk>

Parameters

NameType
invocationsAccountInvocations
optionsgetEstimateFeeBulkOptions

Returns

Promise<EstimateFeeResponseBulk>

Inherited from

Account.getEstimateFeeBulk

Defined in

node_modules/starknet/dist/index.d.ts:3283


getEvents

getEvents(eventFilter): Promise<EVENTS_CHUNK>

Returns all events matching the given filter

Parameters

NameType
eventFilterEventFilter

Returns

Promise<EVENTS_CHUNK>

events and the pagination of the events

Inherited from

Account.getEvents

Defined in

node_modules/starknet/dist/index.d.ts:3302


getInvokeEstimateFee

getInvokeEstimateFee(invocation, invocationDetails, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponse>

Parameters

NameType
invocationInvocation
invocationDetailsInvocationsDetailsWithNonce
blockIdentifier?BlockIdentifier
skipValidate?boolean

Returns

Promise<EstimateFeeResponse>

Inherited from

Account.getInvokeEstimateFee

Defined in

node_modules/starknet/dist/index.d.ts:3280


getL1GasPrice

getL1GasPrice(blockIdentifier?): Promise<string>

Parameters

NameType
blockIdentifier?BlockIdentifier

Returns

Promise<string>

Inherited from

Account.getL1GasPrice

Defined in

node_modules/starknet/dist/index.d.ts:3230


getL1MessageHash

getL1MessageHash(l2TxHash): Promise<string>

Parameters

NameType
l2TxHashBigNumberish

Returns

Promise<string>

Inherited from

Account.getL1MessageHash

Defined in

node_modules/starknet/dist/index.d.ts:3231


getNonce

getNonce(blockIdentifier?): Promise<string>

Parameters

NameType
blockIdentifier?BlockIdentifier

Returns

Promise<string>

Inherited from

Account.getNonce

Defined in

node_modules/starknet/dist/index.d.ts:3743


getNonceForAddress

getNonceForAddress(contractAddress, blockIdentifier?): Promise<string>

Parameters

NameType
contractAddressBigNumberish
blockIdentifier?BlockIdentifier

Returns

Promise<string>

Inherited from

Account.getNonceForAddress

Defined in

node_modules/starknet/dist/index.d.ts:3201


getNonceSafe

getNonceSafe(nonce?): Promise<bigint>

Parameters

NameType
nonce?BigNumberish

Returns

Promise<bigint>

Inherited from

Account.getNonceSafe

Defined in

node_modules/starknet/dist/index.d.ts:3744


getPendingTransactions

getPendingTransactions(): Promise<TransactionWithHash$1[]>

Return transactions from pending block

Returns

Promise<TransactionWithHash$1[]>

Deprecated

Instead use getBlock(BlockTag.pending); (will be removed in next minor version) Utility method, same result can be achieved using getBlockWithTxHashes(BlockTag.pending);

Inherited from

Account.getPendingTransactions

Defined in

node_modules/starknet/dist/index.d.ts:3250


getPreferredVersion

getPreferredVersion(type12, type3): ETransactionVersion

Parameters

NameType
type12ETransactionVersion
type3ETransactionVersion

Returns

ETransactionVersion

Inherited from

Account.getPreferredVersion

Defined in

node_modules/starknet/dist/index.d.ts:3742


getSimulateTransaction

getSimulateTransaction(invocations, options?): Promise<SimulateTransactionResponse>

Parameters

NameTypeDescription
invocationsAccountInvocationsAccountInvocations
options?getSimulateTransactionOptionsblockIdentifier and flags to skip validation and fee charge
- blockIdentifier
- skipValidate (default false)
- skipFeeCharge (default true)

Returns

Promise<SimulateTransactionResponse>

Inherited from

Account.getSimulateTransaction

Defined in

node_modules/starknet/dist/index.d.ts:3267


getSpecVersion

getSpecVersion(): Promise<string>

Returns

Promise<string>

Inherited from

Account.getSpecVersion

Defined in

node_modules/starknet/dist/index.d.ts:3200


getStarkName

getStarkName(address?, StarknetIdContract?): Promise<string>

Parameters

NameType
address?BigNumberish
StarknetIdContract?string

Returns

Promise<string>

Inherited from

Account.getStarkName

Defined in

node_modules/starknet/dist/index.d.ts:3794


getStarkProfile

getStarkProfile(address, StarknetIdContract?, StarknetIdIdentityContract?, StarknetIdVerifierContract?, StarknetIdPfpContract?, StarknetIdPopContract?, StarknetIdMulticallContract?): Promise<StarkProfile>

Parameters

NameType
addressBigNumberish
StarknetIdContract?string
StarknetIdIdentityContract?string
StarknetIdVerifierContract?string
StarknetIdPfpContract?string
StarknetIdPopContract?string
StarknetIdMulticallContract?string

Returns

Promise<StarkProfile>

Inherited from

Account.getStarkProfile

Defined in

node_modules/starknet/dist/index.d.ts:3308


getStorageAt

getStorageAt(contractAddress, key, blockIdentifier?): Promise<string>

Parameters

NameType
contractAddressBigNumberish
keyBigNumberish
blockIdentifier?BlockIdentifier

Returns

Promise<string>

Inherited from

Account.getStorageAt

Defined in

node_modules/starknet/dist/index.d.ts:3269


getSuggestedFee

getSuggestedFee(«destructured», details): Promise<EstimateFee>

Parameters

NameType
«destructured»EstimateFeeAction
detailsUniversalDetails

Returns

Promise<EstimateFee>

Inherited from

Account.getSuggestedFee

Defined in

node_modules/starknet/dist/index.d.ts:3788


getSyncingStats

getSyncingStats(): Promise<Syncing>

Returns an object about the sync status, or false if the node is not synching

Returns

Promise<Syncing>

Object with the stats data

Inherited from

Account.getSyncingStats

Defined in

node_modules/starknet/dist/index.d.ts:3297


getTransaction

getTransaction(txHash): Promise<TransactionWithHash$1>

Parameters

NameType
txHashBigNumberish

Returns

Promise<TransactionWithHash$1>

Inherited from

Account.getTransaction

Defined in

node_modules/starknet/dist/index.d.ts:3251


getTransactionByBlockIdAndIndex

getTransactionByBlockIdAndIndex(blockIdentifier, index): Promise<TransactionWithHash$1>

Parameters

NameType
blockIdentifierBlockIdentifier
indexnumber

Returns

Promise<TransactionWithHash$1>

Inherited from

Account.getTransactionByBlockIdAndIndex

Defined in

node_modules/starknet/dist/index.d.ts:3253


getTransactionByHash

getTransactionByHash(txHash): Promise<TransactionWithHash$1>

Parameters

NameType
txHashBigNumberish

Returns

Promise<TransactionWithHash$1>

Inherited from

Account.getTransactionByHash

Defined in

node_modules/starknet/dist/index.d.ts:3252


getTransactionReceipt

getTransactionReceipt(txHash): Promise<GetTransactionReceiptResponse>

Parameters

NameType
txHashBigNumberish

Returns

Promise<GetTransactionReceiptResponse>

Inherited from

Account.getTransactionReceipt

Defined in

node_modules/starknet/dist/index.d.ts:3254


getTransactionStatus

getTransactionStatus(transactionHash): Promise<TransactionStatus$1>

Get the status of a transaction

Parameters

NameType
transactionHashBigNumberish

Returns

Promise<TransactionStatus$1>

Inherited from

Account.getTransactionStatus

Defined in

node_modules/starknet/dist/index.d.ts:3259


getTransactionTrace

getTransactionTrace(txHash): Promise<TRANSACTION_TRACE>

Parameters

NameType
txHashBigNumberish

Returns

Promise<TRANSACTION_TRACE>

Inherited from

Account.getTransactionTrace

Defined in

node_modules/starknet/dist/index.d.ts:3255


getUniversalSuggestedFee

getUniversalSuggestedFee(version, «destructured», details): Promise<{ maxFee: BigNumberish ; resourceBounds: RESOURCE_BOUNDS_MAPPING }>

Parameters

NameType
versionETransactionVersion
«destructured»EstimateFeeAction
detailsUniversalDetails

Returns

Promise<{ maxFee: BigNumberish ; resourceBounds: RESOURCE_BOUNDS_MAPPING }>

Inherited from

Account.getUniversalSuggestedFee

Defined in

node_modules/starknet/dist/index.d.ts:3784


hashMessage

hashMessage(typedData): Promise<string>

Parameters

NameType
typedDataTypedData

Returns

Promise<string>

Inherited from

Account.hashMessage

Defined in

node_modules/starknet/dist/index.d.ts:3773


invokeFunction

invokeFunction(functionInvocation, details): Promise<InvokedTransaction>

Parameters

NameType
functionInvocationInvocation
detailsInvocationsDetailsWithNonce

Returns

Promise<InvokedTransaction>

Inherited from

Account.invokeFunction

Defined in

node_modules/starknet/dist/index.d.ts:3284


isModule

isModule(class_hash): Promise<boolean>

Call an entrypoint on the module account.

Parameters

NameTypeDescription
class_hashstringthe module to test

Returns

Promise<boolean>

A promise that is true if the module is installed with the account.

Defined in

sdks/account/src/smartr_account.ts:413


prepareMultisig

prepareMultisig(transactions, transactionsDetail?): Promise<InvocationsDetailsWithNonce>

generates the details, i.e nonce, version, fee, module prefix, to execute transactions on the StarkNet network.

Parameters

NameTypeDescription
transactionsAllowArray<Call>An array of transactions to be executed.
transactionsDetail?UniversalDetailsOptional object containing additional details for the transactions.

Returns

Promise<InvocationsDetailsWithNonce>

A Promise that resolves to the transaction details.

Defined in

sdks/account/src/smartr_account.ts:105


removeModule

removeModule(class_hash, execute?): Promise<{ transaction_hash: string }>

remove a module from an account.

Parameters

NameTypeDescription
class_hashstringthe module to remove
execute?trueIf true, the transaction is executed, otherwise it is built and returned so that it can be used in a multicall.

Returns

Promise<{ transaction_hash: string }>

A promise that resolves to the transaction receipt if executes is true, otherwise it returns the transaction call.

Defined in

sdks/account/src/smartr_account.ts:454

removeModule(class_hash, execute): Promise<Call[]>

Parameters

NameType
class_hashstring
executefalse

Returns

Promise<Call[]>

Defined in

sdks/account/src/smartr_account.ts:458


signMessage

signMessage(typedData): Promise<Signature>

Parameters

NameType
typedDataTypedData

Returns

Promise<Signature>

Inherited from

Account.signMessage

Defined in

node_modules/starknet/dist/index.d.ts:3772


signMultisig

signMultisig(transactions, details): Promise<ArraySignatureType>

Signs a set of transactions to be executed on the StarkNet network.

Parameters

NameTypeDescription
transactionsCall[]An array of transactions to be executed.
detailsInvocationsDetailsWithNonceOptional object containing additional details for the transactions.

Returns

Promise<ArraySignatureType>

A Promise that resolves to the signature of the transactions.

Defined in

sdks/account/src/smartr_account.ts:151


simulateTransaction

simulateTransaction(invocations, details?): Promise<SimulateTransactionResponse>

Parameters

NameType
invocationsInvocations
details?SimulateTransactionDetails

Returns

Promise<SimulateTransactionResponse>

Inherited from

Account.simulateTransaction

Defined in

node_modules/starknet/dist/index.d.ts:3756


upgrade

upgrade(classHash): Promise<{ transaction_hash: string }>

Upgrades the SmartrAccount to a new class.

Parameters

NameTypeDescription
classHashstringThe hash of the new class.

Returns

Promise<{ transaction_hash: string }>

A promise that resolves to the transaction receipt if executes is true, otherwise it returns the transaction call.

Defined in

sdks/account/src/smartr_account.ts:398


verifyMessage

verifyMessage(typedData, signature, signatureVerificationFunctionName?, signatureVerificationResponse?): Promise<boolean>

Parameters

NameType
typedDataTypedData
signatureSignature
signatureVerificationFunctionName?string
signatureVerificationResponse?Object
signatureVerificationResponse.errorstring[]
signatureVerificationResponse.nokResponsestring[]
signatureVerificationResponse.okResponsestring[]

Returns

Promise<boolean>

Inherited from

Account.verifyMessage

Defined in

node_modules/starknet/dist/index.d.ts:3779


verifyMessageHash

verifyMessageHash(hash, signature, signatureVerificationFunctionName?, signatureVerificationResponse?): Promise<boolean>

Parameters

NameType
hashBigNumberish
signatureSignature
signatureVerificationFunctionName?string
signatureVerificationResponse?Object
signatureVerificationResponse.errorstring[]
signatureVerificationResponse.nokResponsestring[]
signatureVerificationResponse.okResponsestring[]

Returns

Promise<boolean>

Inherited from

Account.verifyMessageHash

Defined in

node_modules/starknet/dist/index.d.ts:3774


waitForBlock

waitForBlock(blockIdentifier?, retryInterval?): Promise<void>

Pause the execution of the script until a specified block is created.

Parameters

NameTypeDescription
blockIdentifier?BlockIdentifierbloc number (BigNumberisk) or 'pending' or 'latest'. Use of 'latest" or of a block already created will generate no pause.
retryInterval?numbernumber of milliseconds between 2 requests to the node

Returns

Promise<void>

Example

await myProvider.waitForBlock();
// wait the creation of the pending block

Inherited from

Account.waitForBlock

Defined in

node_modules/starknet/dist/index.d.ts:3229


waitForTransaction

waitForTransaction(txHash, options?): Promise<GetTransactionReceiptResponse>

Parameters

NameType
txHashBigNumberish
options?waitForTransactionOptions

Returns

Promise<GetTransactionReceiptResponse>

Inherited from

Account.waitForTransaction

Defined in

node_modules/starknet/dist/index.d.ts:3268


executeStarkName

executeStarkName(provider, address, contract): Promise<CallContractResponse>

Parameters

NameType
providerProviderInterface
addressstring
contractstring

Returns

Promise<CallContractResponse>

Inherited from

Account.executeStarkName

Defined in

node_modules/starknet/dist/index.d.ts:3310


executeStarkProfile

executeStarkProfile(provider, contract, functionName, initialCalldata, fallbackCalldata): Promise<CallContractResponse>

Parameters

NameType
providerProviderInterface
contractstring
functionNamestring
initialCalldataRawArgsArray
fallbackCalldataRawArgsArray

Returns

Promise<CallContractResponse>

Inherited from

Account.executeStarkProfile

Defined in

node_modules/starknet/dist/index.d.ts:3313


getAddressFromStarkName

getAddressFromStarkName(provider, name, StarknetIdContract?): Promise<string>

Parameters

NameType
providerProviderInterface
namestring
StarknetIdContract?string

Returns

Promise<string>

Inherited from

Account.getAddressFromStarkName

Defined in

node_modules/starknet/dist/index.d.ts:3311


getStarkName

getStarkName(provider, address, StarknetIdContract?): Promise<string>

Parameters

NameType
providerProviderInterface
addressBigNumberish
StarknetIdContract?string

Returns

Promise<string>

Inherited from

Account.getStarkName

Defined in

node_modules/starknet/dist/index.d.ts:3309


getStarkProfile

getStarkProfile(provider, address, StarknetIdContract?, StarknetIdIdentityContract?, StarknetIdVerifierContract?, StarknetIdPfpContract?, StarknetIdPopContract?, StarknetIdMulticallContract?): Promise<StarkProfile>

Parameters

NameType
providerProviderInterface
addressBigNumberish
StarknetIdContract?string
StarknetIdIdentityContract?string
StarknetIdVerifierContract?string
StarknetIdPfpContract?string
StarknetIdPopContract?string
StarknetIdMulticallContract?string

Returns

Promise<StarkProfile>

Inherited from

Account.getStarkProfile

Defined in

node_modules/starknet/dist/index.d.ts:3312