Skip to main content
Version: 9.2.1

Class: Provider

Hierarchy​

  • RpcProvider<this> & StarknetId<this> & BrotherId<this>

    ↳ Provider

    ↳↳ Account

Constructors​

constructor​

• new Provider(optionsOrProvider?): Provider

Parameters​

NameType
optionsOrProvider?RpcProviderOptions | ProviderInterface | RpcProvider

Returns​

Provider

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).constructor

Defined in​

src/provider/rpc.ts:66

• new Provider(): Provider

Returns​

Provider

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).constructor

Properties​

responseParser​

• responseParser: RPCResponseParser

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).responseParser

Defined in​

src/provider/rpc.ts:62


channel​

• channel: RpcChannel | RpcChannel

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).channel

Defined in​

src/provider/rpc.ts:64


getStateUpdate​

• getStateUpdate: () => Promise<{ block_hash: string ; new_root: string ; 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: { address: string ; class_hash: string }[] ; replaced_classes: { contract_address: string ; class_hash: string }[] ; nonces: { nonce: string ; contract_address: string }[] ; migrated_compiled_classes: undefined | { class_hash: string ; compiled_class_hash: string }[] } }>(blockIdentifier: "pre_confirmed") => Promise<{ block_hash: never ; 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: { address: string ; class_hash: string }[] ; replaced_classes: { contract_address: string ; class_hash: string }[] ; nonces: { nonce: string ; contract_address: string }[] ; migrated_compiled_classes: undefined | { class_hash: string ; compiled_class_hash: string }[] } ; old_root: undefined | string }>(blockIdentifier: "latest") => Promise<{ block_hash: string ; new_root: string ; 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: { address: string ; class_hash: string }[] ; replaced_classes: { contract_address: string ; class_hash: string }[] ; nonces: { nonce: string ; contract_address: string }[] ; migrated_compiled_classes: undefined | { class_hash: string ; compiled_class_hash: string }[] } }>(blockIdentifier?: BlockIdentifier) => Promise<StateUpdateResponse>

Type declaration​

▸ (): Promise<{ block_hash: string ; new_root: string ; 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: { address: string ; class_hash: string }[] ; replaced_classes: { contract_address: string ; class_hash: string }[] ; nonces: { nonce: string ; contract_address: string }[] ; migrated_compiled_classes: undefined | { class_hash: string ; compiled_class_hash: string }[] } }>

Returns​

Promise<{ block_hash: string ; new_root: string ; 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: { address: string ; class_hash: string }[] ; replaced_classes: { contract_address: string ; class_hash: string }[] ; nonces: { nonce: string ; contract_address: string }[] ; migrated_compiled_classes: undefined | { class_hash: string ; compiled_class_hash: string }[] } }>

▸ (blockIdentifier): Promise<{ block_hash: never ; 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: { address: string ; class_hash: string }[] ; replaced_classes: { contract_address: string ; class_hash: string }[] ; nonces: { nonce: string ; contract_address: string }[] ; migrated_compiled_classes: undefined | { class_hash: string ; compiled_class_hash: string }[] } ; old_root: undefined | string }>

Parameters​
NameType
blockIdentifier"pre_confirmed"
Returns​

Promise<{ block_hash: never ; 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: { address: string ; class_hash: string }[] ; replaced_classes: { contract_address: string ; class_hash: string }[] ; nonces: { nonce: string ; contract_address: string }[] ; migrated_compiled_classes: undefined | { class_hash: string ; compiled_class_hash: string }[] } ; old_root: undefined | string }>

▸ (blockIdentifier): Promise<{ block_hash: string ; new_root: string ; 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: { address: string ; class_hash: string }[] ; replaced_classes: { contract_address: string ; class_hash: string }[] ; nonces: { nonce: string ; contract_address: string }[] ; migrated_compiled_classes: undefined | { class_hash: string ; compiled_class_hash: string }[] } }>

Parameters​
NameType
blockIdentifier"latest"
Returns​

Promise<{ block_hash: string ; new_root: string ; 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: { address: string ; class_hash: string }[] ; replaced_classes: { contract_address: string ; class_hash: string }[] ; nonces: { nonce: string ; contract_address: string }[] ; migrated_compiled_classes: undefined | { class_hash: string ; compiled_class_hash: string }[] } }>

▸ (blockIdentifier?): Promise<StateUpdateResponse>

Parameters​
NameType
blockIdentifier?BlockIdentifier
Returns​

Promise<StateUpdateResponse>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getStateUpdate

Defined in​

src/provider/rpc.ts:257

Methods​

create​

▸ create<T>(this, optionsOrProvider?): Promise<T>

auto configure channel based on provided node leave space for other async before constructor

Type parameters​

NameType
Textends RpcProvider

Parameters​

NameType
this(...args: [optionsOrProvider?: RpcProviderOptions | ProviderInterface | RpcProvider]) => T
optionsOrProvider?RpcProviderOptions

Returns​

Promise<T>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).create

Defined in​

src/provider/rpc.ts:98


getStarkName​

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

Parameters​

NameType
providerProviderInterface
addressBigNumberish
StarknetIdContract?string

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getStarkName

Defined in​

src/provider/extensions/starknetId.ts:62


getAddressFromStarkName​

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

Parameters​

NameType
providerProviderInterface
namestring
StarknetIdContract?string

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getAddressFromStarkName

Defined in​

src/provider/extensions/starknetId.ts:96


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, BrotherId).getStarkProfile

Defined in​

src/provider/extensions/starknetId.ts:128


getBrotherName​

▸ getBrotherName(provider, address, BrotherIdContract?): Promise<string>

Static implementation of getBrotherName

Parameters​

NameTypeDescription
providerProviderInterfaceThe provider interface
addressBigNumberishThe address to get the domain for
BrotherIdContract?stringOptional contract address

Returns​

Promise<string>

The domain name with .brother suffix

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBrotherName

Defined in​

src/provider/extensions/brotherId.ts:148


getAddressFromBrotherName​

▸ getAddressFromBrotherName(provider, name, BrotherIdContract?): Promise<string>

Static implementation of getAddressFromBrotherName

Parameters​

NameTypeDescription
providerProviderInterfaceThe provider interface
namestringThe domain name
BrotherIdContract?stringOptional contract address

Returns​

Promise<string>

The resolver address

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getAddressFromBrotherName

Defined in​

src/provider/extensions/brotherId.ts:186


getBrotherProfile​

▸ getBrotherProfile(provider, address, BrotherIdContract?): Promise<BrotherProfile>

Static implementation of getBrotherProfile

Parameters​

NameTypeDescription
providerProviderInterfaceThe provider interface
addressBigNumberishThe address to get the profile for
BrotherIdContract?stringOptional contract address

Returns​

Promise<BrotherProfile>

The complete Brother profile

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBrotherProfile

Defined in​

src/provider/extensions/brotherId.ts:226


fetch​

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

Parameters​

NameTypeDefault value
methodstringundefined
params?objectundefined
idstring | number0

Returns​

Promise<Response>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).fetch

Defined in​

src/provider/rpc.ts:128


getChainId​

▸ getChainId(): Promise<"0x534e5f4d41494e" | "0x534e5f5345504f4c4941">

Returns​

Promise<"0x534e5f4d41494e" | "0x534e5f5345504f4c4941">

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getChainId

Defined in​

src/provider/rpc.ts:132


readSpecVersion​

▸ readSpecVersion(): undefined | "0.9.0" | "0.10.0"

Returns​

undefined | "0.9.0" | "0.10.0"

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).readSpecVersion

Defined in​

src/provider/rpc.ts:136


getSpecVersion​

▸ getSpecVersion(): Promise<string>

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getSpecVersion

Defined in​

src/provider/rpc.ts:140


setUpSpecVersion​

▸ setUpSpecVersion(): Promise<"0.9.0" | "0.10.0">

Returns​

Promise<"0.9.0" | "0.10.0">

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).setUpSpecVersion

Defined in​

src/provider/rpc.ts:144


getStarknetVersion​

▸ getStarknetVersion(blockIdentifier?): Promise<string>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getStarknetVersion

Defined in​

src/provider/rpc.ts:148


getNonceForAddress​

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

Parameters​

NameType
contractAddressBigNumberish
blockIdentifier?BlockIdentifier

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getNonceForAddress

Defined in​

src/provider/rpc.ts:152


getBlock​

▸ getBlock(): Promise<{ transactions: string[] ; block_number: number ; timestamp: number ; sequencer_address: string ; l1_gas_price: RESOURCE_PRICE ; l2_gas_price: RESOURCE_PRICE ; l1_data_gas_price: RESOURCE_PRICE ; l1_da_mode: L1_DA_MODE ; starknet_version: string }>

Returns​

Promise<{ transactions: string[] ; block_number: number ; timestamp: number ; sequencer_address: string ; l1_gas_price: RESOURCE_PRICE ; l2_gas_price: RESOURCE_PRICE ; l1_data_gas_price: RESOURCE_PRICE ; l1_da_mode: L1_DA_MODE ; starknet_version: string }>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlock

Defined in​

src/provider/rpc.ts:159

▸ getBlock(blockIdentifier): Promise<{ transactions: string[] ; block_number: number ; timestamp: number ; sequencer_address: string ; l1_gas_price: RESOURCE_PRICE ; l2_gas_price: RESOURCE_PRICE ; l1_data_gas_price: RESOURCE_PRICE ; l1_da_mode: L1_DA_MODE ; starknet_version: string }>

Parameters​

NameType
blockIdentifier"pre_confirmed"

Returns​

Promise<{ transactions: string[] ; block_number: number ; timestamp: number ; sequencer_address: string ; l1_gas_price: RESOURCE_PRICE ; l2_gas_price: RESOURCE_PRICE ; l1_data_gas_price: RESOURCE_PRICE ; l1_da_mode: L1_DA_MODE ; starknet_version: string }>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlock

Defined in​

src/provider/rpc.ts:160

▸ getBlock(blockIdentifier): Promise<{ status: EBlockStatus ; block_hash: string ; parent_hash: string ; block_number: number ; new_root: string ; timestamp: number ; sequencer_address: string ; l1_gas_price: RESOURCE_PRICE ; l2_gas_price: RESOURCE_PRICE ; l1_data_gas_price: RESOURCE_PRICE ; l1_da_mode: L1_DA_MODE ; starknet_version: string ; event_commitment: string ; transaction_commitment: string ; receipt_commitment: string ; state_diff_commitment: string ; event_count: number ; transaction_count: number ; state_diff_length: number ; transactions: string[] }>

Parameters​

NameType
blockIdentifier"latest"

Returns​

Promise<{ status: EBlockStatus ; block_hash: string ; parent_hash: string ; block_number: number ; new_root: string ; timestamp: number ; sequencer_address: string ; l1_gas_price: RESOURCE_PRICE ; l2_gas_price: RESOURCE_PRICE ; l1_data_gas_price: RESOURCE_PRICE ; l1_da_mode: L1_DA_MODE ; starknet_version: string ; event_commitment: string ; transaction_commitment: string ; receipt_commitment: string ; state_diff_commitment: string ; event_count: number ; transaction_count: number ; state_diff_length: number ; transactions: string[] }>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlock

Defined in​

src/provider/rpc.ts:161

▸ getBlock(blockIdentifier): Promise<GetBlockResponse>

Parameters​

NameType
blockIdentifierBlockIdentifier

Returns​

Promise<GetBlockResponse>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlock

Defined in​

src/provider/rpc.ts:162


getBlockLatestAccepted​

▸ getBlockLatestAccepted(): Promise<BlockHashAndNumber>

Returns​

Promise<BlockHashAndNumber>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockLatestAccepted

Defined in​

src/provider/rpc.ts:169


getBlockNumber​

▸ getBlockNumber(): Promise<number>

Returns​

Promise<number>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockNumber

Defined in​

src/provider/rpc.ts:173


getBlockWithTxHashes​

▸ getBlockWithTxHashes(blockIdentifier?): Promise<OnlyFirst<BLOCK_WITH_TX_HASHES, { status: EBlockStatus } & BLOCK_HEADER & BLOCK_BODY_WITH_TX_HASHES & PRE_CONFIRMED_BLOCK_HEADER> | OnlyFirst<PRE_CONFIRMED_BLOCK_WITH_TX_HASHES, { status: EBlockStatus } & BLOCK_HEADER & BLOCK_BODY_WITH_TX_HASHES & PRE_CONFIRMED_BLOCK_HEADER>>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<OnlyFirst<BLOCK_WITH_TX_HASHES, { status: EBlockStatus } & BLOCK_HEADER & BLOCK_BODY_WITH_TX_HASHES & PRE_CONFIRMED_BLOCK_HEADER> | OnlyFirst<PRE_CONFIRMED_BLOCK_WITH_TX_HASHES, { status: EBlockStatus } & BLOCK_HEADER & BLOCK_BODY_WITH_TX_HASHES & PRE_CONFIRMED_BLOCK_HEADER>>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockWithTxHashes

Defined in​

src/provider/rpc.ts:177


getBlockWithTxs​

▸ getBlockWithTxs(blockIdentifier?): Promise<OnlyFirst<BLOCK_WITH_TXS, { status: EBlockStatus } & BLOCK_HEADER & BLOCK_BODY_WITH_TXS & PRE_CONFIRMED_BLOCK_HEADER> | OnlyFirst<PRE_CONFIRMED_BLOCK_WITH_TXS, { status: EBlockStatus } & BLOCK_HEADER & BLOCK_BODY_WITH_TXS & PRE_CONFIRMED_BLOCK_HEADER>>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<OnlyFirst<BLOCK_WITH_TXS, { status: EBlockStatus } & BLOCK_HEADER & BLOCK_BODY_WITH_TXS & PRE_CONFIRMED_BLOCK_HEADER> | OnlyFirst<PRE_CONFIRMED_BLOCK_WITH_TXS, { status: EBlockStatus } & BLOCK_HEADER & BLOCK_BODY_WITH_TXS & PRE_CONFIRMED_BLOCK_HEADER>>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockWithTxs

Defined in​

src/provider/rpc.ts:181


waitForBlock​

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

Parameters​

NameTypeDefault value
blockIdentifierBlockIdentifierBlockTag.LATEST
retryIntervalnumber5000

Returns​

Promise<void>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).waitForBlock

Defined in​

src/provider/rpc.ts:185


getL1GasPrice​

▸ getL1GasPrice(blockIdentifier?): Promise<string>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getL1GasPrice

Defined in​

src/provider/rpc.ts:215


getGasPrices​

▸ getGasPrices(blockIdentifier?): Promise<GasPrices>

Get the gas prices related to a block.

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<GasPrices>

an object with l1DataGasPrice, l1GasPrice, l2GasPrice properties (all bigint type).

Example

const result = await myProvider.getGasPrices();
// result = { l1DataGasPrice: 3039n, l1GasPrice: 55590341542890n, l2GasPrice: 8441845008n }

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getGasPrices

Defined in​

src/provider/rpc.ts:231


getL1MessageHash​

▸ getL1MessageHash(l2TxHash): Promise<string>

Parameters​

NameType
l2TxHashBigNumberish

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getL1MessageHash

Defined in​

src/provider/rpc.ts:237


getBlockWithReceipts​

▸ getBlockWithReceipts(blockIdentifier?): Promise<OnlyFirst<BLOCK_WITH_RECEIPTS, { status: EBlockStatus } & BLOCK_HEADER & BLOCK_BODY_WITH_RECEIPTS & PRE_CONFIRMED_BLOCK_HEADER> | OnlyFirst<PRE_CONFIRMED_BLOCK_WITH_RECEIPTS, { status: EBlockStatus } & BLOCK_HEADER & BLOCK_BODY_WITH_RECEIPTS & PRE_CONFIRMED_BLOCK_HEADER>>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<OnlyFirst<BLOCK_WITH_RECEIPTS, { status: EBlockStatus } & BLOCK_HEADER & BLOCK_BODY_WITH_RECEIPTS & PRE_CONFIRMED_BLOCK_HEADER> | OnlyFirst<PRE_CONFIRMED_BLOCK_WITH_RECEIPTS, { status: EBlockStatus } & BLOCK_HEADER & BLOCK_BODY_WITH_RECEIPTS & PRE_CONFIRMED_BLOCK_HEADER>>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockWithReceipts

Defined in​

src/provider/rpc.ts:253


getBlockStateUpdate​

▸ getBlockStateUpdate(): Promise<{ block_hash: string ; new_root: string ; 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: { address: string ; class_hash: string }[] ; replaced_classes: { contract_address: string ; class_hash: string }[] ; nonces: { nonce: string ; contract_address: string }[] ; migrated_compiled_classes: undefined | { class_hash: string ; compiled_class_hash: string }[] } }>

Returns​

Promise<{ block_hash: string ; new_root: string ; 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: { address: string ; class_hash: string }[] ; replaced_classes: { contract_address: string ; class_hash: string }[] ; nonces: { nonce: string ; contract_address: string }[] ; migrated_compiled_classes: undefined | { class_hash: string ; compiled_class_hash: string }[] } }>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockStateUpdate

Defined in​

src/provider/rpc.ts:259

▸ getBlockStateUpdate(blockIdentifier): Promise<{ block_hash: never ; 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: { address: string ; class_hash: string }[] ; replaced_classes: { contract_address: string ; class_hash: string }[] ; nonces: { nonce: string ; contract_address: string }[] ; migrated_compiled_classes: undefined | { class_hash: string ; compiled_class_hash: string }[] } ; old_root: undefined | string }>

Parameters​

NameType
blockIdentifier"pre_confirmed"

Returns​

Promise<{ block_hash: never ; 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: { address: string ; class_hash: string }[] ; replaced_classes: { contract_address: string ; class_hash: string }[] ; nonces: { nonce: string ; contract_address: string }[] ; migrated_compiled_classes: undefined | { class_hash: string ; compiled_class_hash: string }[] } ; old_root: undefined | string }>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockStateUpdate

Defined in​

src/provider/rpc.ts:260

▸ getBlockStateUpdate(blockIdentifier): Promise<{ block_hash: string ; new_root: string ; 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: { address: string ; class_hash: string }[] ; replaced_classes: { contract_address: string ; class_hash: string }[] ; nonces: { nonce: string ; contract_address: string }[] ; migrated_compiled_classes: undefined | { class_hash: string ; compiled_class_hash: string }[] } }>

Parameters​

NameType
blockIdentifier"latest"

Returns​

Promise<{ block_hash: string ; new_root: string ; 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: { address: string ; class_hash: string }[] ; replaced_classes: { contract_address: string ; class_hash: string }[] ; nonces: { nonce: string ; contract_address: string }[] ; migrated_compiled_classes: undefined | { class_hash: string ; compiled_class_hash: string }[] } }>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockStateUpdate

Defined in​

src/provider/rpc.ts:263

▸ getBlockStateUpdate(blockIdentifier?): Promise<StateUpdateResponse>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<StateUpdateResponse>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockStateUpdate

Defined in​

src/provider/rpc.ts:264


getBlockTransactionsTraces​

▸ getBlockTransactionsTraces(blockIdentifier?): Promise<BlockTransactionsTraces | BlockTransactionsTraces>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<BlockTransactionsTraces | BlockTransactionsTraces>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockTransactionsTraces

Defined in​

src/provider/rpc.ts:269


getBlockTransactionCount​

▸ getBlockTransactionCount(blockIdentifier?): Promise<number>

Parameters​

NameType
blockIdentifier?BlockIdentifier

Returns​

Promise<number>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockTransactionCount

Defined in​

src/provider/rpc.ts:273


getTransaction​

▸ getTransaction(txHash): Promise<TXN_WITH_HASH>

Parameters​

NameType
txHashBigNumberish

Returns​

Promise<TXN_WITH_HASH>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getTransaction

Defined in​

src/provider/rpc.ts:277


getTransactionByHash​

▸ getTransactionByHash(txHash): Promise<TXN_WITH_HASH>

Parameters​

NameType
txHashBigNumberish

Returns​

Promise<TXN_WITH_HASH>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getTransactionByHash

Defined in​

src/provider/rpc.ts:281


getTransactionByBlockIdAndIndex​

▸ getTransactionByBlockIdAndIndex(blockIdentifier, index): Promise<TXN_WITH_HASH>

Parameters​

NameType
blockIdentifierBlockIdentifier
indexnumber

Returns​

Promise<TXN_WITH_HASH>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getTransactionByBlockIdAndIndex

Defined in​

src/provider/rpc.ts:285


getTransactionReceipt​

▸ getTransactionReceipt(txHash): Promise<GetTransactionReceiptResponse>

Parameters​

NameType
txHashBigNumberish

Returns​

Promise<GetTransactionReceiptResponse>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getTransactionReceipt

Defined in​

src/provider/rpc.ts:289


getTransactionTrace​

▸ getTransactionTrace(txHash): Promise<TRANSACTION_TRACE | TRANSACTION_TRACE>

Parameters​

NameType
txHashBigNumberish

Returns​

Promise<TRANSACTION_TRACE | TRANSACTION_TRACE>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getTransactionTrace

Defined in​

src/provider/rpc.ts:296


getTransactionStatus​

▸ getTransactionStatus(transactionHash): Promise<TXN_STATUS_RESULT>

Parameters​

NameType
transactionHashBigNumberish

Returns​

Promise<TXN_STATUS_RESULT>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getTransactionStatus

Defined in​

src/provider/rpc.ts:302


getSimulateTransaction​

▸ getSimulateTransaction(invocations, options?): Promise<SimulateTransactionOverheadResponse>

Parameters​

NameType
invocationsAccountInvocations
options?getSimulateTransactionOptions

Returns​

Promise<SimulateTransactionOverheadResponse>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getSimulateTransaction

Defined in​

src/provider/rpc.ts:306


waitForTransaction​

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

Parameters​

NameType
txHashBigNumberish
options?waitForTransactionOptions

Returns​

Promise<GetTransactionReceiptResponse>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).waitForTransaction

Defined in​

src/provider/rpc.ts:316


fastWaitForTransaction​

▸ fastWaitForTransaction(txHash, address, initNonce, options?): Promise<boolean>

Wait up until a new transaction is possible with same the account. This method is fast, but Events and transaction report are not yet available. Useful for gaming activity.

  • only rpc 0.9 and onwards.

Parameters​

NameTypeDescription
txHashBigNumberishtransaction hash
addressstringaddress of the account
initNonceBigNumberishinitial nonce of the account (before the transaction).
options?fastWaitForTransactionOptionsoptions to scan the network for the next possible transaction. retries is the number of times to retry.

Returns​

Promise<boolean>

Returns true if the next transaction is possible, false if the timeout has been reached, throw an error in case of provider communication.

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).fastWaitForTransaction

Defined in​

src/provider/rpc.ts:341


getStorageAt​

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

Parameters​

NameType
contractAddressBigNumberish
keyBigNumberish
blockIdentifier?BlockIdentifier

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getStorageAt

Defined in​

src/provider/rpc.ts:356


getClassHashAt​

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

Parameters​

NameType
contractAddressBigNumberish
blockIdentifier?BlockIdentifier

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getClassHashAt

Defined in​

src/provider/rpc.ts:364


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, BrotherId).getClassByHash

Defined in​

src/provider/rpc.ts:368


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, BrotherId).getClass

Defined in​

src/provider/rpc.ts:372


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, BrotherId).getClassAt

Defined in​

src/provider/rpc.ts:378


getContractVersion​

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

Parameters​

NameType
contractAddressBigNumberish
classHash?undefined
options?getContractVersionOptions

Returns​

Promise<ContractVersion>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getContractVersion

Defined in​

src/provider/rpc.ts:384

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

Parameters​

NameType
contractAddressundefined
classHashBigNumberish
options?getContractVersionOptions

Returns​

Promise<ContractVersion>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getContractVersion

Defined in​

src/provider/rpc.ts:389


getInvokeEstimateFee​

▸ getInvokeEstimateFee(invocation, details, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponseOverhead>

Parameters​

NameType
invocationInvocation
detailsInvocationsDetailsWithNonce
blockIdentifier?BlockIdentifier
skipValidate?boolean

Returns​

Promise<EstimateFeeResponseOverhead>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getInvokeEstimateFee

Defined in​

src/provider/rpc.ts:422


getDeclareEstimateFee​

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

Parameters​

NameType
invocationDeclareContractTransaction
detailsInvocationsDetailsWithNonce
blockIdentifier?BlockIdentifier
skipValidate?boolean

Returns​

Promise<EstimateFeeResponseOverhead>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getDeclareEstimateFee

Defined in​

src/provider/rpc.ts:436


getDeployAccountEstimateFee​

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

Parameters​

NameType
invocationDeployAccountContractTransaction
detailsInvocationsDetailsWithNonce
blockIdentifier?BlockIdentifier
skipValidate?boolean

Returns​

Promise<EstimateFeeResponseOverhead>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getDeployAccountEstimateFee

Defined in​

src/provider/rpc.ts:450


getEstimateFeeBulk​

▸ getEstimateFeeBulk(invocations, options?): Promise<EstimateFeeResponseBulkOverhead>

Parameters​

NameType
invocationsAccountInvocations
options?getEstimateFeeBulkOptions

Returns​

Promise<EstimateFeeResponseBulkOverhead>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getEstimateFeeBulk

Defined in​

src/provider/rpc.ts:464


invokeFunction​

▸ invokeFunction(functionInvocation, details): Promise<{ transaction_hash: string }>

Parameters​

NameType
functionInvocationInvocation
detailsInvocationsDetailsWithNonce

Returns​

Promise<{ transaction_hash: string }>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).invokeFunction

Defined in​

src/provider/rpc.ts:473


declareContract​

▸ declareContract(transaction, details): Promise<{ class_hash: string ; transaction_hash: string }>

Parameters​

NameType
transactionDeclareContractTransaction
detailsInvocationsDetailsWithNonce

Returns​

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

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).declareContract

Defined in​

src/provider/rpc.ts:480


deployAccountContract​

▸ deployAccountContract(transaction, details): Promise<{ contract_address: string ; transaction_hash: string }>

Parameters​

NameType
transactionDeployAccountContractTransaction
detailsInvocationsDetailsWithNonce

Returns​

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

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).deployAccountContract

Defined in​

src/provider/rpc.ts:487


callContract​

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

Parameters​

NameType
callCall
blockIdentifier?BlockIdentifier

Returns​

Promise<string[]>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).callContract

Defined in​

src/provider/rpc.ts:494


estimateMessageFee​

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

Parameters​

NameType
messageMSG_FROM_L1
blockIdentifier?BlockIdentifier

Returns​

Promise<MESSAGE_FEE_ESTIMATE | FEE_ESTIMATE>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).estimateMessageFee

Defined in​

src/provider/rpc.ts:498


getSyncingStats​

▸ getSyncingStats(): Promise<Syncing>

Returns​

Promise<Syncing>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getSyncingStats

Defined in​

src/provider/rpc.ts:505


getEvents​

▸ getEvents(eventFilter): Promise<EVENTS_CHUNK | EVENTS_CHUNK>

Parameters​

NameType
eventFilterEventFilter | EventFilter

Returns​

Promise<EVENTS_CHUNK | EVENTS_CHUNK>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getEvents

Defined in​

src/provider/rpc.ts:509


verifyMessageInStarknet​

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

Parameters​

NameType
messageTypedData | BigNumberish
signatureSignature
accountAddressBigNumberish
signatureVerificationFunctionName?string
signatureVerificationResponse?Object
signatureVerificationResponse.okResponsestring[]
signatureVerificationResponse.nokResponsestring[]
signatureVerificationResponse.errorstring[]

Returns​

Promise<boolean>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).verifyMessageInStarknet

Defined in​

src/provider/rpc.ts:521


isClassDeclared​

▸ isClassDeclared(contractClassIdentifier, blockIdentifier?): Promise<boolean>

Parameters​

NameType
contractClassIdentifierContractClassIdentifier
blockIdentifier?BlockIdentifier

Returns​

Promise<boolean>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).isClassDeclared

Defined in​

src/provider/rpc.ts:538


prepareInvocations​

▸ prepareInvocations(invocations): Promise<Invocations>

Parameters​

NameType
invocationsInvocations

Returns​

Promise<Invocations>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).prepareInvocations

Defined in​

src/provider/rpc.ts:566


getL1MessagesStatus​

▸ getL1MessagesStatus(transactionHash): Promise<L1L2MessagesStatus | L1L2MessagesStatus>

Parameters​

NameType
transactionHashBigNumberish

Returns​

Promise<L1L2MessagesStatus | L1L2MessagesStatus>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getL1MessagesStatus

Defined in​

src/provider/rpc.ts:587


getStorageProof​

▸ getStorageProof(classHashes, contractAddresses, contractsStorageKeys, blockIdentifier?): Promise<StorageProof>

Parameters​

NameType
classHashesBigNumberish[]
contractAddressesBigNumberish[]
contractsStorageKeysCONTRACT_STORAGE_KEYS[]
blockIdentifier?BlockIdentifier

Returns​

Promise<StorageProof>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getStorageProof

Defined in​

src/provider/rpc.ts:593


getCompiledCasm​

▸ getCompiledCasm(classHash): Promise<CASM_COMPILED_CONTRACT_CLASS>

Parameters​

NameType
classHashBigNumberish

Returns​

Promise<CASM_COMPILED_CONTRACT_CLASS>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getCompiledCasm

Defined in​

src/provider/rpc.ts:607


getEstimateTip​

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

Parameters​

NameType
blockIdentifier?BlockIdentifier
optionsTipAnalysisOptions

Returns​

Promise<TipEstimate>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getEstimateTip

Defined in​

src/provider/rpc.ts:611


getStarkName​

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

Parameters​

NameType
addressBigNumberish
StarknetIdContract?string

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getStarkName

Defined in​

src/provider/extensions/starknetId.ts:22


getAddressFromStarkName​

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

Parameters​

NameType
namestring
StarknetIdContract?string

Returns​

Promise<string>

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getAddressFromStarkName

Defined in​

src/provider/extensions/starknetId.ts:31


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, BrotherId).getStarkProfile

Defined in​

src/provider/extensions/starknetId.ts:40


getBrotherName​

▸ getBrotherName(address, BrotherIdContract?): Promise<string>

Gets the primary Brother domain name for an address

Parameters​

NameTypeDescription
addressBigNumberishThe address to get the domain for
BrotherIdContract?stringOptional contract address

Returns​

Promise<string>

The domain name with .brother suffix

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBrotherName

Defined in​

src/provider/extensions/brotherId.ts:99


getAddressFromBrotherName​

▸ getAddressFromBrotherName(name, BrotherIdContract?): Promise<string>

Gets the address associated with a Brother domain name

Parameters​

NameTypeDescription
namestringThe domain name (with or without .brother suffix)
BrotherIdContract?stringOptional contract address

Returns​

Promise<string>

The resolver address for the domain

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getAddressFromBrotherName

Defined in​

src/provider/extensions/brotherId.ts:114


getBrotherProfile​

▸ getBrotherProfile(address, BrotherIdContract?): Promise<BrotherProfile>

Gets the complete profile information for a Brother domain

Parameters​

NameTypeDescription
addressBigNumberishThe address to get the profile for
BrotherIdContract?stringOptional contract address

Returns​

Promise<BrotherProfile>

The complete Brother profile information

Inherited from​

Mixin(BaseRpcProvider, StarknetId, BrotherId).getBrotherProfile

Defined in​

src/provider/extensions/brotherId.ts:132