@coinbase/agentkit
Version:
Coinbase AgentKit core primitives
24 lines (23 loc) • 986 B
TypeScript
import { EvmWalletProvider } from "../../wallet-providers";
export declare const PERMIT2_ADDRESS = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
/**
* Checks if a token is native ETH.
*
* @param token - The token address to check.
* @returns True if the token is native ETH, false otherwise.
*/
export declare function isNativeEth(token: string): boolean;
/**
* Gets the details (decimals and name) for both fromToken and toToken
*
* @param walletProvider - The EVM wallet provider to read contracts
* @param fromToken - The contract address of the from token
* @param toToken - The contract address of the to token
* @returns Promise<{fromTokenDecimals: number, toTokenDecimals: number, fromTokenName: string, toTokenName: string}>
*/
export declare function getTokenDetails(walletProvider: EvmWalletProvider, fromToken: string, toToken: string): Promise<{
fromTokenDecimals: number;
toTokenDecimals: number;
fromTokenName: string;
toTokenName: string;
}>;