Account
A single on-chain account belonging to a user.
Definition
type Account = {
readonly address: Address
readonly index: AccountIndex
readonly owner: number
}Fields
address — Address. The account's on-chain address.
index — AccountIndex (number). The account's index within its user.
owner — number. 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
AccountInfo—{ index, owner }(no address)AccountDetails— addsusernameUser