• Opens HOPR session with the specified configuration.

    Parameters

    • payload: {
          apiEndpoint: string | URL;
          apiToken: string;
          capabilities: ("Retransmission" | "Segmentation" | "RetransmissionAckOnly" | "NoDelay" | "NoRateControl")[];
          destination: string;
          forwardPath: {
              Hops?: number;
              IntermediatePath?: string[];
          };
          listenHost: string;
          maxClientSessions?: null | number;
          maxSurbUpstream?: string;
          protocol: "udp" | "tcp";
          responseBuffer?: string;
          returnPath: {
              Hops?: number;
              IntermediatePath?: string[];
          };
          sessionPool?: null | number;
          target: {
              Plain: string;
          };
          timeout?: number;
      }
      • apiEndpoint: string | URL

        The API endpoint for authentication.

      • apiToken: string

        The API token for authentication.

      • capabilities: ("Retransmission" | "Segmentation" | "RetransmissionAckOnly" | "NoDelay" | "NoRateControl")[]
      • destination: string
      • forwardPath: {
            Hops?: number;
            IntermediatePath?: string[];
        }
        • Optional Hops?: number
        • Optional IntermediatePath?: string[]
      • listenHost: string
      • Optional maxClientSessions?: null | number
      • Optional maxSurbUpstream?: string
      • protocol: "udp" | "tcp"
      • Optional responseBuffer?: string
      • returnPath: {
            Hops?: number;
            IntermediatePath?: string[];
        }
        • Optional Hops?: number
        • Optional IntermediatePath?: string[]
      • Optional sessionPool?: null | number
      • target: {
            Plain: string;
        }
        • Plain: string
      • Optional timeout?: number

        optional timeout for the requests

    Returns Promise<{
        activeClients: string[];
        destination: string;
        forwardPath: {
            Hops?: number;
            IntermediatePath?: string[];
        };
        hoprMtu: number;
        ip: string;
        maxClientSessions: number;
        maxSurbUpstream?: null | string;
        port: number;
        protocol: "udp" | "tcp";
        responseBuffer?: null | string;
        returnPath: {
            Hops?: number;
            IntermediatePath?: string[];
        };
        sessionPool?: null | number;
        surbLen: number;
        target: string;
    }>

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

    Throws

    An error that occurred while processing the request.