import { type Signer, type Wallet } from 'ethers'; /** * Signer Compatibility Helpers * * Utilities for supporting both ethers and viem/wagmi signers. * Provides conversion layer from viem WalletClient to ethers Signer. */ /** * Type guard to check if a signer is from viem/wagmi * @param signer The signer to check * @returns True if the signer is a viem WalletClient */ export declare function isViemWalletClient(signer: any): boolean; /** * Convert a viem WalletClient to an ethers-compatible Signer. * * The account and chain are answered from the client itself, and * transactions, personal messages and EIP-712 typed data are signed through * the client's own `sendTransaction` / `signMessage` / `signTypedData`, so a * local account (for example an embedded wallet built with * `createWalletClient({ account, transport: http() })`) signs locally and * broadcasts the raw transaction. Every other request goes to the client's * transport. * * @param walletClient - Viem WalletClient from wagmi or viem * @returns Ethers Signer that can be used with the SDK */ export declare function viemToEthersSigner(walletClient: any): Promise; /** * Normalize a signer to ensure it's ethers-compatible * Accepts both ethers Signer and viem WalletClient * @param signer Either an ethers Signer or viem WalletClient * @returns Ethers-compatible Signer */ export declare function normalizeSigner(signer: Signer | Wallet | any): Promise; /** * Type that represents either an ethers signer or a viem wallet client */ export type CompatibleSigner = Signer | Wallet | any; /** * Wrap an ethers signer so every transaction it sends carries the active * ERC-8021 attribution suffix (Base Builder Codes). * * Every ethers write in the SDK funnels through the wrapped signer's * `sendTransaction`, so this single wrap attributes all vault writes. The * wrapper is a Proxy — the caller's signer object is never mutated, so a * signer reused outside the SDK sends unattributed transactions. Attribution * state is read at send time, not wrap time; when no attribution is * configured (see `IAugustBase.attribution`) the wrapper is a pass-through. * * Plain value transfers (no calldata) are never attributed, and calldata * already ending in the ERC-8021 marker is left untouched. When the * configured `chains` list requires a chain check and the transaction does * not carry a `chainId`, the signer's provider network is consulted (one * cached RPC call); if that lookup fails the transaction is sent * unattributed. * * @param signer Normalized ethers Signer or Wallet. * @returns A proxied signer with an attribution-aware `sendTransaction`. */ export declare function wrapSignerWithAttribution(signer: T): T;