import { providers } from 'ethers'; import DWEBName from './DWEBName'; import { DwebConfig } from './types/common'; import DwebContractWrapper from './DwebContractWrapper'; export default class DWEBRegistry extends DwebContractWrapper { constructor(options: DwebConfig); /** * Create instance of DWEBName to read/write data for specific domain name * @param name - domain name you would like to work with */ name(name: string): DWEBName; /** * Check if domain name exists. Note that name could be located on Ethereum or Polygon network. * If name is currently on Polygon, it will not exist on Ethereum and vice versa. * @param name */ nameExists(name: string): Promise; /** * Assign default resolver contract to domain name. This is usually done during the registration process, but may be * required if domain has no resolver set or if it is no compatible with Decentraweb. * @param name */ assignDefaultResolver(name: string): Promise; /** * Set resolver contract for domain name. May be used to assign domain custom resolver contract. * * Be careful as this may break domain functionality if resolver contract is not compatible with Decentraweb. * @param name - domain name you would like to work assign resolver to * @param address - address of resolver contract */ setResolver(name: string, address: string): Promise; /** * Get reverse record for address. * * Important: address owner can set any name for his address, even if he doesn't own it, or it is not registered. * To check that name is valid, we check that it resolves to the same address. * @param address * @param skipForwardCheck - by default we check that returned name resolves to the same address. Set this to true to skip this check. */ getReverseRecord(address: string, skipForwardCheck?: boolean): Promise; /** * Set reverse record for signer address. Don't forget to also assign this address to name. * @param name */ setReverseRecord(name: string): Promise; /** * Get all domains owned by address on current network * @param address - Ethereum address * @param skip * @param limit */ getOwnedDomains(address: string, skip: number, limit: number): Promise<{ name: string; isTLD: boolean; createdAt: Date; expiresAt: Date | null; renewalFee: number | null; }[]>; }