Class: Provider
Hierarchy
RpcProvider<this> &StarknetId<this> &BrotherId<this>↳
Provider↳↳
Account
Constructors
constructor
• new Provider(optionsOrProvider?): Provider
Parameters
| Name | Type |
|---|---|
optionsOrProvider? | RpcProviderOptions | ProviderInterface | RpcProvider |
Returns
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).constructor
Defined in
• new Provider(): Provider
Returns
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).constructor
Properties
responseParser
• responseParser: RPCResponseParser
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).responseParser
Defined in
channel
• channel: RpcChannel | RpcChannel
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).channel
Defined in
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 }[] } }>(blockIdentifier: "pre_confirmed") => Promise<PRE_CONFIRMED_STATE_UPDATE>(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 }[] } }>(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 }[] } }>
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 }[] } }>
▸ (blockIdentifier): Promise<PRE_CONFIRMED_STATE_UPDATE>
Parameters
| Name | Type |
|---|---|
blockIdentifier | "pre_confirmed" |
Returns
Promise<PRE_CONFIRMED_STATE_UPDATE>
▸ (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 }[] } }>
Parameters
| Name | Type |
|---|---|
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 }[] } }>
▸ (blockIdentifier?): Promise<StateUpdateResponse>
Parameters
| Name | Type |
|---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise<StateUpdateResponse>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getStateUpdate
Defined in
Methods
create
▸ create<T>(this, optionsOrProvider?): Promise<T>
auto configure channel based on provided node leave space for other async before constructor
Type parameters
| Name | Type |
|---|---|
T | extends RpcProvider |
Parameters
| Name | Type |
|---|---|
this | (...args: [optionsOrProvider?: RpcProviderOptions | ProviderInterface | RpcProvider]) => T |
optionsOrProvider? | RpcProviderOptions |
Returns
Promise<T>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).create
Defined in
getStarkName
▸ getStarkName(provider, address, StarknetIdContract?): Promise<string>
Parameters
| Name | Type |
|---|---|
provider | ProviderInterface |
address | BigNumberish |
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
| Name | Type |
|---|---|
provider | ProviderInterface |
name | string |
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
| Name | Type |
|---|---|
provider | ProviderInterface |
address | BigNumberish |
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
| Name | Type | Description |
|---|---|---|
provider | ProviderInterface | The provider interface |
address | BigNumberish | The address to get the domain for |
BrotherIdContract? | string | Optional 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
| Name | Type | Description |
|---|---|---|
provider | ProviderInterface | The provider interface |
name | string | The domain name |
BrotherIdContract? | string | Optional 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
| Name | Type | Description |
|---|---|---|
provider | ProviderInterface | The provider interface |
address | BigNumberish | The address to get the profile for |
BrotherIdContract? | string | Optional 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
| Name | Type | Default value |
|---|---|---|
method | string | undefined |
params? | object | undefined |
id | string | number | 0 |
Returns
Promise<Response>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).fetch
Defined in
getChainId
▸ getChainId(): Promise<"0x534e5f4d41494e" | "0x534e5f5345504f4c4941">
Returns
Promise<"0x534e5f4d41494e" | "0x534e5f5345504f4c4941">
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getChainId
Defined in
readSpecVersion
▸ readSpecVersion(): undefined | "0.8.1" | "0.9.0"
Returns
undefined | "0.8.1" | "0.9.0"
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).readSpecVersion
Defined in
getSpecVersion
▸ getSpecVersion(): Promise<string>
Returns
Promise<string>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getSpecVersion
Defined in
setUpSpecVersion
▸ setUpSpecVersion(): Promise<"0.8.1" | "0.9.0">
Returns
Promise<"0.8.1" | "0.9.0">
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).setUpSpecVersion
Defined in
getNonceForAddress
▸ getNonceForAddress(contractAddress, blockIdentifier?): Promise<string>
Parameters
| Name | Type |
|---|---|
contractAddress | BigNumberish |
blockIdentifier? | BlockIdentifier |
Returns
Promise<string>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getNonceForAddress
Defined in
getBlock
▸ getBlock(): Promise<{ transactions: string[] ; parent_hash: 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 }>
Returns
Promise<{ transactions: string[] ; parent_hash: 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 }>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlock
Defined in
▸ getBlock(blockIdentifier): Promise<{ transactions: string[] ; parent_hash: 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 }>
Parameters
| Name | Type |
|---|---|
blockIdentifier | "pre_confirmed" |
Returns
Promise<{ transactions: string[] ; parent_hash: 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 }>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlock
Defined in
▸ 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 ; transactions: string[] }>
Parameters
| Name | Type |
|---|---|
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 ; transactions: string[] }>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlock
Defined in
▸ getBlock(blockIdentifier): Promise<GetBlockResponse>
Parameters
| Name | Type |
|---|---|
blockIdentifier | BlockIdentifier |
Returns
Promise<GetBlockResponse>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlock
Defined in
getBlockLatestAccepted
▸ getBlockLatestAccepted(): Promise<BlockHashAndNumber>
Returns
Promise<BlockHashAndNumber>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockLatestAccepted
Defined in
getBlockNumber
▸ getBlockNumber(): Promise<number>
Returns
Promise<number>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockNumber
Defined in
getBlockWithTxHashes
▸ getBlockWithTxHashes(blockIdentifier?): Promise<OnlyFirst<BLOCK_WITH_TX_HASHES, { status: BLOCK_STATUS } & BLOCK_HEADER & BLOCK_BODY_WITH_TX_HASHES & PENDING_BLOCK_HEADER> | OnlyFirst<PENDING_BLOCK_WITH_TX_HASHES, { status: BLOCK_STATUS } & BLOCK_HEADER & BLOCK_BODY_WITH_TX_HASHES & PENDING_BLOCK_HEADER> | 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
| Name | Type |
|---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise<OnlyFirst<BLOCK_WITH_TX_HASHES, { status: BLOCK_STATUS } & BLOCK_HEADER & BLOCK_BODY_WITH_TX_HASHES & PENDING_BLOCK_HEADER> | OnlyFirst<PENDING_BLOCK_WITH_TX_HASHES, { status: BLOCK_STATUS } & BLOCK_HEADER & BLOCK_BODY_WITH_TX_HASHES & PENDING_BLOCK_HEADER> | 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
getBlockWithTxs
▸ getBlockWithTxs(blockIdentifier?): Promise<OnlyFirst<BLOCK_WITH_TXS, { status: BLOCK_STATUS } & BLOCK_HEADER & BLOCK_BODY_WITH_TXS & PENDING_BLOCK_HEADER> | OnlyFirst<PENDING_BLOCK_WITH_TXS, { status: BLOCK_STATUS } & BLOCK_HEADER & BLOCK_BODY_WITH_TXS & PENDING_BLOCK_HEADER> | 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
| Name | Type |
|---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise<OnlyFirst<BLOCK_WITH_TXS, { status: BLOCK_STATUS } & BLOCK_HEADER & BLOCK_BODY_WITH_TXS & PENDING_BLOCK_HEADER> | OnlyFirst<PENDING_BLOCK_WITH_TXS, { status: BLOCK_STATUS } & BLOCK_HEADER & BLOCK_BODY_WITH_TXS & PENDING_BLOCK_HEADER> | 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
waitForBlock
▸ waitForBlock(blockIdentifier?, retryInterval?): Promise<void>
Parameters
| Name | Type | Default value |
|---|---|---|
blockIdentifier | BlockIdentifier | BlockTag.LATEST |
retryInterval | number | 5000 |
Returns
Promise<void>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).waitForBlock
Defined in
getL1GasPrice
▸ getL1GasPrice(blockIdentifier?): Promise<string>
Parameters
| Name | Type |
|---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise<string>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getL1GasPrice
Defined in
getGasPrices
▸ getGasPrices(blockIdentifier?): Promise<GasPrices>
Get the gas prices related to a block.
Parameters
| Name | Type | Description |
|---|---|---|
blockIdentifier? | BlockIdentifier | Optional. Can be 'pending', 'latest' or a block number (an integer type). |
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
getL1MessageHash
▸ getL1MessageHash(l2TxHash): Promise<string>
Parameters
| Name | Type |
|---|---|
l2TxHash | BigNumberish |
Returns
Promise<string>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getL1MessageHash
Defined in
getBlockWithReceipts
▸ getBlockWithReceipts(blockIdentifier?): Promise<OnlyFirst<BLOCK_WITH_RECEIPTS, { status: BLOCK_STATUS } & BLOCK_HEADER & BLOCK_BODY_WITH_RECEIPTS & PENDING_BLOCK_HEADER> | OnlyFirst<PENDING_BLOCK_WITH_RECEIPTS, { status: BLOCK_STATUS } & BLOCK_HEADER & BLOCK_BODY_WITH_RECEIPTS & PENDING_BLOCK_HEADER> | 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
| Name | Type |
|---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise<OnlyFirst<BLOCK_WITH_RECEIPTS, { status: BLOCK_STATUS } & BLOCK_HEADER & BLOCK_BODY_WITH_RECEIPTS & PENDING_BLOCK_HEADER> | OnlyFirst<PENDING_BLOCK_WITH_RECEIPTS, { status: BLOCK_STATUS } & BLOCK_HEADER & BLOCK_BODY_WITH_RECEIPTS & PENDING_BLOCK_HEADER> | 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
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 }[] } }>
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 }[] } }>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockStateUpdate
Defined in
▸ getBlockStateUpdate(blockIdentifier): Promise<PRE_CONFIRMED_STATE_UPDATE>
Parameters
| Name | Type |
|---|---|
blockIdentifier | "pre_confirmed" |
Returns
Promise<PRE_CONFIRMED_STATE_UPDATE>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockStateUpdate
Defined in
▸ 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 }[] } }>
Parameters
| Name | Type |
|---|---|
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 }[] } }>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockStateUpdate
Defined in
▸ getBlockStateUpdate(blockIdentifier?): Promise<StateUpdateResponse>
Parameters
| Name | Type |
|---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise<StateUpdateResponse>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockStateUpdate
Defined in
getBlockTransactionsTraces
▸ getBlockTransactionsTraces(blockIdentifier?): Promise<BlockTransactionsTraces | BlockTransactionsTraces>
Parameters
| Name | Type |
|---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise<BlockTransactionsTraces | BlockTransactionsTraces>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockTransactionsTraces
Defined in
getBlockTransactionCount
▸ getBlockTransactionCount(blockIdentifier?): Promise<number>
Parameters
| Name | Type |
|---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise<number>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getBlockTransactionCount
Defined in
getTransaction
▸ getTransaction(txHash): Promise<TXN_WITH_HASH>
Parameters
| Name | Type |
|---|---|
txHash | BigNumberish |
Returns
Promise<TXN_WITH_HASH>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getTransaction
Defined in
getTransactionByHash
▸ getTransactionByHash(txHash): Promise<TXN_WITH_HASH>
Parameters
| Name | Type |
|---|---|
txHash | BigNumberish |
Returns
Promise<TXN_WITH_HASH>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getTransactionByHash
Defined in
getTransactionByBlockIdAndIndex
▸ getTransactionByBlockIdAndIndex(blockIdentifier, index): Promise<TXN_WITH_HASH>
Parameters
| Name | Type |
|---|---|
blockIdentifier | BlockIdentifier |
index | number |
Returns
Promise<TXN_WITH_HASH>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getTransactionByBlockIdAndIndex
Defined in
getTransactionReceipt
▸ getTransactionReceipt(txHash): Promise<GetTransactionReceiptResponse>
Parameters
| Name | Type |
|---|---|
txHash | BigNumberish |
Returns
Promise<GetTransactionReceiptResponse>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getTransactionReceipt
Defined in
getTransactionTrace
▸ getTransactionTrace(txHash): Promise<TRANSACTION_TRACE | TRANSACTION_TRACE>
Parameters
| Name | Type |
|---|---|
txHash | BigNumberish |
Returns
Promise<TRANSACTION_TRACE | TRANSACTION_TRACE>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getTransactionTrace
Defined in
getTransactionStatus
▸ getTransactionStatus(transactionHash): Promise<TXN_STATUS_RESULT | TXN_STATUS_RESULT>
Parameters
| Name | Type |
|---|---|
transactionHash | BigNumberish |
Returns
Promise<TXN_STATUS_RESULT | TXN_STATUS_RESULT>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getTransactionStatus
Defined in
getSimulateTransaction
▸ getSimulateTransaction(invocations, options?): Promise<SimulateTransactionOverheadResponse>
Parameters
| Name | Type |
|---|---|
invocations | AccountInvocations |
options? | getSimulateTransactionOptions |
Returns
Promise<SimulateTransactionOverheadResponse>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getSimulateTransaction
Defined in
waitForTransaction
▸ waitForTransaction(txHash, options?): Promise<GetTransactionReceiptResponse>
Parameters
| Name | Type |
|---|---|
txHash | BigNumberish |
options? | waitForTransactionOptions |
Returns
Promise<GetTransactionReceiptResponse>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).waitForTransaction
Defined in
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
| Name | Type | Description |
|---|---|---|
txHash | BigNumberish | transaction hash |
address | string | address of the account |
initNonce | BigNumberish | initial nonce of the account (before the transaction). |
options? | fastWaitForTransactionOptions | options 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
getStorageAt
▸ getStorageAt(contractAddress, key, blockIdentifier?): Promise<string>
Parameters
| Name | Type |
|---|---|
contractAddress | BigNumberish |
key | BigNumberish |
blockIdentifier? | BlockIdentifier |
Returns
Promise<string>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getStorageAt
Defined in
getClassHashAt
▸ getClassHashAt(contractAddress, blockIdentifier?): Promise<string>
Parameters
| Name | Type |
|---|---|
contractAddress | BigNumberish |
blockIdentifier? | BlockIdentifier |
Returns
Promise<string>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getClassHashAt
Defined in
getClassByHash
▸ getClassByHash(classHash): Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>
Parameters
| Name | Type |
|---|---|
classHash | BigNumberish |
Returns
Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getClassByHash
Defined in
getClass
▸ getClass(classHash, blockIdentifier?): Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>
Parameters
| Name | Type |
|---|---|
classHash | BigNumberish |
blockIdentifier? | BlockIdentifier |
Returns
Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getClass
Defined in
getClassAt
▸ getClassAt(contractAddress, blockIdentifier?): Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>
Parameters
| Name | Type |
|---|---|
contractAddress | BigNumberish |
blockIdentifier? | BlockIdentifier |
Returns
Promise<LegacyContractClass | Omit<CompiledSierra, "sierra_program_debug_info">>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getClassAt
Defined in
getContractVersion
▸ getContractVersion(contractAddress, classHash?, options?): Promise<ContractVersion>
Parameters
| Name | Type |
|---|---|
contractAddress | BigNumberish |
classHash? | undefined |
options? | getContractVersionOptions |
Returns
Promise<ContractVersion>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getContractVersion
Defined in
▸ getContractVersion(contractAddress, classHash, options?): Promise<ContractVersion>
Parameters
| Name | Type |
|---|---|
contractAddress | undefined |
classHash | BigNumberish |
options? | getContractVersionOptions |
Returns
Promise<ContractVersion>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getContractVersion
Defined in
getInvokeEstimateFee
▸ getInvokeEstimateFee(invocation, details, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponseOverhead>
Parameters
| Name | Type |
|---|---|
invocation | Invocation |
details | InvocationsDetailsWithNonce |
blockIdentifier? | BlockIdentifier |
skipValidate? | boolean |
Returns
Promise<EstimateFeeResponseOverhead>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getInvokeEstimateFee
Defined in
getDeclareEstimateFee
▸ getDeclareEstimateFee(invocation, details, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponseOverhead>
Parameters
| Name | Type |
|---|---|
invocation | DeclareContractTransaction |
details | InvocationsDetailsWithNonce |
blockIdentifier? | BlockIdentifier |
skipValidate? | boolean |
Returns
Promise<EstimateFeeResponseOverhead>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getDeclareEstimateFee
Defined in
getDeployAccountEstimateFee
▸ getDeployAccountEstimateFee(invocation, details, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponseOverhead>
Parameters
| Name | Type |
|---|---|
invocation | DeployAccountContractTransaction |
details | InvocationsDetailsWithNonce |
blockIdentifier? | BlockIdentifier |
skipValidate? | boolean |
Returns
Promise<EstimateFeeResponseOverhead>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getDeployAccountEstimateFee
Defined in
getEstimateFeeBulk
▸ getEstimateFeeBulk(invocations, options?): Promise<EstimateFeeResponseBulkOverhead>
Parameters
| Name | Type |
|---|---|
invocations | AccountInvocations |
options? | getEstimateFeeBulkOptions |
Returns
Promise<EstimateFeeResponseBulkOverhead>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getEstimateFeeBulk
Defined in
invokeFunction
▸ invokeFunction(functionInvocation, details): Promise<{ transaction_hash: string }>
Parameters
| Name | Type |
|---|---|
functionInvocation | Invocation |
details | InvocationsDetailsWithNonce |
Returns
Promise<{ transaction_hash: string }>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).invokeFunction
Defined in
declareContract
▸ declareContract(transaction, details): Promise<{ class_hash: string ; transaction_hash: string }>
Parameters
| Name | Type |
|---|---|
transaction | DeclareContractTransaction |
details | InvocationsDetailsWithNonce |
Returns
Promise<{ class_hash: string ; transaction_hash: string }>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).declareContract
Defined in
deployAccountContract
▸ deployAccountContract(transaction, details): Promise<{ contract_address: string ; transaction_hash: string }>
Parameters
| Name | Type |
|---|---|
transaction | DeployAccountContractTransaction |
details | InvocationsDetailsWithNonce |
Returns
Promise<{ contract_address: string ; transaction_hash: string }>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).deployAccountContract
Defined in
callContract
▸ callContract(call, blockIdentifier?): Promise<string[]>
Parameters
| Name | Type |
|---|---|
call | Call |
blockIdentifier? | BlockIdentifier |
Returns
Promise<string[]>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).callContract
Defined in
estimateMessageFee
▸ estimateMessageFee(message, blockIdentifier?): Promise<FEE_ESTIMATE | MESSAGE_FEE_ESTIMATE>
Parameters
| Name | Type |
|---|---|
message | MSG_FROM_L1 |
blockIdentifier? | BlockIdentifier |
Returns
Promise<FEE_ESTIMATE | MESSAGE_FEE_ESTIMATE>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).estimateMessageFee
Defined in
getSyncingStats
▸ getSyncingStats(): Promise<Syncing>
Returns
Promise<Syncing>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getSyncingStats
Defined in
getEvents
▸ getEvents(eventFilter): Promise<EVENTS_CHUNK | EVENTS_CHUNK>
Parameters
| Name | Type |
|---|---|
eventFilter | EventFilter | EventFilter |
Returns
Promise<EVENTS_CHUNK | EVENTS_CHUNK>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getEvents
Defined in
verifyMessageInStarknet
▸ verifyMessageInStarknet(message, signature, accountAddress, signatureVerificationFunctionName?, signatureVerificationResponse?): Promise<boolean>
Parameters
| Name | Type |
|---|---|
message | TypedData | BigNumberish |
signature | Signature |
accountAddress | BigNumberish |
signatureVerificationFunctionName? | string |
signatureVerificationResponse? | Object |
signatureVerificationResponse.okResponse | string[] |
signatureVerificationResponse.nokResponse | string[] |
signatureVerificationResponse.error | string[] |
Returns
Promise<boolean>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).verifyMessageInStarknet
Defined in
isClassDeclared
▸ isClassDeclared(contractClassIdentifier, blockIdentifier?): Promise<boolean>
Parameters
| Name | Type |
|---|---|
contractClassIdentifier | ContractClassIdentifier |
blockIdentifier? | BlockIdentifier |
Returns
Promise<boolean>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).isClassDeclared
Defined in
prepareInvocations
▸ prepareInvocations(invocations): Promise<Invocations>
Parameters
| Name | Type |
|---|---|
invocations | Invocations |
Returns
Promise<Invocations>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).prepareInvocations
Defined in
getL1MessagesStatus
▸ getL1MessagesStatus(transactionHash): Promise<L1L2MessagesStatus | L1L2MessagesStatus>
Parameters
| Name | Type |
|---|---|
transactionHash | BigNumberish |
Returns
Promise<L1L2MessagesStatus | L1L2MessagesStatus>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getL1MessagesStatus
Defined in
getStorageProof
▸ getStorageProof(classHashes, contractAddresses, contractsStorageKeys, blockIdentifier?): Promise<StorageProof>
Parameters
| Name | Type |
|---|---|
classHashes | BigNumberish[] |
contractAddresses | BigNumberish[] |
contractsStorageKeys | CONTRACT_STORAGE_KEYS[] |
blockIdentifier? | BlockIdentifier |
Returns
Promise<StorageProof>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getStorageProof
Defined in
getCompiledCasm
▸ getCompiledCasm(classHash): Promise<CASM_COMPILED_CONTRACT_CLASS>
Parameters
| Name | Type |
|---|---|
classHash | BigNumberish |
Returns
Promise<CASM_COMPILED_CONTRACT_CLASS>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getCompiledCasm
Defined in
getEstimateTip
▸ getEstimateTip(blockIdentifier?, options?): Promise<TipEstimate>
Parameters
| Name | Type |
|---|---|
blockIdentifier? | BlockIdentifier |
options | TipAnalysisOptions |
Returns
Promise<TipEstimate>
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getEstimateTip
Defined in
getStarkName
▸ getStarkName(address, StarknetIdContract?): Promise<string>
Parameters
| Name | Type |
|---|---|
address | BigNumberish |
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
| Name | Type |
|---|---|
name | string |
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
| Name | Type |
|---|---|
address | BigNumberish |
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
| Name | Type | Description |
|---|---|---|
address | BigNumberish | The address to get the domain for |
BrotherIdContract? | string | Optional 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
| Name | Type | Description |
|---|---|---|
name | string | The domain name (with or without .brother suffix) |
BrotherIdContract? | string | Optional 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
| Name | Type | Description |
|---|---|---|
address | BigNumberish | The address to get the profile for |
BrotherIdContract? | string | Optional contract address |
Returns
Promise<BrotherProfile>
The complete Brother profile information
Inherited from
Mixin(BaseRpcProvider, StarknetId, BrotherId).getBrotherProfile