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: never ; old_root: string ; state_diff: { storage_diffs: { address: string; storage_entries: { key: string; value: string; }[]; }[]; deprecated_declared_classes: string[]; declared_classes: { class_hash: string; compiled_class_hash: string; }[]; deployed_contracts: { ...; }[]; replaced_classes: { ...; }[]; nonces: { ...; }[]; } }>(blockIdentifier: "pending") => Promise<{ block_hash: never ; old_root: string ; state_diff: { storage_diffs: { address: string; storage_entries: { key: string; value: string; }[]; }[]; deprecated_declared_classes: string[]; declared_classes: { class_hash: string; compiled_class_hash: string; }[]; deployed_contracts: { ...; }[]; replaced_classes: { ...; }[]; nonces: { ...; }[]; } }>(blockIdentifier: "latest") => Promise<{ block_hash: string ; old_root: string ; new_root: string ; state_diff: { storage_diffs: { address: string; storage_entries: { key: string; value: string; }[]; }[]; deprecated_declared_classes: string[]; declared_classes: { class_hash: string; compiled_class_hash: string; }[]; deployed_contracts: { ...; }[]; replaced_classes: { ...; }[]; nonces: { ...; }[]; } }>(blockIdentifier?: BlockIdentifier) => Promise<StateUpdateResponse>
Type declaration​
â–¸ (): Promise<{ block_hash: never ; old_root: string ; state_diff: { storage_diffs: { address: string; storage_entries: { key: string; value: string; }[]; }[]; deprecated_declared_classes: string[]; declared_classes: { class_hash: string; compiled_class_hash: string; }[]; deployed_contracts: { ...; }[]; replaced_classes: { ...; }[]; nonces: { ...; }[]; } }>
Returns​
Promise<{ block_hash: never ; old_root: string ; state_diff: { storage_diffs: { address: string; storage_entries: { key: string; value: string; }[]; }[]; deprecated_declared_classes: string[]; declared_classes: { class_hash: string; compiled_class_hash: string; }[]; deployed_contracts: { ...; }[]; replaced_classes: { ...; }[]; nonces: { ...; }[]; } }>
â–¸ (blockIdentifier): Promise<{ block_hash: never ; old_root: string ; state_diff: { storage_diffs: { address: string; storage_entries: { key: string; value: string; }[]; }[]; deprecated_declared_classes: string[]; declared_classes: { class_hash: string; compiled_class_hash: string; }[]; deployed_contracts: { ...; }[]; replaced_classes: { ...; }[]; nonces: { ...; }[]; } }>
Parameters​
| Name | Type |
|---|---|
blockIdentifier | "pending" |
Returns​
Promise<{ block_hash: never ; old_root: string ; state_diff: { storage_diffs: { address: string; storage_entries: { key: string; value: string; }[]; }[]; deprecated_declared_classes: string[]; declared_classes: { class_hash: string; compiled_class_hash: string; }[]; deployed_contracts: { ...; }[]; replaced_classes: { ...; }[]; nonces: { ...; }[]; } }>
â–¸ (blockIdentifier): Promise<{ block_hash: string ; old_root: string ; new_root: string ; state_diff: { storage_diffs: { address: string; storage_entries: { key: string; value: string; }[]; }[]; deprecated_declared_classes: string[]; declared_classes: { class_hash: string; compiled_class_hash: string; }[]; deployed_contracts: { ...; }[]; replaced_classes: { ...; }[]; nonces: { ...; }[]; } }>
Parameters​
| Name | Type |
|---|---|
blockIdentifier | "latest" |
Returns​
Promise<{ block_hash: string ; old_root: string ; new_root: string ; state_diff: { storage_diffs: { address: string; storage_entries: { key: string; value: string; }[]; }[]; deprecated_declared_classes: string[]; declared_classes: { class_hash: string; compiled_class_hash: string; }[]; deployed_contracts: { ...; }[]; replaced_classes: { ...; }[]; nonces: { ...; }[]; } }>
â–¸ (blockIdentifier?): Promise<StateUpdateResponse>
Parameters​
| Name | Type |
|---|---|
blockIdentifier? | BlockIdentifier |
Returns​
Promise<StateUpdateResponse>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getStateUpdate
Defined in​
Methods​
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<StarknetChainId>
Returns​
Promise<StarknetChainId>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getChainId
Defined in​
getSpecVersion​
â–¸ getSpecVersion(): Promise<string>
Returns​
Promise<string>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getSpecVersion
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<PendingBlock>
Returns​
Promise<PendingBlock>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getBlock
Defined in​
â–¸ getBlock(blockIdentifier): Promise<PendingBlock>
Parameters​
| Name | Type |
|---|---|
blockIdentifier | "pending" |
Returns​
Promise<PendingBlock>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getBlock
Defined in​
â–¸ getBlock(blockIdentifier): Promise<Block>
Parameters​
| Name | Type |
|---|---|
blockIdentifier | "latest" |
Returns​
Promise<Block>
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>
Get the most recent accepted block hash and number
Returns​
Promise<BlockHashAndNumber>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getBlockLatestAccepted
Defined in​
getBlockNumber​
â–¸ getBlockNumber(): Promise<number>
Get the most recent accepted block number redundant use getBlockLatestAccepted();
Returns​
Promise<number>
Number of the latest block
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getBlockNumber
Defined in​
getBlockWithTxHashes​
â–¸ getBlockWithTxHashes(blockIdentifier?): Promise<BlockWithTxHashes>
Parameters​
| Name | Type |
|---|---|
blockIdentifier? | BlockIdentifier |
Returns​
Promise<BlockWithTxHashes>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getBlockWithTxHashes
Defined in​
getBlockWithTxs​
â–¸ getBlockWithTxs(blockIdentifier?): Promise<BlockWithTxs>
Parameters​
| Name | Type |
|---|---|
blockIdentifier? | BlockIdentifier |
Returns​
Promise<BlockWithTxs>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getBlockWithTxs
Defined in​
waitForBlock​
â–¸ waitForBlock(blockIdentifier?, retryInterval?): Promise<void>
Pause the execution of the script until a specified block is created.
Parameters​
| Name | Type | Default value | Description |
|---|---|---|---|
blockIdentifier | BlockIdentifier | 'pending' | bloc number (BigNumberish) or 'pending' or 'latest'. Use of 'latest" or of a block already created will generate no pause. |
retryInterval? | number | 5000 | number of milliseconds between 2 requests to the node |
Returns​
Promise<void>
Example
await myProvider.waitForBlock();
// wait the creation of the pending block
Inherited from​
Mixin(BaseRpcProvider, StarknetId).waitForBlock
Defined in​
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<BlockWithTxReceipts>
Parameters​
| Name | Type |
|---|---|
blockIdentifier? | BlockIdentifier |
Returns​
Promise<BlockWithTxReceipts>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getBlockWithReceipts
Defined in​
getBlockStateUpdate​
â–¸ getBlockStateUpdate(): Promise<{ block_hash: never ; old_root: string ; state_diff: { storage_diffs: { address: string; storage_entries: { key: string; value: string; }[]; }[]; deprecated_declared_classes: string[]; declared_classes: { class_hash: string; compiled_class_hash: string; }[]; deployed_contracts: { ...; }[]; replaced_classes: { ...; }[]; nonces: { ...; }[]; } }>
Returns​
Promise<{ block_hash: never ; old_root: string ; state_diff: { storage_diffs: { address: string; storage_entries: { key: string; value: string; }[]; }[]; deprecated_declared_classes: string[]; declared_classes: { class_hash: string; compiled_class_hash: string; }[]; deployed_contracts: { ...; }[]; replaced_classes: { ...; }[]; nonces: { ...; }[]; } }>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getBlockStateUpdate
Defined in​
â–¸ getBlockStateUpdate(blockIdentifier): Promise<{ block_hash: never ; old_root: string ; state_diff: { storage_diffs: { address: string; storage_entries: { key: string; value: string; }[]; }[]; deprecated_declared_classes: string[]; declared_classes: { class_hash: string; compiled_class_hash: string; }[]; deployed_contracts: { ...; }[]; replaced_classes: { ...; }[]; nonces: { ...; }[]; } }>
Parameters​
| Name | Type |
|---|---|
blockIdentifier | "pending" |
Returns​
Promise<{ block_hash: never ; old_root: string ; state_diff: { storage_diffs: { address: string; storage_entries: { key: string; value: string; }[]; }[]; deprecated_declared_classes: string[]; declared_classes: { class_hash: string; compiled_class_hash: string; }[]; deployed_contracts: { ...; }[]; replaced_classes: { ...; }[]; nonces: { ...; }[]; } }>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getBlockStateUpdate
Defined in​
â–¸ getBlockStateUpdate(blockIdentifier): Promise<{ block_hash: string ; old_root: string ; new_root: string ; state_diff: { storage_diffs: { address: string; storage_entries: { key: string; value: string; }[]; }[]; deprecated_declared_classes: string[]; declared_classes: { class_hash: string; compiled_class_hash: string; }[]; deployed_contracts: { ...; }[]; replaced_classes: { ...; }[]; nonces: { ...; }[]; } }>
Parameters​
| Name | Type |
|---|---|
blockIdentifier | "latest" |
Returns​
Promise<{ block_hash: string ; old_root: string ; new_root: string ; state_diff: { storage_diffs: { address: string; storage_entries: { key: string; value: string; }[]; }[]; deprecated_declared_classes: string[]; declared_classes: { class_hash: string; compiled_class_hash: string; }[]; deployed_contracts: { ...; }[]; replaced_classes: { ...; }[]; nonces: { ...; }[]; } }>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getBlockStateUpdate
Defined in​
â–¸ 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>
Parameters​
| Name | Type |
|---|---|
blockIdentifier? | BlockIdentifier |
Returns​
Promise<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​
getPendingTransactions​
â–¸ getPendingTransactions(): Promise<TransactionWithHash[]>
Return transactions from pending block
Returns​
Promise<TransactionWithHash[]>
Deprecated
Instead use getBlock(BlockTag.PENDING); (will be removed in next minor version) Utility method, same result can be achieved using getBlockWithTxHashes(BlockTag.pending);
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getPendingTransactions
Defined in​
getTransaction​
â–¸ getTransaction(txHash): Promise<TransactionWithHash>
Parameters​
| Name | Type |
|---|---|
txHash | BigNumberish |
Returns​
Promise<TransactionWithHash>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getTransaction
Defined in​
getTransactionByHash​
â–¸ getTransactionByHash(txHash): Promise<TransactionWithHash>
Parameters​
| Name | Type |
|---|---|
txHash | BigNumberish |
Returns​
Promise<TransactionWithHash>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getTransactionByHash
Defined in​
getTransactionByBlockIdAndIndex​
â–¸ getTransactionByBlockIdAndIndex(blockIdentifier, index): Promise<TransactionWithHash>
Parameters​
| Name | Type |
|---|---|
blockIdentifier | BlockIdentifier |
index | number |
Returns​
Promise<TransactionWithHash>
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>
Parameters​
| Name | Type |
|---|---|
txHash | BigNumberish |
Returns​
Promise<TRANSACTION_TRACE>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getTransactionTrace
Defined in​
getTransactionStatus​
â–¸ getTransactionStatus(transactionHash): Promise<TransactionStatus>
Get the status of a transaction
Parameters​
| Name | Type |
|---|---|
transactionHash | BigNumberish |
Returns​
Promise<TransactionStatus>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getTransactionStatus
Defined in​
getSimulateTransaction​
â–¸ getSimulateTransaction(invocations, options?): Promise<SimulateTransactionResponse>
Parameters​
| Name | Type | Description |
|---|---|---|
invocations | AccountInvocations | AccountInvocations |
options? | getSimulateTransactionOptions | blockIdentifier and flags to skip validation and fee charge - blockIdentifier - skipValidate (default false) - skipFeeCharge (default true) |
Returns​
Promise<SimulateTransactionResponse>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getSimulateTransaction
Defined in​
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​
getEstimateFee​
â–¸ getEstimateFee(invocation, invocationDetails, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponse>
Parameters​
| Name | Type |
|---|---|
invocation | Invocation |
invocationDetails | InvocationsDetailsWithNonce |
blockIdentifier? | BlockIdentifier |
skipValidate? | boolean |
Returns​
Promise<EstimateFeeResponse>
Deprecated
use gettypeEstimateFee (will be refactored based on type after sequencer deprecation)
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getEstimateFee
Defined in​
getInvokeEstimateFee​
â–¸ getInvokeEstimateFee(invocation, invocationDetails, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponse>
Parameters​
| Name | Type |
|---|---|
invocation | Invocation |
invocationDetails | InvocationsDetailsWithNonce |
blockIdentifier? | BlockIdentifier |
skipValidate? | boolean |
Returns​
Promise<EstimateFeeResponse>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getInvokeEstimateFee
Defined in​
getDeclareEstimateFee​
â–¸ getDeclareEstimateFee(invocation, details, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponse>
Parameters​
| Name | Type |
|---|---|
invocation | DeclareContractTransaction |
details | InvocationsDetailsWithNonce |
blockIdentifier? | BlockIdentifier |
skipValidate? | boolean |
Returns​
Promise<EstimateFeeResponse>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getDeclareEstimateFee
Defined in​
getDeployAccountEstimateFee​
â–¸ getDeployAccountEstimateFee(invocation, details, blockIdentifier?, skipValidate?): Promise<EstimateFeeResponse>
Parameters​
| Name | Type |
|---|---|
invocation | DeployAccountContractTransaction |
details | InvocationsDetailsWithNonce |
blockIdentifier? | BlockIdentifier |
skipValidate? | boolean |
Returns​
Promise<EstimateFeeResponse>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getDeployAccountEstimateFee
Defined in​
getEstimateFeeBulk​
â–¸ getEstimateFeeBulk(invocations, options): Promise<EstimateFeeResponseBulk>
Parameters​
| Name | Type |
|---|---|
invocations | AccountInvocations |
options | getEstimateFeeBulkOptions |
Returns​
Promise<EstimateFeeResponseBulk>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getEstimateFeeBulk
Defined in​
invokeFunction​
â–¸ invokeFunction(functionInvocation, details): Promise<InvokedTransaction>
Parameters​
| Name | Type |
|---|---|
functionInvocation | Invocation |
details | InvocationsDetailsWithNonce |
Returns​
Promise<InvokedTransaction>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).invokeFunction
Defined in​
declareContract​
â–¸ declareContract(transaction, details): Promise<DeclaredTransaction>
Parameters​
| Name | Type |
|---|---|
transaction | DeclareContractTransaction |
details | InvocationsDetailsWithNonce |
Returns​
Promise<DeclaredTransaction>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).declareContract
Defined in​
deployAccountContract​
â–¸ deployAccountContract(transaction, details): Promise<DeployedAccountTransaction>
Parameters​
| Name | Type |
|---|---|
transaction | DeployAccountContractTransaction |
details | InvocationsDetailsWithNonce |
Returns​
Promise<DeployedAccountTransaction>
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>
NEW: Estimate the fee for a message from L1
Parameters​
| Name | Type | Description |
|---|---|---|
message | MSG_FROM_L1 | Message From L1 |
blockIdentifier? | BlockIdentifier | - |
Returns​
Promise<FEE_ESTIMATE>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).estimateMessageFee
Defined in​
getSyncingStats​
â–¸ getSyncingStats(): Promise<Syncing>
Returns an object about the sync status, or false if the node is not synching
Returns​
Promise<Syncing>
Object with the stats data
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getSyncingStats
Defined in​
getEvents​
â–¸ getEvents(eventFilter): Promise<EVENTS_CHUNK>
Returns all events matching the given filter
Parameters​
| Name | Type |
|---|---|
eventFilter | EventFilter |
Returns​
Promise<EVENTS_CHUNK>
events and the pagination of the events
Inherited from​
Mixin(BaseRpcProvider, StarknetId).getEvents
Defined in​
verifyMessageInStarknet​
â–¸ verifyMessageInStarknet(message, signature, accountAddress, signatureVerificationFunctionName?, signatureVerificationResponse?): Promise<boolean>
Verify in Starknet a signature of a TypedData object or of a given hash.
Parameters​
| Name | Type | Description |
|---|---|---|
message | TypedData | BigNumberish | TypedData object to be verified, or message hash to be verified. |
signature | Signature | signature of the message. |
accountAddress | BigNumberish | address of the account that has signed the message. |
signatureVerificationFunctionName? | string | if account contract with non standard account verification function name. |
signatureVerificationResponse? | Object | if account contract with non standard response of verification function. |
signatureVerificationResponse.okResponse | string[] | - |
signatureVerificationResponse.nokResponse | string[] | - |
signatureVerificationResponse.error | string[] | - |
Returns​
Promise<boolean>
const myTypedMessage: TypedMessage = .... ;
const messageHash = typedData.getMessageHash(myTypedMessage,accountAddress);
const sign: WeierstrassSignatureType = ec.starkCurve.sign(messageHash, privateKey);
const accountAddress = "0x43b7240d227aa2fb8434350b3321c40ac1b88c7067982549e7609870621b535";
const result1 = myRpcProvider.verifyMessageInStarknet(myTypedMessage, sign, accountAddress);
const result2 = myRpcProvider.verifyMessageInStarknet(messageHash, sign, accountAddress);
// result1 = result2 = true
Inherited from​
Mixin(BaseRpcProvider, StarknetId).verifyMessageInStarknet
Defined in​
isClassDeclared​
â–¸ isClassDeclared(contractClassIdentifier, blockIdentifier?): Promise<boolean>
Test if class is already declared from ContractClassIdentifier Helper method using getClass
Parameters​
| Name | Type |
|---|---|
contractClassIdentifier | ContractClassIdentifier |
blockIdentifier? | BlockIdentifier |
Returns​
Promise<boolean>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).isClassDeclared
Defined in​
prepareInvocations​
â–¸ prepareInvocations(invocations): Promise<Invocations>
Build bulk invocations with auto-detect declared class
- Test if class is declared if not declare it preventing already declared class error and not declared class errors
- Order declarations first
Parameters​
| Name | Type |
|---|---|
invocations | Invocations |
Returns​
Promise<Invocations>
Inherited from​
Mixin(BaseRpcProvider, StarknetId).prepareInvocations
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