Skip to main content
Version: Next

Class: Provider

Hierarchy​

  • RpcProvider<this> & StarknetId<this>

    ↳ Provider

    ↳↳ Account

Constructors​

constructor​

• new Provider(optionsOrProvider?): Provider

Parameters​

NameType
optionsOrProvider?RpcProviderOptions | ProviderInterface | RpcProvider

Returns​

Provider

Inherited from​

Mixin(BaseRpcProvider, StarknetId).constructor

Defined in​

src/provider/rpc.ts:52

• new Provider(): Provider

Returns​

Provider

Inherited from​

Mixin(BaseRpcProvider, StarknetId).constructor

Properties​

responseParser​

• responseParser: RPCResponseParser

Inherited from​

Mixin(BaseRpcProvider, StarknetId).responseParser

Defined in​

src/provider/rpc.ts:48


channel​

• channel: RpcChannel | RpcChannel

Inherited from​

Mixin(BaseRpcProvider, StarknetId).channel

Defined in​

src/provider/rpc.ts:50


getStateUpdate​

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

Type declaration​

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

Returns​

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

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

Parameters​
NameType
blockIdentifier"pending"
Returns​

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

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

Parameters​
NameType
blockIdentifier"latest"
Returns​

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

â–¸ (blockIdentifier?): Promise<StateUpdateResponse>

Parameters​
NameType
blockIdentifier?BlockIdentifier
Returns​

Promise<StateUpdateResponse>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getStateUpdate

Defined in​

src/provider/rpc.ts:188

Methods​

getStarkName​

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

Parameters​

NameType
providerProviderInterface
addressBigNumberish
StarknetIdContract?string

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getStarkName

Defined in​

src/provider/extensions/starknetId.ts:61


getAddressFromStarkName​

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

Parameters​

NameType
providerProviderInterface
namestring
StarknetIdContract?string

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getAddressFromStarkName

Defined in​

src/provider/extensions/starknetId.ts:95


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​

Mixin(BaseRpcProvider, StarknetId).getStarkProfile

Defined in​

src/provider/extensions/starknetId.ts:121


fetch​

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

Parameters​

NameTypeDefault value
methodstringundefined
params?objectundefined
idstring | number0

Returns​

Promise<Response>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).fetch

Defined in​

src/provider/rpc.ts:65


getChainId​

â–¸ getChainId(): Promise<StarknetChainId>

Returns​

Promise<StarknetChainId>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getChainId

Defined in​

src/provider/rpc.ts:69


getSpecVersion​

â–¸ getSpecVersion(): Promise<string>

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getSpecVersion

Defined in​

src/provider/rpc.ts:73


getNonceForAddress​

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

Parameters​

NameType
contractAddressBigNumberish
blockIdentifier?BlockIdentifier

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getNonceForAddress

Defined in​

src/provider/rpc.ts:77


getBlock​

â–¸ getBlock(): Promise<PendingBlock>

Returns​

Promise<PendingBlock>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getBlock

Defined in​

src/provider/rpc.ts:84

â–¸ getBlock(blockIdentifier): Promise<PendingBlock>

Parameters​

NameType
blockIdentifier"pending"

Returns​

Promise<PendingBlock>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getBlock

Defined in​

src/provider/rpc.ts:85

â–¸ getBlock(blockIdentifier): Promise<Block>

Parameters​

NameType
blockIdentifier"latest"

Returns​

Promise<Block>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getBlock

Defined in​

src/provider/rpc.ts:86

â–¸ getBlock(blockIdentifier?): Promise<GetBlockResponse>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<GetBlockResponse>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getBlock

Defined in​

src/provider/rpc.ts:87


getBlockLatestAccepted​

â–¸ getBlockLatestAccepted(): Promise<BlockHashAndNumber>

Get the most recent accepted block hash and number

Returns​

Promise<BlockHashAndNumber>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getBlockLatestAccepted

Defined in​

src/provider/rpc.ts:97


getBlockNumber​

â–¸ getBlockNumber(): Promise<number>

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

Returns​

Promise<number>

Number of the latest block

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getBlockNumber

Defined in​

src/provider/rpc.ts:106


getBlockWithTxHashes​

â–¸ getBlockWithTxHashes(blockIdentifier?): Promise<BlockWithTxHashes>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<BlockWithTxHashes>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getBlockWithTxHashes

Defined in​

src/provider/rpc.ts:110


getBlockWithTxs​

â–¸ getBlockWithTxs(blockIdentifier?): Promise<BlockWithTxs>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<BlockWithTxs>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getBlockWithTxs

Defined in​

src/provider/rpc.ts:114


waitForBlock​

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

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

Parameters​

NameTypeDefault valueDescription
blockIdentifierBlockIdentifier'pending'bloc number (BigNumberish) or 'pending' or 'latest'. Use of 'latest" or of a block already created will generate no pause.
retryInterval?number5000number of milliseconds between 2 requests to the node

Returns​

Promise<void>

Example

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

Inherited from​

Mixin(BaseRpcProvider, StarknetId).waitForBlock

Defined in​

src/provider/rpc.ts:129


getL1GasPrice​

â–¸ getL1GasPrice(blockIdentifier?): Promise<string>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getL1GasPrice

Defined in​

src/provider/rpc.ts:159


getL1MessageHash​

â–¸ getL1MessageHash(l2TxHash): Promise<string>

Parameters​

NameType
l2TxHashBigNumberish

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getL1MessageHash

Defined in​

src/provider/rpc.ts:165


getBlockWithReceipts​

â–¸ getBlockWithReceipts(blockIdentifier?): Promise<BlockWithTxReceipts>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<BlockWithTxReceipts>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getBlockWithReceipts

Defined in​

src/provider/rpc.ts:181


getBlockStateUpdate​

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

Returns​

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

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getBlockStateUpdate

Defined in​

src/provider/rpc.ts:190

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

Parameters​

NameType
blockIdentifier"pending"

Returns​

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

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getBlockStateUpdate

Defined in​

src/provider/rpc.ts:191

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

Parameters​

NameType
blockIdentifier"latest"

Returns​

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

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getBlockStateUpdate

Defined in​

src/provider/rpc.ts:192

â–¸ getBlockStateUpdate(blockIdentifier?): Promise<StateUpdateResponse>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<StateUpdateResponse>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getBlockStateUpdate

Defined in​

src/provider/rpc.ts:193


getBlockTransactionsTraces​

â–¸ getBlockTransactionsTraces(blockIdentifier?): Promise<BlockTransactionsTraces>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<BlockTransactionsTraces>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getBlockTransactionsTraces

Defined in​

src/provider/rpc.ts:198


getBlockTransactionCount​

â–¸ getBlockTransactionCount(blockIdentifier?): Promise<number>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<number>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getBlockTransactionCount

Defined in​

src/provider/rpc.ts:202


getPendingTransactions​

â–¸ getPendingTransactions(): Promise<TransactionWithHash[]>

Return transactions from pending block

Returns​

Promise<TransactionWithHash[]>

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​

Mixin(BaseRpcProvider, StarknetId).getPendingTransactions

Defined in​

src/provider/rpc.ts:211


getTransaction​

â–¸ getTransaction(txHash): Promise<TransactionWithHash>

Parameters​

NameType
txHashBigNumberish

Returns​

Promise<TransactionWithHash>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getTransaction

Defined in​

src/provider/rpc.ts:218


getTransactionByHash​

â–¸ getTransactionByHash(txHash): Promise<TransactionWithHash>

Parameters​

NameType
txHashBigNumberish

Returns​

Promise<TransactionWithHash>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getTransactionByHash

Defined in​

src/provider/rpc.ts:222


getTransactionByBlockIdAndIndex​

â–¸ getTransactionByBlockIdAndIndex(blockIdentifier, index): Promise<TransactionWithHash>

Parameters​

NameType
blockIdentifierBlockIdentifier
indexnumber

Returns​

Promise<TransactionWithHash>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getTransactionByBlockIdAndIndex

Defined in​

src/provider/rpc.ts:226


getTransactionReceipt​

â–¸ getTransactionReceipt(txHash): Promise<GetTransactionReceiptResponse>

Parameters​

NameType
txHashBigNumberish

Returns​

Promise<GetTransactionReceiptResponse>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getTransactionReceipt

Defined in​

src/provider/rpc.ts:230


getTransactionTrace​

â–¸ getTransactionTrace(txHash): Promise<TRANSACTION_TRACE>

Parameters​

NameType
txHashBigNumberish

Returns​

Promise<TRANSACTION_TRACE>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getTransactionTrace

Defined in​

src/provider/rpc.ts:237


getTransactionStatus​

â–¸ getTransactionStatus(transactionHash): Promise<TransactionStatus>

Get the status of a transaction

Parameters​

NameType
transactionHashBigNumberish

Returns​

Promise<TransactionStatus>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getTransactionStatus

Defined in​

src/provider/rpc.ts:244


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​

Mixin(BaseRpcProvider, StarknetId).getSimulateTransaction

Defined in​

src/provider/rpc.ts:255


waitForTransaction​

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

Parameters​

NameType
txHashBigNumberish
options?waitForTransactionOptions

Returns​

Promise<GetTransactionReceiptResponse>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).waitForTransaction

Defined in​

src/provider/rpc.ts:265


getStorageAt​

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

Parameters​

NameType
contractAddressBigNumberish
keyBigNumberish
blockIdentifier?BlockIdentifier

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getStorageAt

Defined in​

src/provider/rpc.ts:277


getClassHashAt​

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

Parameters​

NameType
contractAddressBigNumberish
blockIdentifier?BlockIdentifier

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getClassHashAt

Defined in​

src/provider/rpc.ts:285


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​

Mixin(BaseRpcProvider, StarknetId).getClassByHash

Defined in​

src/provider/rpc.ts:289


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​

Mixin(BaseRpcProvider, StarknetId).getClass

Defined in​

src/provider/rpc.ts:293


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​

Mixin(BaseRpcProvider, StarknetId).getClassAt

Defined in​

src/provider/rpc.ts:299


getContractVersion​

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

Parameters​

NameType
contractAddressBigNumberish
classHash?undefined
options?getContractVersionOptions

Returns​

Promise<ContractVersion>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getContractVersion

Defined in​

src/provider/rpc.ts:305

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

Parameters​

NameType
contractAddressundefined
classHashBigNumberish
options?getContractVersionOptions

Returns​

Promise<ContractVersion>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getContractVersion

Defined in​

src/provider/rpc.ts:310


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​

Mixin(BaseRpcProvider, StarknetId).getEstimateFee

Defined in​

src/provider/rpc.ts:346


getInvokeEstimateFee​

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

Parameters​

NameType
invocationInvocation
invocationDetailsInvocationsDetailsWithNonce
blockIdentifier?BlockIdentifier
skipValidate?boolean

Returns​

Promise<EstimateFeeResponse>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getInvokeEstimateFee

Defined in​

src/provider/rpc.ts:355


getDeclareEstimateFee​

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

Parameters​

NameType
invocationDeclareContractTransaction
detailsInvocationsDetailsWithNonce
blockIdentifier?BlockIdentifier
skipValidate?boolean

Returns​

Promise<EstimateFeeResponse>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getDeclareEstimateFee

Defined in​

src/provider/rpc.ts:375


getDeployAccountEstimateFee​

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

Parameters​

NameType
invocationDeployAccountContractTransaction
detailsInvocationsDetailsWithNonce
blockIdentifier?BlockIdentifier
skipValidate?boolean

Returns​

Promise<EstimateFeeResponse>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getDeployAccountEstimateFee

Defined in​

src/provider/rpc.ts:395


getEstimateFeeBulk​

â–¸ getEstimateFeeBulk(invocations, options): Promise<EstimateFeeResponseBulk>

Parameters​

NameType
invocationsAccountInvocations
optionsgetEstimateFeeBulkOptions

Returns​

Promise<EstimateFeeResponseBulk>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getEstimateFeeBulk

Defined in​

src/provider/rpc.ts:415


invokeFunction​

â–¸ invokeFunction(functionInvocation, details): Promise<InvokedTransaction>

Parameters​

NameType
functionInvocationInvocation
detailsInvocationsDetailsWithNonce

Returns​

Promise<InvokedTransaction>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).invokeFunction

Defined in​

src/provider/rpc.ts:424


declareContract​

â–¸ declareContract(transaction, details): Promise<DeclaredTransaction>

Parameters​

NameType
transactionDeclareContractTransaction
detailsInvocationsDetailsWithNonce

Returns​

Promise<DeclaredTransaction>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).declareContract

Defined in​

src/provider/rpc.ts:431


deployAccountContract​

â–¸ deployAccountContract(transaction, details): Promise<DeployedAccountTransaction>

Parameters​

NameType
transactionDeployAccountContractTransaction
detailsInvocationsDetailsWithNonce

Returns​

Promise<DeployedAccountTransaction>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).deployAccountContract

Defined in​

src/provider/rpc.ts:438


callContract​

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

Parameters​

NameType
callCall
blockIdentifier?BlockIdentifier

Returns​

Promise<string[]>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).callContract

Defined in​

src/provider/rpc.ts:448


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​

Mixin(BaseRpcProvider, StarknetId).estimateMessageFee

Defined in​

src/provider/rpc.ts:456


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​

Mixin(BaseRpcProvider, StarknetId).getSyncingStats

Defined in​

src/provider/rpc.ts:464


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​

Mixin(BaseRpcProvider, StarknetId).getEvents

Defined in​

src/provider/rpc.ts:472


verifyMessageInStarknet​

â–¸ verifyMessageInStarknet(message, signature, accountAddress, signatureVerificationFunctionName?, signatureVerificationResponse?): Promise<boolean>

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

Parameters​

NameTypeDescription
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 = myRpcProvider.verifyMessageInStarknet(myTypedMessage, sign, accountAddress);
const result2 = myRpcProvider.verifyMessageInStarknet(messageHash, sign, accountAddress);
// result1 = result2 = true

Inherited from​

Mixin(BaseRpcProvider, StarknetId).verifyMessageInStarknet

Defined in​

src/provider/rpc.ts:494


getStarkName​

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

Parameters​

NameType
addressBigNumberish
StarknetIdContract?string

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getStarkName

Defined in​

src/provider/extensions/starknetId.ts:21


getAddressFromStarkName​

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

Parameters​

NameType
namestring
StarknetIdContract?string

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId).getAddressFromStarkName

Defined in​

src/provider/extensions/starknetId.ts:30


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​

Mixin(BaseRpcProvider, StarknetId).getStarkProfile

Defined in​

src/provider/extensions/starknetId.ts:39