interface AddressManager {
    addDNSMapping(domain, ipAddresses): void;
    addObservedAddr(addr): void;
    confirmObservedAddr(addr): void;
    getAddresses(): Multiaddr[];
    getAnnounceAddrs(): Multiaddr[];
    getListenAddrs(): Multiaddr[];
    getObservedAddrs(): Multiaddr[];
    removeDNSMapping(domain): void;
    removeObservedAddr(addr): void;
}

Methods

  • Adds a mapping between one or more IP addresses and a domain name - when getAddresses is invoked, where the IP addresses are present in a multiaddr, an additional multiaddr will be added with ip4 and ip6 tuples replaced with dns4 and `dns6 ones respectively.

    Parameters

    • domain: string
    • ipAddresses: string[]

    Returns void