Pluto
@hyperledger/identus-sdk v7.0.0
@hyperledger/identus-sdk / overview / Pluto
Class: Pluto
Defined in: src/pluto/Pluto.ts:46
Pluto is a storage interface describing storage requirements of the edge agents which will be implemented using this SDK. Implement this interface using your preferred underlying storage technology, most appropriate for your use case.
Extends
Implements
Constructors
Constructor
new Pluto(
store:Store,keyRestoration:KeyRestoration):Pluto
Defined in: src/pluto/Pluto.ts:199
Parameters
| Parameter | Type | 
|---|---|
| store | Store | 
| keyRestoration | KeyRestoration | 
Returns
Pluto
Overrides
Properties
| Property | Modifier | Type | Default value | Description | Inherited from | Defined in | 
|---|---|---|---|---|---|---|
| BackupMgr | public | BackupManager | undefined | - | - | src/pluto/Pluto.ts:196 | 
| state | public | State | State.STOPPED | current status of the entity | Pluto.stateController.state | src/domain/protocols/Startable.ts:42 | 
Methods
backup()
backup(
version?:"0.0.1"):Promise<{credentials: {data:string;recovery_id:string; }[];did_pairs: {alias:string;holder:string;recipient:string; }[];dids: {alias?:string;did:string; }[];keys: {did?:string;index?:number;key:string;recovery_id:string; }[];link_secret?:string;mediators: {holder_did:string;mediator_did:string;routing_did:string; }[];messages:string[];version?:"0.0.1"; }>
Defined in: src/pluto/Pluto.ts:221
Backups *
Parameters
| Parameter | Type | 
|---|---|
| version? | "0.0.1" | 
Returns
Promise<{ credentials: { data: string; recovery_id: string; }[]; did_pairs: { alias: string; holder: string; recipient: string; }[]; dids: { alias?: string; did: string; }[]; keys: { did?: string; index?: number; key: string; recovery_id: string; }[]; link_secret?: string; mediators: { holder_did: string; mediator_did: string; routing_did: string; }[]; messages: string[]; version?: "0.0.1"; }>
Implementation of
deleteMessage()
deleteMessage(
id:string):Promise<void>
Defined in: src/pluto/Pluto.ts:229
Delete a previously stored messages
Parameters
| Parameter | Type | 
|---|---|
| id | string | 
Returns
Promise<void>
Implementation of
getAllCredentials()
getAllCredentials():
Promise<Credential[]>
Defined in: src/pluto/Pluto.ts:243
Retrieve all the stored credentials
Returns
Promise<Credential[]>
Implementation of
getAllDidPairs()
getAllDidPairs():
Promise<DIDPair[]>
Defined in: src/pluto/Pluto.ts:436
Retrieve all stored DID pairs (DIDComm connections).
Returns
Promise<DIDPair[]>
Implementation of
getAllMediators()
getAllMediators():
Promise<Mediator[]>
Defined in: src/pluto/Pluto.ts:488
Mediators *
Returns
Promise<Mediator[]>
Implementation of
getAllMessages()
getAllMessages():
Promise<Message[]>
Defined in: src/pluto/Pluto.ts:417
Retrieve all stored DIDComm messages.
Returns
Promise<Message[]>
Implementation of
getAllPeerDIDs()
getAllPeerDIDs():
Promise<PeerDID[]>
Defined in: src/pluto/Pluto.ts:359
Retrieve all stored Peer DIDs.
Returns
Promise<PeerDID[]>
Implementation of
getAllPrismDIDs()
getAllPrismDIDs():
Promise<PrismDID[]>
Defined in: src/pluto/Pluto.ts:321
Retrieve all stored PRISM DIDs.
Returns
Promise<PrismDID[]>
Implementation of
getCredentialMetadata()
getCredentialMetadata(
name:string):Promise<CredentialMetadata|null>
Defined in: src/pluto/Pluto.ts:264
Fetch the Credential Metadata by its name
Parameters
| Parameter | Type | Description | 
|---|---|---|
| name | string | 
Returns
Promise<CredentialMetadata | null>
Implementation of
getDIDPrivateKeysByDID()
getDIDPrivateKeysByDID(
did:DID):Promise<PrivateKey[]>
Defined in: src/pluto/Pluto.ts:286
Retrieve available private keys for a given DID.
Parameters
| Parameter | Type | 
|---|---|
| did | DID | 
Returns
Promise<PrivateKey[]>
Implementation of
getLinkSecret()
getLinkSecret(
name:string):Promise<LinkSecret|null>
Defined in: src/pluto/Pluto.ts:275
Retrieve the stored link secret by its name
Parameters
| Parameter | Type | Default value | 
|---|---|---|
| name | string | Domain.LinkSecret.defaultName | 
Returns
Promise<LinkSecret | null>
Implementation of
getMessage()
getMessage(
id:string):Promise<Message|null>
Defined in: src/pluto/Pluto.ts:413
Retrieve a DIDComm message by ID.
Parameters
| Parameter | Type | 
|---|---|
| id | string | 
Returns
Promise<Message | null>
Implementation of
getPairByDID()
Defined in: src/pluto/Pluto.ts:444
Retrieve a DID pair containing a given DID as either host or receiver.
Parameters
| Parameter | Type | 
|---|---|
| did | DID | 
Returns
Promise<DIDPair | null>
Implementation of
getPairByName()
getPairByName(
alias:string):Promise<DIDPair|null>
Defined in: src/pluto/Pluto.ts:461
Retrieve a DID pair by a given pair name.
Parameters
| Parameter | Type | 
|---|---|
| alias | string | 
Returns
Promise<DIDPair | null>
Implementation of
restore()
restore(
backup: {credentials: {data:string;recovery_id:string; }[];did_pairs: {alias:string;holder:string;recipient:string; }[];dids: {alias?:string;did:string; }[];keys: {did?:string;index?:number;key:string;recovery_id:string; }[];link_secret?:string;mediators: {holder_did:string;mediator_did:string;routing_did:string; }[];messages:string[];version?:"0.0.1"; }):Promise<void>
Defined in: src/pluto/Pluto.ts:225
load the given data into the store
Parameters
| Parameter | Type | Description | 
|---|---|---|
| backup | { credentials: {data:string;recovery_id:string; }[];did_pairs: {alias:string;holder:string;recipient:string; }[];dids: {alias?:string;did:string; }[];keys: {did?:string;index?:number;key:string;recovery_id:string; }[];link_secret?:string;mediators: {holder_did:string;mediator_did:string;routing_did:string; }[];messages:string[];version?:"0.0.1"; } | |
| backup.credentials | { data:string;recovery_id:string; }[] | - | 
| backup.did_pairs | { alias:string;holder:string;recipient:string; }[] | - | 
| backup.dids | { alias?:string;did:string; }[] | - | 
| backup.keys | { did?:string;index?:number;key:string;recovery_id:string; }[] | - | 
| backup.link_secret? | string | - | 
| backup.mediators | { holder_did:string;mediator_did:string;routing_did:string; }[] | - | 
| backup.messages | string[] | - | 
| backup.version? | "0.0.1" | - | 
Returns
Promise<void>
Implementation of
revokeCredential()
revokeCredential(
credential:Credential):Promise<void>
Defined in: src/pluto/Pluto.ts:248
Revoke a Credential
Parameters
| Parameter | Type | 
|---|---|
| credential | Credential | 
Returns
Promise<void>
Implementation of
start()
start():
Promise<State>
Defined in: src/domain/protocols/Startable.ts:62
handle the startup of an entity
updates state according to lifecycle
Returns
Promise<State>
Implementation of
Inherited from
stop()
stop():
Promise<State>
Defined in: src/domain/protocols/Startable.ts:72
handle the teardown of an entity
updates state according to lifecycle
Returns
Promise<State>
Implementation of
Inherited from
storeCredential()
storeCredential(
credential:Credential):Promise<void>
Defined in: src/pluto/Pluto.ts:239
Credentials *
Parameters
| Parameter | Type | 
|---|---|
| credential | Credential | 
Returns
Promise<void>
Implementation of
storeCredentialMetadata()
storeCredentialMetadata(
metadata:CredentialMetadata):Promise<void>
Defined in: src/pluto/Pluto.ts:260
Credential Metadata *
Parameters
| Parameter | Type | 
|---|---|
| metadata | CredentialMetadata | 
Returns
Promise<void>
Implementation of
storeDID()
storeDID(
did:DID,keys?:Arrayable<PrivateKey>,alias?:string):Promise<void>
Defined in: src/pluto/Pluto.ts:296
DIDs *
Parameters
| Parameter | Type | 
|---|---|
| did | DID | 
| keys? | Arrayable<PrivateKey> | 
| alias? | string | 
Returns
Promise<void>
Implementation of
storeDIDPair()
storeDIDPair(
host:DID,receiver:DID,alias:string):Promise<void>
Defined in: src/pluto/Pluto.ts:424
DID Pairs *
Parameters
| Parameter | Type | 
|---|---|
| host | DID | 
| receiver | DID | 
| alias | string | 
Returns
Promise<void>
Implementation of
storeLinkSecret()
storeLinkSecret(
linkSecret:LinkSecret):Promise<void>
Defined in: src/pluto/Pluto.ts:271
LinkSecret *
Parameters
| Parameter | Type | 
|---|---|
| linkSecret | LinkSecret | 
Returns
Promise<void>
Implementation of
storeMediator()
storeMediator(
mediator:Mediator):Promise<void>
Defined in: src/pluto/Pluto.ts:524
Store a mediator information.
Parameters
| Parameter | Type | 
|---|---|
| mediator | Mediator | 
Returns
Promise<void>
Implementation of
storeMessage()
storeMessage(
message:Message):Promise<void>
Defined in: src/pluto/Pluto.ts:403
Messages *
Parameters
| Parameter | Type | 
|---|---|
| message | Message | 
Returns
Promise<void>
Implementation of
storeMessages()
storeMessages(
messages:Message[]):Promise<void>
Defined in: src/pluto/Pluto.ts:407
Store an array of DIDComm messages
Parameters
| Parameter | Type | 
|---|---|
| messages | Message[] | 
Returns
Promise<void>
Implementation of
storePeerDID()
storePeerDID(
did:DID,privateKeys:PrivateKey[]):Promise<void>
Defined in: src/pluto/Pluto.ts:351
Peer DIDs *
Parameters
| Parameter | Type | 
|---|---|
| did | DID | 
| privateKeys | PrivateKey[] | 
Returns
Promise<void>
Implementation of
storePrismDID()
storePrismDID(
did:DID,privateKey:PrivateKey,alias?:string):Promise<void>
Defined in: src/pluto/Pluto.ts:310
Prism DIDs *
Parameters
| Parameter | Type | 
|---|---|
| did | DID | 
| privateKey | PrivateKey | 
| alias? | string | 
Returns
Promise<void>
Implementation of
storePrivateKey()
storePrivateKey(
privateKey:PrivateKey):Promise<void>
Defined in: src/pluto/Pluto.ts:282
PrivateKeys *
Parameters
| Parameter | Type | 
|---|---|
| privateKey | PrivateKey | 
Returns
Promise<void>