Class: EquitoClient
Methods
getApiAt()
getApiAt(
blockNumber
?):Promise
<ApiDecoration
<"promise"
>>
Returns the API instance at a specific block number, if specified. Otherwise, returns the API instance at the latest finalized block.
Parameters
• blockNumber?: number
If provided, the API instance will be created at the block number.
Returns
Promise
<ApiDecoration
<"promise"
>>
The API instance at the block number.
Defined in
getBlockTimestamp()
getBlockTimestamp(
blockNumber
):Promise
<number
>
Returns the timestamp in milliseconds of a specific block number.
Parameters
• blockNumber: number
The block number for which to get the timestamp.
Returns
Promise
<number
>
The timestamp in milliseconds of the block.
Defined in
getConfirmationTime()
getConfirmationTime(
args
):Promise
<GetConfirmationTimeReturnType
>
Returns the timestamp in milliseconds of a proof for a specific message hash, chain selector, and block number.
Parameters
• args: GetConfirmationTimeArgs
Returns
Promise
<GetConfirmationTimeReturnType
>
Defined in
getNextValidators()
getNextValidators():
Promise
<`0x${string}`[]>
Returns the list of validators for the next session.
Returns
Promise
<`0x${string}`[]>
The list of validators.
Defined in
getProof()
getProof(
messageHash
,chainSelector
,blockNumber
?):Promise
<undefined
| `0x${string}`>
Returns the proof for a specific message hash, chain selector, and block number.
Parameters
• messageHash: `0x${string}`
The message hash for which to get the proof.
• chainSelector: number
The chain selector for which to get the proof.
• blockNumber?: number
The block number at which to get the proof.
Returns
Promise
<undefined
| `0x${string}`>
If exists, the proof for the message in Hex format.
Defined in
getRouter()
getRouter(
chainSelector
):Promise
<`0x${string}`>
Returns the router contract address for a given chain selector.
Parameters
• chainSelector: number
The chain selector for which to get the router contract address.
Returns
Promise
<`0x${string}`>
The router contract address.
Defined in
getSignatures()
getSignatures(
messageHash
,chainSelector
,blockNumber
?):Promise
<`0x${string}`[]>
Returns the list of signatures for a specific message hash, chain selector, and block number.
Parameters
• messageHash: `0x${string}`
The message hash for which to get the signatures.
• chainSelector: number
The chain selector for which to get the signatures.
• blockNumber?: number
The block number at which to get the signatures.
Returns
Promise
<`0x${string}`[]>
The list of signatures.
Defined in
getValidators()
getValidators(
chainSelector
,blockNumber
?):Promise
<`0x${string}`[]>
Returns the list of validators for a specific chain and block number.
Parameters
• chainSelector: number
The chain selector for which to get the validators.
• blockNumber?: number
The block number at which to get the validators.
Returns
Promise
<`0x${string}`[]>
The list of validators.
Defined in
listenForSignatures()
listenForSignatures(
args
):Promise
<void
>
Listens for signatures for a specific message hash, chain selector, and block number in a specific time frame.
Parameters
• args: ListenForSignaturesArgs
Returns
Promise
<void
>
Defined in
create()
static
create(config
):Promise
<EquitoClient
>
Create a new instance of EquitoClient.
An EquitoClient instance is a wrapper around the Substrate API that provides methods to interact with the Equito node.
Parameters
• config: EquitoClientCreateConfig
The configuration for creating an EquitoClient.
Returns
Promise
<EquitoClient
>
A new instance of EquitoClient.