UNPKG

@wttp/core

Version:

Core contracts, interfaces, and TypeScript types for the Web3 Transfer Protocol (WTTP).

26 lines 1.03 kB
import { ethers } from "ethers"; /** * Formats and validates an Ethereum address * * @param address - The Ethereum address to format and validate * @returns The checksummed Ethereum address * @throws Error if the address is invalid */ export declare function formatEthereumAddress(address: string | ethers.Addressable): string; /** * Resolves an ENS (Ethereum Name Service) name to its corresponding Ethereum address * * @param name - The ENS name to resolve (e.g., "example.eth") * @returns Promise resolving to the Ethereum address * @throws Error if the ENS name cannot be resolved */ export declare function resolveEnsName(name: string): Promise<string>; /** * Resolves a hostname to an Ethereum address * Handles both ENS names and direct Ethereum addresses * * @param hostname - The hostname to resolve (can be URL, wURL, or hostname string) * @returns Promise resolving to the Ethereum address */ export declare function getHostAddress(hostname: string): Promise<string>; //# sourceMappingURL=domains.d.ts.map