Skip to main content

Service

@iota/identity-wasm API documentation


Class: Service

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

Methods​

toJSON()​

Call Signature​

toJSON(): Object

  • Return copy of self without private attributes.
Returns​

Object

Call Signature​

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​

json​

any

Returns​

Service


clone()​

clone(): Service

Deep clones the object.

Returns​

Service