Skip to main content

@atala/prism-wallet-sdk / Exports / Domain / Pluto

Interface: Pluto

Domain.Pluto

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.

Implemented by

Table of contents

Methods

Methods

backup

backup(): 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 = linksecret; mediators: { holder_did: string ; mediator_did: string ; routing_did: string }[] ; messages: string[] ; version?: "0.0.1" }>

create a Backup object from the stored data

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 = linksecret; mediators: { holder_did: string ; mediator_did: string ; routing_did: string }[] ; messages: string[] ; version?: "0.0.1" }>

Defined in

src/domain/buildingBlocks/Pluto.ts:44


deleteMessage

deleteMessage(uuid): Promise<void>

Delete a previously stored messages

Parameters

NameType
uuidstring

Returns

Promise<void>

Defined in

src/domain/buildingBlocks/Pluto.ts:179


getAllCredentials

getAllCredentials(): Promise<Credential[]>

Retrieve all the stored credentials

Returns

Promise<Credential[]>

Defined in

src/domain/buildingBlocks/Pluto.ts:159


getAllDidPairs

getAllDidPairs(): Promise<DIDPair[]>

Retrieve all stored DID pairs (DIDComm connections).

Returns

Promise<DIDPair[]>

Defined in

src/domain/buildingBlocks/Pluto.ts:129


getAllMediators

getAllMediators(): Promise<Mediator[]>

Retrieve all stored mediators.

Returns

Promise<Mediator[]>

Defined in

src/domain/buildingBlocks/Pluto.ts:154


getAllMessages

getAllMessages(): Promise<Message[]>

Retrieve all stored DIDComm messages.

Returns

Promise<Message[]>

Defined in

src/domain/buildingBlocks/Pluto.ts:144


getAllPeerDIDs

getAllPeerDIDs(): Promise<PeerDID[]>

Retrieve all stored Peer DIDs.

Returns

Promise<PeerDID[]>

Defined in

src/domain/buildingBlocks/Pluto.ts:119


getAllPrismDIDs

getAllPrismDIDs(): Promise<PrismDID[]>

Retrieve all stored PRISM DIDs.

Returns

Promise<PrismDID[]>

Defined in

src/domain/buildingBlocks/Pluto.ts:114


getCredentialMetadata

getCredentialMetadata(name): Promise<null | CredentialMetadata>

Fetch the Credential Metadata by its name

Parameters

NameType
namestring

Returns

Promise<null | CredentialMetadata>

Defined in

src/domain/buildingBlocks/Pluto.ts:61


getDIDPrivateKeysByDID

getDIDPrivateKeysByDID(did): Promise<PrivateKey[]>

Retrieve available private keys for a given DID.

Parameters

NameType
didDID

Returns

Promise<PrivateKey[]>

Defined in

src/domain/buildingBlocks/Pluto.ts:124


getLinkSecret

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

Retrieve the stored link secret by its name

Parameters

NameType
name?string

Returns

Promise<null | LinkSecret>

Defined in

src/domain/buildingBlocks/Pluto.ts:164


getMessage

getMessage(id): Promise<null | Message>

Retrieve a DIDComm message by ID.

Parameters

NameType
idstring

Returns

Promise<null | Message>

Defined in

src/domain/buildingBlocks/Pluto.ts:149


getPairByDID

getPairByDID(did): Promise<null | DIDPair>

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

Parameters

NameType
didDID

Returns

Promise<null | DIDPair>

Defined in

src/domain/buildingBlocks/Pluto.ts:134


getPairByName

getPairByName(name): Promise<null | DIDPair>

Retrieve a DID pair by a given pair name.

Parameters

NameType
namestring

Returns

Promise<null | DIDPair>

Defined in

src/domain/buildingBlocks/Pluto.ts:139


restore

restore(backup): Promise<void>

load the given data into the store

Parameters

NameTypeDefault value
backupObjectundefined
backup.credentials{ data: string ; recovery_id: string }[]undefined
backup.did_pairs{ alias: string ; holder: string ; recipient: string }[]undefined
backup.dids{ alias?: string ; did: string }[]undefined
backup.keys{ did?: string ; index?: number ; key: string ; recovery_id: string }[]undefined
backup.link_secret?stringlinksecret
backup.mediators{ holder_did: string ; mediator_did: string ; routing_did: string }[]undefined
backup.messagesstring[]undefined
backup.version?"0.0.1"undefined

Returns

Promise<void>

Defined in

src/domain/buildingBlocks/Pluto.ts:50


revokeCredential

revokeCredential(credential): Promise<void>

Revoke a Credential

Parameters

NameType
credentialCredential

Returns

Promise<void>

Defined in

src/domain/buildingBlocks/Pluto.ts:174


start

start(): Promise<void>

Pluto initialise function

Returns

Promise<void>

Defined in

src/domain/buildingBlocks/Pluto.ts:39


storeCredential

storeCredential(credential): Promise<void>

Store a Credential into the Database

Parameters

NameType
credentialCredential

Returns

Promise<void>

Defined in

src/domain/buildingBlocks/Pluto.ts:109


storeCredentialMetadata

storeCredentialMetadata(metadata): Promise<void>

Store the Credential Metadata

Parameters

NameType
metadataCredentialMetadata

Returns

Promise<void>

Defined in

src/domain/buildingBlocks/Pluto.ts:55


storeDID

storeDID(did, keys?, alias?): Promise<void>

Store a DID with optional private key(s) and alias

Parameters

NameType
didDID
keys?Arrayable<PrivateKey>
alias?string

Returns

Promise<void>

Defined in

src/domain/buildingBlocks/Pluto.ts:67


storeDIDPair

storeDIDPair(host, receiver, name): Promise<void>

Store a named pair of DIDs representing a DIDComm connection.

Parameters

NameType
hostDID
receiverDID
namestring

Returns

Promise<void>

Defined in

src/domain/buildingBlocks/Pluto.ts:84


storeLinkSecret

storeLinkSecret(linkSecret): Promise<void>

Store a new linkSecret

Parameters

NameType
linkSecretLinkSecret

Returns

Promise<void>

Defined in

src/domain/buildingBlocks/Pluto.ts:169


storeMediator

storeMediator(mediator): Promise<void>

Store a mediator information.

Parameters

NameType
mediatorMediator

Returns

Promise<void>

Defined in

src/domain/buildingBlocks/Pluto.ts:104


storeMessage

storeMessage(message): Promise<void>

Store a DIDComm message.

Parameters

NameType
messageMessage

Returns

Promise<void>

Defined in

src/domain/buildingBlocks/Pluto.ts:89


storeMessages

storeMessages(messages): Promise<void>

Store an array of DIDComm messages

Parameters

NameType
messagesMessage[]

Returns

Promise<void>

Defined in

src/domain/buildingBlocks/Pluto.ts:94


storePeerDID

storePeerDID(did, privateKeys): Promise<void>

Store a Peer DID and an array of its privateKeys.

Parameters

NameType
didDID
privateKeysPrivateKey[]

Returns

Promise<void>

Deprecated

use storeDID instead

Defined in

src/domain/buildingBlocks/Pluto.ts:79


storePrismDID

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

Store a PRISM DID and its private key with given metadata.

Parameters

NameType
didDID
privateKeyPrivateKey
alias?string

Returns

Promise<void>

Deprecated

use storeDID instead

Defined in

src/domain/buildingBlocks/Pluto.ts:73


storePrivateKey

storePrivateKey(privateKey): Promise<void>

Store a list of private keys with its metadata and a reference to the DID it belongs to.

Parameters

NameType
privateKeyPrivateKey

Returns

Promise<void>

Defined in

src/domain/buildingBlocks/Pluto.ts:99