UNPKG

whoisens-lib

Version:

Whois for ENS (Ethereum Name Service) lookup service

76 lines (75 loc) 1.82 kB
export declare enum EthAddressType { name = "name", address = "address", error = "error" } export declare enum ResolveType { forward = "forward", reverse = "reverse", error = "error" } export interface IENSParams { networkURL?: string; contractAddress?: string; } export interface ISetResponse { resultName: string; result: Response; } export interface ISetResponseError { resultName: string; error: string; } export interface IResponse { requestedInfo: IResponseRequestedInfo; responseInfo: IResponseResponseInfo; ethRCP: IEthJSONRCP; error?: string; } export interface IResponseRequestedInfo { address: string; processingAddress: string; } export interface IEthJSONRCP { request: { id: number; contractAddress: string; contractMethod: string; payload: string; parameters: object; }; response: IJSONRCPResponse; } export interface IJSONRCPResponse { id: number; jsonrpc: string; result: string; error?: object; } export interface IResponseResponseInfo { result?: string | number; resultError?: Error; data?: IAdditionalDataInfo; ethRCP?: IEthJSONRCP; error?: string; } export interface IAdditionalDataInfo { address?: string; addressParent?: string; addressType?: EthAddressType; nameMain?: string; resolveType?: string; reverseAddress?: string; } export declare class NameIsNotRegisteredError extends Error { private readonly code; constructor(message?: string); } export declare class ResolverNotSetError extends Error { private readonly code; constructor(message?: string); } export declare class InvalidEthNameError extends Error { private readonly code; constructor(recieved: any, message?: string); }