Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DecodedMessage<ContentTypes>

Type parameters

  • ContentTypes = any

Hierarchy

  • DecodedMessage

Index

Constructors

Properties

content: ContentTypes
contentBytes: Uint8Array
contentFallback?: string
contentTopic: string
contentType: ContentTypeId
conversation: Conversation<ContentTypes>
error?: Error
id: string
messageVersion: "v1" | "v2"
recipientAddress?: string
senderAddress: string
sent: Date

Methods

  • toBytes(): Uint8Array
  • fromBytes<ContentTypes>(data: Uint8Array, client: Client<ContentTypes>): Promise<DecodedMessage<ContentTypes>>
  • fromV1Message<ContentTypes>(message: MessageV1, content: ContentTypes, contentType: ContentTypeId, contentBytes: Uint8Array, contentTopic: string, conversation: Conversation<ContentTypes>, error?: Error, contentFallback?: string): DecodedMessage<ContentTypes>
  • fromV2Message<ContentTypes>(message: MessageV2, content: ContentTypes, contentType: ContentTypeId, contentTopic: string, contentBytes: Uint8Array, conversation: Conversation<ContentTypes>, senderAddress: string, error?: Error, contentFallback?: string): DecodedMessage<ContentTypes>
  • Type parameters

    • ContentTypes

    Parameters

    • message: MessageV2
    • content: ContentTypes
    • contentType: ContentTypeId
    • contentTopic: string
    • contentBytes: Uint8Array
    • conversation: Conversation<ContentTypes>
    • senderAddress: string
    • Optional error: Error
    • Optional contentFallback: string

    Returns DecodedMessage<ContentTypes>

Generated using TypeDoc