Hook to get the approved signer of the connected Abstract Global Wallet.
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>.
Show properties
Hex | undefined
The specific address of the approved signer account (selected using useAccount’s addresses[1]).
readonly Hex[] | undefined
An array of all addresses connected to the application.
Chain
Information about the currently connected blockchain network.
number
The ID of the current blockchain network.
Connector
The connector instance used to manage the connection.
boolean
Indicates if the account is currently connected.
boolean
Indicates if the account is attempting to reconnect.
boolean
Indicates if the account is in the process of connecting.