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

Account

A single on-chain account belonging to a user.

Definition

type Account = {
  readonly address: Address
  readonly index: AccountIndex
  readonly owner: number
}

Fields

addressAddress. The account's on-chain address.

indexAccountIndex (number). The account's index within its user.

ownernumber. The owning user's index.

Construction

Use the toAccount helper to assemble one from a User, AccountIndex, and Address.

import { toAccount } from "@left-curve/sdk"
import type { Account, User } from "@left-curve/sdk"
 
const account: Account = toAccount({ user, accountIndex: 0, address })

See also