Skip to main content

MessageV1

Class: MessageV1

Hierarchy

  • MessageBase

    MessageV1

Implements

  • MessageV1

Constructors

constructor

new MessageV1(id, bytes, obj, header, senderAddress)

Parameters

NameType
idstring
bytesUint8Array
objMessage
headerMessageHeaderV1
senderAddressundefined | string

Overrides

MessageBase.constructor

Defined in

Message.ts:75

Properties

ciphertext

ciphertext: Ciphertext

Implementation of

proto.MessageV1.ciphertext

Inherited from

MessageBase.ciphertext

Defined in

Message.ts:43


contentType

Optional contentType: ContentTypeId

Inherited from

MessageBase.contentType

Defined in

Message.ts:46


conversation

conversation: undefined = undefined

Defined in

Message.ts:73


error

Optional error: Error

Inherited from

MessageBase.error

Defined in

Message.ts:47


header: MessageHeaderV1

Defined in

Message.ts:70


headerBytes

headerBytes: Uint8Array

Implementation of

proto.MessageV1.headerBytes

Inherited from

MessageBase.headerBytes

Defined in

Message.ts:42


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

Message.ts:53


senderAddress

senderAddress: undefined | string

Defined in

Message.ts:72

Accessors

recipientAddress

get recipientAddress(): undefined | string

Returns

undefined | string

Defined in

Message.ts:107


sent

get sent(): Date

Returns

Date

Defined in

Message.ts:102

Methods

decrypt

decrypt(keystore, myPublicKeyBundle): Promise<Uint8Array>

Parameters

NameType
keystoreKeystore
myPublicKeyBundlePublicKeyBundle

Returns

Promise<Uint8Array>

Defined in

Message.ts:116


toBytes

toBytes(): Uint8Array

Returns

Uint8Array

Inherited from

MessageBase.toBytes

Defined in

Message.ts:62


create

Static create(obj, header, bytes): Promise<MessageV1>

Parameters

NameType
objMessage
headerMessageHeaderV1
bytesUint8Array

Returns

Promise<MessageV1>

Defined in

Message.ts:87


encode

Static encode(keystore, payload, sender, recipient, timestamp): Promise<MessageV1>

Parameters

NameType
keystoreKeystore
payloadUint8Array
senderPublicKeyBundle
recipientPublicKeyBundle
timestampDate

Returns

Promise<MessageV1>

Defined in

Message.ts:162


fromBytes

Static fromBytes(bytes): Promise<MessageV1>

Parameters

NameType
bytesUint8Array

Returns

Promise<MessageV1>

Defined in

Message.ts:133

Was the information on this page helpful?