UNPKG

whoisens-lib

Version:

Whois for ENS (Ethereum Name Service) lookup service

42 lines 1.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var EthAddressType; (function (EthAddressType) { EthAddressType["name"] = "name"; EthAddressType["address"] = "address"; EthAddressType["error"] = "error"; })(EthAddressType = exports.EthAddressType || (exports.EthAddressType = {})); var ResolveType; (function (ResolveType) { ResolveType["forward"] = "forward"; ResolveType["reverse"] = "reverse"; ResolveType["error"] = "error"; })(ResolveType = exports.ResolveType || (exports.ResolveType = {})); class NameIsNotRegisteredError extends Error { constructor(message = 'Name is not registered') { super(); this.name = 'NameIsNotRegisteredError'; this.code = 'NAME_IS_NOT_REGISTERED'; this.message = message; } } exports.NameIsNotRegisteredError = NameIsNotRegisteredError; class ResolverNotSetError extends Error { constructor(message = 'Resolver is not set') { super(); this.name = 'ResolverNotSetError'; this.code = 'RESOLVER_NOT_SET'; this.message = message; } } exports.ResolverNotSetError = ResolverNotSetError; class InvalidEthNameError extends Error { constructor(recieved, message = 'Invalid address or name') { super(); this.name = 'InvalidEthNameError'; this.code = 'INVALID_ETH_NAME'; this.message = message + `. Got: ${recieved}`; } } exports.InvalidEthNameError = InvalidEthNameError; //# sourceMappingURL=types.js.map