import { ethers } from "ethers"; import { type EvmInitTransferEvent, type MPCSignature, type OmniAddress, type OmniTransferMessage, type TokenMetadata, type TransferMessagePayload } from "../types/index.js"; import { type EVMChainKind } from "../utils/index.js"; /** * EVM blockchain implementation of the bridge client */ export declare class EvmBridgeClient { private wallet; private chain; private factory; /** * Creates a new EVM bridge client instance * @param wallet - Ethereum signer instance for transaction signing * @param chain - The EVM chain to deploy to (Ethereum, Base, or Arbitrum) * @throws {Error} If factory address is not configured for the chain or if chain is not EVM */ constructor(wallet: ethers.Signer, chain: EVMChainKind); /** * Logs metadata for a token * @param tokenAddress - OmniAddress of the token * @returns Promise resolving to the transaction hash * @throws Will throw an error if logging fails or caller doesn't have admin role */ logMetadata(tokenAddress: OmniAddress): Promise; /** * Deploys an ERC-20 token representing a bridged version of a token from another chain. * @param signature - MPC signature authorizing the token deployment * @param metadata - Object containing token metadata * @returns Promise resolving to object containing transaction hash and deployed token address * @throws Will throw an error if the deployment fails */ deployToken(signature: MPCSignature, metadata: TokenMetadata): Promise<{ txHash: string; tokenAddress: string; }>; /** * Approves the bridge factory to spend ERC20 tokens on behalf of the user * @param tokenAddress - The ERC20 token contract address * @param amount - Amount to approve for spending * @returns Promise resolving to transaction hash */ approveToken(tokenAddress: string, amount: bigint): Promise; /** * Approves maximum possible amount (permanent approval) for the bridge factory * @param tokenAddress - The ERC20 token contract address * @returns Promise resolving to transaction hash */ approveTokenMax(tokenAddress: string): Promise; /** * Checks the current allowance for the bridge factory to spend tokens * @param tokenAddress - The ERC20 token contract address * @param owner - The token owner address * @returns Promise resolving to current allowance amount */ checkAllowance(tokenAddress: string, owner: string): Promise; /** * Transfers ERC-20 tokens to the bridge contract on the EVM chain. * This transaction generates a proof that is subsequently used to mint/unlock * corresponding tokens on the destination chain. * * @param transfer - Transfer message containing token, amount, recipient, etc. * @param usePermanentApproval - If true, approves maximum amount for permanent approval * @throws {Error} If token address is not on the correct EVM chain * @returns Promise resolving to transaction hash */ initTransfer(transfer: OmniTransferMessage, usePermanentApproval?: boolean): Promise; /** * Finalizes a transfer on the EVM chain by minting/unlocking tokens. * @param transferMessage - The transfer message payload from NEAR * @param signature - MPC signature authorizing the transfer * @returns Promise resolving to the transaction hash */ finalizeTransfer(transferMessage: TransferMessagePayload, signature: MPCSignature): Promise; /** * Parses InitTransfer event from an EVM transaction receipt * @param txHash - Transaction hash to parse * @returns Promise resolving to the parsed InitTransfer event * @throws {Error} If transaction receipt is not found or InitTransfer event is not found */ getInitTransferEvent(txHash: string): Promise; private isNativeToken; } //# sourceMappingURL=evm.d.ts.map