import Web3 from 'web3'; import { NetworkId } from './types'; /** * Checks if the contract in the given address has the given method * * @param web3 - Web3 instance * @param contractAddress - address of the contract to check * @param signatureHash - keccak256 of the method signature * * @returns * true if method exists, false if not */ export declare const hasMethod: (web3: Web3, contractAddress: string, signatureHash: string) => Promise; /** * Checks if the given web3 instance has accounts to sign txs * * @param web3 - Web3 instance * * @returns * true if has accounts, false if not */ export declare const hasAccounts: (web3: Web3) => Promise; /** * Gets the unlocked address of the given web3 instance * * @param web3 - Web3 instance * * @returns Current address */ export declare const getCurrentAddress: (web3: Web3) => Promise; /** * Validates the given address * * @param address * * @returns * true if valid, false if not */ export declare const isValidAddress: (address: string) => any; /** * Validates the given checksum address for the given networkId * * @param address * @param networkId - chanetworkIdnId where checksummed address should be valid * * @returns * true if valid, false if not */ export declare const isValidChecksumAddress: (address: string, networkId?: NetworkId | undefined) => any; /** * Generates checksum address * * @param address * @param networkId - networkId where checksummed address should be valid * * @returns * Checksummed address */ export declare const toChecksumAddress: (address: string, networkId?: NetworkId | undefined) => any; /** * Validates the given label * * @param label - label to validate * * @returns * true if valid, false if not */ export declare const isValidLabel: (label: string) => boolean; /** * Validates the given domain syntax * * @param domain - domain to validate * * @returns * true if valid, false if not */ export declare const isValidDomain: (domain: string) => boolean; /** * Validates the given domain TLD * * @param domain - domain to validate * * @returns * true if valid, false if not */ export declare const isValidTld: (domain: string) => boolean; /** * Returns namehash of the given domain * * @param domain - domain to apply namehash function * * @returns * namehash of the given domain */ export declare const namehash: (domain: string) => any; /** * Returns '0x' + keccak256 of the given label * * @param label - label to apply keccak256 function * * @returns * '0x' + keccak256 of the given label */ export declare const labelhash: (label: string) => string;