Skip to content

Commit

Permalink
docs!: Introduced breaking changes in Pluto as we are intro… (hyperle…
Browse files Browse the repository at this point in the history
…dger#116)

BREAKING CHANGE: Introduced breaking changes in Pluto as we are introducing credential abstraction and anoncred issuing functionality.
- X25519 keys were wrongly set as EC (elliptic) key types which is wrong. EC25519 + Secp256k1 belong to EC key type, X25519 should have Curve25519 instead to be valid. If you previously had a key stored as EC (x25519) changing that keyType to KeyTypes.X25519 (Curve25519).
- As we have introduced new credential types we have also built a credential abstraction so storing and fetching credentials becomes easier.
  • Loading branch information
elribonazo authored Nov 7, 2023
1 parent 14389a1 commit be8c6e8
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/domain/buildingBlocks/Pluto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,24 @@ import { Anoncreds } from "../models/Anoncreds";
*
*/
export interface Pluto {
/**
* Store the AnonCreds Credential Metadata referencing its linkSecret name
*/
storeCredentialMetadata(
metadata: Anoncreds.CredentialRequestMeta,
linkSecret: Anoncreds.LinkSecret
): Promise<void>;

/**
* Fetch the AnonCreds Credential Metadata by its linkSecret name
*/
fetchCredentialMetadata(
linkSecretName: string
): Promise<Anoncreds.CredentialRequestMeta | null>;

/**
* Pluto initialise function
*/
start(): Promise<void>;

/**
Expand Down Expand Up @@ -72,6 +81,9 @@ export interface Pluto {
*/
storeMediator(mediator: DID, host: DID, routing: DID): Promise<void>;

/**
* Store a Credential into the Database
*/
storeCredential(credential: Credential): Promise<void>;

/**
Expand Down Expand Up @@ -184,10 +196,19 @@ export interface Pluto {
*/
getAllMediators(): Promise<Array<Mediator>>;

/**
* Retrieve all the stored credentials
*/
getAllCredentials(): Promise<Array<Credential>>;

/**
* Retrieve the anoncreds stored link secret by its name
*/
getLinkSecret(linkSecretName?: string): Promise<Anoncreds.LinkSecret | null>;

/**
* Store a new anoncreds linkSecret
*/
storeLinkSecret(
linkSecret: Anoncreds.LinkSecret,
linkSecretName: string
Expand Down

0 comments on commit be8c6e8

Please sign in to comment.