@learncard/core 8.0.1 → 8.0.4

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
@@ -1,6 +1,4 @@
1
- // Generated by dts-bundle-generator v5.9.0
2
-
3
- /// <reference types="node" />
1
+ // Generated by dts-bundle-generator v6.13.0
4
2
 
5
3
  import { CeramicClient } from '@ceramicnetwork/http-client';
6
4
  import { StreamID } from '@ceramicnetwork/streamid';
@@ -1138,7 +1136,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
1138
1136
  "@context": z.ZodArray<z.ZodString, "many">;
1139
1137
  id: z.ZodOptional<z.ZodString>;
1140
1138
  type: z.ZodArray<z.ZodString, "atleastone">;
1141
- verifiableCredential: z.ZodUnion<[
1139
+ verifiableCredential: z.ZodOptional<z.ZodUnion<[
1142
1140
  z.ZodObject<z.extendShape<{
1143
1141
  "@context": z.ZodArray<z.ZodString, "many">;
1144
1142
  id: z.ZodOptional<z.ZodString>;
@@ -2369,18 +2367,12 @@ declare const UnsignedVPValidator: z.ZodObject<{
2369
2367
  verificationMethod: string;
2370
2368
  }[];
2371
2369
  }>, "many">
2372
- ]>;
2370
+ ]>>;
2373
2371
  holder: z.ZodOptional<z.ZodString>;
2374
2372
  }, "strip", z.ZodAny, {
2375
2373
  [x: string]: any;
2376
2374
  id?: string | undefined;
2377
- holder?: string | undefined;
2378
- type: [
2379
- string,
2380
- ...string[]
2381
- ];
2382
- "@context": string[];
2383
- verifiableCredential: {
2375
+ verifiableCredential?: {
2384
2376
  [x: string]: any;
2385
2377
  id?: string | undefined;
2386
2378
  expirationDate?: string | undefined;
@@ -2598,17 +2590,17 @@ declare const UnsignedVPValidator: z.ZodObject<{
2598
2590
  proofPurpose: string;
2599
2591
  verificationMethod: string;
2600
2592
  }[];
2601
- }[];
2602
- }, {
2603
- [x: string]: any;
2604
- id?: string | undefined;
2593
+ }[] | undefined;
2605
2594
  holder?: string | undefined;
2606
2595
  type: [
2607
2596
  string,
2608
2597
  ...string[]
2609
2598
  ];
2610
2599
  "@context": string[];
2611
- verifiableCredential: {
2600
+ }, {
2601
+ [x: string]: any;
2602
+ id?: string | undefined;
2603
+ verifiableCredential?: {
2612
2604
  [x: string]: any;
2613
2605
  id?: string | undefined;
2614
2606
  expirationDate?: string | undefined;
@@ -2826,14 +2818,20 @@ declare const UnsignedVPValidator: z.ZodObject<{
2826
2818
  proofPurpose: string;
2827
2819
  verificationMethod: string;
2828
2820
  }[];
2829
- }[];
2821
+ }[] | undefined;
2822
+ holder?: string | undefined;
2823
+ type: [
2824
+ string,
2825
+ ...string[]
2826
+ ];
2827
+ "@context": string[];
2830
2828
  }>;
2831
2829
  export declare type UnsignedVP = z.infer<typeof UnsignedVPValidator>;
2832
2830
  declare const VPValidator: z.ZodObject<z.extendShape<{
2833
2831
  "@context": z.ZodArray<z.ZodString, "many">;
2834
2832
  id: z.ZodOptional<z.ZodString>;
2835
2833
  type: z.ZodArray<z.ZodString, "atleastone">;
2836
- verifiableCredential: z.ZodUnion<[
2834
+ verifiableCredential: z.ZodOptional<z.ZodUnion<[
2837
2835
  z.ZodObject<z.extendShape<{
2838
2836
  "@context": z.ZodArray<z.ZodString, "many">;
2839
2837
  id: z.ZodOptional<z.ZodString>;
@@ -4064,7 +4062,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
4064
4062
  verificationMethod: string;
4065
4063
  }[];
4066
4064
  }>, "many">
4067
- ]>;
4065
+ ]>>;
4068
4066
  holder: z.ZodOptional<z.ZodString>;
4069
4067
  }, {
4070
4068
  proof: z.ZodUnion<[
@@ -4132,34 +4130,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
4132
4130
  }>, "strip", z.ZodAny, {
4133
4131
  [x: string]: any;
4134
4132
  id?: string | undefined;
4135
- holder?: string | undefined;
4136
- type: [
4137
- string,
4138
- ...string[]
4139
- ];
4140
- "@context": string[];
4141
- proof: {
4142
- [x: string]: any;
4143
- challenge?: string | undefined;
4144
- domain?: string | undefined;
4145
- nonce?: string | undefined;
4146
- jws?: string | undefined;
4147
- type: string;
4148
- created: string;
4149
- proofPurpose: string;
4150
- verificationMethod: string;
4151
- } | {
4152
- [x: string]: any;
4153
- challenge?: string | undefined;
4154
- domain?: string | undefined;
4155
- nonce?: string | undefined;
4156
- jws?: string | undefined;
4157
- type: string;
4158
- created: string;
4159
- proofPurpose: string;
4160
- verificationMethod: string;
4161
- }[];
4162
- verifiableCredential: {
4133
+ verifiableCredential?: {
4163
4134
  [x: string]: any;
4164
4135
  id?: string | undefined;
4165
4136
  expirationDate?: string | undefined;
@@ -4377,10 +4348,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
4377
4348
  proofPurpose: string;
4378
4349
  verificationMethod: string;
4379
4350
  }[];
4380
- }[];
4381
- }, {
4382
- [x: string]: any;
4383
- id?: string | undefined;
4351
+ }[] | undefined;
4384
4352
  holder?: string | undefined;
4385
4353
  type: [
4386
4354
  string,
@@ -4408,7 +4376,10 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
4408
4376
  proofPurpose: string;
4409
4377
  verificationMethod: string;
4410
4378
  }[];
4411
- verifiableCredential: {
4379
+ }, {
4380
+ [x: string]: any;
4381
+ id?: string | undefined;
4382
+ verifiableCredential?: {
4412
4383
  [x: string]: any;
4413
4384
  id?: string | undefined;
4414
4385
  expirationDate?: string | undefined;
@@ -4626,6 +4597,33 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
4626
4597
  proofPurpose: string;
4627
4598
  verificationMethod: string;
4628
4599
  }[];
4600
+ }[] | undefined;
4601
+ holder?: string | undefined;
4602
+ type: [
4603
+ string,
4604
+ ...string[]
4605
+ ];
4606
+ "@context": string[];
4607
+ proof: {
4608
+ [x: string]: any;
4609
+ challenge?: string | undefined;
4610
+ domain?: string | undefined;
4611
+ nonce?: string | undefined;
4612
+ jws?: string | undefined;
4613
+ type: string;
4614
+ created: string;
4615
+ proofPurpose: string;
4616
+ verificationMethod: string;
4617
+ } | {
4618
+ [x: string]: any;
4619
+ challenge?: string | undefined;
4620
+ domain?: string | undefined;
4621
+ nonce?: string | undefined;
4622
+ jws?: string | undefined;
4623
+ type: string;
4624
+ created: string;
4625
+ proofPurpose: string;
4626
+ verificationMethod: string;
4629
4627
  }[];
4630
4628
  }>;
4631
4629
  export declare type VP = z.infer<typeof VPValidator>;
@@ -4751,6 +4749,7 @@ export declare type IndexPlane = {
4751
4749
  add: <Metadata extends Record<string, any> = Record<never, never>>(obj: CredentialRecord<Metadata>, options?: PlaneOptions) => Promise<boolean>;
4752
4750
  update: (id: string, updates: Record<string, any>, options?: PlaneOptions) => Promise<boolean>;
4753
4751
  remove: (id: string, options?: PlaneOptions) => Promise<boolean>;
4752
+ removeAll?: (options?: PlaneOptions) => Promise<boolean>;
4754
4753
  };
4755
4754
  export declare type PluginIndexPlane = IndexPlane;
4756
4755
  export declare type LearnCardIndexPlane<Plugins extends Plugin[]> = {
@@ -4955,6 +4954,11 @@ export declare type VcTemplates = {
4955
4954
  criteriaNarrative?: string;
4956
4955
  issuanceDate?: string;
4957
4956
  };
4957
+ jff2: {
4958
+ did?: string;
4959
+ subject?: string;
4960
+ issuanceDate?: string;
4961
+ };
4958
4962
  };
4959
4963
  /** @group VC Templates Plugin */
4960
4964
  export declare type NewCredentialFunction = (args?: DiscriminatedUnionize<VcTemplates>) => UnsignedVC;
@@ -5023,6 +5027,7 @@ export declare type IDXPluginMethods = {
5023
5027
  getVerifiableCredentialsFromIdx: () => Promise<VC[]>;
5024
5028
  addVerifiableCredentialInIdx: <Metadata extends Record<string, any> = Record<never, never>>(cred: CredentialRecord<Metadata>) => Promise<string>;
5025
5029
  removeVerifiableCredentialInIdx: (title: string) => Promise<StreamID>;
5030
+ removeAllVerifiableCredentialsInIdx: () => Promise<StreamID>;
5026
5031
  };
5027
5032
  /** @group IDXPlugin */
5028
5033
  export declare type IDXPluginDependentMethods<URI extends string = ""> = {
@@ -5940,7 +5945,7 @@ export declare const getTestCache: () => TestCachePlugin;
5940
5945
  /**
5941
5946
  * @group Plugins
5942
5947
  */
5943
- export declare const getVCAPIPlugin: ({ url, did, }: {
5948
+ export declare const getVCAPIPlugin: ({ url: _url, did: _did, }: {
5944
5949
  url: string;
5945
5950
  did?: string;
5946
5951
  }) => Promise<VCAPIPlugin>;
@@ -5948,10 +5953,5 @@ export declare const getVCAPIPlugin: ({ url, did, }: {
5948
5953
  * @group Plugins
5949
5954
  */
5950
5955
  export declare const getVpqrPlugin: (learnCard: LearnCard<any, any, VpqrPluginDependentMethods>) => VpqrPlugin;
5951
- export * from "@wallet/init";
5952
- export { LearnCard, Plugin } from "types/wallet";
5953
- export * from "types/LearnCard";
5954
- export * from "@wallet/base";
5955
- export * from "@wallet/plugins";
5956
5956
 
5957
5957
  export {};