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

getAccount

Environment Imports

import { getAccount } from '@ivem/kit'
import { useAccount } from '@ivem/kit-react'
import { useAccount } from '@ivem/kit-vue'

Usage

import { getAccount } from '@ivem/kit'
 
const account = getAccount(config)

Parameters

  • config: Config

Return Type

  • {
  • address?: string
  • addresses: readonly string[]
  • chainId: string
  • status: 'connected' | 'connecting' | 'disconnected' | 'reconnecting'
  • isConnected: boolean
  • isConnecting: boolean
  • isDisconnected: boolean
  • isReconnecting: boolean
  • }

Examples

const account = getAccount(config)
if (account.isConnected) console.log(account.address)

Related