MessageV1
Class: MessageV1
Hierarchy
MessageBase
↳
MessageV1
Implements
MessageV1
Constructors
constructor
new MessageV1(id
, bytes
, obj
, header
, senderAddress
)
Parameters
Name | Type |
---|---|
id | string |
bytes | Uint8Array |
obj | Message |
header | MessageHeaderV1 |
senderAddress | undefined | string |
Overrides
MessageBase.constructor
Defined in
Properties
ciphertext
ciphertext: Ciphertext
Implementation of
proto.MessageV1.ciphertext
Inherited from
MessageBase.ciphertext
Defined in
contentType
Optional
contentType: ContentTypeId
Inherited from
MessageBase.contentType
Defined in
conversation
conversation: undefined
= undefined
Defined in
error
Optional
error: Error
Inherited from
MessageBase.error
Defined in
header
header: MessageHeaderV1
Defined in
headerBytes
headerBytes: Uint8Array
Implementation of
proto.MessageV1.headerBytes
Inherited from
MessageBase.headerBytes
Defined in
id
id: string
Identifier that is deterministically derived from the bytes of the message header and ciphertext, where all those bytes are authenticated. This can be used in determining uniqueness of messages.
Inherited from
MessageBase.id
Defined in
senderAddress
senderAddress: undefined
| string
Defined in
Accessors
recipientAddress
get
recipientAddress(): undefined
| string
Returns
undefined
| string
Defined in
sent
get
sent(): Date
Returns
Date
Defined in
Methods
decrypt
decrypt(keystore
, myPublicKeyBundle
): Promise
<Uint8Array
>
Parameters
Name | Type |
---|---|
keystore | Keystore |
myPublicKeyBundle | PublicKeyBundle |
Returns
Promise
<Uint8Array
>
Defined in
toBytes
toBytes(): Uint8Array
Returns
Uint8Array
Inherited from
MessageBase.toBytes
Defined in
create
Static
create(obj
, header
, bytes
): Promise
<MessageV1
>
Parameters
Name | Type |
---|---|
obj | Message |
header | MessageHeaderV1 |
bytes | Uint8Array |
Returns
Promise
<MessageV1
>
Defined in
encode
Static
encode(keystore
, payload
, sender
, recipient
, timestamp
): Promise
<MessageV1
>
Parameters
Name | Type |
---|---|
keystore | Keystore |
payload | Uint8Array |
sender | PublicKeyBundle |
recipient | PublicKeyBundle |
timestamp | Date |
Returns
Promise
<MessageV1
>
Defined in
fromBytes
Static
fromBytes(bytes
): Promise
<MessageV1
>
Parameters
Name | Type |
---|---|
bytes | Uint8Array |
Returns
Promise
<MessageV1
>