@learncard/core 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.d.ts CHANGED
@@ -4625,12 +4625,13 @@ export declare type EthereumConfig = {
4625
4625
  network?: providers.Networkish;
4626
4626
  };
4627
4627
  export declare type IDXPluginMethods = {
4628
- getCredentialsListFromIndex: (alias?: string) => Promise<CredentialsList>;
4628
+ getCredentialsListFromIdx: (alias?: string) => Promise<CredentialsList>;
4629
4629
  publishContentToCeramic: (cred: any) => Promise<string>;
4630
4630
  readContentFromCeramic: (streamId: string) => Promise<any>;
4631
- getVerifiableCredentialFromIndex: (title: string) => Promise<any>;
4632
- getVerifiableCredentialsFromIndex: () => Promise<any>;
4631
+ getVerifiableCredentialFromIdx: (title: string) => Promise<VC>;
4632
+ getVerifiableCredentialsFromIdx: () => Promise<VC[]>;
4633
4633
  addVerifiableCredentialInIdx: (cred: IDXCredential) => Promise<StreamID>;
4634
+ removeVerifiableCredentialInIdx: (title: string) => Promise<StreamID>;
4634
4635
  };
4635
4636
  declare enum StorageType {
4636
4637
  ceramic = "ceramic"
@@ -4707,9 +4708,11 @@ export declare type LearnCardWallet = {
4707
4708
  */
4708
4709
  verifyPresentation: (presentation: VP) => Promise<VerificationCheck>;
4709
4710
  /** Returns the credential marked with `title` from IDX */
4710
- getCredential: (title: string) => Promise<any>;
4711
+ getCredential: (title: string) => Promise<VC>;
4711
4712
  /** Returns all credentials from IDX */
4712
- getCredentials: () => Promise<any[]>;
4713
+ getCredentials: () => Promise<VC[]>;
4714
+ /** Returns all credentials from IDX */
4715
+ getCredentialsList: () => Promise<IDXCredential[]>;
4713
4716
  /**
4714
4717
  * Publishes a credential to Ceramic, returning the credential's stream ID
4715
4718
  *
@@ -4717,7 +4720,7 @@ export declare type LearnCardWallet = {
4717
4720
  *
4718
4721
  * Resolving a stream ID can be done by passing the stream ID to `readFromCeramic`
4719
4722
  */
4720
- publishCredential: (credential: any) => Promise<string>;
4723
+ publishCredential: (credential: VC) => Promise<string>;
4721
4724
  /**
4722
4725
  * Adds a stream ID pointing to a credential (such as the one returned by `publishCredential`)
4723
4726
  * to IDX with a bespoke title
@@ -4726,6 +4729,14 @@ export declare type LearnCardWallet = {
4726
4729
  * or by using `getCredentials` to get a list of all credentials that have been added to IDX
4727
4730
  */
4728
4731
  addCredential: (credential: IDXCredential) => Promise<void>;
4732
+ /**
4733
+ * Adds a stream ID pointing to a credential (such as the one returned by `publishCredential`)
4734
+ * to IDX with a bespoke title
4735
+ *
4736
+ * The credential may then be retrieved using `getCredential` and passing in that bespoke title,
4737
+ * or by using `getCredentials` to get a list of all credentials that have been added to IDX
4738
+ */
4739
+ removeCredential: (title: string) => Promise<void>;
4729
4740
  /**
4730
4741
  * Resolves a stream ID, returning its contents
4731
4742
  *