Function to get all Ethereum wallets linked to an Abstract Global Wallet.
getLinkedAccounts
import { useAbstractClient } from "@abstract-foundation/agw-react"; export default function CheckLinkedAccounts() { const { data: agwClient } = useAbstractClient(); async function checkLinkedAccounts() { if (!agwClient) return; // Get all linked Ethereum Mainnet wallets for an AGW const { linkedAccounts } = await agwClient.getLinkedAccounts({ agwAddress: "0x273B3527BF5b607dE86F504fED49e1582dD2a1C6", // The AGW to check }); console.log("Linked accounts:", linkedAccounts); } return <button onClick={checkLinkedAccounts}>Check Linked Accounts</button>; }
Was this page helpful?