@gerege-systems/eid-mongolia-sdk 0.32.0 → 0.34.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/README.md +40 -0
- package/dist/browser.d.cts +2 -2
- package/dist/browser.d.ts +2 -2
- package/dist/browser.js +1 -1
- package/dist/{chunk-R73IR6OH.js → chunk-TNXO4QLU.js} +3 -0
- package/dist/{errors-3JEfE-FW.d.cts → errors-mcDbKiz_.d.cts} +7 -1
- package/dist/{errors-3JEfE-FW.d.ts → errors-mcDbKiz_.d.ts} +7 -1
- package/dist/index.cjs +394 -20
- package/dist/index.d.cts +177 -5
- package/dist/index.d.ts +177 -5
- package/dist/index.js +370 -10
- package/dist/pades.d.cts +2 -2
- package/dist/pades.d.ts +2 -2
- package/dist/pades.js +1 -1
- package/dist/{types-ByGHVzuP.d.ts → types-Cf3GT4wh.d.cts} +11 -1
- package/dist/{types-ByGHVzuP.d.cts → types-Cf3GT4wh.d.ts} +11 -1
- package/dist/validate.d.cts +1 -1
- package/dist/validate.d.ts +1 -1
- package/dist/validate.js +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as RpCredentials, C as CertificateLevel, I as Interaction, S as SignatureAlgorithm, H as HashAlgorithm, N as NotificationSession, D as DeviceLinkSession, a as SessionResult, b as PersonBlock, c as RepresentationsResponse, E as EidImage, A as AcspContext, F as FlowType } from './types-
|
|
2
|
-
export { d as DEFAULT_SIGN_SESSION_TTL_MS, e as EndResult, O as OrgResult, P as PdfImage, f as Representation, g as
|
|
3
|
-
import { O as OnBehalfErrorCode, R as RetryableErrorCode, A as ApiError, H as HttpErrorInit } from './errors-
|
|
4
|
-
export { a as AppTransactionTooLargeError, b as AuthenticationError, C as CertChoiceInvalidError, D as DeviceLinkError,
|
|
1
|
+
import { R as RpCredentials, C as CertificateLevel, I as Interaction, S as SignatureAlgorithm, H as HashAlgorithm, N as NotificationSession, D as DeviceLinkSession, a as SessionResult, b as PersonBlock, c as RepresentationsResponse, E as EidImage, A as AcspContext, F as FlowType } from './types-Cf3GT4wh.cjs';
|
|
2
|
+
export { d as DEFAULT_SIGN_SESSION_TTL_MS, e as EndResult, O as OrgResult, P as PdfImage, f as Representation, g as SessionPresentation, h as SessionState, i as SignContext, j as SignatureAlgorithmParameters, k as SignatureProtocol, T as TokenCertSessionBlock, l as TokenCertStatus, p as parseExpiresAt, s as sessionExpiry, m as startExpiry } from './types-Cf3GT4wh.cjs';
|
|
3
|
+
import { O as OnBehalfErrorCode, R as RetryableErrorCode, E as EidError, A as ApiError, H as HttpErrorInit } from './errors-mcDbKiz_.cjs';
|
|
4
|
+
export { a as AppTransactionTooLargeError, b as AuthenticationError, C as CertChoiceInvalidError, D as DeviceLinkError, F as ForbiddenError, N as NetworkError, c as NoSigningCertificateError, d as ON_BEHALF_ERROR_CODES, P as PDF_REGISTER_ERROR_CODES, e as PdfRegisterErrorCode, Q as QrTokenInvalidError, f as RETRYABLE_ERROR_CODES, g as RequestInvalidError, h as ResponseTooLargeError, S as SessionFailedError, V as ValidationError, p as parseRetryAfter } from './errors-mcDbKiz_.cjs';
|
|
5
5
|
import { X509Certificate, KeyObject } from 'node:crypto';
|
|
6
6
|
export { NavigatorLike, isMobileUserAgent } from './browser.cjs';
|
|
7
7
|
|
|
@@ -1139,6 +1139,174 @@ declare function tokenAuthDigest(rpUUID: string, challengeB64: string): Buffer;
|
|
|
1139
1139
|
*/
|
|
1140
1140
|
declare function tokenLimitOf(err: unknown): TokenLimit | undefined;
|
|
1141
1141
|
|
|
1142
|
+
/** Аттрибутын каталог (CA гэрээ v1, 2026-10-23). */
|
|
1143
|
+
declare const QR_ATTRIBUTES: readonly ["age_over_18", "age_over_21", "full_name", "phone", "birth_date", "civil_id"];
|
|
1144
|
+
type QrAttribute = (typeof QR_ATTRIBUTES)[number];
|
|
1145
|
+
/** Иргэний аппын QR-ийн угтвар: `EIDMN-QR1:<token>`. */
|
|
1146
|
+
declare const QR_PREFIX = "EIDMN-QR1:";
|
|
1147
|
+
declare const DEFAULT_QR_ISSUER = "https://ca.eidmongolia.mn";
|
|
1148
|
+
declare const DEFAULT_QR_JWKS_URL = "https://ca.eidmongolia.mn/.well-known/eid-jwks.json";
|
|
1149
|
+
declare const DEFAULT_QR_JWKS_CACHE_TTL_MS = 3600000;
|
|
1150
|
+
/** Presentation-ийн `iat`-аас хойш хүлээн авах дээд хугацаа (мс). */
|
|
1151
|
+
declare const DEFAULT_QR_MAX_AGE_MS = 600000;
|
|
1152
|
+
/** `iat` ирээдүйд байж болох зөрүү (мс). */
|
|
1153
|
+
declare const QR_CLOCK_SKEW_MS = 60000;
|
|
1154
|
+
/**
|
|
1155
|
+
* QR алдааны кодууд ({@link QrError.code}). CA-ийн 404 `QR_TOKEN_INVALID` нь {@link QrTokenInvalidError}
|
|
1156
|
+
* (`ApiError`, `code === "QR_TOKEN_INVALID"`) болж ирнэ.
|
|
1157
|
+
* - `QR_FORMAT_INVALID` — скан хийсэн мөр eID «Миний QR» биш (клиент талын)
|
|
1158
|
+
* - `QR_TOKEN_INVALID` — токен танигдахгүй / хугацаа дууссан (120 с) / ашиглагдсан → шинэ QR гаргуул
|
|
1159
|
+
* - `QR_ATTRIBUTES_INVALID` — аттрибут хоосон / каталогид алга / давхардсан (клиент талын, CA руу явахгүй)
|
|
1160
|
+
* - `QR_PRESENTATION_INVALID` — JWS шалгалт унасан — хариунд ИТГЭХГҮЙ
|
|
1161
|
+
* - `QR_JWKS_UNAVAILABLE` — CA-ийн JWKS татагдсангүй (түр; дахин оролдож болно)
|
|
1162
|
+
* - `QR_PENDING` — `qr.result`-ийн хүлээх хугацаа (`maxWaitMs`) дууссан ч иргэн хараахан хариулаагүй (CA-ийн session
|
|
1163
|
+
* идэвхтэй хэвээр) — дахин `result` / `check` дуудаж болно. CA-ийн жинхэнэ хугацаа дуусалт = SessionFailedError TIMEOUT.
|
|
1164
|
+
*/
|
|
1165
|
+
declare const QR_ERROR_CODES: readonly ["QR_FORMAT_INVALID", "QR_TOKEN_INVALID", "QR_ATTRIBUTES_INVALID", "QR_PRESENTATION_INVALID", "QR_JWKS_UNAVAILABLE", "QR_PENDING"];
|
|
1166
|
+
type QrErrorCode = (typeof QR_ERROR_CODES)[number];
|
|
1167
|
+
/** «Миний QR»-ийн клиент талын алдаа. */
|
|
1168
|
+
declare class QrError extends EidError {
|
|
1169
|
+
readonly code: QrErrorCode;
|
|
1170
|
+
readonly reason: string;
|
|
1171
|
+
constructor(code: QrErrorCode, reason: string);
|
|
1172
|
+
}
|
|
1173
|
+
/** Скан хийсэн QR-ээс токен: `EIDMN-QR1:<token>` эсвэл зөвхөн токен (43 тэмдэгт base64url). Буруу бол QR_FORMAT_INVALID. */
|
|
1174
|
+
declare function parseQr(scanned: string): string;
|
|
1175
|
+
interface QrConfig {
|
|
1176
|
+
/** Анхдагч {@link DEFAULT_QR_JWKS_URL}. https (http зөвхөн localhost). */
|
|
1177
|
+
jwksUrl?: string;
|
|
1178
|
+
/** Хүлээгдэх `iss`; анхдагч {@link DEFAULT_QR_ISSUER}. */
|
|
1179
|
+
issuer?: string;
|
|
1180
|
+
jwksCacheTtlMs?: number;
|
|
1181
|
+
maxAgeMs?: number;
|
|
1182
|
+
}
|
|
1183
|
+
interface QrStartInput {
|
|
1184
|
+
/** Скан хийсэн агуулга (`EIDMN-QR1:<token>`) эсвэл {@link parseQr}-ийн токен. */
|
|
1185
|
+
qr: string;
|
|
1186
|
+
/** Хүсэх аттрибутууд (≥ 1, давхардалгүй); RP-д аттрибут бүрийн `QR_ATTR:<нэр>` эрх. */
|
|
1187
|
+
attributes: readonly QrAttribute[];
|
|
1188
|
+
/** RP-ийн nonce (сонголттой) — JWS-ийн `nonce`-д буцна; өгөөгүй бол rpChallenge. */
|
|
1189
|
+
nonce?: string;
|
|
1190
|
+
}
|
|
1191
|
+
/** `qr.start`-ийн хариу — JSON-оор хадгалж (stateless backend) `qr.result`-д дамжуулна. `vc`-г кассын дэлгэцэнд харуул. */
|
|
1192
|
+
interface QrSession {
|
|
1193
|
+
sessionId: string;
|
|
1194
|
+
vc: string;
|
|
1195
|
+
nonce: string;
|
|
1196
|
+
attributes: QrAttribute[];
|
|
1197
|
+
/** CA-ийн session дуусах мөч (мс epoch), байвал. */
|
|
1198
|
+
expiresAt?: number;
|
|
1199
|
+
}
|
|
1200
|
+
interface QrFullName {
|
|
1201
|
+
surname: string;
|
|
1202
|
+
givenName: string;
|
|
1203
|
+
}
|
|
1204
|
+
/** Баталгаажсан аттрибутууд — хүсээгүй / байхгүй нь алга. */
|
|
1205
|
+
interface QrAttrs {
|
|
1206
|
+
age_over_18?: boolean;
|
|
1207
|
+
age_over_21?: boolean;
|
|
1208
|
+
full_name?: QrFullName;
|
|
1209
|
+
phone?: string;
|
|
1210
|
+
birth_date?: string;
|
|
1211
|
+
civil_id?: string;
|
|
1212
|
+
}
|
|
1213
|
+
interface QrPresentation {
|
|
1214
|
+
/** Энэ RP-д зориулсан тогтмол pairwise id (иргэний дугаар биш). */
|
|
1215
|
+
sub: string;
|
|
1216
|
+
attrs: QrAttrs;
|
|
1217
|
+
/** Хүссэн боловч бүртгэлд байхгүй (алдаа биш). */
|
|
1218
|
+
unavailable: QrAttribute[];
|
|
1219
|
+
sessionId: string;
|
|
1220
|
+
/** `iat`, мс epoch. */
|
|
1221
|
+
issuedAt: number;
|
|
1222
|
+
/** Түүхий compact JWS (аудитад хадгалж болно). */
|
|
1223
|
+
jws: string;
|
|
1224
|
+
}
|
|
1225
|
+
/** `qr.check`-ийн хариу: иргэн хараахан хариулаагүй, эсвэл шалгагдсан presentation. */
|
|
1226
|
+
type QrCheck = {
|
|
1227
|
+
state: "RUNNING";
|
|
1228
|
+
} | {
|
|
1229
|
+
state: "COMPLETE";
|
|
1230
|
+
presentation: QrPresentation;
|
|
1231
|
+
};
|
|
1232
|
+
interface QrExpect {
|
|
1233
|
+
issuer?: string;
|
|
1234
|
+
/** RP UUID. */
|
|
1235
|
+
audience: string;
|
|
1236
|
+
sessionId: string;
|
|
1237
|
+
nonce: string;
|
|
1238
|
+
attributes: readonly string[];
|
|
1239
|
+
/** мс epoch; анхдагч Date.now(). */
|
|
1240
|
+
now?: number;
|
|
1241
|
+
maxAgeMs?: number;
|
|
1242
|
+
}
|
|
1243
|
+
interface Jwk {
|
|
1244
|
+
kty?: string;
|
|
1245
|
+
crv?: string;
|
|
1246
|
+
x?: string;
|
|
1247
|
+
y?: string;
|
|
1248
|
+
kid?: string;
|
|
1249
|
+
alg?: string;
|
|
1250
|
+
use?: string;
|
|
1251
|
+
}
|
|
1252
|
+
interface Jwks {
|
|
1253
|
+
keys: Jwk[];
|
|
1254
|
+
}
|
|
1255
|
+
/**
|
|
1256
|
+
* Compact JWS-ийг `jwks`-ээр шалгаж (ES256, kid) claim-уудыг тулгана: iss, aud (RP UUID), sid, nonce, iat (≤ now+60 с,
|
|
1257
|
+
* ≥ now−maxAge), exp (байвал), attrs ∪ unavailable = хүссэн аттрибутууд яг, аттрибут бүрийн төрөл. Алдаа бол
|
|
1258
|
+
* {@link QrError} `QR_PRESENTATION_INVALID` — хариунд ИТГЭХГҮЙ. Сүлжээгүй (хадгалсан presentation-ийг дахин шалгах, тест).
|
|
1259
|
+
*/
|
|
1260
|
+
declare function verifyQrPresentation(jws: string, jwks: Jwks | null | undefined, expect: QrExpect): QrPresentation;
|
|
1261
|
+
interface QrApiDeps {
|
|
1262
|
+
http: Http;
|
|
1263
|
+
session: SessionApi;
|
|
1264
|
+
credentials: RpCredentials;
|
|
1265
|
+
config?: QrConfig;
|
|
1266
|
+
fetchImpl?: typeof fetch;
|
|
1267
|
+
dispatcher?: unknown;
|
|
1268
|
+
timeoutMs?: number;
|
|
1269
|
+
}
|
|
1270
|
+
/** `client.qr` — «Миний QR»: parse → start → result. */
|
|
1271
|
+
declare class QrApi {
|
|
1272
|
+
private readonly d;
|
|
1273
|
+
private jwks;
|
|
1274
|
+
private fetchedAt;
|
|
1275
|
+
private lastAttempt;
|
|
1276
|
+
private inflight;
|
|
1277
|
+
constructor(d: QrApiDeps);
|
|
1278
|
+
/** {@link parseQr}. */
|
|
1279
|
+
parse(scanned: string): string;
|
|
1280
|
+
/**
|
|
1281
|
+
* `POST /authentication/qr` — QR-ийн токеныг (нэг удаагийн) CA-д өгч иргэний утас руу хүсэлт илгээнэ; `vc`-г кассын
|
|
1282
|
+
* дэлгэцэнд харуул. Алдаа: {@link QrError} (FORMAT / ATTRIBUTES — CA руу явахгүй), 404 {@link QrTokenInvalidError}
|
|
1283
|
+
* (шинэ QR гаргуул), 403 ForbiddenError (QR_PRESENT / QR_ATTR:* эрх алга).
|
|
1284
|
+
*/
|
|
1285
|
+
start(input: QrStartInput): Promise<QrSession>;
|
|
1286
|
+
/**
|
|
1287
|
+
* Session дуустал long-poll хийж presentation-ийг CA-ийн JWKS-ээр шалгана. Татгалзсан / хугацаа дууссан бол
|
|
1288
|
+
* SessionFailedError (`USER_REFUSED`, `TIMEOUT` г.м.); шалгалт унавал {@link QrError} `QR_PRESENTATION_INVALID`;
|
|
1289
|
+
* JWKS татагдахгүй бол `QR_JWKS_UNAVAILABLE` (дахин оролдож болно).
|
|
1290
|
+
*/
|
|
1291
|
+
result(session: QrSession, opts?: {
|
|
1292
|
+
maxWaitMs?: number;
|
|
1293
|
+
serverPollMs?: number;
|
|
1294
|
+
}): Promise<QrPresentation>;
|
|
1295
|
+
/**
|
|
1296
|
+
* Нэг удаагийн шалгалт (polling UI-д): `GET /session/{id}` (`serverPollMs` хүртэл, анхдагч 1000 мс) — иргэн хараахан
|
|
1297
|
+
* хариулаагүй бол `{ state: "RUNNING" }`, зөвшөөрсөн бол JWS/JWKS-ээр шалгасан `{ state: "COMPLETE", presentation }`.
|
|
1298
|
+
* Татгалзсан / CA-ийн хугацаа дууссан бол SessionFailedError; бусад алдаа {@link result}-тэй ижил.
|
|
1299
|
+
*/
|
|
1300
|
+
check(session: QrSession, opts?: {
|
|
1301
|
+
serverPollMs?: number;
|
|
1302
|
+
}): Promise<QrCheck>;
|
|
1303
|
+
private finish;
|
|
1304
|
+
/** Хадгалсан presentation JWS-ийг QrSession-тэй тулгаж шалгана (JWKS кэш; танихгүй kid → нэг удаа дахин татна). */
|
|
1305
|
+
verify(jws: string, session: QrSession): Promise<QrPresentation>;
|
|
1306
|
+
private keys;
|
|
1307
|
+
private fetchJwks;
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1142
1310
|
/** Хүсэлтийн хугацаа: CA бүх хүлээн авагчид 120 с-д илгээнэ, nginx 150 с. */
|
|
1143
1311
|
declare const DEFAULT_SHARE_TIMEOUT_MS = 150000;
|
|
1144
1312
|
/** `client.share()`-ийн оролт. Хязгаар (CA main 0329ef95): discovery-ийн `share` блок ({@link ShareInfo}). */
|
|
@@ -1262,6 +1430,8 @@ interface ClientConfig {
|
|
|
1262
1430
|
signSessionTtlMs?: number;
|
|
1263
1431
|
/** Trust anchor (Root CA) — validator-д. Production-д ЗААВАЛ. */
|
|
1264
1432
|
trust?: TrustConfig;
|
|
1433
|
+
/** «Миний QR»-ийн presentation шалгалт (JWKS URL, issuer, кэш). Анхдагч = prod CA. */
|
|
1434
|
+
qr?: QrConfig;
|
|
1265
1435
|
}
|
|
1266
1436
|
/** RP-API-ийн албан ёсны хост (2026-09-28-наас бүх RP, /v3-гүй). */
|
|
1267
1437
|
declare const DEFAULT_BASE_URL = "https://rp.eidmongolia.mn";
|
|
@@ -1275,6 +1445,8 @@ declare class EidClient {
|
|
|
1275
1445
|
readonly organization: OrganizationApi;
|
|
1276
1446
|
readonly person: PersonApi;
|
|
1277
1447
|
readonly token: TokenApi;
|
|
1448
|
+
/** «Миний QR» (биечлэн шалгах): parse → start → result. */
|
|
1449
|
+
readonly qr: QrApi;
|
|
1278
1450
|
readonly session: SessionApi;
|
|
1279
1451
|
readonly validator: ResponseValidator;
|
|
1280
1452
|
/** `credentials.rpName` — иргэний утсанд харагдах RP нэр. */
|
|
@@ -1687,4 +1859,4 @@ declare function withReturnHint(callbackUrl: string, userAgent: string): string;
|
|
|
1687
1859
|
*/
|
|
1688
1860
|
declare function createEidLogin(opts: EidLoginOptions): EidLogin;
|
|
1689
1861
|
|
|
1690
|
-
export { APP_ATTESTATION_INVALID, AcspContext, type AcspV2Params, type ActivityCounts, type ActivityItem, type ActivityQuery, ApiError, AuthApi, type AuthDefaults, type AuthOptions, type BuildDeviceLinkInput, CITIZEN_INTERMEDIATES_PEM, CITIZEN_ISSUING_CA_SKI, CSR_KEY_REUSED, type CertChoiceOptions, type CertCounts, type CertSubject, CertificateLevel, type ClientConfig, type CompletedForRegistration, DEFAULT_BASE_URL, DEFAULT_MAX_WAIT_MS, DEFAULT_PDF_TIMEOUT_MS, DEFAULT_SHARE_TIMEOUT_MS, DeviceLinkSession, type DeviceLinkSessionType, type DeviceLinkType, EidClient, EidImage, type EidLogin, type EidLoginContext, type EidLoginEvent, type EidLoginEventKind, type EidLoginIdentity, type EidLoginMode, type EidLoginOptions, type EidLoginRateLimitFn, type EidLoginRateLimits, type EidLoginRateRule, type EidLoginRequest, type EidLoginResponse, type EidLoginStore, type EidLoginSuccess, type EidLoginTx, FlowType, HashAlgorithm, Http, type HttpConfig, HttpErrorInit, Interaction, KYC_INCOMPLETE, LoginStoreFullError, MAX_APP_TRANSACTION_BYTES, MEMORY_LOGIN_STORE_MAX, NATIONAL_ROOT_CA_PEM, NO_ACTIVE_DEVICE, NotificationSession, type OcspCheckerOptions, OnBehalfErrorCode, OrganizationApi, PDF_SIGNATURE_REGISTER_FIELDS, type PdfDigestInput, type PdfDigestSession, type PdfDigestSigner, type PdfSignatureImage, type PersonActivity, PersonApi, PersonBlock, type PersonCertificate, type PersonCertificates, type PersonChild, type PersonChildren, type PersonDevice, type PersonDevices, type PersonSummary, type PriorSignature, type QrDeviceLinkTickerOptions, type RegisterSignatureInput, type RegisterSignatureResult, RepresentationsResponse, ResponseValidator, RetryableErrorCode, type RevocationChecker, type RevocationOutcome, type RevocationStatus, RpCredentials, SHARE_ERROR_CODES, SHARE_FORM_FIELDS, SessionApi, SessionResult, type SessionTtl, ShareError, type ShareErrorCode, type ShareInfo, type ShareInput, type ShareNotSignedReason, type ShareResult, SignApi, type SignDefaults, type SignOptions, SignatureAlgorithm, type Signer, type SignerRef, TOKEN_CONFLICT_CODES, TOKEN_ERROR_CODES, TOKEN_ISSUANCE_PENDING, TokenApi, type TokenAuthChallenge, type TokenAuthResult, type TokenCertInfo, type TokenCertInput, type TokenCertItem, type TokenCertPreview, type TokenCertResult, type TokenCertStart, type TokenConflictCode, type TokenErrorCode, type TokenIdentity, type TokenLimit, type TokenOrganization, type TrustConfig, type ValidateAuthOptions, type ValidateSignOptions, type VerifiedIdentity, type VerifiedSignature, WAIT_GRACE_MS, acspV2Digest, buildAcspV2Payload, buildDeviceLink, buildRegisterBody, certificateLevelOf, createEidLogin, defaultRateLimit, deviceLinkInput, forwardedClientIp, interactionsToBase64, memoryLoginStore, ocspRevocationChecker, parseSessionResult, parseSubject, personMatchesCertificate, qrDeviceLinkTicker, randomChallenge, registrationFromCompleted, resolveBaseUrl, sha256Base64, tokenAuthDigest, tokenLimitOf, userChallengeOf, verifyPayloadSignature, verifyPrehashedSignature, verifyTokenCertificates, withReturnHint };
|
|
1862
|
+
export { APP_ATTESTATION_INVALID, AcspContext, type AcspV2Params, type ActivityCounts, type ActivityItem, type ActivityQuery, ApiError, AuthApi, type AuthDefaults, type AuthOptions, type BuildDeviceLinkInput, CITIZEN_INTERMEDIATES_PEM, CITIZEN_ISSUING_CA_SKI, CSR_KEY_REUSED, type CertChoiceOptions, type CertCounts, type CertSubject, CertificateLevel, type ClientConfig, type CompletedForRegistration, DEFAULT_BASE_URL, DEFAULT_MAX_WAIT_MS, DEFAULT_PDF_TIMEOUT_MS, DEFAULT_QR_ISSUER, DEFAULT_QR_JWKS_CACHE_TTL_MS, DEFAULT_QR_JWKS_URL, DEFAULT_QR_MAX_AGE_MS, DEFAULT_SHARE_TIMEOUT_MS, DeviceLinkSession, type DeviceLinkSessionType, type DeviceLinkType, EidClient, EidError, EidImage, type EidLogin, type EidLoginContext, type EidLoginEvent, type EidLoginEventKind, type EidLoginIdentity, type EidLoginMode, type EidLoginOptions, type EidLoginRateLimitFn, type EidLoginRateLimits, type EidLoginRateRule, type EidLoginRequest, type EidLoginResponse, type EidLoginStore, type EidLoginSuccess, type EidLoginTx, FlowType, HashAlgorithm, Http, type HttpConfig, HttpErrorInit, Interaction, type Jwk, type Jwks, KYC_INCOMPLETE, LoginStoreFullError, MAX_APP_TRANSACTION_BYTES, MEMORY_LOGIN_STORE_MAX, NATIONAL_ROOT_CA_PEM, NO_ACTIVE_DEVICE, NotificationSession, type OcspCheckerOptions, OnBehalfErrorCode, OrganizationApi, PDF_SIGNATURE_REGISTER_FIELDS, type PdfDigestInput, type PdfDigestSession, type PdfDigestSigner, type PdfSignatureImage, type PersonActivity, PersonApi, PersonBlock, type PersonCertificate, type PersonCertificates, type PersonChild, type PersonChildren, type PersonDevice, type PersonDevices, type PersonSummary, type PriorSignature, QR_ATTRIBUTES, QR_CLOCK_SKEW_MS, QR_ERROR_CODES, QR_PREFIX, QrApi, type QrAttribute, type QrAttrs, type QrCheck, type QrConfig, type QrDeviceLinkTickerOptions, QrError, type QrErrorCode, type QrExpect, type QrFullName, type QrPresentation, type QrSession, type QrStartInput, type RegisterSignatureInput, type RegisterSignatureResult, RepresentationsResponse, ResponseValidator, RetryableErrorCode, type RevocationChecker, type RevocationOutcome, type RevocationStatus, RpCredentials, SHARE_ERROR_CODES, SHARE_FORM_FIELDS, SessionApi, SessionResult, type SessionTtl, ShareError, type ShareErrorCode, type ShareInfo, type ShareInput, type ShareNotSignedReason, type ShareResult, SignApi, type SignDefaults, type SignOptions, SignatureAlgorithm, type Signer, type SignerRef, TOKEN_CONFLICT_CODES, TOKEN_ERROR_CODES, TOKEN_ISSUANCE_PENDING, TokenApi, type TokenAuthChallenge, type TokenAuthResult, type TokenCertInfo, type TokenCertInput, type TokenCertItem, type TokenCertPreview, type TokenCertResult, type TokenCertStart, type TokenConflictCode, type TokenErrorCode, type TokenIdentity, type TokenLimit, type TokenOrganization, type TrustConfig, type ValidateAuthOptions, type ValidateSignOptions, type VerifiedIdentity, type VerifiedSignature, WAIT_GRACE_MS, acspV2Digest, buildAcspV2Payload, buildDeviceLink, buildRegisterBody, certificateLevelOf, createEidLogin, defaultRateLimit, deviceLinkInput, forwardedClientIp, interactionsToBase64, memoryLoginStore, ocspRevocationChecker, parseQr, parseSessionResult, parseSubject, personMatchesCertificate, qrDeviceLinkTicker, randomChallenge, registrationFromCompleted, resolveBaseUrl, sha256Base64, tokenAuthDigest, tokenLimitOf, userChallengeOf, verifyPayloadSignature, verifyPrehashedSignature, verifyQrPresentation, verifyTokenCertificates, withReturnHint };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as RpCredentials, C as CertificateLevel, I as Interaction, S as SignatureAlgorithm, H as HashAlgorithm, N as NotificationSession, D as DeviceLinkSession, a as SessionResult, b as PersonBlock, c as RepresentationsResponse, E as EidImage, A as AcspContext, F as FlowType } from './types-
|
|
2
|
-
export { d as DEFAULT_SIGN_SESSION_TTL_MS, e as EndResult, O as OrgResult, P as PdfImage, f as Representation, g as
|
|
3
|
-
import { O as OnBehalfErrorCode, R as RetryableErrorCode, A as ApiError, H as HttpErrorInit } from './errors-
|
|
4
|
-
export { a as AppTransactionTooLargeError, b as AuthenticationError, C as CertChoiceInvalidError, D as DeviceLinkError,
|
|
1
|
+
import { R as RpCredentials, C as CertificateLevel, I as Interaction, S as SignatureAlgorithm, H as HashAlgorithm, N as NotificationSession, D as DeviceLinkSession, a as SessionResult, b as PersonBlock, c as RepresentationsResponse, E as EidImage, A as AcspContext, F as FlowType } from './types-Cf3GT4wh.js';
|
|
2
|
+
export { d as DEFAULT_SIGN_SESSION_TTL_MS, e as EndResult, O as OrgResult, P as PdfImage, f as Representation, g as SessionPresentation, h as SessionState, i as SignContext, j as SignatureAlgorithmParameters, k as SignatureProtocol, T as TokenCertSessionBlock, l as TokenCertStatus, p as parseExpiresAt, s as sessionExpiry, m as startExpiry } from './types-Cf3GT4wh.js';
|
|
3
|
+
import { O as OnBehalfErrorCode, R as RetryableErrorCode, E as EidError, A as ApiError, H as HttpErrorInit } from './errors-mcDbKiz_.js';
|
|
4
|
+
export { a as AppTransactionTooLargeError, b as AuthenticationError, C as CertChoiceInvalidError, D as DeviceLinkError, F as ForbiddenError, N as NetworkError, c as NoSigningCertificateError, d as ON_BEHALF_ERROR_CODES, P as PDF_REGISTER_ERROR_CODES, e as PdfRegisterErrorCode, Q as QrTokenInvalidError, f as RETRYABLE_ERROR_CODES, g as RequestInvalidError, h as ResponseTooLargeError, S as SessionFailedError, V as ValidationError, p as parseRetryAfter } from './errors-mcDbKiz_.js';
|
|
5
5
|
import { X509Certificate, KeyObject } from 'node:crypto';
|
|
6
6
|
export { NavigatorLike, isMobileUserAgent } from './browser.js';
|
|
7
7
|
|
|
@@ -1139,6 +1139,174 @@ declare function tokenAuthDigest(rpUUID: string, challengeB64: string): Buffer;
|
|
|
1139
1139
|
*/
|
|
1140
1140
|
declare function tokenLimitOf(err: unknown): TokenLimit | undefined;
|
|
1141
1141
|
|
|
1142
|
+
/** Аттрибутын каталог (CA гэрээ v1, 2026-10-23). */
|
|
1143
|
+
declare const QR_ATTRIBUTES: readonly ["age_over_18", "age_over_21", "full_name", "phone", "birth_date", "civil_id"];
|
|
1144
|
+
type QrAttribute = (typeof QR_ATTRIBUTES)[number];
|
|
1145
|
+
/** Иргэний аппын QR-ийн угтвар: `EIDMN-QR1:<token>`. */
|
|
1146
|
+
declare const QR_PREFIX = "EIDMN-QR1:";
|
|
1147
|
+
declare const DEFAULT_QR_ISSUER = "https://ca.eidmongolia.mn";
|
|
1148
|
+
declare const DEFAULT_QR_JWKS_URL = "https://ca.eidmongolia.mn/.well-known/eid-jwks.json";
|
|
1149
|
+
declare const DEFAULT_QR_JWKS_CACHE_TTL_MS = 3600000;
|
|
1150
|
+
/** Presentation-ийн `iat`-аас хойш хүлээн авах дээд хугацаа (мс). */
|
|
1151
|
+
declare const DEFAULT_QR_MAX_AGE_MS = 600000;
|
|
1152
|
+
/** `iat` ирээдүйд байж болох зөрүү (мс). */
|
|
1153
|
+
declare const QR_CLOCK_SKEW_MS = 60000;
|
|
1154
|
+
/**
|
|
1155
|
+
* QR алдааны кодууд ({@link QrError.code}). CA-ийн 404 `QR_TOKEN_INVALID` нь {@link QrTokenInvalidError}
|
|
1156
|
+
* (`ApiError`, `code === "QR_TOKEN_INVALID"`) болж ирнэ.
|
|
1157
|
+
* - `QR_FORMAT_INVALID` — скан хийсэн мөр eID «Миний QR» биш (клиент талын)
|
|
1158
|
+
* - `QR_TOKEN_INVALID` — токен танигдахгүй / хугацаа дууссан (120 с) / ашиглагдсан → шинэ QR гаргуул
|
|
1159
|
+
* - `QR_ATTRIBUTES_INVALID` — аттрибут хоосон / каталогид алга / давхардсан (клиент талын, CA руу явахгүй)
|
|
1160
|
+
* - `QR_PRESENTATION_INVALID` — JWS шалгалт унасан — хариунд ИТГЭХГҮЙ
|
|
1161
|
+
* - `QR_JWKS_UNAVAILABLE` — CA-ийн JWKS татагдсангүй (түр; дахин оролдож болно)
|
|
1162
|
+
* - `QR_PENDING` — `qr.result`-ийн хүлээх хугацаа (`maxWaitMs`) дууссан ч иргэн хараахан хариулаагүй (CA-ийн session
|
|
1163
|
+
* идэвхтэй хэвээр) — дахин `result` / `check` дуудаж болно. CA-ийн жинхэнэ хугацаа дуусалт = SessionFailedError TIMEOUT.
|
|
1164
|
+
*/
|
|
1165
|
+
declare const QR_ERROR_CODES: readonly ["QR_FORMAT_INVALID", "QR_TOKEN_INVALID", "QR_ATTRIBUTES_INVALID", "QR_PRESENTATION_INVALID", "QR_JWKS_UNAVAILABLE", "QR_PENDING"];
|
|
1166
|
+
type QrErrorCode = (typeof QR_ERROR_CODES)[number];
|
|
1167
|
+
/** «Миний QR»-ийн клиент талын алдаа. */
|
|
1168
|
+
declare class QrError extends EidError {
|
|
1169
|
+
readonly code: QrErrorCode;
|
|
1170
|
+
readonly reason: string;
|
|
1171
|
+
constructor(code: QrErrorCode, reason: string);
|
|
1172
|
+
}
|
|
1173
|
+
/** Скан хийсэн QR-ээс токен: `EIDMN-QR1:<token>` эсвэл зөвхөн токен (43 тэмдэгт base64url). Буруу бол QR_FORMAT_INVALID. */
|
|
1174
|
+
declare function parseQr(scanned: string): string;
|
|
1175
|
+
interface QrConfig {
|
|
1176
|
+
/** Анхдагч {@link DEFAULT_QR_JWKS_URL}. https (http зөвхөн localhost). */
|
|
1177
|
+
jwksUrl?: string;
|
|
1178
|
+
/** Хүлээгдэх `iss`; анхдагч {@link DEFAULT_QR_ISSUER}. */
|
|
1179
|
+
issuer?: string;
|
|
1180
|
+
jwksCacheTtlMs?: number;
|
|
1181
|
+
maxAgeMs?: number;
|
|
1182
|
+
}
|
|
1183
|
+
interface QrStartInput {
|
|
1184
|
+
/** Скан хийсэн агуулга (`EIDMN-QR1:<token>`) эсвэл {@link parseQr}-ийн токен. */
|
|
1185
|
+
qr: string;
|
|
1186
|
+
/** Хүсэх аттрибутууд (≥ 1, давхардалгүй); RP-д аттрибут бүрийн `QR_ATTR:<нэр>` эрх. */
|
|
1187
|
+
attributes: readonly QrAttribute[];
|
|
1188
|
+
/** RP-ийн nonce (сонголттой) — JWS-ийн `nonce`-д буцна; өгөөгүй бол rpChallenge. */
|
|
1189
|
+
nonce?: string;
|
|
1190
|
+
}
|
|
1191
|
+
/** `qr.start`-ийн хариу — JSON-оор хадгалж (stateless backend) `qr.result`-д дамжуулна. `vc`-г кассын дэлгэцэнд харуул. */
|
|
1192
|
+
interface QrSession {
|
|
1193
|
+
sessionId: string;
|
|
1194
|
+
vc: string;
|
|
1195
|
+
nonce: string;
|
|
1196
|
+
attributes: QrAttribute[];
|
|
1197
|
+
/** CA-ийн session дуусах мөч (мс epoch), байвал. */
|
|
1198
|
+
expiresAt?: number;
|
|
1199
|
+
}
|
|
1200
|
+
interface QrFullName {
|
|
1201
|
+
surname: string;
|
|
1202
|
+
givenName: string;
|
|
1203
|
+
}
|
|
1204
|
+
/** Баталгаажсан аттрибутууд — хүсээгүй / байхгүй нь алга. */
|
|
1205
|
+
interface QrAttrs {
|
|
1206
|
+
age_over_18?: boolean;
|
|
1207
|
+
age_over_21?: boolean;
|
|
1208
|
+
full_name?: QrFullName;
|
|
1209
|
+
phone?: string;
|
|
1210
|
+
birth_date?: string;
|
|
1211
|
+
civil_id?: string;
|
|
1212
|
+
}
|
|
1213
|
+
interface QrPresentation {
|
|
1214
|
+
/** Энэ RP-д зориулсан тогтмол pairwise id (иргэний дугаар биш). */
|
|
1215
|
+
sub: string;
|
|
1216
|
+
attrs: QrAttrs;
|
|
1217
|
+
/** Хүссэн боловч бүртгэлд байхгүй (алдаа биш). */
|
|
1218
|
+
unavailable: QrAttribute[];
|
|
1219
|
+
sessionId: string;
|
|
1220
|
+
/** `iat`, мс epoch. */
|
|
1221
|
+
issuedAt: number;
|
|
1222
|
+
/** Түүхий compact JWS (аудитад хадгалж болно). */
|
|
1223
|
+
jws: string;
|
|
1224
|
+
}
|
|
1225
|
+
/** `qr.check`-ийн хариу: иргэн хараахан хариулаагүй, эсвэл шалгагдсан presentation. */
|
|
1226
|
+
type QrCheck = {
|
|
1227
|
+
state: "RUNNING";
|
|
1228
|
+
} | {
|
|
1229
|
+
state: "COMPLETE";
|
|
1230
|
+
presentation: QrPresentation;
|
|
1231
|
+
};
|
|
1232
|
+
interface QrExpect {
|
|
1233
|
+
issuer?: string;
|
|
1234
|
+
/** RP UUID. */
|
|
1235
|
+
audience: string;
|
|
1236
|
+
sessionId: string;
|
|
1237
|
+
nonce: string;
|
|
1238
|
+
attributes: readonly string[];
|
|
1239
|
+
/** мс epoch; анхдагч Date.now(). */
|
|
1240
|
+
now?: number;
|
|
1241
|
+
maxAgeMs?: number;
|
|
1242
|
+
}
|
|
1243
|
+
interface Jwk {
|
|
1244
|
+
kty?: string;
|
|
1245
|
+
crv?: string;
|
|
1246
|
+
x?: string;
|
|
1247
|
+
y?: string;
|
|
1248
|
+
kid?: string;
|
|
1249
|
+
alg?: string;
|
|
1250
|
+
use?: string;
|
|
1251
|
+
}
|
|
1252
|
+
interface Jwks {
|
|
1253
|
+
keys: Jwk[];
|
|
1254
|
+
}
|
|
1255
|
+
/**
|
|
1256
|
+
* Compact JWS-ийг `jwks`-ээр шалгаж (ES256, kid) claim-уудыг тулгана: iss, aud (RP UUID), sid, nonce, iat (≤ now+60 с,
|
|
1257
|
+
* ≥ now−maxAge), exp (байвал), attrs ∪ unavailable = хүссэн аттрибутууд яг, аттрибут бүрийн төрөл. Алдаа бол
|
|
1258
|
+
* {@link QrError} `QR_PRESENTATION_INVALID` — хариунд ИТГЭХГҮЙ. Сүлжээгүй (хадгалсан presentation-ийг дахин шалгах, тест).
|
|
1259
|
+
*/
|
|
1260
|
+
declare function verifyQrPresentation(jws: string, jwks: Jwks | null | undefined, expect: QrExpect): QrPresentation;
|
|
1261
|
+
interface QrApiDeps {
|
|
1262
|
+
http: Http;
|
|
1263
|
+
session: SessionApi;
|
|
1264
|
+
credentials: RpCredentials;
|
|
1265
|
+
config?: QrConfig;
|
|
1266
|
+
fetchImpl?: typeof fetch;
|
|
1267
|
+
dispatcher?: unknown;
|
|
1268
|
+
timeoutMs?: number;
|
|
1269
|
+
}
|
|
1270
|
+
/** `client.qr` — «Миний QR»: parse → start → result. */
|
|
1271
|
+
declare class QrApi {
|
|
1272
|
+
private readonly d;
|
|
1273
|
+
private jwks;
|
|
1274
|
+
private fetchedAt;
|
|
1275
|
+
private lastAttempt;
|
|
1276
|
+
private inflight;
|
|
1277
|
+
constructor(d: QrApiDeps);
|
|
1278
|
+
/** {@link parseQr}. */
|
|
1279
|
+
parse(scanned: string): string;
|
|
1280
|
+
/**
|
|
1281
|
+
* `POST /authentication/qr` — QR-ийн токеныг (нэг удаагийн) CA-д өгч иргэний утас руу хүсэлт илгээнэ; `vc`-г кассын
|
|
1282
|
+
* дэлгэцэнд харуул. Алдаа: {@link QrError} (FORMAT / ATTRIBUTES — CA руу явахгүй), 404 {@link QrTokenInvalidError}
|
|
1283
|
+
* (шинэ QR гаргуул), 403 ForbiddenError (QR_PRESENT / QR_ATTR:* эрх алга).
|
|
1284
|
+
*/
|
|
1285
|
+
start(input: QrStartInput): Promise<QrSession>;
|
|
1286
|
+
/**
|
|
1287
|
+
* Session дуустал long-poll хийж presentation-ийг CA-ийн JWKS-ээр шалгана. Татгалзсан / хугацаа дууссан бол
|
|
1288
|
+
* SessionFailedError (`USER_REFUSED`, `TIMEOUT` г.м.); шалгалт унавал {@link QrError} `QR_PRESENTATION_INVALID`;
|
|
1289
|
+
* JWKS татагдахгүй бол `QR_JWKS_UNAVAILABLE` (дахин оролдож болно).
|
|
1290
|
+
*/
|
|
1291
|
+
result(session: QrSession, opts?: {
|
|
1292
|
+
maxWaitMs?: number;
|
|
1293
|
+
serverPollMs?: number;
|
|
1294
|
+
}): Promise<QrPresentation>;
|
|
1295
|
+
/**
|
|
1296
|
+
* Нэг удаагийн шалгалт (polling UI-д): `GET /session/{id}` (`serverPollMs` хүртэл, анхдагч 1000 мс) — иргэн хараахан
|
|
1297
|
+
* хариулаагүй бол `{ state: "RUNNING" }`, зөвшөөрсөн бол JWS/JWKS-ээр шалгасан `{ state: "COMPLETE", presentation }`.
|
|
1298
|
+
* Татгалзсан / CA-ийн хугацаа дууссан бол SessionFailedError; бусад алдаа {@link result}-тэй ижил.
|
|
1299
|
+
*/
|
|
1300
|
+
check(session: QrSession, opts?: {
|
|
1301
|
+
serverPollMs?: number;
|
|
1302
|
+
}): Promise<QrCheck>;
|
|
1303
|
+
private finish;
|
|
1304
|
+
/** Хадгалсан presentation JWS-ийг QrSession-тэй тулгаж шалгана (JWKS кэш; танихгүй kid → нэг удаа дахин татна). */
|
|
1305
|
+
verify(jws: string, session: QrSession): Promise<QrPresentation>;
|
|
1306
|
+
private keys;
|
|
1307
|
+
private fetchJwks;
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1142
1310
|
/** Хүсэлтийн хугацаа: CA бүх хүлээн авагчид 120 с-д илгээнэ, nginx 150 с. */
|
|
1143
1311
|
declare const DEFAULT_SHARE_TIMEOUT_MS = 150000;
|
|
1144
1312
|
/** `client.share()`-ийн оролт. Хязгаар (CA main 0329ef95): discovery-ийн `share` блок ({@link ShareInfo}). */
|
|
@@ -1262,6 +1430,8 @@ interface ClientConfig {
|
|
|
1262
1430
|
signSessionTtlMs?: number;
|
|
1263
1431
|
/** Trust anchor (Root CA) — validator-д. Production-д ЗААВАЛ. */
|
|
1264
1432
|
trust?: TrustConfig;
|
|
1433
|
+
/** «Миний QR»-ийн presentation шалгалт (JWKS URL, issuer, кэш). Анхдагч = prod CA. */
|
|
1434
|
+
qr?: QrConfig;
|
|
1265
1435
|
}
|
|
1266
1436
|
/** RP-API-ийн албан ёсны хост (2026-09-28-наас бүх RP, /v3-гүй). */
|
|
1267
1437
|
declare const DEFAULT_BASE_URL = "https://rp.eidmongolia.mn";
|
|
@@ -1275,6 +1445,8 @@ declare class EidClient {
|
|
|
1275
1445
|
readonly organization: OrganizationApi;
|
|
1276
1446
|
readonly person: PersonApi;
|
|
1277
1447
|
readonly token: TokenApi;
|
|
1448
|
+
/** «Миний QR» (биечлэн шалгах): parse → start → result. */
|
|
1449
|
+
readonly qr: QrApi;
|
|
1278
1450
|
readonly session: SessionApi;
|
|
1279
1451
|
readonly validator: ResponseValidator;
|
|
1280
1452
|
/** `credentials.rpName` — иргэний утсанд харагдах RP нэр. */
|
|
@@ -1687,4 +1859,4 @@ declare function withReturnHint(callbackUrl: string, userAgent: string): string;
|
|
|
1687
1859
|
*/
|
|
1688
1860
|
declare function createEidLogin(opts: EidLoginOptions): EidLogin;
|
|
1689
1861
|
|
|
1690
|
-
export { APP_ATTESTATION_INVALID, AcspContext, type AcspV2Params, type ActivityCounts, type ActivityItem, type ActivityQuery, ApiError, AuthApi, type AuthDefaults, type AuthOptions, type BuildDeviceLinkInput, CITIZEN_INTERMEDIATES_PEM, CITIZEN_ISSUING_CA_SKI, CSR_KEY_REUSED, type CertChoiceOptions, type CertCounts, type CertSubject, CertificateLevel, type ClientConfig, type CompletedForRegistration, DEFAULT_BASE_URL, DEFAULT_MAX_WAIT_MS, DEFAULT_PDF_TIMEOUT_MS, DEFAULT_SHARE_TIMEOUT_MS, DeviceLinkSession, type DeviceLinkSessionType, type DeviceLinkType, EidClient, EidImage, type EidLogin, type EidLoginContext, type EidLoginEvent, type EidLoginEventKind, type EidLoginIdentity, type EidLoginMode, type EidLoginOptions, type EidLoginRateLimitFn, type EidLoginRateLimits, type EidLoginRateRule, type EidLoginRequest, type EidLoginResponse, type EidLoginStore, type EidLoginSuccess, type EidLoginTx, FlowType, HashAlgorithm, Http, type HttpConfig, HttpErrorInit, Interaction, KYC_INCOMPLETE, LoginStoreFullError, MAX_APP_TRANSACTION_BYTES, MEMORY_LOGIN_STORE_MAX, NATIONAL_ROOT_CA_PEM, NO_ACTIVE_DEVICE, NotificationSession, type OcspCheckerOptions, OnBehalfErrorCode, OrganizationApi, PDF_SIGNATURE_REGISTER_FIELDS, type PdfDigestInput, type PdfDigestSession, type PdfDigestSigner, type PdfSignatureImage, type PersonActivity, PersonApi, PersonBlock, type PersonCertificate, type PersonCertificates, type PersonChild, type PersonChildren, type PersonDevice, type PersonDevices, type PersonSummary, type PriorSignature, type QrDeviceLinkTickerOptions, type RegisterSignatureInput, type RegisterSignatureResult, RepresentationsResponse, ResponseValidator, RetryableErrorCode, type RevocationChecker, type RevocationOutcome, type RevocationStatus, RpCredentials, SHARE_ERROR_CODES, SHARE_FORM_FIELDS, SessionApi, SessionResult, type SessionTtl, ShareError, type ShareErrorCode, type ShareInfo, type ShareInput, type ShareNotSignedReason, type ShareResult, SignApi, type SignDefaults, type SignOptions, SignatureAlgorithm, type Signer, type SignerRef, TOKEN_CONFLICT_CODES, TOKEN_ERROR_CODES, TOKEN_ISSUANCE_PENDING, TokenApi, type TokenAuthChallenge, type TokenAuthResult, type TokenCertInfo, type TokenCertInput, type TokenCertItem, type TokenCertPreview, type TokenCertResult, type TokenCertStart, type TokenConflictCode, type TokenErrorCode, type TokenIdentity, type TokenLimit, type TokenOrganization, type TrustConfig, type ValidateAuthOptions, type ValidateSignOptions, type VerifiedIdentity, type VerifiedSignature, WAIT_GRACE_MS, acspV2Digest, buildAcspV2Payload, buildDeviceLink, buildRegisterBody, certificateLevelOf, createEidLogin, defaultRateLimit, deviceLinkInput, forwardedClientIp, interactionsToBase64, memoryLoginStore, ocspRevocationChecker, parseSessionResult, parseSubject, personMatchesCertificate, qrDeviceLinkTicker, randomChallenge, registrationFromCompleted, resolveBaseUrl, sha256Base64, tokenAuthDigest, tokenLimitOf, userChallengeOf, verifyPayloadSignature, verifyPrehashedSignature, verifyTokenCertificates, withReturnHint };
|
|
1862
|
+
export { APP_ATTESTATION_INVALID, AcspContext, type AcspV2Params, type ActivityCounts, type ActivityItem, type ActivityQuery, ApiError, AuthApi, type AuthDefaults, type AuthOptions, type BuildDeviceLinkInput, CITIZEN_INTERMEDIATES_PEM, CITIZEN_ISSUING_CA_SKI, CSR_KEY_REUSED, type CertChoiceOptions, type CertCounts, type CertSubject, CertificateLevel, type ClientConfig, type CompletedForRegistration, DEFAULT_BASE_URL, DEFAULT_MAX_WAIT_MS, DEFAULT_PDF_TIMEOUT_MS, DEFAULT_QR_ISSUER, DEFAULT_QR_JWKS_CACHE_TTL_MS, DEFAULT_QR_JWKS_URL, DEFAULT_QR_MAX_AGE_MS, DEFAULT_SHARE_TIMEOUT_MS, DeviceLinkSession, type DeviceLinkSessionType, type DeviceLinkType, EidClient, EidError, EidImage, type EidLogin, type EidLoginContext, type EidLoginEvent, type EidLoginEventKind, type EidLoginIdentity, type EidLoginMode, type EidLoginOptions, type EidLoginRateLimitFn, type EidLoginRateLimits, type EidLoginRateRule, type EidLoginRequest, type EidLoginResponse, type EidLoginStore, type EidLoginSuccess, type EidLoginTx, FlowType, HashAlgorithm, Http, type HttpConfig, HttpErrorInit, Interaction, type Jwk, type Jwks, KYC_INCOMPLETE, LoginStoreFullError, MAX_APP_TRANSACTION_BYTES, MEMORY_LOGIN_STORE_MAX, NATIONAL_ROOT_CA_PEM, NO_ACTIVE_DEVICE, NotificationSession, type OcspCheckerOptions, OnBehalfErrorCode, OrganizationApi, PDF_SIGNATURE_REGISTER_FIELDS, type PdfDigestInput, type PdfDigestSession, type PdfDigestSigner, type PdfSignatureImage, type PersonActivity, PersonApi, PersonBlock, type PersonCertificate, type PersonCertificates, type PersonChild, type PersonChildren, type PersonDevice, type PersonDevices, type PersonSummary, type PriorSignature, QR_ATTRIBUTES, QR_CLOCK_SKEW_MS, QR_ERROR_CODES, QR_PREFIX, QrApi, type QrAttribute, type QrAttrs, type QrCheck, type QrConfig, type QrDeviceLinkTickerOptions, QrError, type QrErrorCode, type QrExpect, type QrFullName, type QrPresentation, type QrSession, type QrStartInput, type RegisterSignatureInput, type RegisterSignatureResult, RepresentationsResponse, ResponseValidator, RetryableErrorCode, type RevocationChecker, type RevocationOutcome, type RevocationStatus, RpCredentials, SHARE_ERROR_CODES, SHARE_FORM_FIELDS, SessionApi, SessionResult, type SessionTtl, ShareError, type ShareErrorCode, type ShareInfo, type ShareInput, type ShareNotSignedReason, type ShareResult, SignApi, type SignDefaults, type SignOptions, SignatureAlgorithm, type Signer, type SignerRef, TOKEN_CONFLICT_CODES, TOKEN_ERROR_CODES, TOKEN_ISSUANCE_PENDING, TokenApi, type TokenAuthChallenge, type TokenAuthResult, type TokenCertInfo, type TokenCertInput, type TokenCertItem, type TokenCertPreview, type TokenCertResult, type TokenCertStart, type TokenConflictCode, type TokenErrorCode, type TokenIdentity, type TokenLimit, type TokenOrganization, type TrustConfig, type ValidateAuthOptions, type ValidateSignOptions, type VerifiedIdentity, type VerifiedSignature, WAIT_GRACE_MS, acspV2Digest, buildAcspV2Payload, buildDeviceLink, buildRegisterBody, certificateLevelOf, createEidLogin, defaultRateLimit, deviceLinkInput, forwardedClientIp, interactionsToBase64, memoryLoginStore, ocspRevocationChecker, parseQr, parseSessionResult, parseSubject, personMatchesCertificate, qrDeviceLinkTicker, randomChallenge, registrationFromCompleted, resolveBaseUrl, sha256Base64, tokenAuthDigest, tokenLimitOf, userChallengeOf, verifyPayloadSignature, verifyPrehashedSignature, verifyQrPresentation, verifyTokenCertificates, withReturnHint };
|