• Instead of using HOPR address, we can assign HOPR address to a specific name called alias. Give an address a more memorable alias and use it instead of Hopr address. Aliases are kept locally and are not saved or shared on the network.

    Parameters

    • payload: {
          apiEndpoint: string | URL;
          apiToken: string;
          capabilities: ("Retransmission" | "Segmentation")[];
          destination: string;
          listenHost: string;
          path: {
              Hops?: number;
              IntermediatePath?: string[];
          };
          protocol: "udp" | "tcp";
          target: {
              Plain: string;
          };
          timeout?: number;
      }
      • apiEndpoint: string | URL

        The API endpoint for authentication.

      • apiToken: string

        The API token for authentication.

      • capabilities: ("Retransmission" | "Segmentation")[]
      • destination: string
      • listenHost: string
      • path: {
            Hops?: number;
            IntermediatePath?: string[];
        }
        • Optional Hops?: number
        • Optional IntermediatePath?: string[]
      • protocol: "udp" | "tcp"
      • target: {
            Plain: string;
        }
        • Plain: string
      • Optional timeout?: number

        optional timeout for the requests

    Returns Promise<{
        ip: string;
        path: {
            Hops?: number;
            IntermediatePath?: string[];
        };
        port: number;
        protocol: "udp" | "tcp";
        target: string;
    }>

    A Promise that resolves to true if alias successfully linked to peerId.

    Throws

    An error that occurred while processing the request.