@hyperledger/identus-edge-agent-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
- backup
- deleteMessage
- getAllCredentials
- getAllDidPairs
- getAllMediators
- getAllMessages
- getAllPeerDIDs
- getAllPrismDIDs
- getCredentialMetadata
- getDIDPrivateKeysByDID
- getLinkSecret
- getMessage
- getPairByDID
- getPairByName
- restore
- revokeCredential
- start
- stop
- storeCredential
- storeCredentialMetadata
- storeDID
- storeDIDPair
- storeLinkSecret
- storeMediator
- storeMessage
- storeMessages
- storePeerDID
- storePrismDID
- storePrivateKey
Methods
backup
▸ backup(version?
): 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
Parameters
Name | 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
= linksecret; mediators
: { holder_did
: string
; mediator_did
: string
; routing_did
: string
}[] ; messages
: string
[] ; version?
: "0.0.1"
}>
Defined in
src/domain/buildingBlocks/Pluto.ts:47
deleteMessage
▸ deleteMessage(uuid
): Promise
<void
>
Delete a previously stored messages
Parameters
Name | Type |
---|---|
uuid | string |
Returns
Promise
<void
>
Defined in
src/domain/buildingBlocks/Pluto.ts:182
getAllCredentials
▸ getAllCredentials(): Promise
<Credential
[]>
Retrieve all the stored credentials
Returns
Promise
<Credential
[]>
Defined in
src/domain/buildingBlocks/Pluto.ts:162
getAllDidPairs
▸ getAllDidPairs(): Promise
<DIDPair
[]>
Retrieve all stored DID pairs (DIDComm connections).
Returns
Promise
<DIDPair
[]>
Defined in
src/domain/buildingBlocks/Pluto.ts:132
getAllMediators
▸ getAllMediators(): Promise
<Mediator
[]>
Retrieve all stored mediators.
Returns
Promise
<Mediator
[]>
Defined in
src/domain/buildingBlocks/Pluto.ts:157
getAllMessages
▸ getAllMessages(): Promise
<Message
[]>
Retrieve all stored DIDComm messages.
Returns
Promise
<Message
[]>
Defined in
src/domain/buildingBlocks/Pluto.ts:147
getAllPeerDIDs
▸ getAllPeerDIDs(): Promise
<PeerDID
[]>
Retrieve all stored Peer DIDs.
Returns
Promise
<PeerDID
[]>
Defined in
src/domain/buildingBlocks/Pluto.ts:122
getAllPrismDIDs
▸ getAllPrismDIDs(): Promise
<PrismDID
[]>
Retrieve all stored PRISM DIDs.
Returns
Promise
<PrismDID
[]>
Defined in
src/domain/buildingBlocks/Pluto.ts:117
getCredentialMetadata
▸ getCredentialMetadata(name
): Promise
<null
| CredentialMetadata
>
Fetch the Credential Metadata by its name
Parameters
Name | Type |
---|---|
name | string |
Returns
Promise
<null
| CredentialMetadata
>
Defined in
src/domain/buildingBlocks/Pluto.ts:64
getDIDPrivateKeysByDID
▸ getDIDPrivateKeysByDID(did
): Promise
<PrivateKey
[]>
Retrieve available private keys for a given DID.
Parameters
Name | Type |
---|---|
did | DID |
Returns
Promise
<PrivateKey
[]>
Defined in
src/domain/buildingBlocks/Pluto.ts:127
getLinkSecret
▸ getLinkSecret(name?
): Promise
<null
| LinkSecret
>
Retrieve the stored link secret by its name
Parameters
Name | Type |
---|---|
name? | string |
Returns
Promise
<null
| LinkSecret
>
Defined in
src/domain/buildingBlocks/Pluto.ts:167
getMessage
▸ getMessage(id
): Promise
<null
| Message
>
Retrieve a DIDComm message by ID.
Parameters
Name | Type |
---|---|
id | string |
Returns
Promise
<null
| Message
>
Defined in
src/domain/buildingBlocks/Pluto.ts:152
getPairByDID
▸ getPairByDID(did
): Promise
<null
| DIDPair
>
Retrieve a DID pair containing a given DID as either host or receiver.
Parameters
Name | Type |
---|---|
did | DID |
Returns
Promise
<null
| DIDPair
>
Defined in
src/domain/buildingBlocks/Pluto.ts:137
getPairByName
▸ getPairByName(name
): Promise
<null
| DIDPair
>
Retrieve a DID pair by a given pair name.
Parameters
Name | Type |
---|---|
name | string |
Returns
Promise
<null
| DIDPair
>
Defined in
src/domain/buildingBlocks/Pluto.ts:142
restore
▸ restore(backup
): Promise
<void
>
load the given data into the store
Parameters
Name | Type | Default value |
---|---|---|
backup | Object | undefined |
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? | string | linksecret |
backup.mediators | { holder_did : string ; mediator_did : string ; routing_did : string }[] | undefined |
backup.messages | string [] | undefined |
backup.version? | "0.0.1" | undefined |
Returns
Promise
<void
>
Defined in
src/domain/buildingBlocks/Pluto.ts:53
revokeCredential
▸ revokeCredential(credential
): Promise
<void
>
Revoke a Credential
Parameters
Name | Type |
---|---|
credential | Credential |
Returns
Promise
<void
>
Defined in
src/domain/buildingBlocks/Pluto.ts:177
start
▸ start(): Promise
<void
>
Pluto initialise function
Returns
Promise
<void
>
Defined in
src/domain/buildingBlocks/Pluto.ts:41
stop
▸ stop(): Promise
<void
>
Returns
Promise
<void
>
Defined in
src/domain/buildingBlocks/Pluto.ts:42
storeCredential
▸ storeCredential(credential
): Promise
<void
>
Store a Credential into the Database
Parameters
Name | Type |
---|---|
credential | Credential |
Returns
Promise
<void
>
Defined in
src/domain/buildingBlocks/Pluto.ts:112
storeCredentialMetadata
▸ storeCredentialMetadata(metadata
): Promise
<void
>
Store the Credential Metadata
Parameters
Name | Type |
---|---|
metadata | CredentialMetadata |
Returns
Promise
<void
>
Defined in
src/domain/buildingBlocks/Pluto.ts:58
storeDID
▸ storeDID(did
, keys?
, alias?
): Promise
<void
>
Store a DID with optional private key(s) and alias
Parameters
Name | Type |
---|---|
did | DID |
keys? | Arrayable <PrivateKey > |
alias? | string |
Returns
Promise
<void
>
Defined in
src/domain/buildingBlocks/Pluto.ts:70
storeDIDPair
▸ storeDIDPair(host
, receiver
, name
): Promise
<void
>
Store a named pair of DIDs representing a DIDComm connection.
Parameters
Name | Type |
---|---|
host | DID |
receiver | DID |
name | string |
Returns
Promise
<void
>
Defined in
src/domain/buildingBlocks/Pluto.ts:87
storeLinkSecret
▸ storeLinkSecret(linkSecret
): Promise
<void
>
Store a new linkSecret
Parameters
Name | Type |
---|---|
linkSecret | LinkSecret |
Returns
Promise
<void
>
Defined in
src/domain/buildingBlocks/Pluto.ts:172
storeMediator
▸ storeMediator(mediator
): Promise
<void
>
Store a mediator information.
Parameters
Name | Type |
---|---|
mediator | Mediator |
Returns
Promise
<void
>
Defined in
src/domain/buildingBlocks/Pluto.ts:107
storeMessage
▸ storeMessage(message
): Promise
<void
>
Store a DIDComm message.
Parameters
Name | Type |
---|---|
message | Message |
Returns
Promise
<void
>
Defined in
src/domain/buildingBlocks/Pluto.ts:92
storeMessages
▸ storeMessages(messages
): Promise
<void
>
Store an array of DIDComm messages
Parameters
Name | Type |
---|---|
messages | Message [] |
Returns
Promise
<void
>
Defined in
src/domain/buildingBlocks/Pluto.ts:97
storePeerDID
▸ storePeerDID(did
, privateKeys
): Promise
<void
>
Store a Peer DID and an array of its privateKeys.
Parameters
Name | Type |
---|---|
did | DID |
privateKeys | PrivateKey [] |
Returns
Promise
<void
>
Deprecated
use storeDID instead
Defined in
src/domain/buildingBlocks/Pluto.ts:82
storePrismDID
▸ storePrismDID(did
, privateKey
, alias?
): Promise
<void
>
Store a PRISM DID and its private key with given metadata.
Parameters
Name | Type |
---|---|
did | DID |
privateKey | PrivateKey |
alias? | string |
Returns
Promise
<void
>
Deprecated
use storeDID instead
Defined in
src/domain/buildingBlocks/Pluto.ts:76
storePrivateKey
▸ storePrivateKey(privateKey
): Promise
<void
>
Store a list of private keys with its metadata and a reference to the DID it belongs to.
Parameters
Name | Type |
---|---|
privateKey | PrivateKey |
Returns
Promise
<void
>