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

useAccount

Usage

import { useAccount } from '@ivem/kit-react'
 
const account = useAccount()

Parameters

  • None

Return Type

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

Examples

function AccountStatus() {
  const account = useAccount()
  if (!account.isConnected) return <p>Disconnected</p>
  return <p>{account.address}</p>
}

Related