@learncard/core 8.5.5 → 9.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/dist/core.cjs.development.js +843 -68975
  2. package/dist/core.cjs.development.js.map +4 -4
  3. package/dist/core.cjs.production.min.js +1 -948
  4. package/dist/core.cjs.production.min.js.map +4 -4
  5. package/dist/core.esm.js +1059 -69202
  6. package/dist/core.esm.js.map +4 -4
  7. package/dist/index.d.ts +0 -1
  8. package/dist/types/LearnCard.d.ts +0 -57
  9. package/dist/types/helpers.d.ts +0 -15
  10. package/dist/types/planes.d.ts +36 -5
  11. package/dist/types/utilities.d.ts +4 -0
  12. package/dist/wallet/plugins/index.d.ts +1 -13
  13. package/package.json +4 -24
  14. package/dist/didkit/didkit_wasm.d.ts +0 -251
  15. package/dist/didkit/didkit_wasm.js +0 -1135
  16. package/dist/didkit/didkit_wasm_bg.wasm +0 -0
  17. package/dist/didkit/didkit_wasm_bg.wasm.d.ts +0 -43
  18. package/dist/didkit/index.d.ts +0 -4
  19. package/dist/didkit_wasm.d.ts +0 -251
  20. package/dist/didkit_wasm.js +0 -1135
  21. package/dist/didkit_wasm_bg.wasm +0 -0
  22. package/dist/didkit_wasm_bg.wasm.d.ts +0 -43
  23. package/dist/wallet/defaults.d.ts +0 -5
  24. package/dist/wallet/init.d.ts +0 -29
  25. package/dist/wallet/initializers/apiLearnCard.d.ts +0 -14
  26. package/dist/wallet/initializers/customLearnCard.d.ts +0 -7
  27. package/dist/wallet/initializers/emptyLearnCard.d.ts +0 -7
  28. package/dist/wallet/initializers/learnCardFromSeed.d.ts +0 -7
  29. package/dist/wallet/plugins/EthereumPlugin/hardcodedTokens.d.ts +0 -22
  30. package/dist/wallet/plugins/EthereumPlugin/helpers.d.ts +0 -7
  31. package/dist/wallet/plugins/EthereumPlugin/index.d.ts +0 -7
  32. package/dist/wallet/plugins/EthereumPlugin/types.d.ts +0 -32
  33. package/dist/wallet/plugins/ceramic/ceramic.d.ts +0 -215
  34. package/dist/wallet/plugins/ceramic/helpers.d.ts +0 -3
  35. package/dist/wallet/plugins/ceramic/index.d.ts +0 -4
  36. package/dist/wallet/plugins/ceramic/types.d.ts +0 -43
  37. package/dist/wallet/plugins/chapi/chapi.d.ts +0 -5
  38. package/dist/wallet/plugins/chapi/index.d.ts +0 -2
  39. package/dist/wallet/plugins/chapi/types.d.ts +0 -88
  40. package/dist/wallet/plugins/didkey/helpers.d.ts +0 -4
  41. package/dist/wallet/plugins/didkey/index.d.ts +0 -217
  42. package/dist/wallet/plugins/didkey/types.d.ts +0 -18
  43. package/dist/wallet/plugins/didkit/index.d.ts +0 -8
  44. package/dist/wallet/plugins/didkit/types.d.ts +0 -40
  45. package/dist/wallet/plugins/expiration/index.d.ts +0 -7
  46. package/dist/wallet/plugins/expiration/types.d.ts +0 -3
  47. package/dist/wallet/plugins/idx/idx.d.ts +0 -6
  48. package/dist/wallet/plugins/idx/index.d.ts +0 -4
  49. package/dist/wallet/plugins/idx/types.d.ts +0 -54
  50. package/dist/wallet/plugins/learn-card/index.d.ts +0 -7
  51. package/dist/wallet/plugins/learn-card/types.d.ts +0 -17
  52. package/dist/wallet/plugins/learn-card/verify.d.ts +0 -215
  53. package/dist/wallet/plugins/vc/index.d.ts +0 -2
  54. package/dist/wallet/plugins/vc/issueCredential.d.ts +0 -98
  55. package/dist/wallet/plugins/vc/issuePresentation.d.ts +0 -220
  56. package/dist/wallet/plugins/vc/types.d.ts +0 -35
  57. package/dist/wallet/plugins/vc/vc.d.ts +0 -5
  58. package/dist/wallet/plugins/vc/verifyCredential.d.ts +0 -8
  59. package/dist/wallet/plugins/vc/verifyPresentation.d.ts +0 -8
  60. package/dist/wallet/plugins/vc-api/helpers.d.ts +0 -8
  61. package/dist/wallet/plugins/vc-api/index.d.ts +0 -8
  62. package/dist/wallet/plugins/vc-api/types.d.ts +0 -20
  63. package/dist/wallet/plugins/vc-resolution/index.d.ts +0 -6
  64. package/dist/wallet/plugins/vc-resolution/types.d.ts +0 -13
  65. package/dist/wallet/plugins/vc-templates/index.d.ts +0 -2
  66. package/dist/wallet/plugins/vc-templates/templates.d.ts +0 -6
  67. package/dist/wallet/plugins/vc-templates/types.d.ts +0 -68
  68. package/dist/wallet/plugins/vc-templates/vc-templates.d.ts +0 -5
  69. package/dist/wallet/plugins/vpqr/index.d.ts +0 -7
  70. package/dist/wallet/plugins/vpqr/types.d.ts +0 -12
@@ -1,98 +0,0 @@
1
- import { UnsignedVC } from '@learncard/types';
2
- import { ProofOptions } from '../../plugins/didkit/types';
3
- import { VCDependentLearnCard, VCImplicitLearnCard } from './types';
4
- export declare const issueCredential: (initLearnCard: VCDependentLearnCard) => (learnCard: VCImplicitLearnCard, credential: UnsignedVC, signingOptions?: Partial<ProofOptions>) => Promise<{
5
- [x: string]: any;
6
- id?: string | undefined;
7
- expirationDate?: string | undefined;
8
- credentialStatus?: {
9
- type: string;
10
- id: string;
11
- } | undefined;
12
- credentialSchema?: {
13
- type: string;
14
- id: string;
15
- }[] | undefined;
16
- refreshService?: {
17
- [x: string]: any;
18
- type: string;
19
- id: string;
20
- } | undefined;
21
- type: [string, ...string[]];
22
- '@context': (string | Record<string, any>)[];
23
- issuer: string | {
24
- [x: string]: any;
25
- type?: string | [string, ...string[]] | undefined;
26
- id?: string | undefined;
27
- name?: string | undefined;
28
- url?: string | undefined;
29
- phone?: string | undefined;
30
- description?: string | undefined;
31
- endorsement?: any[] | undefined;
32
- image?: string | {
33
- caption?: string | undefined;
34
- type: string;
35
- id: string;
36
- } | undefined;
37
- email?: string | undefined;
38
- address?: {
39
- addressCountry?: string | undefined;
40
- addressCountryCode?: string | undefined;
41
- addressRegion?: string | undefined;
42
- addressLocality?: string | undefined;
43
- streetAddress?: string | undefined;
44
- postOfficeBoxNumber?: string | undefined;
45
- postalCode?: string | undefined;
46
- geo?: {
47
- type: string | [string, ...string[]];
48
- latitude: number;
49
- longitude: number;
50
- } | undefined;
51
- type: string | [string, ...string[]];
52
- } | undefined;
53
- otherIdentifier?: {
54
- type: string | [string, ...string[]];
55
- identifier: string;
56
- identifierType: string;
57
- }[] | undefined;
58
- official?: string | undefined;
59
- parentOrg?: any;
60
- familyName?: string | undefined;
61
- givenName?: string | undefined;
62
- additionalName?: string | undefined;
63
- patronymicName?: string | undefined;
64
- honorificPrefix?: string | undefined;
65
- honorificSuffix?: string | undefined;
66
- familyNamePrefix?: string | undefined;
67
- dateOfBirth?: string | undefined;
68
- };
69
- issuanceDate: string;
70
- credentialSubject: {
71
- [x: string]: any;
72
- id?: string | undefined;
73
- } | {
74
- [x: string]: any;
75
- id?: string | undefined;
76
- }[];
77
- proof: {
78
- [x: string]: any;
79
- challenge?: string | undefined;
80
- domain?: string | undefined;
81
- nonce?: string | undefined;
82
- jws?: string | undefined;
83
- type: string;
84
- created: string;
85
- proofPurpose: string;
86
- verificationMethod: string;
87
- } | {
88
- [x: string]: any;
89
- challenge?: string | undefined;
90
- domain?: string | undefined;
91
- nonce?: string | undefined;
92
- jws?: string | undefined;
93
- type: string;
94
- created: string;
95
- proofPurpose: string;
96
- verificationMethod: string;
97
- }[];
98
- }>;
@@ -1,220 +0,0 @@
1
- import { UnsignedVP } from '@learncard/types';
2
- import { ProofOptions } from '../../plugins/didkit/types';
3
- import { VCDependentLearnCard, VCImplicitLearnCard } from './types';
4
- export declare const issuePresentation: (initLearnCard: VCDependentLearnCard) => (learnCard: VCImplicitLearnCard, presentation: UnsignedVP, signingOptions?: Partial<ProofOptions>) => Promise<{
5
- [x: string]: any;
6
- id?: string | undefined;
7
- verifiableCredential?: {
8
- [x: string]: any;
9
- id?: string | undefined;
10
- expirationDate?: string | undefined;
11
- credentialStatus?: {
12
- type: string;
13
- id: string;
14
- } | undefined;
15
- credentialSchema?: {
16
- type: string;
17
- id: string;
18
- }[] | undefined;
19
- refreshService?: {
20
- [x: string]: any;
21
- type: string;
22
- id: string;
23
- } | undefined;
24
- type: [string, ...string[]];
25
- '@context': (string | Record<string, any>)[];
26
- issuer: string | {
27
- [x: string]: any;
28
- type?: string | [string, ...string[]] | undefined;
29
- id?: string | undefined;
30
- name?: string | undefined;
31
- url?: string | undefined;
32
- phone?: string | undefined;
33
- description?: string | undefined;
34
- endorsement?: any[] | undefined;
35
- image?: string | {
36
- caption?: string | undefined;
37
- type: string;
38
- id: string;
39
- } | undefined;
40
- email?: string | undefined;
41
- address?: {
42
- addressCountry?: string | undefined;
43
- addressCountryCode?: string | undefined;
44
- addressRegion?: string | undefined;
45
- addressLocality?: string | undefined;
46
- streetAddress?: string | undefined;
47
- postOfficeBoxNumber?: string | undefined;
48
- postalCode?: string | undefined;
49
- geo?: {
50
- type: string | [string, ...string[]];
51
- latitude: number;
52
- longitude: number;
53
- } | undefined;
54
- type: string | [string, ...string[]];
55
- } | undefined;
56
- otherIdentifier?: {
57
- type: string | [string, ...string[]];
58
- identifier: string;
59
- identifierType: string;
60
- }[] | undefined;
61
- official?: string | undefined;
62
- parentOrg?: any;
63
- familyName?: string | undefined;
64
- givenName?: string | undefined;
65
- additionalName?: string | undefined;
66
- patronymicName?: string | undefined;
67
- honorificPrefix?: string | undefined;
68
- honorificSuffix?: string | undefined;
69
- familyNamePrefix?: string | undefined;
70
- dateOfBirth?: string | undefined;
71
- };
72
- issuanceDate: string;
73
- credentialSubject: {
74
- [x: string]: any;
75
- id?: string | undefined;
76
- } | {
77
- [x: string]: any;
78
- id?: string | undefined;
79
- }[];
80
- proof: {
81
- [x: string]: any;
82
- challenge?: string | undefined;
83
- domain?: string | undefined;
84
- nonce?: string | undefined;
85
- jws?: string | undefined;
86
- type: string;
87
- created: string;
88
- proofPurpose: string;
89
- verificationMethod: string;
90
- } | {
91
- [x: string]: any;
92
- challenge?: string | undefined;
93
- domain?: string | undefined;
94
- nonce?: string | undefined;
95
- jws?: string | undefined;
96
- type: string;
97
- created: string;
98
- proofPurpose: string;
99
- verificationMethod: string;
100
- }[];
101
- } | {
102
- [x: string]: any;
103
- id?: string | undefined;
104
- expirationDate?: string | undefined;
105
- credentialStatus?: {
106
- type: string;
107
- id: string;
108
- } | undefined;
109
- credentialSchema?: {
110
- type: string;
111
- id: string;
112
- }[] | undefined;
113
- refreshService?: {
114
- [x: string]: any;
115
- type: string;
116
- id: string;
117
- } | undefined;
118
- type: [string, ...string[]];
119
- '@context': (string | Record<string, any>)[];
120
- issuer: string | {
121
- [x: string]: any;
122
- type?: string | [string, ...string[]] | undefined;
123
- id?: string | undefined;
124
- name?: string | undefined;
125
- url?: string | undefined;
126
- phone?: string | undefined;
127
- description?: string | undefined;
128
- endorsement?: any[] | undefined;
129
- image?: string | {
130
- caption?: string | undefined;
131
- type: string;
132
- id: string;
133
- } | undefined;
134
- email?: string | undefined;
135
- address?: {
136
- addressCountry?: string | undefined;
137
- addressCountryCode?: string | undefined;
138
- addressRegion?: string | undefined;
139
- addressLocality?: string | undefined;
140
- streetAddress?: string | undefined;
141
- postOfficeBoxNumber?: string | undefined;
142
- postalCode?: string | undefined;
143
- geo?: {
144
- type: string | [string, ...string[]];
145
- latitude: number;
146
- longitude: number;
147
- } | undefined;
148
- type: string | [string, ...string[]];
149
- } | undefined;
150
- otherIdentifier?: {
151
- type: string | [string, ...string[]];
152
- identifier: string;
153
- identifierType: string;
154
- }[] | undefined;
155
- official?: string | undefined;
156
- parentOrg?: any;
157
- familyName?: string | undefined;
158
- givenName?: string | undefined;
159
- additionalName?: string | undefined;
160
- patronymicName?: string | undefined;
161
- honorificPrefix?: string | undefined;
162
- honorificSuffix?: string | undefined;
163
- familyNamePrefix?: string | undefined;
164
- dateOfBirth?: string | undefined;
165
- };
166
- issuanceDate: string;
167
- credentialSubject: {
168
- [x: string]: any;
169
- id?: string | undefined;
170
- } | {
171
- [x: string]: any;
172
- id?: string | undefined;
173
- }[];
174
- proof: {
175
- [x: string]: any;
176
- challenge?: string | undefined;
177
- domain?: string | undefined;
178
- nonce?: string | undefined;
179
- jws?: string | undefined;
180
- type: string;
181
- created: string;
182
- proofPurpose: string;
183
- verificationMethod: string;
184
- } | {
185
- [x: string]: any;
186
- challenge?: string | undefined;
187
- domain?: string | undefined;
188
- nonce?: string | undefined;
189
- jws?: string | undefined;
190
- type: string;
191
- created: string;
192
- proofPurpose: string;
193
- verificationMethod: string;
194
- }[];
195
- }[] | undefined;
196
- holder?: string | undefined;
197
- type: [string, ...string[]];
198
- '@context': (string | Record<string, any>)[];
199
- proof: {
200
- [x: string]: any;
201
- challenge?: string | undefined;
202
- domain?: string | undefined;
203
- nonce?: string | undefined;
204
- jws?: string | undefined;
205
- type: string;
206
- created: string;
207
- proofPurpose: string;
208
- verificationMethod: string;
209
- } | {
210
- [x: string]: any;
211
- challenge?: string | undefined;
212
- domain?: string | undefined;
213
- nonce?: string | undefined;
214
- jws?: string | undefined;
215
- type: string;
216
- created: string;
217
- proofPurpose: string;
218
- verificationMethod: string;
219
- }[];
220
- }>;
@@ -1,35 +0,0 @@
1
- import { JWK, UnsignedVC, VC, UnsignedVP, VP, VerificationCheck } from '@learncard/types';
2
- import { Plugin, LearnCard } from '../../../types/wallet';
3
- import { ProofOptions, InputMetadata } from '../didkit/types';
4
- /** @group VC Plugin */
5
- export type VCPluginDependentMethods = {
6
- getSubjectDid: (type: 'key') => string;
7
- getSubjectKeypair: () => JWK;
8
- keyToVerificationMethod: (type: string, keypair: JWK) => Promise<string>;
9
- didToVerificationMethod: (did: string) => Promise<string>;
10
- issueCredential: (credential: UnsignedVC, options: ProofOptions, keypair: JWK) => Promise<VC>;
11
- verifyCredential: (credential: VC, options?: ProofOptions) => Promise<VerificationCheck>;
12
- issuePresentation: (presentation: UnsignedVP, options: ProofOptions, keypair: JWK) => Promise<VP>;
13
- verifyPresentation: (presentation: VP | string, options?: ProofOptions) => Promise<VerificationCheck>;
14
- resolveDid: (did: string, inputMetadata?: InputMetadata) => Promise<Record<string, any>>;
15
- };
16
- /** @group VC Plugin */
17
- export type VCPluginMethods = {
18
- issueCredential: (credential: UnsignedVC, signingOptions?: Partial<ProofOptions>) => Promise<VC>;
19
- verifyCredential: (credential: VC, options?: Partial<ProofOptions>) => Promise<VerificationCheck>;
20
- issuePresentation: (credential: UnsignedVP, signingOptions?: Partial<ProofOptions>) => Promise<VP>;
21
- verifyPresentation: (presentation: VP | string, options?: Partial<ProofOptions>) => Promise<VerificationCheck>;
22
- getTestVc: (subject?: string) => UnsignedVC;
23
- getTestVp: (credential?: VC) => Promise<UnsignedVP>;
24
- getDidAuthVp: (options?: ProofOptions) => Promise<VP | string>;
25
- };
26
- /** @group VC Plugin */
27
- export type VCDependentLearnCard = LearnCard<any, 'id', VCPluginDependentMethods>;
28
- /** @group VC Plugin */
29
- export type VCImplicitLearnCard = LearnCard<any, 'id', VCPluginMethods & VCPluginDependentMethods>;
30
- /** @group VC Plugin */
31
- export type VerifyExtension = {
32
- verifyCredential: (credential: VC) => Promise<VerificationCheck>;
33
- };
34
- /** @group VC Plugin */
35
- export type VCPlugin = Plugin<'VC', any, VCPluginMethods, 'id', VCPluginDependentMethods>;
@@ -1,5 +0,0 @@
1
- import { VCDependentLearnCard, VCPlugin } from './types';
2
- /**
3
- * @group Plugins
4
- */
5
- export declare const getVCPlugin: (learnCard: VCDependentLearnCard) => VCPlugin;
@@ -1,8 +0,0 @@
1
- import { VC } from '@learncard/types';
2
- import { ProofOptions } from '../../plugins/didkit/types';
3
- import { VCDependentLearnCard, VCImplicitLearnCard } from './types';
4
- export declare const verifyCredential: (initLearnCard: VCDependentLearnCard) => (_learnCard: VCImplicitLearnCard, credential: VC, options?: Partial<ProofOptions>) => Promise<{
5
- checks: string[];
6
- warnings: string[];
7
- errors: string[];
8
- }>;
@@ -1,8 +0,0 @@
1
- import { VP } from '@learncard/types';
2
- import { ProofOptions } from '../../plugins/didkit/types';
3
- import { VCDependentLearnCard, VCImplicitLearnCard } from './types';
4
- export declare const verifyPresentation: (initLearnCard: VCDependentLearnCard) => (_learnCard: VCImplicitLearnCard, presentation: VP | string, options?: Partial<ProofOptions>) => Promise<{
5
- checks: string[];
6
- warnings: string[];
7
- errors: string[];
8
- }>;
@@ -1,8 +0,0 @@
1
- /**
2
- * Sends a POST request via fetch
3
- */
4
- export declare const post: (url: string, data: Record<string, any>) => Promise<Response>;
5
- /**
6
- * Returns whether or not an HTTP status code is successful
7
- */
8
- export declare const isSuccessful: (status: number) => boolean;
@@ -1,8 +0,0 @@
1
- import { VCAPIPlugin } from './types';
2
- /**
3
- * @group Plugins
4
- */
5
- export declare const getVCAPIPlugin: ({ url: _url, did: _did, }: {
6
- url: string;
7
- did?: string;
8
- }) => Promise<VCAPIPlugin>;
@@ -1,20 +0,0 @@
1
- import { UnsignedVC, UnsignedVP, VC, VP, VerificationCheck } from '@learncard/types';
2
- import { Plugin } from '../../../types/wallet';
3
- /** @group VC-API Plugin */
4
- export type APIOptions = {
5
- created?: string;
6
- challenge?: string;
7
- domain?: string;
8
- };
9
- /** @group VC-API Plugin */
10
- export type VCAPIPluginMethods = {
11
- getSubjectDid: (type: string) => string;
12
- issueCredential: (credential: UnsignedVC, signingOptions?: APIOptions) => Promise<VC>;
13
- verifyCredential: (credential: VC, options?: Omit<APIOptions, 'created'>) => Promise<VerificationCheck>;
14
- issuePresentation: (presentation: UnsignedVP, signingOptions?: APIOptions) => Promise<VP>;
15
- verifyPresentation: (presentation: VP, options?: Omit<APIOptions, 'created'>) => Promise<VerificationCheck>;
16
- getTestVc: (subject?: string) => UnsignedVC;
17
- getTestVp: (credential?: VC) => Promise<UnsignedVP>;
18
- };
19
- /** @group VC-API Plugin */
20
- export type VCAPIPlugin = Plugin<'VC API', 'id', VCAPIPluginMethods>;
@@ -1,6 +0,0 @@
1
- import { VCResolutionPluginType } from './types';
2
- export * from './types';
3
- /**
4
- * @group Plugins
5
- */
6
- export declare const VCResolutionPlugin: VCResolutionPluginType;
@@ -1,13 +0,0 @@
1
- import { VC } from '@learncard/types';
2
- import { Plugin } from '../../../types/wallet';
3
- /** @group VC Resolution Plugin */
4
- export type LC_URI<URI extends string = ''> = string | URI;
5
- /** @group VC Resolution Plugin */
6
- export type VCResolutionPluginMethods = {
7
- resolveCredential: (uri?: LC_URI) => Promise<VC | undefined>;
8
- };
9
- /** @group VC Resolution Plugin */
10
- export type ResolutionExtension<URI extends string> = {
11
- resolveCredential: (uri?: LC_URI<URI>) => Promise<VC | undefined>;
12
- };
13
- export type VCResolutionPluginType = Plugin<'VC Resolution', any, VCResolutionPluginMethods>;
@@ -1,2 +0,0 @@
1
- export { getVCTemplatesPlugin } from './vc-templates';
2
- export * from './types';
@@ -1,6 +0,0 @@
1
- import { UnsignedVC } from '@learncard/types';
2
- import { VcTemplates } from './types';
3
- /** @group VC Templates Plugin */
4
- export declare const VC_TEMPLATES: {
5
- [Key in keyof VcTemplates]: (args: VcTemplates[Key]) => UnsignedVC;
6
- };
@@ -1,68 +0,0 @@
1
- import { UnsignedVC, VC, UnsignedVP } from '@learncard/types';
2
- import { DiscriminatedUnionize } from '../../../types/helpers';
3
- import { Plugin } from '../../../types/wallet';
4
- /** @group VC Templates Plugin */
5
- export type BoostAttachment = {
6
- type?: string;
7
- title?: string;
8
- url?: string;
9
- };
10
- /** @group VC Templates Plugin */
11
- export type BoostDisplay = {
12
- backgroundImage?: string;
13
- backgroundColor?: string;
14
- };
15
- /** @group VC Templates Plugin */
16
- export type VcTemplates = {
17
- basic: {
18
- did?: string;
19
- subject?: string;
20
- issuanceDate?: string;
21
- };
22
- achievement: {
23
- did?: string;
24
- subject?: string;
25
- name?: string;
26
- achievementName?: string;
27
- description?: string;
28
- criteriaNarrative?: string;
29
- issuanceDate?: string;
30
- };
31
- jff2: {
32
- did?: string;
33
- subject?: string;
34
- issuanceDate?: string;
35
- };
36
- boost: {
37
- did?: string;
38
- subject?: string;
39
- issuanceDate?: string;
40
- expirationDate?: string;
41
- boostId?: string;
42
- boostName?: string;
43
- boostImage?: string;
44
- achievementId?: string;
45
- achievementType?: string;
46
- achievementName?: string;
47
- achievementDescription?: string;
48
- achievementNarrative?: string;
49
- achievementImage?: string;
50
- attachments?: BoostAttachment[];
51
- display?: BoostDisplay;
52
- };
53
- };
54
- /** @group VC Templates Plugin */
55
- export type NewCredentialFunction = (args?: DiscriminatedUnionize<VcTemplates>) => UnsignedVC;
56
- /** @group VC Templates Plugin */
57
- export type VCTemplatePluginDependentMethods = {
58
- getSubjectDid?: (type: 'key') => string;
59
- };
60
- /** @group VC Templates Plugin */
61
- export type VCTemplatePluginMethods = {
62
- newCredential: NewCredentialFunction;
63
- newPresentation: (credential: VC, args?: {
64
- did?: string;
65
- }) => Promise<UnsignedVP>;
66
- };
67
- /** @group VC Templates Plugin */
68
- export type VCTemplatePlugin = Plugin<'VC Templates', any, VCTemplatePluginMethods, 'id', VCTemplatePluginDependentMethods>;
@@ -1,5 +0,0 @@
1
- import { VCTemplatePlugin } from './types';
2
- /**
3
- * @group Plugins
4
- */
5
- export declare const getVCTemplatesPlugin: () => VCTemplatePlugin;
@@ -1,7 +0,0 @@
1
- import { VpqrPlugin, VpqrPluginDependentMethods } from './types';
2
- import { LearnCard } from '../../../types/wallet';
3
- export * from './types';
4
- /**
5
- * @group Plugins
6
- */
7
- export declare const getVpqrPlugin: (learnCard: LearnCard<any, any, VpqrPluginDependentMethods>) => VpqrPlugin;
@@ -1,12 +0,0 @@
1
- import { VP } from '@learncard/types';
2
- import { Plugin } from '../../../types/wallet';
3
- /** @group VPQR Plugin */
4
- export type VpqrPluginMethods = {
5
- vpFromQrCode: (text: string) => Promise<VP>;
6
- vpToQrCode: (vp: VP) => Promise<string>;
7
- };
8
- /** @group VPQR Plugin */
9
- export type VpqrPluginDependentMethods = {
10
- contextLoader: (url: string) => Promise<Record<string, any>>;
11
- };
12
- export type VpqrPlugin = Plugin<'Vpqr', any, VpqrPluginMethods, any, VpqrPluginDependentMethods>;