@learncard/types 5.19.0 → 5.21.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/auth.d.ts +35 -2
- package/dist/auth.d.ts.map +1 -1
- package/dist/clr.d.ts +8 -8
- package/dist/credential-refresh.d.ts +65 -12
- package/dist/credential-refresh.d.ts.map +1 -1
- package/dist/did.d.ts +2 -2
- package/dist/lcn.d.ts +5218 -2351
- package/dist/lcn.d.ts.map +1 -1
- package/dist/obv3.d.ts +8 -8
- package/dist/types.cjs.development.cjs +417 -201
- package/dist/types.cjs.development.cjs.map +3 -3
- package/dist/types.cjs.production.min.cjs +23 -23
- package/dist/types.cjs.production.min.cjs.map +4 -4
- package/dist/types.esm.js +1261 -1045
- package/dist/types.esm.js.map +3 -3
- package/dist/vc.d.ts +13 -13
- package/dist/vc.d.ts.map +1 -1
- package/dist/vc.test.d.ts +2 -0
- package/dist/vc.test.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/auth.ts +55 -4
- package/src/credential-refresh.ts +35 -1
- package/src/lcn.ts +283 -18
- package/src/vc.test.ts +35 -0
- package/src/vc.ts +14 -2
package/dist/vc.d.ts
CHANGED
|
@@ -351,7 +351,7 @@ export declare const UnsignedVCValidator: z.ZodObject<{
|
|
|
351
351
|
export type UnsignedVC = z.infer<typeof UnsignedVCValidator>;
|
|
352
352
|
export declare const ProofValidator: z.ZodObject<{
|
|
353
353
|
type: z.ZodString;
|
|
354
|
-
created: z.ZodString
|
|
354
|
+
created: z.ZodOptional<z.ZodString>;
|
|
355
355
|
challenge: z.ZodOptional<z.ZodString>;
|
|
356
356
|
domain: z.ZodOptional<z.ZodString>;
|
|
357
357
|
nonce: z.ZodOptional<z.ZodString>;
|
|
@@ -510,7 +510,7 @@ export declare const VCValidator: z.ZodObject<{
|
|
|
510
510
|
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>]>>;
|
|
511
511
|
proof: z.ZodUnion<[z.ZodObject<{
|
|
512
512
|
type: z.ZodString;
|
|
513
|
-
created: z.ZodString
|
|
513
|
+
created: z.ZodOptional<z.ZodString>;
|
|
514
514
|
challenge: z.ZodOptional<z.ZodString>;
|
|
515
515
|
domain: z.ZodOptional<z.ZodString>;
|
|
516
516
|
nonce: z.ZodOptional<z.ZodString>;
|
|
@@ -519,7 +519,7 @@ export declare const VCValidator: z.ZodObject<{
|
|
|
519
519
|
jws: z.ZodOptional<z.ZodString>;
|
|
520
520
|
}, z.core.$catchall<z.ZodAny>>, z.ZodArray<z.ZodObject<{
|
|
521
521
|
type: z.ZodString;
|
|
522
|
-
created: z.ZodString
|
|
522
|
+
created: z.ZodOptional<z.ZodString>;
|
|
523
523
|
challenge: z.ZodOptional<z.ZodString>;
|
|
524
524
|
domain: z.ZodOptional<z.ZodString>;
|
|
525
525
|
nonce: z.ZodOptional<z.ZodString>;
|
|
@@ -683,7 +683,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
|
683
683
|
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>]>>;
|
|
684
684
|
proof: z.ZodUnion<[z.ZodObject<{
|
|
685
685
|
type: z.ZodString;
|
|
686
|
-
created: z.ZodString
|
|
686
|
+
created: z.ZodOptional<z.ZodString>;
|
|
687
687
|
challenge: z.ZodOptional<z.ZodString>;
|
|
688
688
|
domain: z.ZodOptional<z.ZodString>;
|
|
689
689
|
nonce: z.ZodOptional<z.ZodString>;
|
|
@@ -692,7 +692,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
|
692
692
|
jws: z.ZodOptional<z.ZodString>;
|
|
693
693
|
}, z.core.$catchall<z.ZodAny>>, z.ZodArray<z.ZodObject<{
|
|
694
694
|
type: z.ZodString;
|
|
695
|
-
created: z.ZodString
|
|
695
|
+
created: z.ZodOptional<z.ZodString>;
|
|
696
696
|
challenge: z.ZodOptional<z.ZodString>;
|
|
697
697
|
domain: z.ZodOptional<z.ZodString>;
|
|
698
698
|
nonce: z.ZodOptional<z.ZodString>;
|
|
@@ -850,7 +850,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
|
850
850
|
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>]>>;
|
|
851
851
|
proof: z.ZodUnion<[z.ZodObject<{
|
|
852
852
|
type: z.ZodString;
|
|
853
|
-
created: z.ZodString
|
|
853
|
+
created: z.ZodOptional<z.ZodString>;
|
|
854
854
|
challenge: z.ZodOptional<z.ZodString>;
|
|
855
855
|
domain: z.ZodOptional<z.ZodString>;
|
|
856
856
|
nonce: z.ZodOptional<z.ZodString>;
|
|
@@ -859,7 +859,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
|
859
859
|
jws: z.ZodOptional<z.ZodString>;
|
|
860
860
|
}, z.core.$catchall<z.ZodAny>>, z.ZodArray<z.ZodObject<{
|
|
861
861
|
type: z.ZodString;
|
|
862
|
-
created: z.ZodString
|
|
862
|
+
created: z.ZodOptional<z.ZodString>;
|
|
863
863
|
challenge: z.ZodOptional<z.ZodString>;
|
|
864
864
|
domain: z.ZodOptional<z.ZodString>;
|
|
865
865
|
nonce: z.ZodOptional<z.ZodString>;
|
|
@@ -1025,7 +1025,7 @@ export declare const VPValidator: z.ZodObject<{
|
|
|
1025
1025
|
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>]>>;
|
|
1026
1026
|
proof: z.ZodUnion<[z.ZodObject<{
|
|
1027
1027
|
type: z.ZodString;
|
|
1028
|
-
created: z.ZodString
|
|
1028
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1029
1029
|
challenge: z.ZodOptional<z.ZodString>;
|
|
1030
1030
|
domain: z.ZodOptional<z.ZodString>;
|
|
1031
1031
|
nonce: z.ZodOptional<z.ZodString>;
|
|
@@ -1034,7 +1034,7 @@ export declare const VPValidator: z.ZodObject<{
|
|
|
1034
1034
|
jws: z.ZodOptional<z.ZodString>;
|
|
1035
1035
|
}, z.core.$catchall<z.ZodAny>>, z.ZodArray<z.ZodObject<{
|
|
1036
1036
|
type: z.ZodString;
|
|
1037
|
-
created: z.ZodString
|
|
1037
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1038
1038
|
challenge: z.ZodOptional<z.ZodString>;
|
|
1039
1039
|
domain: z.ZodOptional<z.ZodString>;
|
|
1040
1040
|
nonce: z.ZodOptional<z.ZodString>;
|
|
@@ -1192,7 +1192,7 @@ export declare const VPValidator: z.ZodObject<{
|
|
|
1192
1192
|
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>]>>;
|
|
1193
1193
|
proof: z.ZodUnion<[z.ZodObject<{
|
|
1194
1194
|
type: z.ZodString;
|
|
1195
|
-
created: z.ZodString
|
|
1195
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1196
1196
|
challenge: z.ZodOptional<z.ZodString>;
|
|
1197
1197
|
domain: z.ZodOptional<z.ZodString>;
|
|
1198
1198
|
nonce: z.ZodOptional<z.ZodString>;
|
|
@@ -1201,7 +1201,7 @@ export declare const VPValidator: z.ZodObject<{
|
|
|
1201
1201
|
jws: z.ZodOptional<z.ZodString>;
|
|
1202
1202
|
}, z.core.$catchall<z.ZodAny>>, z.ZodArray<z.ZodObject<{
|
|
1203
1203
|
type: z.ZodString;
|
|
1204
|
-
created: z.ZodString
|
|
1204
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1205
1205
|
challenge: z.ZodOptional<z.ZodString>;
|
|
1206
1206
|
domain: z.ZodOptional<z.ZodString>;
|
|
1207
1207
|
nonce: z.ZodOptional<z.ZodString>;
|
|
@@ -1213,7 +1213,7 @@ export declare const VPValidator: z.ZodObject<{
|
|
|
1213
1213
|
holder: z.ZodOptional<z.ZodString>;
|
|
1214
1214
|
proof: z.ZodUnion<[z.ZodObject<{
|
|
1215
1215
|
type: z.ZodString;
|
|
1216
|
-
created: z.ZodString
|
|
1216
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1217
1217
|
challenge: z.ZodOptional<z.ZodString>;
|
|
1218
1218
|
domain: z.ZodOptional<z.ZodString>;
|
|
1219
1219
|
nonce: z.ZodOptional<z.ZodString>;
|
|
@@ -1222,7 +1222,7 @@ export declare const VPValidator: z.ZodObject<{
|
|
|
1222
1222
|
jws: z.ZodOptional<z.ZodString>;
|
|
1223
1223
|
}, z.core.$catchall<z.ZodAny>>, z.ZodArray<z.ZodObject<{
|
|
1224
1224
|
type: z.ZodString;
|
|
1225
|
-
created: z.ZodString
|
|
1225
|
+
created: z.ZodOptional<z.ZodString>;
|
|
1226
1226
|
challenge: z.ZodOptional<z.ZodString>;
|
|
1227
1227
|
domain: z.ZodOptional<z.ZodString>;
|
|
1228
1228
|
nonce: z.ZodOptional<z.ZodString>;
|
package/dist/vc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc.d.ts","sourceRoot":"","sources":["../src/vc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,eAAO,MAAM,gBAAgB,2EAAwD,CAAC;AACtF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEvD,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAE/E,eAAO,MAAM,cAAc;;;;mBAM1B,CAAC;AACF,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEnD,eAAO,MAAM,uBAAuB;;;;iBAIlC,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAErE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;iBAU3B,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAQV,CAAC;AACvB,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE7D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAEtB,CAAC;AACH,MAAM,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vc.test.d.ts","sourceRoot":"","sources":["../src/vc.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
package/src/auth.ts
CHANGED
|
@@ -101,6 +101,24 @@ export interface PhoneVerificationHandle {
|
|
|
101
101
|
_internal?: unknown;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/** Sign-in features available to the UI, independent of the provider name. */
|
|
105
|
+
export interface SignInCapabilities {
|
|
106
|
+
readonly emailLink: boolean;
|
|
107
|
+
/** Email OTP is verified by the app's server, then exchanged via customToken. */
|
|
108
|
+
readonly emailOtp: boolean;
|
|
109
|
+
readonly phoneOtp: boolean;
|
|
110
|
+
readonly google: boolean;
|
|
111
|
+
readonly apple: boolean;
|
|
112
|
+
readonly social: boolean;
|
|
113
|
+
readonly customToken: boolean;
|
|
114
|
+
readonly deleteAccount: boolean;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface SocialSignInOptions {
|
|
118
|
+
/** Restore a session using the existing re-authentication interaction. */
|
|
119
|
+
intent?: 'signIn' | 'reauthenticate';
|
|
120
|
+
}
|
|
121
|
+
|
|
104
122
|
/**
|
|
105
123
|
* Abstract sign-in adapter interface.
|
|
106
124
|
*
|
|
@@ -118,6 +136,7 @@ export interface PhoneVerificationHandle {
|
|
|
118
136
|
*/
|
|
119
137
|
export interface SignInAdapter {
|
|
120
138
|
readonly providerType: AuthProviderType;
|
|
139
|
+
readonly capabilities: SignInCapabilities;
|
|
121
140
|
|
|
122
141
|
// --- Auth state ---
|
|
123
142
|
|
|
@@ -140,6 +159,9 @@ export interface SignInAdapter {
|
|
|
140
159
|
|
|
141
160
|
isEmailLink(link: string): boolean;
|
|
142
161
|
|
|
162
|
+
/** Authoritative provider check; isEmailLink remains a synchronous hint. */
|
|
163
|
+
validateEmailLink(link: string): Promise<boolean>;
|
|
164
|
+
|
|
143
165
|
// --- Phone OTP ---
|
|
144
166
|
|
|
145
167
|
/**
|
|
@@ -153,6 +175,17 @@ export interface SignInAdapter {
|
|
|
153
175
|
*/
|
|
154
176
|
confirmPhoneOtp(handle: PhoneVerificationHandle, code: string | number): Promise<AuthUser>;
|
|
155
177
|
|
|
178
|
+
/** Preferred API: confirm the most recent request without exposing SDK state. */
|
|
179
|
+
confirmPhoneOtp(code: string | number): Promise<AuthUser>;
|
|
180
|
+
|
|
181
|
+
/** Fires when a code is ready for entry, on either platform. */
|
|
182
|
+
onPhoneCodeSent(callback: () => void): () => void;
|
|
183
|
+
|
|
184
|
+
/** Auto-retrieved code; call confirmPhoneOtp before starting key derivation. */
|
|
185
|
+
onPhoneVerificationCompleted(callback: (code: string | undefined) => void): () => void;
|
|
186
|
+
|
|
187
|
+
onPhoneVerificationFailed(callback: (error: unknown) => void): () => void;
|
|
188
|
+
|
|
156
189
|
/**
|
|
157
190
|
* Confirm a phone OTP using a native verificationId (Capacitor auto-verify
|
|
158
191
|
* path). Falls back to `confirmPhoneOtp` when not implemented.
|
|
@@ -161,9 +194,9 @@ export interface SignInAdapter {
|
|
|
161
194
|
|
|
162
195
|
// --- OAuth ---
|
|
163
196
|
|
|
164
|
-
signInWithGoogle(): Promise<AuthUser>;
|
|
197
|
+
signInWithGoogle(options?: SocialSignInOptions): Promise<AuthUser>;
|
|
165
198
|
|
|
166
|
-
signInWithApple(): Promise<AuthUser>;
|
|
199
|
+
signInWithApple(options?: SocialSignInOptions): Promise<AuthUser>;
|
|
167
200
|
|
|
168
201
|
/** Check for a pending OAuth redirect result (e.g. Apple on web). */
|
|
169
202
|
checkRedirectResult?(): Promise<AuthUser | null>;
|
|
@@ -179,6 +212,15 @@ export interface SignInAdapter {
|
|
|
179
212
|
|
|
180
213
|
deleteAccount(): Promise<void>;
|
|
181
214
|
|
|
215
|
+
/** Update the signed-in user's display profile, when supported. */
|
|
216
|
+
updateProfile?(profile: {
|
|
217
|
+
displayName?: string | null;
|
|
218
|
+
photoUrl?: string | null;
|
|
219
|
+
}): Promise<void>;
|
|
220
|
+
|
|
221
|
+
/** Limit the auth session to this browser tab on a public computer. */
|
|
222
|
+
setSessionPersistence?(sessionOnly: boolean): Promise<void>;
|
|
223
|
+
|
|
182
224
|
signOut(): Promise<void>;
|
|
183
225
|
|
|
184
226
|
// --- Cleanup ---
|
|
@@ -346,7 +388,13 @@ export interface KeyDerivationStrategy<
|
|
|
346
388
|
fetchServerKeyStatus(token: string, providerType: AuthProviderType): Promise<ServerKeyStatus>;
|
|
347
389
|
|
|
348
390
|
/** Store the remote key component on the server */
|
|
349
|
-
storeAuthShare(
|
|
391
|
+
storeAuthShare(
|
|
392
|
+
token: string,
|
|
393
|
+
providerType: AuthProviderType,
|
|
394
|
+
remoteKey: string,
|
|
395
|
+
did: string,
|
|
396
|
+
didAuthVp?: string
|
|
397
|
+
): Promise<void>;
|
|
350
398
|
|
|
351
399
|
/** Mark migration complete on the server (optional — only needed for migration-capable strategies) */
|
|
352
400
|
markMigrated?(token: string, providerType: AuthProviderType, didAuthVp?: string): Promise<void>;
|
|
@@ -374,7 +422,10 @@ export interface KeyDerivationStrategy<
|
|
|
374
422
|
}): Promise<TRecoverySetupResult>;
|
|
375
423
|
|
|
376
424
|
/** Get configured recovery methods for the authenticated user */
|
|
377
|
-
getAvailableRecoveryMethods?(
|
|
425
|
+
getAvailableRecoveryMethods?(
|
|
426
|
+
token: string,
|
|
427
|
+
providerType: AuthProviderType
|
|
428
|
+
): Promise<RecoveryMethodInfo[]>;
|
|
378
429
|
|
|
379
430
|
// --- Contact method management ---
|
|
380
431
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
2
|
|
|
3
|
-
import { UnsignedVCValidator, VCValidator } from './vc';
|
|
3
|
+
import { CredentialStatusValidator, UnsignedVCValidator, VCValidator } from './vc';
|
|
4
4
|
import { JWEValidator } from './crypto';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -73,6 +73,40 @@ export type AllocateCredentialRefreshResult = z.infer<
|
|
|
73
73
|
typeof AllocateCredentialRefreshResultValidator
|
|
74
74
|
>;
|
|
75
75
|
|
|
76
|
+
// --- Managed issuance receipt (returned to the issuer after a refreshable send) ---
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Issuance metadata returned to the authenticated issuer after a refreshable send
|
|
80
|
+
* (unified send with `refresh: true`, or `sendBoost` with `enableRefresh: true`).
|
|
81
|
+
*
|
|
82
|
+
* Populated from the actual signed version 1 credential — never from the template or
|
|
83
|
+
* allocation alone. This is issuance metadata only: it must not contain credential
|
|
84
|
+
* claims, subject bodies, plaintext VCs, or JWEs. The issuer retains its own
|
|
85
|
+
* template/claims alongside this receipt, and preserves the exact `credentialStatus`
|
|
86
|
+
* descriptor when publishing an update (no new allocation).
|
|
87
|
+
*/
|
|
88
|
+
export const ManagedCredentialRefreshReceiptValidator = z
|
|
89
|
+
.object({
|
|
90
|
+
refreshId: z.string().min(1),
|
|
91
|
+
refreshService: ManagedCredentialRefreshServiceValidator,
|
|
92
|
+
credentialId: z.string().min(1),
|
|
93
|
+
issuerDid: z.string().min(1),
|
|
94
|
+
holderDid: z.string().min(1),
|
|
95
|
+
credentialStatus: CredentialStatusValidator.or(
|
|
96
|
+
CredentialStatusValidator.array()
|
|
97
|
+
).optional(),
|
|
98
|
+
})
|
|
99
|
+
.strip();
|
|
100
|
+
export type ManagedCredentialRefreshReceipt = z.infer<
|
|
101
|
+
typeof ManagedCredentialRefreshReceiptValidator
|
|
102
|
+
>;
|
|
103
|
+
|
|
104
|
+
/** Allocation metadata for deferred Inbox issuance. No holder is invented before claim. */
|
|
105
|
+
export const InboxCredentialRefreshReceiptValidator = ManagedCredentialRefreshReceiptValidator.omit(
|
|
106
|
+
{ holderDid: true }
|
|
107
|
+
).extend({ holderDid: z.string().min(1).optional() });
|
|
108
|
+
export type InboxCredentialRefreshReceipt = z.infer<typeof InboxCredentialRefreshReceiptValidator>;
|
|
109
|
+
|
|
76
110
|
// --- Publication ------------------------------------------------------------
|
|
77
111
|
|
|
78
112
|
export const CredentialRefreshSigningModeValidator = z.enum(['issuer-signed', 'signing-authority']);
|