@hyperledger/identus-sdk / Exports / Domain / Message
Class: Message
Domain.Message
Storable define properties a Domain object must implement to be compatible with Pluto
Implements
Table of contents
Constructors
Properties
- ack
- attachments
- body
- createdTime
- direction
- expiresTimePlus
- extraHeaders
- from
- fromPrior
- id
- piuri
- pthid
- thid
- to
- uuid
Methods
Constructors
constructor
• new Message(body
, id?
, piuri
, from?
, to?
, attachments?
, thid?
, extraHeaders?
, createdTime?
, expiresTimePlus?
, ack?
, direction?
, fromPrior?
, pthid?
): Message
Parameters
Name | Type | Default value |
---|---|---|
body | string | JsonObj <any > | undefined |
id | string | undefined |
piuri | string | undefined |
from? | DID | undefined |
to? | DID | undefined |
attachments | AttachmentDescriptor [] | [] |
thid? | string | undefined |
extraHeaders | JsonObj <any > | {} |
createdTime | number | undefined |
expiresTimePlus | number | undefined |
ack | string [] | [] |
direction | MessageDirection | MessageDirection.RECEIVED |
fromPrior? | string | undefined |
pthid? | string | undefined |
Returns
Defined in
src/domain/models/Message.ts:24
Properties
ack
• Readonly
ack: string
[] = []
Defined in
src/domain/models/Message.ts:35
attachments
• Readonly
attachments: AttachmentDescriptor
[] = []
Defined in
src/domain/models/Message.ts:30
body
• Readonly
body: JsonObj
<any
>
Defined in
src/domain/models/Message.ts:22
createdTime
• Readonly
createdTime: number
Defined in
src/domain/models/Message.ts:33
direction
• direction: MessageDirection
= MessageDirection.RECEIVED
Defined in
src/domain/models/Message.ts:36
expiresTimePlus
• Readonly
expiresTimePlus: number
Defined in
src/domain/models/Message.ts:34
extraHeaders
• Readonly
extraHeaders: JsonObj
<any
> = {}
Defined in
src/domain/models/Message.ts:32
from
• Optional
Readonly
from: DID
Defined in
src/domain/models/Message.ts:28
fromPrior
• Optional
Readonly
fromPrior: string
Defined in
src/domain/models/Message.ts:37
id
• Readonly
id: string
Defined in
src/domain/models/Message.ts:26
piuri
• Readonly
piuri: string
Defined in
src/domain/models/Message.ts:27
pthid
• Optional
Readonly
pthid: string
Defined in
src/domain/models/Message.ts:38
thid
• Optional
Readonly
thid: string
Defined in
src/domain/models/Message.ts:31
to
• Optional
Readonly
to: DID
Defined in
src/domain/models/Message.ts:29
uuid
• uuid: string
Universally Unique Identifier. should be unique across all items.
Implementation of
Defined in
src/domain/models/Message.ts:21
Methods
fromJson
▸ fromJson(jsonString
): Message
Parameters
Name | Type |
---|---|
jsonString | any |
Returns
Defined in
src/domain/models/Message.ts:44
isBase64Attachment
▸ isBase64Attachment(data
): data is AttachmentBase64
Parameters
Name | Type |
---|---|
data | any |
Returns
data is AttachmentBase64
Defined in
src/domain/models/Message.ts:140
isJsonAttachment
▸ isJsonAttachment(data
): data is AttachmentJsonData
Parameters
Name | Type |
---|---|
data | any |
Returns
data is AttachmentJsonData