Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

queryStatus

Read the chain id and the latest finalized block.

Signature

function queryStatus(client: Client): Promise<{
  chainId: string
  block: BlockInfo
}>

Example

import { createPublicClient, createTransport, testnet } from "@left-curve/sdk"
 
const client = createPublicClient({ chain: testnet, transport: createTransport() })
const status = await client.queryStatus()
console.log(status.chainId, status.block.height)

Returns

{ chainId: string; block: BlockInfo }BlockInfo is { height: string; timestamp: string; hash: string }.

See also