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

getAccountStatus

Read the current user state (active, inactive, or frozen) for an account.

Signature

function getAccountStatus(
  client: Client,
  parameters: {
    address: Address
    height?: number
  },
): Promise<UserStatus>

Example

import { createPublicClient, createTransport, testnet } from "@left-curve/sdk"
import type { Address } from "@left-curve/sdk"
 
const client = createPublicClient({ chain: testnet, transport: createTransport() })
const address: Address = "0x1234567890abcdef1234567890abcdef12345678"
 
const status = await client.getAccountStatus({ address })
// "active" | "inactive" | "frozen"

Parameters

addressAddress. The account.

heightnumber, optional. Block height. Default 0 (latest).

Returns

UserStatus"active" | "inactive" | "frozen". Use the UserState const map for comparisons.

See also