Skip to main content

AttachmentDescriptor

@hyperledger/identus-sdk v8.1.3


@hyperledger/identus-sdk / overview / Domain / AttachmentDescriptor

Class: AttachmentDescriptor

Defined in: packages/shared/domain/build/index.d.ts:275

Constructors​

Constructor​

new AttachmentDescriptor(data: AttachmentData, mediaType?: string, id?: string, filename?: string[], format?: string, lastModTime?: string, byteCount?: number, description?: string): AttachmentDescriptor

Defined in: packages/shared/domain/build/index.d.ts:284

Parameters​

ParameterType
dataAttachmentData
mediaType?string
id?string
filename?string[]
format?string
lastModTime?string
byteCount?number
description?string

Returns​

AttachmentDescriptor

Properties​

PropertyModifierTypeDefined in
byteCount?readonlynumberpackages/shared/domain/build/index.d.ts:282
datareadonlyAttachmentDatapackages/shared/domain/build/index.d.ts:276
description?readonlystringpackages/shared/domain/build/index.d.ts:283
filename?readonlystring[]packages/shared/domain/build/index.d.ts:279
format?readonlystringpackages/shared/domain/build/index.d.ts:280
idreadonlystringpackages/shared/domain/build/index.d.ts:278
lastModTime?readonlystringpackages/shared/domain/build/index.d.ts:281
mediaType?readonlystringpackages/shared/domain/build/index.d.ts:277

Accessors​

payload​

Get Signature​

get payload(): any

Defined in: packages/shared/domain/build/index.d.ts:285

Returns​

any

Methods​

build()​

static build<T>(payload: T, id?: string, mediaType?: string, filename?: string[], format?: string, lastModTime?: string, byteCount?: number, description?: string): AttachmentDescriptor

Defined in: packages/shared/domain/build/index.d.ts:293

Type Parameters​

Type Parameter
T

Parameters​

ParameterType
payloadT
id?string
mediaType?string
filename?string[]
format?string
lastModTime?string
byteCount?number
description?string

Returns​

AttachmentDescriptor


extractJSON()​

static extractJSON(attachment: AttachmentDescriptor): any

Defined in: packages/shared/domain/build/index.d.ts:292

Get the presumed JSON from the attachment

Parameters​

ParameterTypeDescription
attachmentAttachmentDescriptor-

Returns​

any