@learncard/core 6.4.0 → 7.0.1

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
@@ -14,7 +14,10 @@ declare const UnsignedVCValidator: z.ZodObject<{
14
14
  z.ZodString,
15
15
  z.ZodObject<{
16
16
  id: z.ZodOptional<z.ZodString>;
17
- type: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
17
+ type: z.ZodUnion<[
18
+ z.ZodString,
19
+ z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>
20
+ ]>;
18
21
  name: z.ZodOptional<z.ZodString>;
19
22
  url: z.ZodOptional<z.ZodString>;
20
23
  phone: z.ZodOptional<z.ZodString>;
@@ -168,7 +171,7 @@ declare const UnsignedVCValidator: z.ZodObject<{
168
171
  dateOfBirth: z.ZodOptional<z.ZodString>;
169
172
  }, "strip", z.ZodAny, {
170
173
  [x: string]: any;
171
- type?: [
174
+ type?: string | [
172
175
  string,
173
176
  ...string[]
174
177
  ] | undefined;
@@ -225,7 +228,7 @@ declare const UnsignedVCValidator: z.ZodObject<{
225
228
  dateOfBirth?: string | undefined;
226
229
  }, {
227
230
  [x: string]: any;
228
- type?: [
231
+ type?: string | [
229
232
  string,
230
233
  ...string[]
231
234
  ] | undefined;
@@ -360,7 +363,7 @@ declare const UnsignedVCValidator: z.ZodObject<{
360
363
  "@context": string[];
361
364
  issuer: string | {
362
365
  [x: string]: any;
363
- type?: [
366
+ type?: string | [
364
367
  string,
365
368
  ...string[]
366
369
  ] | undefined;
@@ -448,7 +451,7 @@ declare const UnsignedVCValidator: z.ZodObject<{
448
451
  "@context": string[];
449
452
  issuer: string | {
450
453
  [x: string]: any;
451
- type?: [
454
+ type?: string | [
452
455
  string,
453
456
  ...string[]
454
457
  ] | undefined;
@@ -522,7 +525,10 @@ declare const VCValidator: z.ZodObject<z.extendShape<{
522
525
  z.ZodString,
523
526
  z.ZodObject<{
524
527
  id: z.ZodOptional<z.ZodString>;
525
- type: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
528
+ type: z.ZodUnion<[
529
+ z.ZodString,
530
+ z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>
531
+ ]>;
526
532
  name: z.ZodOptional<z.ZodString>;
527
533
  url: z.ZodOptional<z.ZodString>;
528
534
  phone: z.ZodOptional<z.ZodString>;
@@ -676,7 +682,7 @@ declare const VCValidator: z.ZodObject<z.extendShape<{
676
682
  dateOfBirth: z.ZodOptional<z.ZodString>;
677
683
  }, "strip", z.ZodAny, {
678
684
  [x: string]: any;
679
- type?: [
685
+ type?: string | [
680
686
  string,
681
687
  ...string[]
682
688
  ] | undefined;
@@ -733,7 +739,7 @@ declare const VCValidator: z.ZodObject<z.extendShape<{
733
739
  dateOfBirth?: string | undefined;
734
740
  }, {
735
741
  [x: string]: any;
736
- type?: [
742
+ type?: string | [
737
743
  string,
738
744
  ...string[]
739
745
  ] | undefined;
@@ -931,7 +937,7 @@ declare const VCValidator: z.ZodObject<z.extendShape<{
931
937
  "@context": string[];
932
938
  issuer: string | {
933
939
  [x: string]: any;
934
- type?: [
940
+ type?: string | [
935
941
  string,
936
942
  ...string[]
937
943
  ] | undefined;
@@ -1040,7 +1046,7 @@ declare const VCValidator: z.ZodObject<z.extendShape<{
1040
1046
  "@context": string[];
1041
1047
  issuer: string | {
1042
1048
  [x: string]: any;
1043
- type?: [
1049
+ type?: string | [
1044
1050
  string,
1045
1051
  ...string[]
1046
1052
  ] | undefined;
@@ -1140,7 +1146,10 @@ declare const UnsignedVPValidator: z.ZodObject<{
1140
1146
  z.ZodString,
1141
1147
  z.ZodObject<{
1142
1148
  id: z.ZodOptional<z.ZodString>;
1143
- type: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
1149
+ type: z.ZodUnion<[
1150
+ z.ZodString,
1151
+ z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>
1152
+ ]>;
1144
1153
  name: z.ZodOptional<z.ZodString>;
1145
1154
  url: z.ZodOptional<z.ZodString>;
1146
1155
  phone: z.ZodOptional<z.ZodString>;
@@ -1294,7 +1303,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
1294
1303
  dateOfBirth: z.ZodOptional<z.ZodString>;
1295
1304
  }, "strip", z.ZodAny, {
1296
1305
  [x: string]: any;
1297
- type?: [
1306
+ type?: string | [
1298
1307
  string,
1299
1308
  ...string[]
1300
1309
  ] | undefined;
@@ -1351,7 +1360,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
1351
1360
  dateOfBirth?: string | undefined;
1352
1361
  }, {
1353
1362
  [x: string]: any;
1354
- type?: [
1363
+ type?: string | [
1355
1364
  string,
1356
1365
  ...string[]
1357
1366
  ] | undefined;
@@ -1549,7 +1558,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
1549
1558
  "@context": string[];
1550
1559
  issuer: string | {
1551
1560
  [x: string]: any;
1552
- type?: [
1561
+ type?: string | [
1553
1562
  string,
1554
1563
  ...string[]
1555
1564
  ] | undefined;
@@ -1658,7 +1667,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
1658
1667
  "@context": string[];
1659
1668
  issuer: string | {
1660
1669
  [x: string]: any;
1661
- type?: [
1670
+ type?: string | [
1662
1671
  string,
1663
1672
  ...string[]
1664
1673
  ] | undefined;
@@ -1752,7 +1761,10 @@ declare const UnsignedVPValidator: z.ZodObject<{
1752
1761
  z.ZodString,
1753
1762
  z.ZodObject<{
1754
1763
  id: z.ZodOptional<z.ZodString>;
1755
- type: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
1764
+ type: z.ZodUnion<[
1765
+ z.ZodString,
1766
+ z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>
1767
+ ]>;
1756
1768
  name: z.ZodOptional<z.ZodString>;
1757
1769
  url: z.ZodOptional<z.ZodString>;
1758
1770
  phone: z.ZodOptional<z.ZodString>;
@@ -1906,7 +1918,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
1906
1918
  dateOfBirth: z.ZodOptional<z.ZodString>;
1907
1919
  }, "strip", z.ZodAny, {
1908
1920
  [x: string]: any;
1909
- type?: [
1921
+ type?: string | [
1910
1922
  string,
1911
1923
  ...string[]
1912
1924
  ] | undefined;
@@ -1963,7 +1975,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
1963
1975
  dateOfBirth?: string | undefined;
1964
1976
  }, {
1965
1977
  [x: string]: any;
1966
- type?: [
1978
+ type?: string | [
1967
1979
  string,
1968
1980
  ...string[]
1969
1981
  ] | undefined;
@@ -2161,7 +2173,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
2161
2173
  "@context": string[];
2162
2174
  issuer: string | {
2163
2175
  [x: string]: any;
2164
- type?: [
2176
+ type?: string | [
2165
2177
  string,
2166
2178
  ...string[]
2167
2179
  ] | undefined;
@@ -2270,7 +2282,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
2270
2282
  "@context": string[];
2271
2283
  issuer: string | {
2272
2284
  [x: string]: any;
2273
- type?: [
2285
+ type?: string | [
2274
2286
  string,
2275
2287
  ...string[]
2276
2288
  ] | undefined;
@@ -2391,7 +2403,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
2391
2403
  "@context": string[];
2392
2404
  issuer: string | {
2393
2405
  [x: string]: any;
2394
- type?: [
2406
+ type?: string | [
2395
2407
  string,
2396
2408
  ...string[]
2397
2409
  ] | undefined;
@@ -2500,7 +2512,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
2500
2512
  "@context": string[];
2501
2513
  issuer: string | {
2502
2514
  [x: string]: any;
2503
- type?: [
2515
+ type?: string | [
2504
2516
  string,
2505
2517
  ...string[]
2506
2518
  ] | undefined;
@@ -2619,7 +2631,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
2619
2631
  "@context": string[];
2620
2632
  issuer: string | {
2621
2633
  [x: string]: any;
2622
- type?: [
2634
+ type?: string | [
2623
2635
  string,
2624
2636
  ...string[]
2625
2637
  ] | undefined;
@@ -2728,7 +2740,7 @@ declare const UnsignedVPValidator: z.ZodObject<{
2728
2740
  "@context": string[];
2729
2741
  issuer: string | {
2730
2742
  [x: string]: any;
2731
- type?: [
2743
+ type?: string | [
2732
2744
  string,
2733
2745
  ...string[]
2734
2746
  ] | undefined;
@@ -2829,7 +2841,10 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
2829
2841
  z.ZodString,
2830
2842
  z.ZodObject<{
2831
2843
  id: z.ZodOptional<z.ZodString>;
2832
- type: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
2844
+ type: z.ZodUnion<[
2845
+ z.ZodString,
2846
+ z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>
2847
+ ]>;
2833
2848
  name: z.ZodOptional<z.ZodString>;
2834
2849
  url: z.ZodOptional<z.ZodString>;
2835
2850
  phone: z.ZodOptional<z.ZodString>;
@@ -2983,7 +2998,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
2983
2998
  dateOfBirth: z.ZodOptional<z.ZodString>;
2984
2999
  }, "strip", z.ZodAny, {
2985
3000
  [x: string]: any;
2986
- type?: [
3001
+ type?: string | [
2987
3002
  string,
2988
3003
  ...string[]
2989
3004
  ] | undefined;
@@ -3040,7 +3055,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
3040
3055
  dateOfBirth?: string | undefined;
3041
3056
  }, {
3042
3057
  [x: string]: any;
3043
- type?: [
3058
+ type?: string | [
3044
3059
  string,
3045
3060
  ...string[]
3046
3061
  ] | undefined;
@@ -3238,7 +3253,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
3238
3253
  "@context": string[];
3239
3254
  issuer: string | {
3240
3255
  [x: string]: any;
3241
- type?: [
3256
+ type?: string | [
3242
3257
  string,
3243
3258
  ...string[]
3244
3259
  ] | undefined;
@@ -3347,7 +3362,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
3347
3362
  "@context": string[];
3348
3363
  issuer: string | {
3349
3364
  [x: string]: any;
3350
- type?: [
3365
+ type?: string | [
3351
3366
  string,
3352
3367
  ...string[]
3353
3368
  ] | undefined;
@@ -3441,7 +3456,10 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
3441
3456
  z.ZodString,
3442
3457
  z.ZodObject<{
3443
3458
  id: z.ZodOptional<z.ZodString>;
3444
- type: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>;
3459
+ type: z.ZodUnion<[
3460
+ z.ZodString,
3461
+ z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>
3462
+ ]>;
3445
3463
  name: z.ZodOptional<z.ZodString>;
3446
3464
  url: z.ZodOptional<z.ZodString>;
3447
3465
  phone: z.ZodOptional<z.ZodString>;
@@ -3595,7 +3613,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
3595
3613
  dateOfBirth: z.ZodOptional<z.ZodString>;
3596
3614
  }, "strip", z.ZodAny, {
3597
3615
  [x: string]: any;
3598
- type?: [
3616
+ type?: string | [
3599
3617
  string,
3600
3618
  ...string[]
3601
3619
  ] | undefined;
@@ -3652,7 +3670,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
3652
3670
  dateOfBirth?: string | undefined;
3653
3671
  }, {
3654
3672
  [x: string]: any;
3655
- type?: [
3673
+ type?: string | [
3656
3674
  string,
3657
3675
  ...string[]
3658
3676
  ] | undefined;
@@ -3850,7 +3868,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
3850
3868
  "@context": string[];
3851
3869
  issuer: string | {
3852
3870
  [x: string]: any;
3853
- type?: [
3871
+ type?: string | [
3854
3872
  string,
3855
3873
  ...string[]
3856
3874
  ] | undefined;
@@ -3959,7 +3977,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
3959
3977
  "@context": string[];
3960
3978
  issuer: string | {
3961
3979
  [x: string]: any;
3962
- type?: [
3980
+ type?: string | [
3963
3981
  string,
3964
3982
  ...string[]
3965
3983
  ] | undefined;
@@ -4164,7 +4182,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
4164
4182
  "@context": string[];
4165
4183
  issuer: string | {
4166
4184
  [x: string]: any;
4167
- type?: [
4185
+ type?: string | [
4168
4186
  string,
4169
4187
  ...string[]
4170
4188
  ] | undefined;
@@ -4273,7 +4291,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
4273
4291
  "@context": string[];
4274
4292
  issuer: string | {
4275
4293
  [x: string]: any;
4276
- type?: [
4294
+ type?: string | [
4277
4295
  string,
4278
4296
  ...string[]
4279
4297
  ] | undefined;
@@ -4413,7 +4431,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
4413
4431
  "@context": string[];
4414
4432
  issuer: string | {
4415
4433
  [x: string]: any;
4416
- type?: [
4434
+ type?: string | [
4417
4435
  string,
4418
4436
  ...string[]
4419
4437
  ] | undefined;
@@ -4522,7 +4540,7 @@ declare const VPValidator: z.ZodObject<z.extendShape<{
4522
4540
  "@context": string[];
4523
4541
  issuer: string | {
4524
4542
  [x: string]: any;
4525
- type?: [
4543
+ type?: string | [
4526
4544
  string,
4527
4545
  ...string[]
4528
4546
  ] | undefined;
@@ -4645,16 +4663,10 @@ declare const VerificationItemValidator: z.ZodObject<{
4645
4663
  check: string;
4646
4664
  }>;
4647
4665
  export declare type VerificationItem = z.infer<typeof VerificationItemValidator>;
4648
- declare const StorageTypeValidator: z.ZodEnum<[
4649
- "ceramic"
4650
- ]>;
4651
- /** @group IDXPlugin */
4652
- export declare type StorageType = z.infer<typeof StorageTypeValidator>;
4653
4666
  /** @group IDXPlugin */
4654
4667
  export declare type IDXCredential<Metadata extends Record<string, any> = Record<never, never>> = {
4655
4668
  id: string;
4656
- title: string;
4657
- storageType?: StorageType;
4669
+ uri: string;
4658
4670
  [key: string]: any;
4659
4671
  } & Metadata;
4660
4672
  declare const JWKValidator: z.ZodObject<{
@@ -4750,29 +4762,16 @@ export declare type Token = {
4750
4762
  };
4751
4763
  /** @group Ethereum Plugin */
4752
4764
  export declare type TokenList = Token[];
4753
- /** @group IDXPlugin */
4754
- export declare type CeramicIDXArgs = {
4755
- modelData: ModelAliases;
4756
- credentialAlias: string;
4757
- ceramicEndpoint: string;
4758
- defaultContentFamily: string;
4765
+ /** @group VC Resolution Plugin */
4766
+ export declare type LC_URI<URI extends string = ""> = string | URI;
4767
+ /** @group VC Resolution Plugin */
4768
+ export declare type VCResolutionPluginMethods = {
4769
+ resolveCredential: (uri?: LC_URI) => Promise<VC | undefined>;
4759
4770
  };
4760
- /** @group IDXPlugin */
4761
- export declare type IDXPluginMethods = {
4762
- getCredentialsListFromIdx: <Metadata extends Record<string, any> = Record<never, never>>(alias?: string) => Promise<CredentialsList<Metadata>>;
4763
- publishContentToCeramic: (cred: any) => Promise<string>;
4764
- readContentFromCeramic: (streamId: string) => Promise<any>;
4765
- getVerifiableCredentialFromIdx: (title: string) => Promise<VC>;
4766
- getVerifiableCredentialsFromIdx: () => Promise<VC[]>;
4767
- addVerifiableCredentialInIdx: <Metadata extends Record<string, any> = Record<never, never>>(cred: IDXCredential<Metadata>) => Promise<StreamID>;
4768
- removeVerifiableCredentialInIdx: (title: string) => Promise<StreamID>;
4769
- };
4770
- /** @group IDXPlugin */
4771
- export declare type CredentialsList<Metadata extends Record<string, any> = Record<never, never>> = {
4772
- credentials: Array<IDXCredential<Metadata>>;
4771
+ /** @group VC Resolution Plugin */
4772
+ export declare type ResolutionExtension<URI extends string> = {
4773
+ resolveCredential: (uri?: LC_URI<URI>) => Promise<VC | undefined>;
4773
4774
  };
4774
- /** @group IDXPlugin */
4775
- export declare const CredentialsListValidator: z.ZodType<CredentialsList>;
4776
4775
  export declare type Last<T extends any[]> = T extends [
4777
4776
  ...any[],
4778
4777
  infer R
@@ -4806,6 +4805,52 @@ export declare type Wallet<PluginNames extends string = "", PluginMethods extend
4806
4805
  Methods
4807
4806
  ]>>>;
4808
4807
  };
4808
+ /** @group IDXPlugin */
4809
+ export declare type CeramicIDXArgs = {
4810
+ modelData: ModelAliases;
4811
+ credentialAlias: string;
4812
+ ceramicEndpoint: string;
4813
+ defaultContentFamily: string;
4814
+ };
4815
+ /** @group IDXPlugin */
4816
+ export declare type CeramicURI = `lc:ceramic:${string}`;
4817
+ /** @group IDXPlugin */
4818
+ export declare const CeramicURIValidator: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
4819
+ /** @group IDXPlugin */
4820
+ export declare type IDXPluginMethods<URI extends string = ""> = {
4821
+ getCredentialsListFromIdx: <Metadata extends Record<string, any> = Record<never, never>>(alias?: string) => Promise<CredentialsList<Metadata>>;
4822
+ publishContentToCeramic: (cred: any) => Promise<CeramicURI>;
4823
+ readContentFromCeramic: (streamId: string) => Promise<any>;
4824
+ getVerifiableCredentialFromIdx: (id: string) => Promise<VC | undefined>;
4825
+ getVerifiableCredentialsFromIdx: () => Promise<VC[]>;
4826
+ addVerifiableCredentialInIdx: <Metadata extends Record<string, any> = Record<never, never>>(cred: IDXCredential<Metadata>) => Promise<CeramicURI>;
4827
+ removeVerifiableCredentialInIdx: (title: string) => Promise<StreamID>;
4828
+ } & ResolutionExtension<URI | CeramicURI>;
4829
+ /** @group IDXPlugin */
4830
+ export declare type IDXPluginDependentMethods<URI extends string = ""> = {
4831
+ getKey: () => string;
4832
+ } & ResolutionExtension<URI>;
4833
+ /** @group IDXPlugin */
4834
+ export declare type CredentialsList<Metadata extends Record<string, any> = Record<never, never>> = {
4835
+ credentials: Array<IDXCredential<Metadata>>;
4836
+ };
4837
+ /** @group IDXPlugin */
4838
+ export declare const CredentialsListValidator: z.ZodType<CredentialsList>;
4839
+ /** @group IDXPlugin */
4840
+ export declare type BackwardsCompatIDXCredential<Metadata extends Record<string, any> = Record<never, never>> = {
4841
+ [key: string]: any;
4842
+ id: string;
4843
+ title: string;
4844
+ storageType?: "ceramic";
4845
+ } & Metadata;
4846
+ /** @group IDXPlugin */
4847
+ export declare const BackwardsCompatIDXCredentialValidator: z.ZodType<BackwardsCompatIDXCredential>;
4848
+ /** @group IDXPlugin */
4849
+ export declare type BackwardsCompatCredentialsList<Metadata extends Record<string, any> = Record<never, never>> = {
4850
+ credentials: Array<IDXCredential<Metadata> | BackwardsCompatIDXCredential<Metadata>>;
4851
+ };
4852
+ /** @group IDXPlugin */
4853
+ export declare const BackwardsCompatCredentialsListValidator: z.ZodType<BackwardsCompatCredentialsList>;
4809
4854
  /** @group VC Plugin */
4810
4855
  export declare type VCPluginDependentMethods = {
4811
4856
  getSubjectDid: (type: "key") => string;
@@ -4982,6 +5027,39 @@ export declare type VCAPIPluginMethods = {
4982
5027
  getTestVc: (subject?: string) => UnsignedVC;
4983
5028
  getTestVp: (credential?: VC) => Promise<UnsignedVP>;
4984
5029
  };
5030
+ /**
5031
+ *
5032
+ * @group Plugins
5033
+ */
5034
+ export declare const getDidKitPlugin: (input?: InitInput | Promise<InitInput>) => Promise<Plugin<"DIDKit", DidkitPluginMethods>>;
5035
+ /**
5036
+ *
5037
+ * @group Plugins
5038
+ */
5039
+ export declare const getDidKeyPlugin: <DidMethod extends string>(wallet: Wallet<string, DependentMethods<DidMethod>>, key: string) => Promise<Plugin<"DID Key", DidKeyPluginMethods<DidMethod>, Record<never, never>>>;
5040
+ /**
5041
+ * @group Plugins
5042
+ */
5043
+ export declare const getVCPlugin: (wallet: Wallet<string, VCPluginDependentMethods>) => Plugin<"VC", VCPluginMethods, VCPluginDependentMethods>;
5044
+ /**
5045
+ * @group Plugins
5046
+ */
5047
+ export declare const getIDXPlugin: <URI extends string = "">(wallet: Wallet<any, IDXPluginDependentMethods<URI>>, { modelData, credentialAlias, ceramicEndpoint, defaultContentFamily }: CeramicIDXArgs) => Promise<Plugin<"IDX", IDXPluginMethods<URI>, Record<never, never>>>;
5048
+ /**
5049
+ * @group Plugins
5050
+ */
5051
+ export declare const ExpirationPlugin: (wallet: Wallet<any, VerifyExtension>) => Plugin<"Expiration", VerifyExtension>;
5052
+ /**
5053
+ * @group Plugins
5054
+ */
5055
+ export declare const getEthereumPlugin: (initWallet: Wallet<string, {
5056
+ getSubjectDid: (type: DidMethod) => string;
5057
+ getSubjectKeypair: (type?: Algorithm) => JWK;
5058
+ }>, config: EthereumConfig) => Plugin<"Ethereum", EthereumPluginMethods>;
5059
+ /**
5060
+ * @group Plugins
5061
+ */
5062
+ export declare const getVpqrPlugin: (wallet: Wallet<string, VpqrPluginDependentMethods>) => Plugin<"Vpqr", VpqrPluginMethods>;
4985
5063
  /**
4986
5064
  * Wallet holder's did
4987
5065
  *
@@ -5047,7 +5125,7 @@ export declare type VerifyPresentation = (presentation: VP, options?: Partial<Pr
5047
5125
  *
5048
5126
  * @group LearnCard Methods
5049
5127
  */
5050
- export declare type GetCredential = (title: string) => Promise<VC>;
5128
+ export declare type GetCredential = (title: string) => Promise<VC | undefined>;
5051
5129
  /**
5052
5130
  * Returns all credentials from IDX
5053
5131
  *
@@ -5061,35 +5139,31 @@ export declare type GetCredentials = () => Promise<VC[]>;
5061
5139
  */
5062
5140
  export declare type GetCredentialsList = <Metadata extends Record<string, any> = Record<never, never>>() => Promise<IDXCredential<Metadata>[]>;
5063
5141
  /**
5064
- * Publishes a credential to Ceramic, returning the credential's stream ID
5142
+ * Publishes a credential to Ceramic, returning the credential's Ceramic URI
5065
5143
  *
5066
- * This stream ID may then be shared/persisted/resolved to gain access to the credential
5144
+ * This URI may then be shared/persisted/resolved to gain access to the credential
5067
5145
  *
5068
- * Resolving a stream ID can be done by passing the stream ID to `readFromCeramic`
5146
+ * Resolving a URI can be done by passing the URI to `resolveCredential`
5069
5147
  *
5070
5148
  * @group LearnCard Methods
5071
5149
  */
5072
- export declare type PublishCredential = (credential: VC) => Promise<string>;
5150
+ export declare type PublishCredential = (credential: VC) => Promise<CeramicURI>;
5073
5151
  /**
5074
- * Adds a stream ID pointing to a credential (such as the one returned by `publishCredential`)
5075
- * to IDX with a bespoke title
5152
+ * Adds a URI pointing to a credential (such as the one returned by `publishCredential`)
5153
+ * to IDX with a bespoke ID
5076
5154
  *
5077
- * The credential may then be retrieved using `getCredential` and passing in that bespoke title,
5078
- * or by using `getCredentials` to get a list of all credentials that have been added to IDX
5155
+ * The credential may then be retrieved using `getCredential` and passing in that bespoke ID,
5156
+ * or by using `getCredentials`/`getCredentialsList` to get a list of all credentials that have been added to IDX
5079
5157
  *
5080
5158
  * @group LearnCard Methods
5081
5159
  */
5082
5160
  export declare type AddCredential = <Metadata extends Record<string, any> = Record<never, never>>(credential: IDXCredential<Metadata>) => Promise<void>;
5083
5161
  /**
5084
- * Adds a stream ID pointing to a credential (such as the one returned by `publishCredential`)
5085
- * to IDX with a bespoke title
5086
- *
5087
- * The credential may then be retrieved using `getCredential` and passing in that bespoke title,
5088
- * or by using `getCredentials` to get a list of all credentials that have been added to IDX
5162
+ * Removes a credential from IDX by passing in its bespoke ID
5089
5163
  *
5090
5164
  * @group LearnCard Methods
5091
5165
  */
5092
- export declare type RemoveCredential = (title: string) => Promise<void>;
5166
+ export declare type RemoveCredential = (id: string) => Promise<void>;
5093
5167
  /**
5094
5168
  * Resolves a did to its did document
5095
5169
  *
@@ -5099,12 +5173,18 @@ export declare type ResolveDid = (did: string, inputMetadata?: InputMetadata) =>
5099
5173
  /**
5100
5174
  * Resolves a stream ID, returning its contents
5101
5175
  *
5176
+ * @group LearnCard Methods
5177
+ */
5178
+ export declare type ReadFromCeramic = (streamId: string) => Promise<any>;
5179
+ /**
5180
+ * Resolves a LearnCard URI (e.g. lc:ceramic:1234561)
5181
+ *
5102
5182
  * This can be given the return value of `publishCredential` to gain access to the credential
5103
5183
  * that was published
5104
5184
  *
5105
5185
  * @group LearnCard Methods
5106
5186
  */
5107
- export declare type ReadFromCeramic = (streamId: string) => Promise<any>;
5187
+ export declare type ResolveCredential = (URI?: string | "" | `lc:ceramic:${string}`) => Promise<VC | undefined>;
5108
5188
  /**
5109
5189
  * Returns an example credential, optionally allowing a subject's did to be passed in
5110
5190
  *
@@ -5238,6 +5318,7 @@ export declare type AllLearnCardMethods = {
5238
5318
  removeCredential: RemoveCredential;
5239
5319
  resolveDid: ResolveDid;
5240
5320
  readFromCeramic: ReadFromCeramic;
5321
+ resolveCredential: ResolveCredential;
5241
5322
  getTestVc: GetTestVc;
5242
5323
  getTestVp: GetTestVp;
5243
5324
  getEthereumAddress: GetEthereumAddress;
@@ -5256,10 +5337,11 @@ export declare type AllLearnCardMethods = {
5256
5337
  storeCredentialViaChapiDidAuth: StoreCredentialViaChapiDidAuth;
5257
5338
  };
5258
5339
  /** @group Universal Wallets */
5259
- export declare type LearnCardRawWallet = Wallet<"DIDKit" | "DID Key" | "VC" | "VC Templates" | "IDX" | "Expiration" | "Ethereum" | "Vpqr" | "CHAPI", MergeObjects<[
5340
+ export declare type LearnCardRawWallet = Wallet<"DIDKit" | "DID Key" | "VC" | "VC Templates" | "VC Resolution" | "IDX" | "Expiration" | "Ethereum" | "Vpqr" | "CHAPI", MergeObjects<[
5260
5341
  DidKeyPluginMethods<DidMethod>,
5261
5342
  VCPluginMethods,
5262
5343
  VCTemplatePluginMethods,
5344
+ VCResolutionPluginMethods,
5263
5345
  IDXPluginMethods,
5264
5346
  EthereumPluginMethods,
5265
5347
  VpqrPluginMethods,
@@ -5352,41 +5434,6 @@ export declare function initLearnCard(config: WalletFromKey["args"]): Promise<Wa
5352
5434
  export declare function initLearnCard(config: WalletFromVcApi["args"]): Promise<WalletFromVcApi["returnValue"]>;
5353
5435
  /** @group Universal Wallets */
5354
5436
  export declare const generateWallet: <PluginNames extends string, PluginMethods extends Record<string, (...args: any[]) => any> = Record<never, never>>(contents?: any[], _wallet?: Partial<Wallet<any, PluginMethods>>) => Promise<Wallet<PluginNames, PluginMethods>>;
5355
- /**
5356
- *
5357
- * @group Plugins
5358
- */
5359
- export declare const getDidKitPlugin: (input?: InitInput | Promise<InitInput>) => Promise<Plugin<"DIDKit", DidkitPluginMethods>>;
5360
- /**
5361
- *
5362
- * @group Plugins
5363
- */
5364
- export declare const getDidKeyPlugin: <DidMethod extends string>(wallet: Wallet<string, DependentMethods<DidMethod>>, key: string) => Promise<Plugin<"DID Key", DidKeyPluginMethods<DidMethod>, Record<never, never>>>;
5365
- /**
5366
- * @group Plugins
5367
- */
5368
- export declare const getVCPlugin: (wallet: Wallet<string, VCPluginDependentMethods>) => Plugin<"VC", VCPluginMethods, VCPluginDependentMethods>;
5369
- /**
5370
- * @group Plugins
5371
- */
5372
- export declare const getIDXPlugin: (wallet: Wallet<any, {
5373
- getKey: () => string;
5374
- }>, { modelData, credentialAlias, ceramicEndpoint, defaultContentFamily }: CeramicIDXArgs) => Promise<Plugin<"IDX", IDXPluginMethods>>;
5375
- /**
5376
- * @group Plugins
5377
- */
5378
- export declare const ExpirationPlugin: (wallet: Wallet<any, VerifyExtension>) => Plugin<"Expiration", VerifyExtension>;
5379
- /**
5380
- * @group Plugins
5381
- */
5382
- export declare const getEthereumPlugin: (initWallet: Wallet<string, {
5383
- getSubjectDid: (type: DidMethod) => string;
5384
- getSubjectKeypair: (type?: Algorithm) => JWK;
5385
- }>, config: EthereumConfig) => Plugin<"Ethereum", EthereumPluginMethods>;
5386
- /**
5387
- * @group Plugins
5388
- */
5389
- export declare const getVpqrPlugin: (wallet: Wallet<string, VpqrPluginDependentMethods>) => Plugin<"Vpqr", VpqrPluginMethods>;
5390
5437
  export * from "@wallet/init";
5391
5438
  export { Wallet, Plugin } from "types/wallet";
5392
5439
  export * from "types/LearnCard";