Skip to main content
Version: 1.5

Class: LinkedDomainService

identity_wasm.LinkedDomainService

Table of contents​

Constructors​

Methods​

Constructors​

constructor​

• new LinkedDomainService(options)

Constructs a new LinkedDomainService that wraps a spec compliant Linked Domain Service Endpoint.

Domain URLs must include the https scheme in order to pass the domain linkage validation.

Parameters​

NameType
optionsILinkedDomainService

Methods​

toJSON​

▸ toJSON(): Object

  • Return copy of self without private attributes.

Returns​

Object


toString​

▸ toString(): string

Return stringified version of self.

Returns​

string


domains​

▸ domains(): string[]

Returns the domains contained in the Linked Domain Service.

Returns​

string[]


toService​

▸ toService(): Service

Returns the inner service which can be added to a DID Document.

Returns​

Service


fromService​

▸ Static fromService(service): LinkedDomainService

Creates a new LinkedDomainService from a Service.

Error

Errors if service is not a valid Linked Domain Service.

Parameters​

NameType
serviceService

Returns​

LinkedDomainService


isValid​

▸ Static isValid(service): boolean

Returns true if a Service is a valid Linked Domain Service.

Parameters​

NameType
serviceService

Returns​

boolean


clone​

▸ clone(): LinkedDomainService

Deep clones the object.

Returns​

LinkedDomainService