Skip to main content

@atala/prism-wallet-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

Accessors

Methods

Constructors

constructor

new Message(body, id?, piuri, from?, to?, attachments?, thid?, extraHeaders?, createdTime?, expiresTimePlus?, ack?, direction?, fromPrior?, pthid?): Message

Parameters

NameTypeDefault value
bodystringundefined
idstringundefined
piuristringundefined
from?DIDundefined
to?DIDundefined
attachmentsAttachmentDescriptor[][]
thid?stringundefined
extraHeadersRecord<string, any>{}
createdTimestringundefined
expiresTimePlusstringundefined
ackstring[][]
directionMessageDirectionMessageDirection.RECEIVED
fromPrior?stringundefined
pthid?stringundefined

Returns

Message

Defined in

src/domain/models/Message.ts:24

Properties

ack

Readonly ack: string[] = []

Defined in

src/domain/models/Message.ts:39


attachments

Readonly attachments: AttachmentDescriptor[] = []

Defined in

src/domain/models/Message.ts:30


body

Readonly body: string

Defined in

src/domain/models/Message.ts:25


createdTime

Readonly createdTime: string

Defined in

src/domain/models/Message.ts:34


direction

direction: MessageDirection = MessageDirection.RECEIVED

Defined in

src/domain/models/Message.ts:40


expiresTimePlus

Readonly expiresTimePlus: string

Defined in

src/domain/models/Message.ts:35


extraHeaders

Readonly extraHeaders: Record<string, 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:41


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:42


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

Storable.uuid

Defined in

src/domain/models/Message.ts:22

Accessors

credentialFormat

get credentialFormat(): JWT | SDJWT | AnonCreds | Unknown

Returns

JWT | SDJWT | AnonCreds | Unknown

Defined in

src/domain/models/Message.ts:55


safeBody

get safeBody(): any

Returns

any

Defined in

src/domain/models/Message.ts:47

Methods

fromJson

fromJson(jsonString): Message

Parameters

NameType
jsonStringany

Returns

Message

Defined in

src/domain/models/Message.ts:80


isBase64Attachment

isBase64Attachment(data): data is AttachmentBase64

Parameters

NameType
dataany

Returns

data is AttachmentBase64

Defined in

src/domain/models/Message.ts:169


isJsonAttachment

isJsonAttachment(data): data is AttachmentJsonData

Parameters

NameType
dataany

Returns

data is AttachmentJsonData

Defined in

src/domain/models/Message.ts:173