Skip to main content

DecodedMessage

Class: DecodedMessage

Constructors

constructor

new DecodedMessage(«destructured»)

Parameters

NameType
«destructured»Omit<DecodedMessage, "toBytes">

Defined in

Message.ts:244

Properties

content

content: any

Defined in

Message.ts:240


contentBytes

contentBytes: Uint8Array

Defined in

Message.ts:242


contentTopic

contentTopic: string

Defined in

Message.ts:237


contentType

contentType: ContentTypeId

Defined in

Message.ts:239


conversation

conversation: Conversation

Defined in

Message.ts:238


error

Optional error: Error

Defined in

Message.ts:241


id

id: string

Defined in

Message.ts:232


messageVersion

messageVersion: "v1" | "v2"

Defined in

Message.ts:233


recipientAddress

Optional recipientAddress: string

Defined in

Message.ts:235


senderAddress

senderAddress: string

Defined in

Message.ts:234


sent

sent: Date

Defined in

Message.ts:236

Methods

toBytes

toBytes(): Uint8Array

Returns

Uint8Array

Defined in

Message.ts:270


fromBytes

Static fromBytes(data, client): Promise<DecodedMessage>

Parameters

NameType
dataUint8Array
clientClient

Returns

Promise<DecodedMessage>

Defined in

Message.ts:283


fromV1Message

Static fromV1Message(message, content, contentType, contentBytes, contentTopic, conversation, error?): DecodedMessage

Parameters

NameType
messageMessageV1
contentany
contentTypeContentTypeId
contentBytesUint8Array
contentTopicstring
conversationConversation
error?Error

Returns

DecodedMessage

Defined in

Message.ts:318


fromV2Message

Static fromV2Message(message, content, contentType, contentTopic, contentBytes, conversation, senderAddress, error?): DecodedMessage

Parameters

NameType
messageMessageV2
contentany
contentTypeContentTypeId
contentTopicstring
contentBytesUint8Array
conversationConversation
senderAddressstring
error?Error

Returns

DecodedMessage

Defined in

Message.ts:346

Was the information on this page helpful?