import { linkableWalletActions } from "@abstract-foundation/agw-client";import { createWalletClient, custom } from "viem";import { sepolia, abstractTestnet } from "viem/chains";export default function LinkWallet() { async function linkAgwWallet() { // Initialize a Viem Wallet client: (https://viem.sh/docs/clients/wallet) // And extend it with linkableWalletActions const client = createWalletClient({ chain: sepolia, transport: custom(window.ethereum!), }).extend(linkableWalletActions()); // Call linkToAgw with the AGW address const { l1TransactionHash, getL2TransactionHash } = await client.linkToAgw({ agwAddress: "0x...", // The AGW address to link to enabled: true, // Enable or disable the link l2Chain: abstractTestnet, }); // Get the L2 transaction hash once the L1 transaction is confirmed const l2Hash = await getL2TransactionHash(); } return <button onClick={linkAgwWallet}>Link Wallet</button>;}