DecodedMessage
Class: DecodedMessage
Constructors
constructor
new DecodedMessage(«destructured»
)
Parameters
Name | Type |
---|---|
«destructured» | Omit <DecodedMessage , "toBytes" > |
Defined in
Properties
content
content: any
Defined in
contentBytes
contentBytes: Uint8Array
Defined in
contentTopic
contentTopic: string
Defined in
contentType
contentType: ContentTypeId
Defined in
conversation
conversation: Conversation
Defined in
error
Optional
error: Error
Defined in
id
id: string
Defined in
messageVersion
messageVersion: "v1"
| "v2"
Defined in
recipientAddress
Optional
recipientAddress: string
Defined in
senderAddress
senderAddress: string
Defined in
sent
sent: Date
Defined in
Methods
toBytes
toBytes(): Uint8Array
Returns
Uint8Array
Defined in
fromBytes
Static
fromBytes(data
, client
): Promise
<DecodedMessage
>
Parameters
Name | Type |
---|---|
data | Uint8Array |
client | Client |
Returns
Promise
<DecodedMessage
>
Defined in
fromV1Message
Static
fromV1Message(message
, content
, contentType
, contentBytes
, contentTopic
, conversation
, error?
): DecodedMessage
Parameters
Name | Type |
---|---|
message | MessageV1 |
content | any |
contentType | ContentTypeId |
contentBytes | Uint8Array |
contentTopic | string |
conversation | Conversation |
error? | Error |
Returns
Defined in
fromV2Message
Static
fromV2Message(message
, content
, contentType
, contentTopic
, contentBytes
, conversation
, senderAddress
, error?
): DecodedMessage
Parameters
Name | Type |
---|---|
message | MessageV2 |
content | any |
contentType | ContentTypeId |
contentTopic | string |
contentBytes | Uint8Array |
conversation | Conversation |
senderAddress | string |
error? | Error |