Class: AttestationService
Service for performing attestation operations to a connector.
Implements
IAttestationComponent
Constructors
Constructor
new AttestationService(
options?):AttestationService
Create a new instance of AttestationService.
Parameters
options?
IAttestationServiceConstructorOptions
The options for the service.
Returns
AttestationService
Properties
CLASS_NAME
readonlystaticCLASS_NAME:string
Runtime name for the class.
Methods
className()
className():
string
Returns the class name of the component.
Returns
string
The class name of the component.
Implementation of
IAttestationComponent.className
create()
create(
attestationObject,namespace?):Promise<string>
Attest the data and return the collated information.
Parameters
attestationObject
IJsonLdNodeObject
The data to attest.
namespace?
string
The namespace of the connector to use for the attestation, defaults to service configured namespace.
Returns
Promise<string>
The id.
Implementation of
IAttestationComponent.create
get()
get(
id):Promise<IAttestationInformation>
Resolve and verify the attestation id.
Parameters
id
string
The attestation id to verify.
Returns
Promise<IAttestationInformation>
The verified attestation details.
Implementation of
IAttestationComponent.get
transfer()
transfer(
attestationId,holderIdentity,holderAddress):Promise<void>
Transfer the attestation to a new holder.
Parameters
attestationId
string
The attestation to transfer.
holderIdentity
string
The identity to transfer the attestation to.
holderAddress
string
The address to transfer the attestation to.
Returns
Promise<void>
The updated attestation details.
Implementation of
IAttestationComponent.transfer
destroy()
destroy(
attestationId):Promise<void>
Destroy the attestation.
Parameters
attestationId
string
The attestation to transfer.
Returns
Promise<void>
The updated attestation details.
Implementation of
IAttestationComponent.destroy