Skip to main content
function useEvmAddress(): {
  evmAddress: null | `0x${string}`;
};
Hook to access the user’s primary EVM (Ethereum Virtual Machine) address. If the user has a Smart Account, this will return the Smart Account address. If the user has an EOA, this will return the EOA address. If the user has neither, this will return null.

Returns

{
  evmAddress: null | `0x${string}`;
}

evmAddress

evmAddress: null | `0x${string}`;

Example

function EVMWalletInfo() {
  const { evmAddress } = useEvmAddress();

  if (!evmAddress) {
    return <p>No EVM wallet connected</p>;
  }

  return (
    <div>
      <h3>Your EVM Wallet</h3>
      <p>Address: {evmAddress}</p>
    </div>
  );
}