Class: Provider
Hierarchy
RpcProvider
<this
> &StarknetId
<this
>↳
Provider
↳↳
Account
Constructors
constructor
• new Provider(optionsOrProvider?
): Provider
Parameters
Name | Type |
---|---|
optionsOrProvider? | RpcProviderOptions | ProviderInterface | RpcProvider |
Returns
Inherited from
Mixin(BaseRpcProvider, StarknetId).constructor
Defined in
• new Provider(): Provider
Returns
Inherited from
Mixin(BaseRpcProvider, StarknetId).constructor
Properties
responseParser
• responseParser: RPCResponseParser
Inherited from
Mixin(BaseRpcProvider, StarknetId).responseParser
Defined in
channel
• channel: RpcChannel
| RpcChannel
Inherited from
Mixin(BaseRpcProvider, StarknetId).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).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 <T > |
Parameters
Name | Type |
---|---|
this | (...args : [optionsOrProvider?: RpcProviderOptions | ProviderInterface | RpcProvider]) => T |
optionsOrProvider? | RpcProviderOptions |
Returns
Promise
<T
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).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).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).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).getStarkProfile
Defined in
src/provider/extensions/starknetId.ts:128
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).fetch
Defined in
getChainId
▸ getChainId(): Promise
<"0x534e5f4d41494e"
| "0x534e5f5345504f4c4941"
>
Returns
Promise
<"0x534e5f4d41494e"
| "0x534e5f5345504f4c4941"
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).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).readSpecVersion
Defined in
getSpecVersion
▸ getSpecVersion(): Promise
<string
>
Returns
Promise
<string
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).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).setUpSpecVersion
Defined in
getNonceForAddress
▸ getNonceForAddress(contractAddress
, blockIdentifier?
): Promise
<string
>
Parameters
Name | Type |
---|---|
contractAddress | BigNumberish |
blockIdentifier? | BlockIdentifier |
Returns
Promise
<string
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).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).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).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).getBlock
Defined in
▸ getBlock(blockIdentifier
): Promise
<GetBlockResponse
>
Parameters
Name | Type |
---|---|
blockIdentifier | BlockIdentifier |
Returns
Promise
<GetBlockResponse
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).getBlock
Defined in
getBlockLatestAccepted
▸ getBlockLatestAccepted(): Promise
<BlockHashAndNumber
>
Returns
Promise
<BlockHashAndNumber
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).getBlockLatestAccepted
Defined in
getBlockNumber
▸ getBlockNumber(): Promise
<number
>
Returns
Promise
<number
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).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).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).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).waitForBlock
Defined in
getL1GasPrice
▸ getL1GasPrice(blockIdentifier?
): Promise
<string
>
Parameters
Name | Type |
---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise
<string
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).getL1GasPrice
Defined in
getL1MessageHash
▸ getL1MessageHash(l2TxHash
): Promise
<string
>
Parameters
Name | Type |
---|---|
l2TxHash | BigNumberish |
Returns
Promise
<string
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).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).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).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).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).getBlockStateUpdate
Defined in
▸ getBlockStateUpdate(blockIdentifier?
): Promise
<StateUpdateResponse
>
Parameters
Name | Type |
---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise
<StateUpdateResponse
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).getBlockStateUpdate
Defined in
getBlockTransactionsTraces
▸ getBlockTransactionsTraces(blockIdentifier?
): Promise
<BlockTransactionsTraces
| BlockTransactionsTraces
>
Parameters
Name | Type |
---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise
<BlockTransactionsTraces
| BlockTransactionsTraces
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).getBlockTransactionsTraces
Defined in
getBlockTransactionCount
▸ getBlockTransactionCount(blockIdentifier?
): Promise
<number
>
Parameters
Name | Type |
---|---|
blockIdentifier? | BlockIdentifier |
Returns
Promise
<number
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).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).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).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).getTransactionByBlockIdAndIndex
Defined in
getTransactionReceipt
▸ getTransactionReceipt(txHash
): Promise
<GetTransactionReceiptResponse
>
Parameters
Name | Type |
---|---|
txHash | BigNumberish |
Returns
Promise
<GetTransactionReceiptResponse
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).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).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).getTransactionStatus
Defined in
getSimulateTransaction
▸ getSimulateTransaction(invocations
, options?
): Promise
<SimulateTransactionOverheadResponse
>
Parameters
Name | Type |
---|---|
invocations | AccountInvocations |
options? | getSimulateTransactionOptions |
Returns
Promise
<SimulateTransactionOverheadResponse
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).getSimulateTransaction
Defined in
waitForTransaction
▸ waitForTransaction(txHash
, options?
): Promise
<GetTransactionReceiptResponse
>
Parameters
Name | Type |
---|---|
txHash | BigNumberish |
options? | waitForTransactionOptions |
Returns
Promise
<GetTransactionReceiptResponse
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).waitForTransaction
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).getStorageAt
Defined in
getClassHashAt
▸ getClassHashAt(contractAddress
, blockIdentifier?
): Promise
<string
>
Parameters
Name | Type |
---|---|
contractAddress | BigNumberish |
blockIdentifier? | BlockIdentifier |
Returns
Promise
<string
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).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).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).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).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).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).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).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).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).getDeployAccountEstimateFee
Defined in
getEstimateFeeBulk
▸ getEstimateFeeBulk(invocations
, options
): Promise
<EstimateFeeResponseBulkOverhead
>
Parameters
Name | Type |
---|---|
invocations | AccountInvocations |
options | getEstimateFeeBulkOptions |
Returns
Promise
<EstimateFeeResponseBulkOverhead
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).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).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).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).deployAccountContract
Defined in
callContract
▸ callContract(call
, blockIdentifier?
): Promise
<string
[]>
Parameters
Name | Type |
---|---|
call | Call |
blockIdentifier? | BlockIdentifier |
Returns
Promise
<string
[]>
Inherited from
Mixin(BaseRpcProvider, StarknetId).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).estimateMessageFee
Defined in
getSyncingStats
▸ getSyncingStats(): Promise
<Syncing
>
Returns
Promise
<Syncing
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).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).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).verifyMessageInStarknet
Defined in
isClassDeclared
▸ isClassDeclared(contractClassIdentifier
, blockIdentifier?
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
contractClassIdentifier | ContractClassIdentifier |
blockIdentifier? | BlockIdentifier |
Returns
Promise
<boolean
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).isClassDeclared
Defined in
prepareInvocations
▸ prepareInvocations(invocations
): Promise
<Invocations
>
Parameters
Name | Type |
---|---|
invocations | Invocations |
Returns
Promise
<Invocations
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).prepareInvocations
Defined in
getL1MessagesStatus
▸ getL1MessagesStatus(transactionHash
): Promise
<L1L2MessagesStatus
| L1L2MessagesStatus
>
Parameters
Name | Type |
---|---|
transactionHash | BigNumberish |
Returns
Promise
<L1L2MessagesStatus
| L1L2MessagesStatus
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).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).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).getCompiledCasm
Defined in
getEstimateTip
▸ getEstimateTip(blockIdentifier?
, options?
): Promise
<TipEstimate
>
Parameters
Name | Type |
---|---|
blockIdentifier? | BlockIdentifier |
options | TipAnalysisOptions |
Returns
Promise
<TipEstimate
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).getEstimateTip
Defined in
getStarkName
▸ getStarkName(address
, StarknetIdContract?
): Promise
<string
>
Parameters
Name | Type |
---|---|
address | BigNumberish |
StarknetIdContract? | string |
Returns
Promise
<string
>
Inherited from
Mixin(BaseRpcProvider, StarknetId).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).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).getStarkProfile