CDP Frontend SDK
    Preparing search index...

    Function useEvmAddress

    • 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}` }

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

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

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