ao-js-sdk - v0.2.11
    Preparing search index...

    Interface IMessagesService

    interface IMessagesService {
        countAllMessages(params: GetAllMessagesParams): Promise<number>;
        getAllMessages(
            params?: { owner?: string; recipient?: string; tags?: Tags },
        ): Promise<Partial<FullArweaveTransaction>[]>;
        getAllMessagesReceivedBy(
            params: GetAllMessagesByRecipientParams,
        ): Promise<Partial<FullArweaveTransaction>[]>;
        getAllMessagesSentBy(
            params: GetAllMessagesBySenderParams,
        ): Promise<Partial<FullArweaveTransaction>[]>;
        getAllMessagesWithBuilder(
            builder: any,
        ): Promise<Partial<FullArweaveTransaction>[]>;
        getLatestMessages(
            params?: GetLatestMessagesParams,
        ): Promise<GetLatestMessagesResponse>;
        getLatestMessagesReceivedBy(
            params: GetLatestMessagesByRecipientParams,
        ): Promise<GetLatestMessagesResponse>;
        getLatestMessagesSentBy(
            params: GetLatestMessagesBySenderParams,
        ): Promise<GetLatestMessagesResponse>;
        getMessageById(
            id: string,
        ): Promise<undefined | Partial<FullArweaveTransaction>>;
    }

    Implemented by

    Index

    Methods

    • Retrieves all messages matching the given filters

      Parameters

      • Optionalparams: { owner?: string; recipient?: string; tags?: Tags }

        Parameters for filtering messages

        • Optionalowner?: string

          Owner address to filter messages by

        • Optionalrecipient?: string

          Recipient address to filter messages by

        • Optionaltags?: Tags

          Tags to filter messages by

      Returns Promise<Partial<FullArweaveTransaction>[]>

      Promise resolving to all matching messages

      MessagesServiceError if the query fails

    • Retrieves all messages using a custom GQL builder with automatic pagination

      Parameters

      • builder: any

        The ArweaveGQLBuilder instance to use for querying

      Returns Promise<Partial<FullArweaveTransaction>[]>

      Promise resolving to all matching messages

      MessagesServiceError if the query fails

    • Retrieves a message by its ID

      Parameters

      • id: string

        The message ID to retrieve

      Returns Promise<undefined | Partial<FullArweaveTransaction>>

      Promise resolving to the message or undefined if not found

      MessagesServiceError if the query fails