Skip to main content
Version: 1.3

Class: Service

identity_wasm.Service

A DID Document Service used to enable trusted interactions associated with a DID subject.

Table of contents

Constructors

Methods

Constructors

constructor

new Service(service)

Parameters

NameType
serviceIService

Methods

toJSON

toJSON(): Object

  • Return copy of self without private attributes.

Returns

Object

toJSON(): any

Serializes this to a JSON object.

Returns

any


toString

toString(): string

Return stringified version of self.

Returns

string


id

id(): DIDUrl

Returns a copy of the Service id.

Returns

DIDUrl


type

type(): string[]

Returns a copy of the Service type.

Returns

string[]


serviceEndpoint

serviceEndpoint(): string | string[] | Map\<string, string[]>

Returns a copy of the Service endpoint.

Returns

string | string[] | Map\<string, string[]>


properties

properties(): Map\<string, any>

Returns a copy of the custom properties on the Service.

Returns

Map\<string, any>


fromJSON

Static fromJSON(json): Service

Deserializes an instance from a JSON object.

Parameters

NameType
jsonany

Returns

Service


clone

clone(): Service

Deep clones the object.

Returns

Service