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
Name | Type |
---|---|
service | IService |
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
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
Name | Type |
---|---|
json | any |
Returns
clone
▸ clone(): Service
Deep clones the object.