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
| Name | Type |
|---|---|
options | ILinkedDomainService |
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
fromService
▸ Static fromService(service): LinkedDomainService
Creates a new LinkedDomainService from a Service.
Error
Errors if service is not a valid Linked Domain Service.
Parameters
| Name | Type |
|---|---|
service | Service |
Returns
isValid
▸ Static isValid(service): boolean
Returns true if a Service is a valid Linked Domain Service.
Parameters
| Name | Type |
|---|---|
service | Service |
Returns
boolean
clone
▸ clone(): LinkedDomainService
Deep clones the object.