Function popAllMessages

  • Get the list of messages currently present in the nodes message inbox. The messages are removed from the inbox.

    Parameters

    • payload: {
          apiEndpoint: string | URL;
          apiToken: string;
          tag?: null | number;
          timeout?: number;
      }
      • apiEndpoint: string | URL

        The API endpoint for authentication.

      • apiToken: string

        The API token for authentication.

      • Optional tag?: null | number
      • Optional timeout?: number

        optional timeout for the requests

    Returns Promise<{
        messages: {
            body: string;
            receivedAt: number;
            tag: number;
        }[];
    }>

    • A promise that resolves to the list of messages currently present in the nodes message inbox.