• Safely send a message through the network. Checks if node has at least one open outgoing channel

    Parameters

    • payload: {
          apiEndpoint: string | URL;
          apiToken: string;
          body: string;
          destination?: string;
          hops?: number;
          path?: string[];
          peerId?: string;
          tag: number;
          timeout?: number;
      }

      The payload of the message.

      • apiEndpoint: string | URL

        The API endpoint for authentication.

      • apiToken: string

        The API token for authentication.

      • body: string
      • Optional destination?: string
      • Optional hops?: number
      • Optional path?: string[]
      • Optional peerId?: string
      • tag: number
      • Optional timeout?: number

        optional timeout for the requests

    Returns Promise<undefined | string>