Skip to main content

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

ParameterType
storeStore
keyRestorationKeyRestoration

Returns

Pluto

Overrides

Controller.constructor

Properties

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
BackupMgrpublicBackupManagerundefined--src/pluto/Pluto.ts:196
statepublicStateState.STOPPEDcurrent status of the entityPluto.state Controller.statesrc/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

ParameterType
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

Pluto.backup


deleteMessage()

deleteMessage(id: string): Promise<void>

Defined in: src/pluto/Pluto.ts:229

Delete a previously stored messages

Parameters

ParameterType
idstring

Returns

Promise<void>

Implementation of

Pluto.deleteMessage


getAllCredentials()

getAllCredentials(): Promise<Credential[]>

Defined in: src/pluto/Pluto.ts:243

Retrieve all the stored credentials

Returns

Promise<Credential[]>

Implementation of

Pluto.getAllCredentials


getAllDidPairs()

getAllDidPairs(): Promise<DIDPair[]>

Defined in: src/pluto/Pluto.ts:436

Retrieve all stored DID pairs (DIDComm connections).

Returns

Promise<DIDPair[]>

Implementation of

Pluto.getAllDidPairs


getAllMediators()

getAllMediators(): Promise<Mediator[]>

Defined in: src/pluto/Pluto.ts:488

Mediators *

Returns

Promise<Mediator[]>

Implementation of

Pluto.getAllMediators


getAllMessages()

getAllMessages(): Promise<Message[]>

Defined in: src/pluto/Pluto.ts:417

Retrieve all stored DIDComm messages.

Returns

Promise<Message[]>

Implementation of

Pluto.getAllMessages


getAllPeerDIDs()

getAllPeerDIDs(): Promise<PeerDID[]>

Defined in: src/pluto/Pluto.ts:359

Retrieve all stored Peer DIDs.

Returns

Promise<PeerDID[]>

Implementation of

Pluto.getAllPeerDIDs


getAllPrismDIDs()

getAllPrismDIDs(): Promise<PrismDID[]>

Defined in: src/pluto/Pluto.ts:321

Retrieve all stored PRISM DIDs.

Returns

Promise<PrismDID[]>

Implementation of

Pluto.getAllPrismDIDs


getCredentialMetadata()

getCredentialMetadata(name: string): Promise<CredentialMetadata | null>

Defined in: src/pluto/Pluto.ts:264

Fetch the Credential Metadata by its name

Parameters

ParameterTypeDescription
namestring

Returns

Promise<CredentialMetadata | null>

Implementation of

Pluto.getCredentialMetadata


getDIDPrivateKeysByDID()

getDIDPrivateKeysByDID(did: DID): Promise<PrivateKey[]>

Defined in: src/pluto/Pluto.ts:286

Retrieve available private keys for a given DID.

Parameters

ParameterType
didDID

Returns

Promise<PrivateKey[]>

Implementation of

Pluto.getDIDPrivateKeysByDID


getLinkSecret()

getLinkSecret(name: string): Promise<LinkSecret | null>

Defined in: src/pluto/Pluto.ts:275

Retrieve the stored link secret by its name

Parameters

ParameterTypeDefault value
namestringDomain.LinkSecret.defaultName

Returns

Promise<LinkSecret | null>

Implementation of

Pluto.getLinkSecret


getMessage()

getMessage(id: string): Promise<Message | null>

Defined in: src/pluto/Pluto.ts:413

Retrieve a DIDComm message by ID.

Parameters

ParameterType
idstring

Returns

Promise<Message | null>

Implementation of

Pluto.getMessage


getPairByDID()

getPairByDID(did: DID): Promise<DIDPair | null>

Defined in: src/pluto/Pluto.ts:444

Retrieve a DID pair containing a given DID as either host or receiver.

Parameters

ParameterType
didDID

Returns

Promise<DIDPair | null>

Implementation of

Pluto.getPairByDID


getPairByName()

getPairByName(alias: string): Promise<DIDPair | null>

Defined in: src/pluto/Pluto.ts:461

Retrieve a DID pair by a given pair name.

Parameters

ParameterType
aliasstring

Returns

Promise<DIDPair | null>

Implementation of

Pluto.getPairByName


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

ParameterTypeDescription
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.messagesstring[]-
backup.version?"0.0.1"-

Returns

Promise<void>

Implementation of

Pluto.restore


revokeCredential()

revokeCredential(credential: Credential): Promise<void>

Defined in: src/pluto/Pluto.ts:248

Revoke a Credential

Parameters

ParameterType
credentialCredential

Returns

Promise<void>

Implementation of

Pluto.revokeCredential


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

Pluto.start

Inherited from

Controller.start


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

Pluto.stop

Inherited from

Controller.stop


storeCredential()

storeCredential(credential: Credential): Promise<void>

Defined in: src/pluto/Pluto.ts:239

Credentials *

Parameters

ParameterType
credentialCredential

Returns

Promise<void>

Implementation of

Pluto.storeCredential


storeCredentialMetadata()

storeCredentialMetadata(metadata: CredentialMetadata): Promise<void>

Defined in: src/pluto/Pluto.ts:260

Credential Metadata *

Parameters

ParameterType
metadataCredentialMetadata

Returns

Promise<void>

Implementation of

Pluto.storeCredentialMetadata


storeDID()

storeDID(did: DID, keys?: Arrayable<PrivateKey>, alias?: string): Promise<void>

Defined in: src/pluto/Pluto.ts:296

DIDs *

Parameters

ParameterType
didDID
keys?Arrayable<PrivateKey>
alias?string

Returns

Promise<void>

Implementation of

Pluto.storeDID


storeDIDPair()

storeDIDPair(host: DID, receiver: DID, alias: string): Promise<void>

Defined in: src/pluto/Pluto.ts:424

DID Pairs *

Parameters

ParameterType
hostDID
receiverDID
aliasstring

Returns

Promise<void>

Implementation of

Pluto.storeDIDPair


storeLinkSecret()

storeLinkSecret(linkSecret: LinkSecret): Promise<void>

Defined in: src/pluto/Pluto.ts:271

LinkSecret *

Parameters

ParameterType
linkSecretLinkSecret

Returns

Promise<void>

Implementation of

Pluto.storeLinkSecret


storeMediator()

storeMediator(mediator: Mediator): Promise<void>

Defined in: src/pluto/Pluto.ts:524

Store a mediator information.

Parameters

ParameterType
mediatorMediator

Returns

Promise<void>

Implementation of

Pluto.storeMediator


storeMessage()

storeMessage(message: Message): Promise<void>

Defined in: src/pluto/Pluto.ts:403

Messages *

Parameters

ParameterType
messageMessage

Returns

Promise<void>

Implementation of

Pluto.storeMessage


storeMessages()

storeMessages(messages: Message[]): Promise<void>

Defined in: src/pluto/Pluto.ts:407

Store an array of DIDComm messages

Parameters

ParameterType
messagesMessage[]

Returns

Promise<void>

Implementation of

Pluto.storeMessages


storePeerDID()

storePeerDID(did: DID, privateKeys: PrivateKey[]): Promise<void>

Defined in: src/pluto/Pluto.ts:351

Peer DIDs *

Parameters

ParameterType
didDID
privateKeysPrivateKey[]

Returns

Promise<void>

Implementation of

Pluto.storePeerDID


storePrismDID()

storePrismDID(did: DID, privateKey: PrivateKey, alias?: string): Promise<void>

Defined in: src/pluto/Pluto.ts:310

Prism DIDs *

Parameters

ParameterType
didDID
privateKeyPrivateKey
alias?string

Returns

Promise<void>

Implementation of

Pluto.storePrismDID


storePrivateKey()

storePrivateKey(privateKey: PrivateKey): Promise<void>

Defined in: src/pluto/Pluto.ts:282

PrivateKeys *

Parameters

ParameterType
privateKeyPrivateKey

Returns

Promise<void>

Implementation of

Pluto.storePrivateKey