Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.abs.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Use the useGlobalWalletSignerAccount hook to retrieve the account approved to sign transactions for the connected Abstract Global Wallet. This is helpful if you need to access the underlying EOA approved to sign transactions for the Abstract Global Wallet smart contract. It uses the useAccount hook from wagmi under the hood.

Import

import { useGlobalWalletSignerAccount } from "@abstract-foundation/agw-react";

Usage

import { useGlobalWalletSignerAccount } from "@abstract-foundation/agw-react";

export default function App() {
  const { address, status } = useGlobalWalletSignerAccount();

  if (status === "disconnected") return <div>Disconnected</div>;

  if (status === "connecting" || status === "reconnecting") {
    return <div>Connecting...</div>;
  }

  return (
    <div>
      Connected to EOA: {address}
      Status: {status}
    </div>
  );
}

Returns

Returns a UseAccountReturnType<Config>.