@metamask-previews/kyc-controller 0.0.0-preview-8bfa290fb → 0.2.0-preview-97d6b86c0
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/CHANGELOG.md +30 -49
- package/dist/{KycController-method-action-types.d.mts → KycController-method-action-types.d.ts} +35 -7
- package/dist/KycController-method-action-types.d.ts.map +1 -0
- package/dist/{KycController-method-action-types.mjs → KycController-method-action-types.js} +1 -1
- package/dist/KycController-method-action-types.js.map +1 -0
- package/dist/{KycController.d.mts → KycController.d.ts} +87 -45
- package/dist/KycController.d.ts.map +1 -0
- package/dist/KycController.js +1990 -0
- package/dist/KycController.js.map +1 -0
- package/dist/{KycService-method-action-types.d.mts → KycService-method-action-types.d.ts} +16 -16
- package/dist/KycService-method-action-types.d.ts.map +1 -0
- package/dist/{KycService-method-action-types.mjs → KycService-method-action-types.js} +1 -1
- package/dist/KycService-method-action-types.js.map +1 -0
- package/dist/{KycService.d.mts → KycService.d.ts} +23 -23
- package/dist/KycService.d.ts.map +1 -0
- package/dist/{KycService.mjs → KycService.js} +194 -185
- package/dist/KycService.js.map +1 -0
- package/dist/{countryCodes.d.cts → countryCodes.d.ts} +1 -1
- package/dist/countryCodes.d.ts.map +1 -0
- package/dist/{countryCodes.mjs → countryCodes.js} +1 -1
- package/dist/countryCodes.js.map +1 -0
- package/dist/{crypto.d.mts → crypto.d.ts} +1 -1
- package/dist/crypto.d.ts.map +1 -0
- package/dist/{crypto.mjs → crypto.js} +7 -7
- package/dist/crypto.js.map +1 -0
- package/dist/{encoding.d.mts → encoding.d.ts} +1 -1
- package/dist/encoding.d.ts.map +1 -0
- package/dist/{encoding.mjs → encoding.js} +2 -2
- package/dist/encoding.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/{logger.d.cts → logger.d.ts} +2 -3
- package/dist/logger.d.ts.map +1 -0
- package/dist/{logger.mjs → logger.js} +2 -2
- package/dist/logger.js.map +1 -0
- package/dist/{selectors.d.mts → selectors.d.ts} +4 -4
- package/dist/selectors.d.ts.map +1 -0
- package/dist/{selectors.mjs → selectors.js} +2 -2
- package/dist/selectors.js.map +1 -0
- package/dist/{types.d.cts → types.d.ts} +72 -13
- package/dist/types.d.ts.map +1 -0
- package/dist/{types.mjs → types.js} +1 -1
- package/dist/types.js.map +1 -0
- package/dist/ukyc/{constants.d.mts → constants.d.ts} +9 -9
- package/dist/ukyc/constants.d.ts.map +1 -0
- package/dist/ukyc/{constants.mjs → constants.js} +1 -1
- package/dist/ukyc/constants.js.map +1 -0
- package/dist/ukyc/{deriveClientMaterial.d.cts → deriveClientMaterial.d.ts} +1 -1
- package/dist/ukyc/deriveClientMaterial.d.ts.map +1 -0
- package/dist/ukyc/{deriveClientMaterial.mjs → deriveClientMaterial.js} +7 -7
- package/dist/ukyc/deriveClientMaterial.js.map +1 -0
- package/dist/ukyc/{jwtChain.d.mts → jwtChain.d.ts} +1 -1
- package/dist/ukyc/jwtChain.d.ts.map +1 -0
- package/dist/ukyc/{jwtChain.mjs → jwtChain.js} +4 -4
- package/dist/ukyc/jwtChain.js.map +1 -0
- package/dist/ukyc/{localUserSecret.d.mts → localUserSecret.d.ts} +1 -1
- package/dist/ukyc/localUserSecret.d.ts.map +1 -0
- package/dist/ukyc/{localUserSecret.mjs → localUserSecret.js} +4 -4
- package/dist/ukyc/localUserSecret.js.map +1 -0
- package/dist/ukyc/{storageAccessToken.d.mts → storageAccessToken.d.ts} +2 -2
- package/dist/ukyc/storageAccessToken.d.ts.map +1 -0
- package/dist/ukyc/{storageAccessToken.mjs → storageAccessToken.js} +5 -5
- package/dist/ukyc/storageAccessToken.js.map +1 -0
- package/dist/ukyc/{testToken.d.mts → testToken.d.ts} +2 -2
- package/dist/ukyc/testToken.d.ts.map +1 -0
- package/dist/ukyc/{testToken.mjs → testToken.js} +5 -5
- package/dist/ukyc/testToken.js.map +1 -0
- package/dist/ukyc/{wrapEncryptionKey.d.mts → wrapEncryptionKey.d.ts} +1 -1
- package/dist/ukyc/wrapEncryptionKey.d.ts.map +1 -0
- package/dist/ukyc/{wrapEncryptionKey.mjs → wrapEncryptionKey.js} +3 -4
- package/dist/ukyc/wrapEncryptionKey.js.map +1 -0
- package/dist/ukyc/{wrappedRelayPayload.d.mts → wrappedRelayPayload.d.ts} +3 -3
- package/dist/ukyc/wrappedRelayPayload.d.ts.map +1 -0
- package/dist/ukyc/{wrappedRelayPayload.mjs → wrappedRelayPayload.js} +2 -2
- package/dist/ukyc/wrappedRelayPayload.js.map +1 -0
- package/dist/vendorDisclaimerAcceptance.d.ts +39 -0
- package/dist/vendorDisclaimerAcceptance.d.ts.map +1 -0
- package/dist/vendorDisclaimerAcceptance.js +67 -0
- package/dist/vendorDisclaimerAcceptance.js.map +1 -0
- package/dist/vendors/MoonPayFrameHandler.d.ts +74 -0
- package/dist/vendors/MoonPayFrameHandler.d.ts.map +1 -0
- package/dist/vendors/MoonPayFrameHandler.js +218 -0
- package/dist/vendors/MoonPayFrameHandler.js.map +1 -0
- package/package.json +19 -23
- package/dist/KycController-method-action-types.cjs +0 -7
- package/dist/KycController-method-action-types.cjs.map +0 -1
- package/dist/KycController-method-action-types.d.cts +0 -239
- package/dist/KycController-method-action-types.d.cts.map +0 -1
- package/dist/KycController-method-action-types.d.mts.map +0 -1
- package/dist/KycController-method-action-types.mjs.map +0 -1
- package/dist/KycController.cjs +0 -1882
- package/dist/KycController.cjs.map +0 -1
- package/dist/KycController.d.cts +0 -395
- package/dist/KycController.d.cts.map +0 -1
- package/dist/KycController.d.mts.map +0 -1
- package/dist/KycController.mjs +0 -1877
- package/dist/KycController.mjs.map +0 -1
- package/dist/KycService-method-action-types.cjs +0 -7
- package/dist/KycService-method-action-types.cjs.map +0 -1
- package/dist/KycService-method-action-types.d.cts +0 -220
- package/dist/KycService-method-action-types.d.cts.map +0 -1
- package/dist/KycService-method-action-types.d.mts.map +0 -1
- package/dist/KycService-method-action-types.mjs.map +0 -1
- package/dist/KycService.cjs +0 -637
- package/dist/KycService.cjs.map +0 -1
- package/dist/KycService.d.cts +0 -552
- package/dist/KycService.d.cts.map +0 -1
- package/dist/KycService.d.mts.map +0 -1
- package/dist/KycService.mjs.map +0 -1
- package/dist/countryCodes.cjs +0 -274
- package/dist/countryCodes.cjs.map +0 -1
- package/dist/countryCodes.d.cts.map +0 -1
- package/dist/countryCodes.d.mts +0 -18
- package/dist/countryCodes.d.mts.map +0 -1
- package/dist/countryCodes.mjs.map +0 -1
- package/dist/crypto.cjs +0 -154
- package/dist/crypto.cjs.map +0 -1
- package/dist/crypto.d.cts +0 -84
- package/dist/crypto.d.cts.map +0 -1
- package/dist/crypto.d.mts.map +0 -1
- package/dist/crypto.mjs.map +0 -1
- package/dist/encoding.cjs +0 -40
- package/dist/encoding.cjs.map +0 -1
- package/dist/encoding.d.cts +0 -24
- package/dist/encoding.d.cts.map +0 -1
- package/dist/encoding.d.mts.map +0 -1
- package/dist/encoding.mjs.map +0 -1
- package/dist/index.cjs +0 -37
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -19
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts +0 -19
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs +0 -12
- package/dist/index.mjs.map +0 -1
- package/dist/logger.cjs +0 -9
- package/dist/logger.cjs.map +0 -1
- package/dist/logger.d.cts.map +0 -1
- package/dist/logger.d.mts +0 -6
- package/dist/logger.d.mts.map +0 -1
- package/dist/logger.mjs.map +0 -1
- package/dist/selectors.cjs +0 -30
- package/dist/selectors.cjs.map +0 -1
- package/dist/selectors.d.cts +0 -24
- package/dist/selectors.d.cts.map +0 -1
- package/dist/selectors.d.mts.map +0 -1
- package/dist/selectors.mjs.map +0 -1
- package/dist/types.cjs +0 -10
- package/dist/types.cjs.map +0 -1
- package/dist/types.d.cts.map +0 -1
- package/dist/types.d.mts +0 -217
- package/dist/types.d.mts.map +0 -1
- package/dist/types.mjs.map +0 -1
- package/dist/ukyc/constants.cjs +0 -75
- package/dist/ukyc/constants.cjs.map +0 -1
- package/dist/ukyc/constants.d.cts +0 -69
- package/dist/ukyc/constants.d.cts.map +0 -1
- package/dist/ukyc/constants.d.mts.map +0 -1
- package/dist/ukyc/constants.mjs.map +0 -1
- package/dist/ukyc/deriveClientMaterial.cjs +0 -65
- package/dist/ukyc/deriveClientMaterial.cjs.map +0 -1
- package/dist/ukyc/deriveClientMaterial.d.cts.map +0 -1
- package/dist/ukyc/deriveClientMaterial.d.mts +0 -54
- package/dist/ukyc/deriveClientMaterial.d.mts.map +0 -1
- package/dist/ukyc/deriveClientMaterial.mjs.map +0 -1
- package/dist/ukyc/jwtChain.cjs +0 -54
- package/dist/ukyc/jwtChain.cjs.map +0 -1
- package/dist/ukyc/jwtChain.d.cts +0 -40
- package/dist/ukyc/jwtChain.d.cts.map +0 -1
- package/dist/ukyc/jwtChain.d.mts.map +0 -1
- package/dist/ukyc/jwtChain.mjs.map +0 -1
- package/dist/ukyc/localUserSecret.cjs +0 -98
- package/dist/ukyc/localUserSecret.cjs.map +0 -1
- package/dist/ukyc/localUserSecret.d.cts +0 -65
- package/dist/ukyc/localUserSecret.d.cts.map +0 -1
- package/dist/ukyc/localUserSecret.d.mts.map +0 -1
- package/dist/ukyc/localUserSecret.mjs.map +0 -1
- package/dist/ukyc/storageAccessToken.cjs +0 -139
- package/dist/ukyc/storageAccessToken.cjs.map +0 -1
- package/dist/ukyc/storageAccessToken.d.cts +0 -99
- package/dist/ukyc/storageAccessToken.d.cts.map +0 -1
- package/dist/ukyc/storageAccessToken.d.mts.map +0 -1
- package/dist/ukyc/storageAccessToken.mjs.map +0 -1
- package/dist/ukyc/testToken.cjs +0 -61
- package/dist/ukyc/testToken.cjs.map +0 -1
- package/dist/ukyc/testToken.d.cts +0 -50
- package/dist/ukyc/testToken.d.cts.map +0 -1
- package/dist/ukyc/testToken.d.mts.map +0 -1
- package/dist/ukyc/testToken.mjs.map +0 -1
- package/dist/ukyc/wrapEncryptionKey.cjs +0 -31
- package/dist/ukyc/wrapEncryptionKey.cjs.map +0 -1
- package/dist/ukyc/wrapEncryptionKey.d.cts +0 -36
- package/dist/ukyc/wrapEncryptionKey.d.cts.map +0 -1
- package/dist/ukyc/wrapEncryptionKey.d.mts.map +0 -1
- package/dist/ukyc/wrapEncryptionKey.mjs.map +0 -1
- package/dist/ukyc/wrappedRelayPayload.cjs +0 -32
- package/dist/ukyc/wrappedRelayPayload.cjs.map +0 -1
- package/dist/ukyc/wrappedRelayPayload.d.cts +0 -35
- package/dist/ukyc/wrappedRelayPayload.d.cts.map +0 -1
- package/dist/ukyc/wrappedRelayPayload.d.mts.map +0 -1
- package/dist/ukyc/wrappedRelayPayload.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,58 +9,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
### Added
|
|
11
11
|
|
|
12
|
-
- Add `
|
|
13
|
-
- Add session-scoped disclaimer APIs on `KycService` for the idOS / KYC-provider catalog ([#9979](https://github.com/MetaMask/core/pull/9979)):
|
|
14
|
-
- `fetchSessionDisclaimers({ sessionId })` calls `GET /sessions/{sessionId}/disclaimers`
|
|
15
|
-
- `submitSessionDisclaimers({ sessionId, idOS, kycProvider, credentialReusabilityConsentGiven })` calls `POST /sessions/{sessionId}/disclaimers`
|
|
16
|
-
- Add `KycService.submitVendorDisclaimers({ vendor, disclaimerIds })` (`POST /vendors/{vendor}/disclaimers`) to record Iron T&C signings, plus the `KycVendorSigning` response type. The consents path calls this alongside session-scoped disclaimers; vendor T&C ids are no longer sent on the session disclaimer POST. ([#9979](https://github.com/MetaMask/core/pull/9979))
|
|
17
|
-
- Add `KycConsentDocument`, `KycConsentRecord`, and `KycSessionDisclaimers` types for that catalog, plus in-memory `credentialReusabilityConsentGiven` and `sessionDisclaimers` controller state. `acceptTermsAndStartSession` forwards optional `credentialReusabilityConsentGiven` (default `false`). ([#9979](https://github.com/MetaMask/core/pull/9979))
|
|
18
|
-
- Parameterize Universal KYC vendor HTTP on `KycService` so identity vendors share one client surface instead of vendor-branded methods ([#9908](https://github.com/MetaMask/core/pull/9908)):
|
|
19
|
-
- `fetchDisclaimers({ vendor, country })` and `checkKycRequired({ vendor, ... })` call `/vendors/{vendor}/disclaimers` and `/vendors/{vendor}/kyc-required` (`vendor` defaults to `moonpay`)
|
|
20
|
-
- `createVendorCustomer({ vendor, email })` calls `POST /vendors/{vendor}/customers`
|
|
21
|
-
- `fetchKycStatus()` reads `GET /kyc/status`
|
|
22
|
-
- Add a consents-path KYC flow on `KycController` for non-MoonPay vendors (currently `iron`): empty-shell customer → disclaimers → consents → SumSub, skipping MoonPay Check/Auth frames. `initialize({ vendor })` and `createVendorCustomer({ vendor, email })` drive the path; `acceptTermsAndStartSession` requires `sumsubTncSigned` / `idosTncSigned`. ([#9908](https://github.com/MetaMask/core/pull/9908))
|
|
23
|
-
- Add `KycController.refreshKycStatus()` and the `KycController:statusChanged` event so consumers can poll user-keyed KYC status for toast / banner surfaces. ([#9908](https://github.com/MetaMask/core/pull/9908))
|
|
24
|
-
- Add `KycController.getCustomerIdentity()` (and `KycCustomerIdentity`) returning the vendor-scoped `{ vendor, id }` for the current session, or `null` before authentication and after `reset()`. ([#9908](https://github.com/MetaMask/core/pull/9908))
|
|
25
|
-
- Extend `KycProduct` with `'money'` and `KycVendor` with `'iron'`. ([#9908](https://github.com/MetaMask/core/pull/9908))
|
|
26
|
-
- Add `KycUserStatus` / `KycUserStatusResponse` types for the simplified `GET /kyc/status` payload. ([#9908](https://github.com/MetaMask/core/pull/9908))
|
|
27
|
-
- Add persisted `termsAcceptedVendor` state recording which vendor's disclaimers `acceptedDisclaimerIds` belong to, so stored acceptance is only reused for that vendor. ([#9908](https://github.com/MetaMask/core/pull/9908))
|
|
28
|
-
- Add persisted `sumsubTncAccepted` and `idosTncAccepted` state so T&C2 flags can be validated when resuming a consents-path session. ([#9908](https://github.com/MetaMask/core/pull/9908))
|
|
29
|
-
- Add `KycController.clearState()` (and the `KycController:clearState` action) restoring the default state, including the fields `reset()` preserves: the session email, terms acceptance, the per-product KYC-required cache and the user-keyed status. Intended for a full wallet reset. ([#9958](https://github.com/MetaMask/core/pull/9958))
|
|
12
|
+
- Add `KycController.fetchSessionDisclaimers`, which fetches the idOS + KYC-provider disclaimers by `{ sessionId }` or `{ country }`. ([#10162](https://github.com/MetaMask/core/pull/10162))
|
|
30
13
|
|
|
31
14
|
### Changed
|
|
32
15
|
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
- **BREAKING:**
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
- **BREAKING:** Replace `KycService.submitConsents` (`POST /consents`) with session-scoped `fetchSessionDisclaimers` / `submitSessionDisclaimers` plus vendor T&C recording via `submitVendorDisclaimers`. Consents now use `{ key, version }` document records plus `credentialReusabilityConsentGiven` instead of Iron disclaimer ids and boolean T&C flags, and they require a UKYC session id. Iron content ids are posted separately to `POST /vendors/{vendor}/disclaimers`. The consents path records vendor T&Cs, then creates the UKYC session, then records session disclaimers. A 409 conflict is re-checked with a GET and only treated as success when every accepted document is consented. ([#9979](https://github.com/MetaMask/core/pull/9979))
|
|
40
|
-
- Make the `fetch` option on the `KycService` constructor optional; it now defaults to the runtime's native `fetch` (browser, React Native, Node 18+), so consumers no longer need to inject one. ([#9908](https://github.com/MetaMask/core/pull/9908))
|
|
41
|
-
- **BREAKING:** Invalidate terms acceptance when `termsAcceptedVendor` is `null` (pre-migration state), forcing reacceptance after the multi-vendor upgrade to ensure users review current vendor terms. ([#9908](https://github.com/MetaMask/core/pull/9908))
|
|
42
|
-
- **BREAKING:** Require `sumsubTncSigned` and `idosTncSigned` on `acceptTermsAndStartSession` for every vendor, so callers explicitly declare T&C2 acceptance. Zero-argument calls and omitted flags fail instead of defaulting to `true`. ([#9908](https://github.com/MetaMask/core/pull/9908))
|
|
43
|
-
- Rename `CreateUkycSessionParams.vendorId` to `vendor` for consistency with other service methods. ([#9908](https://github.com/MetaMask/core/pull/9908))
|
|
44
|
-
- Bump `@metamask/base-data-service` from `^0.1.3` to `^1.0.0` ([#9972](https://github.com/MetaMask/core/pull/9972))
|
|
45
|
-
- Replace `KycController` `console.error` tracing with the `@metamask/utils` debug logger (`createProjectLogger` / `createModuleLogger`), so flow diagnostics are opt-in via `DEBUG=kyc-controller*` instead of always printing to the console. ([#10054](https://github.com/MetaMask/core/pull/10054))
|
|
46
|
-
- Bump `@metamask/utils` from `^11.11.0` to `^11.12.0` ([#10076](https://github.com/MetaMask/core/pull/10076))
|
|
16
|
+
- **BREAKING:** Rename `KycService.fetchDisclaimersCatalog` to `fetchSessionDisclaimersByCountry`. ([#10162](https://github.com/MetaMask/core/pull/10162))
|
|
17
|
+
- Rename `FetchDisclaimersCatalogParams` to `FetchSessionDisclaimersByCountryParams`.
|
|
18
|
+
- Rename the messenger action `KycService:fetchDisclaimersCatalog` to `KycService:fetchSessionDisclaimersByCountry`.
|
|
19
|
+
- **BREAKING:** Rename `KycService.fetchSessionDisclaimers` to `fetchSessionDisclaimersBySessionId` ([#10162](https://github.com/MetaMask/core/pull/10162))
|
|
20
|
+
- Rename `FetchSessionDisclaimersParams` to `FetchSessionDisclaimersBySessionIdParams`.
|
|
21
|
+
- Rename the messenger action `KycService:fetchSessionDisclaimers` to `KycService:fetchSessionDisclaimersBySessionId`.
|
|
47
22
|
|
|
48
|
-
|
|
23
|
+
## [0.2.0]
|
|
49
24
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- **BREAKING:** Drop CommonJS support ([#9536](https://github.com/MetaMask/core/pull/9536))
|
|
28
|
+
- This package is now ESM-only, but can still be used in CommonJS projects via `require(esm)` in modern Node.js versions (22+), or dynamic imports in older Node.js versions.
|
|
29
|
+
- **BREAKING:** Bump minimum Node.js version to 22 ([#9976](https://github.com/MetaMask/core/pull/9976))
|
|
30
|
+
- **BREAKING:** Bump TypeScript target to ES2022 ([#10019](https://github.com/MetaMask/core/pull/10019))
|
|
31
|
+
- This package now ships ES2022 code, requiring a compatible modern environment or bundler configuration to consume.
|
|
32
|
+
- Bump `@metamask/base-controller` from `^9.1.0` to `^10.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
|
|
33
|
+
- Bump `@metamask/base-data-service` from `^1.0.0` to `^2.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
|
|
34
|
+
- Bump `@metamask/controller-utils` from `^12.3.0` to `^13.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
|
|
35
|
+
- Bump `@metamask/geolocation-controller` from `^1.0.0` to `^2.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
|
|
36
|
+
- Bump `@metamask/messenger` from `^2.0.0` to `^3.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
|
|
37
|
+
- Bump `@metamask/profile-sync-controller` from `^30.0.0` to `^31.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
|
|
38
|
+
|
|
39
|
+
## [0.1.0]
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
|
|
43
|
+
- Initial Release ([#10145](https://github.com/MetaMask/core/pull/10145))
|
|
65
44
|
|
|
66
|
-
[Unreleased]: https://github.com/MetaMask/core/
|
|
45
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/kyc-controller@0.2.0...HEAD
|
|
46
|
+
[0.2.0]: https://github.com/MetaMask/core/compare/@metamask/kyc-controller@0.1.0...@metamask/kyc-controller@0.2.0
|
|
47
|
+
[0.1.0]: https://github.com/MetaMask/core/releases/tag/@metamask/kyc-controller@0.1.0
|
package/dist/{KycController-method-action-types.d.mts → KycController-method-action-types.d.ts}
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file is auto generated.
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import type { KycController } from
|
|
5
|
+
import type { KycController } from './KycController.js';
|
|
6
6
|
/**
|
|
7
7
|
* Resolves persisted terms + geolocation, and auto-creates a session when
|
|
8
8
|
* terms are already accepted and an email is available.
|
|
@@ -48,6 +48,28 @@ export type KycControllerLoadDisclaimersAction = {
|
|
|
48
48
|
type: `KycController:loadDisclaimers`;
|
|
49
49
|
handler: KycController['loadDisclaimers'];
|
|
50
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* Fetches the idOS + KYC-provider disclaimer catalog. Pass exactly one of
|
|
53
|
+
* `sessionId` or `country`:
|
|
54
|
+
*
|
|
55
|
+
* - `{ sessionId }` → {@link KycService.fetchSessionDisclaimersBySessionId}
|
|
56
|
+
* (`GET /sessions/{sessionId}/disclaimers`)
|
|
57
|
+
* - `{ country }` → {@link KycService.fetchSessionDisclaimersByCountry}
|
|
58
|
+
* (`GET /disclaimers?country=`)
|
|
59
|
+
*
|
|
60
|
+
* A session-id fetch also writes the catalog to `sessionDisclaimers`.
|
|
61
|
+
*
|
|
62
|
+
* @param params - The parameters. Provide exactly one of `sessionId` or
|
|
63
|
+
* `country`.
|
|
64
|
+
* @param params.sessionId - The UKYC session id.
|
|
65
|
+
* @param params.country - ISO 3166-1 alpha-3 country code.
|
|
66
|
+
* @returns The catalog. Session fetches include consent state; country
|
|
67
|
+
* fetches do not.
|
|
68
|
+
*/
|
|
69
|
+
export type KycControllerFetchSessionDisclaimersAction = {
|
|
70
|
+
type: `KycController:fetchSessionDisclaimers`;
|
|
71
|
+
handler: KycController['fetchSessionDisclaimers'];
|
|
72
|
+
};
|
|
51
73
|
/**
|
|
52
74
|
* Captures terms acceptance for the currently loaded disclaimers and creates
|
|
53
75
|
* a session.
|
|
@@ -57,10 +79,12 @@ export type KycControllerLoadDisclaimersAction = {
|
|
|
57
79
|
* @param params.product - The consuming feature the flow runs for. See
|
|
58
80
|
* {@link initialize} for how the product drives the automatic post
|
|
59
81
|
* authentication continuation.
|
|
60
|
-
* @param params.
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
82
|
+
* @param params.providerDisclaimersAccepted - Sumsub disclaimer documents the
|
|
83
|
+
* customer accepted (`{ key, version }` records). Required for every vendor
|
|
84
|
+
* so callers explicitly declare acceptance.
|
|
85
|
+
* @param params.idosDisclaimersAccepted - idOS disclaimer documents the
|
|
86
|
+
* customer accepted (`{ key, version }` records). Required for every vendor
|
|
87
|
+
* so callers explicitly declare acceptance.
|
|
64
88
|
* @param params.credentialReusabilityConsentGiven - Whether the customer
|
|
65
89
|
* consented to reuse existing idOS credentials. Used when recording
|
|
66
90
|
* session-scoped disclaimers on the consents path. Defaults to `false`.
|
|
@@ -194,6 +218,10 @@ export type KycControllerStartSumSubAction = {
|
|
|
194
218
|
* stores it on state, publishes {@link KycControllerStatusChangedEvent}, and
|
|
195
219
|
* schedules short-interval polling while the status is `pending`.
|
|
196
220
|
*
|
|
221
|
+
* Skipped when `userStatus` is already `completed`: a follow-up
|
|
222
|
+
* `GET /kyc/status` can still read a stale `pending` (for example after
|
|
223
|
+
* `session_not_in_valid_state`) and must not undo that decision.
|
|
224
|
+
*
|
|
197
225
|
* @returns The latest status payload.
|
|
198
226
|
*/
|
|
199
227
|
export type KycControllerRefreshKycStatusAction = {
|
|
@@ -235,5 +263,5 @@ export type KycControllerClearStateAction = {
|
|
|
235
263
|
/**
|
|
236
264
|
* Union of all KycController action types.
|
|
237
265
|
*/
|
|
238
|
-
export type KycControllerMethodActions = KycControllerInitializeAction | KycControllerCreateVendorCustomerAction | KycControllerLoadDisclaimersAction | KycControllerAcceptTermsAndStartSessionAction | KycControllerClearSavedTermsAction | KycControllerHandleFrameMessageAction | KycControllerBuildCheckFrameUrlAction | KycControllerBuildAuthFrameUrlAction | KycControllerBuildResetFrameUrlAction | KycControllerCheckKycRequiredAction | KycControllerGetKycStatusAction | KycControllerGetCustomerIdentityAction | KycControllerStartSumSubAction | KycControllerRefreshKycStatusAction | KycControllerGetSessionStatusAction | KycControllerResetAction | KycControllerClearStateAction;
|
|
239
|
-
//# sourceMappingURL=KycController-method-action-types.d.
|
|
266
|
+
export type KycControllerMethodActions = KycControllerInitializeAction | KycControllerCreateVendorCustomerAction | KycControllerLoadDisclaimersAction | KycControllerFetchSessionDisclaimersAction | KycControllerAcceptTermsAndStartSessionAction | KycControllerClearSavedTermsAction | KycControllerHandleFrameMessageAction | KycControllerBuildCheckFrameUrlAction | KycControllerBuildAuthFrameUrlAction | KycControllerBuildResetFrameUrlAction | KycControllerCheckKycRequiredAction | KycControllerGetKycStatusAction | KycControllerGetCustomerIdentityAction | KycControllerStartSumSubAction | KycControllerRefreshKycStatusAction | KycControllerGetSessionStatusAction | KycControllerResetAction | KycControllerClearStateAction;
|
|
267
|
+
//# sourceMappingURL=KycController-method-action-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KycController-method-action-types.d.ts","sourceRoot":"","sources":["../src/KycController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CACtC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,uCAAuC,GAAG;IACpD,IAAI,EAAE,oCAAoC,CAAC;IAC3C,OAAO,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;CAChD,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,+BAA+B,CAAC;IACtC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C,GACpC,qCAAqC,GACrC,mCAAmC,GACnC,+BAA+B,GAC/B,sCAAsC,GACtC,8BAA8B,GAC9B,mCAAmC,GACnC,mCAAmC,GACnC,wBAAwB,GACxB,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KycController-method-action-types.js","sourceRoot":"","sources":["../src/KycController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { KycController } from './KycController.js';\n\n/**\n * Resolves persisted terms + geolocation, and auto-creates a session when\n * terms are already accepted and an email is available.\n *\n * @param params - Optional parameters.\n * @param params.email - The account email to associate with the session.\n * @param params.product - The consuming feature the flow runs for. When\n * provided, the controller automatically runs the KYC-required check once\n * authentication completes (and chains into document verification when KYC\n * is required). When omitted, the flow stops at `form` and the consumer must\n * call `checkKycRequired` manually.\n * @param params.vendor - Identity vendor for this flow. Non-MoonPay vendors\n * skip Check/Auth frames and use the consents path. Defaults to `moonpay`.\n */\nexport type KycControllerInitializeAction = {\n type: `KycController:initialize`;\n handler: KycController['initialize'];\n};\n\n/**\n * Creates (or resumes) an empty-shell customer for the given identity\n * vendor. Exposed so a consumer can ensure the customer exists before\n * showing T&C screens independently of {@link initialize}.\n *\n * A call while a session flow is already in progress is a no-op — matching\n * {@link initialize} — so a vendor switch cannot leave Check/Auth frames\n * attached to the wrong vendor. Call {@link reset} first to start over.\n *\n * @param params - The parameters.\n * @param params.vendor - Identity vendor for the customer.\n * @param params.email - Email for the vendor customer.\n */\nexport type KycControllerCreateVendorCustomerAction = {\n type: `KycController:createVendorCustomer`;\n handler: KycController['createVendorCustomer'];\n};\n\n/**\n * Loads the disclaimers for the resolved (or provided) country.\n *\n * @param params - Optional parameters.\n * @param params.country - ISO 3166-1 alpha-3 country code override.\n */\nexport type KycControllerLoadDisclaimersAction = {\n type: `KycController:loadDisclaimers`;\n handler: KycController['loadDisclaimers'];\n};\n\n/**\n * Fetches the idOS + KYC-provider disclaimer catalog. Pass exactly one of\n * `sessionId` or `country`:\n *\n * - `{ sessionId }` → {@link KycService.fetchSessionDisclaimersBySessionId}\n * (`GET /sessions/{sessionId}/disclaimers`)\n * - `{ country }` → {@link KycService.fetchSessionDisclaimersByCountry}\n * (`GET /disclaimers?country=`)\n *\n * A session-id fetch also writes the catalog to `sessionDisclaimers`.\n *\n * @param params - The parameters. Provide exactly one of `sessionId` or\n * `country`.\n * @param params.sessionId - The UKYC session id.\n * @param params.country - ISO 3166-1 alpha-3 country code.\n * @returns The catalog. Session fetches include consent state; country\n * fetches do not.\n */\nexport type KycControllerFetchSessionDisclaimersAction = {\n type: `KycController:fetchSessionDisclaimers`;\n handler: KycController['fetchSessionDisclaimers'];\n};\n\n/**\n * Captures terms acceptance for the currently loaded disclaimers and creates\n * a session.\n *\n * @param params - The parameters.\n * @param params.email - The account email to associate with the session.\n * @param params.product - The consuming feature the flow runs for. See\n * {@link initialize} for how the product drives the automatic post\n * authentication continuation.\n * @param params.providerDisclaimersAccepted - Sumsub disclaimer documents the\n * customer accepted (`{ key, version }` records). Required for every vendor\n * so callers explicitly declare acceptance.\n * @param params.idosDisclaimersAccepted - idOS disclaimer documents the\n * customer accepted (`{ key, version }` records). Required for every vendor\n * so callers explicitly declare acceptance.\n * @param params.credentialReusabilityConsentGiven - Whether the customer\n * consented to reuse existing idOS credentials. Used when recording\n * session-scoped disclaimers on the consents path. Defaults to `false`.\n */\nexport type KycControllerAcceptTermsAndStartSessionAction = {\n type: `KycController:acceptTermsAndStartSession`;\n handler: KycController['acceptTermsAndStartSession'];\n};\n\n/**\n * Clears the persisted terms acceptance.\n */\nexport type KycControllerClearSavedTermsAction = {\n type: `KycController:clearSavedTerms`;\n handler: KycController['clearSavedTerms'];\n};\n\n/**\n * Handles a message posted by a Check/Auth frame and advances the flow.\n *\n * The transport-agnostic caller (WebView on mobile, iframe on web) forwards\n * the raw message and injects the returned `reply` back into the frame.\n *\n * @param params - The parameters.\n * @param params.message - The raw message posted by the frame.\n * @returns An object whose optional `reply` should be posted back.\n */\nexport type KycControllerHandleFrameMessageAction = {\n type: `KycController:handleFrameMessage`;\n handler: KycController['handleFrameMessage'];\n};\n\n/**\n * Builds the Check-frame URL, or `null` when no session exists yet.\n *\n * @returns The Check-frame URL or `null`.\n */\nexport type KycControllerBuildCheckFrameUrlAction = {\n type: `KycController:buildCheckFrameUrl`;\n handler: KycController['buildCheckFrameUrl'];\n};\n\n/**\n * Builds the Auth-frame URL, or `null` when no client token is available.\n *\n * @returns The Auth-frame URL or `null`.\n */\nexport type KycControllerBuildAuthFrameUrlAction = {\n type: `KycController:buildAuthFrameUrl`;\n handler: KycController['buildAuthFrameUrl'];\n};\n\n/**\n * Builds the Reset-frame URL.\n *\n * @returns The Reset-frame URL.\n */\nexport type KycControllerBuildResetFrameUrlAction = {\n type: `KycController:buildResetFrameUrl`;\n handler: KycController['buildResetFrameUrl'];\n};\n\n/**\n * Checks whether KYC is required for a product and caches the result.\n *\n * @param params - The parameters.\n * @param params.product - The consuming feature.\n * @param params.country - Optional alpha-3 country override.\n * @returns Whether KYC is required.\n */\nexport type KycControllerCheckKycRequiredAction = {\n type: `KycController:checkKycRequired`;\n handler: KycController['checkKycRequired'];\n};\n\n/**\n * Reads the cached \"is KYC required\" result for a product.\n *\n * @param params - The parameters.\n * @param params.product - The consuming feature.\n * @returns The cached value, or `undefined` if not yet checked.\n */\nexport type KycControllerGetKycStatusAction = {\n type: `KycController:getKycStatus`;\n handler: KycController['getKycStatus'];\n};\n\n/**\n * Returns the vendor-scoped identity for the currently authenticated\n * customer, or `null` when the flow has not yet captured a vendor customer\n * id (before authentication or after {@link reset}), or when a MoonPay id\n * is present under a different `activeVendor`.\n *\n * Exposed so consumers (e.g. ramps autoramp creation) can attach the vendor\n * customer id to downstream calls without reading the full KYC state, which\n * also holds session/access tokens. The id is session-scoped and never\n * persisted.\n *\n * @returns The current {@link KycCustomerIdentity}, or `null`.\n */\nexport type KycControllerGetCustomerIdentityAction = {\n type: `KycController:getCustomerIdentity`;\n handler: KycController['getCustomerIdentity'];\n};\n\n/**\n * Runs the SumSub document-verification sub-flow end to end:\n *\n * 1. creates a UKYC session, receiving per-secret encryption schemas;\n * 2. verifies the `encryptionDataKey` schema's `jwtChain` against the\n * idOS enclave JWKS and the `ukycCapabilityToken` schema's `jwtChain` against\n * the idOS relay JWKS, then confirms each attested session server public\n * key;\n * 3. derives the `data_encryption_key` from the wallet's UKYC\n * `local_user_secret` and wraps it for the session server;\n * 4. mints a client-signed, read-only `ukyc_capability_token`, wraps it the\n * same way as the encryption key, and submits both via authorizations;\n * 5. fetches the SumSub applicant access token; and\n * 6. presents the SDK via the injected launcher.\n *\n * If a UKYC session already exists (the consents path creates it before\n * recording session disclaimers), steps 1–4 are skipped.\n *\n * If authorizations report the applicant is already approved on the relay\n * while the vendor is still finalizing (`kycStatus: approved`,\n * `finalStatus: pending`), the sub-flow stops at step 4 with a\n * `vendorProcessing` status and a message rather than launching the SDK.\n *\n * @param params - Optional parameters.\n * @param params.locale - BCP-47 locale for the SDK UI.\n * @param params.debug - Enables SDK debug logging.\n * @returns The SDK result.\n */\nexport type KycControllerStartSumSubAction = {\n type: `KycController:startSumSub`;\n handler: KycController['startSumSub'];\n};\n\n/**\n * Refreshes the user-keyed simplified KYC status from `GET /kyc/status`,\n * stores it on state, publishes {@link KycControllerStatusChangedEvent}, and\n * schedules short-interval polling while the status is `pending`.\n *\n * Skipped when `userStatus` is already `completed`: a follow-up\n * `GET /kyc/status` can still read a stale `pending` (for example after\n * `session_not_in_valid_state`) and must not undo that decision.\n *\n * @returns The latest status payload.\n */\nexport type KycControllerRefreshKycStatusAction = {\n type: `KycController:refreshKycStatus`;\n handler: KycController['refreshKycStatus'];\n};\n\n/**\n * Fetches the current UKYC session status for the active sub-flow and records\n * it on state. Useful for a one-off refresh outside the automatic polling\n * loop that {@link startSumSub} runs.\n *\n * @returns The fetched session status.\n * @throws If there is no active SumSub session to query.\n */\nexport type KycControllerGetSessionStatusAction = {\n type: `KycController:getSessionStatus`;\n handler: KycController['getSessionStatus'];\n};\n\n/**\n * Resets the flow to idle, clearing session tokens and sub-flow state while\n * preserving persisted terms acceptance and the per-product cache.\n */\nexport type KycControllerResetAction = {\n type: `KycController:reset`;\n handler: KycController['reset'];\n};\n\n/**\n * Restores the controller to its default state, discarding everything\n * {@link reset} deliberately keeps: the session email, the persisted terms\n * acceptance, the per-product KYC-required cache and the user-keyed status.\n *\n * Intended for a full wallet reset, where no trace of the previous\n * customer may survive into the next wallet.\n */\nexport type KycControllerClearStateAction = {\n type: `KycController:clearState`;\n handler: KycController['clearState'];\n};\n\n/**\n * Union of all KycController action types.\n */\nexport type KycControllerMethodActions =\n | KycControllerInitializeAction\n | KycControllerCreateVendorCustomerAction\n | KycControllerLoadDisclaimersAction\n | KycControllerFetchSessionDisclaimersAction\n | KycControllerAcceptTermsAndStartSessionAction\n | KycControllerClearSavedTermsAction\n | KycControllerHandleFrameMessageAction\n | KycControllerBuildCheckFrameUrlAction\n | KycControllerBuildAuthFrameUrlAction\n | KycControllerBuildResetFrameUrlAction\n | KycControllerCheckKycRequiredAction\n | KycControllerGetKycStatusAction\n | KycControllerGetCustomerIdentityAction\n | KycControllerStartSumSubAction\n | KycControllerRefreshKycStatusAction\n | KycControllerGetSessionStatusAction\n | KycControllerResetAction\n | KycControllerClearStateAction;\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ControllerGetStateAction, ControllerStateChangeEvent } from
|
|
2
|
-
import { BaseController } from
|
|
3
|
-
import type { Messenger } from
|
|
4
|
-
import type { UserStorageControllerPerformGetStorageAction, UserStorageControllerPerformSetStorageAction } from
|
|
5
|
-
import type { Json } from
|
|
6
|
-
import type { KycControllerMethodActions } from
|
|
7
|
-
import type { KycServiceMethodActions } from
|
|
8
|
-
import type { KycCustomerIdentity, KycDisclaimer, KycPhase, KycProduct, KycSessionDisclaimers, KycSessionStatus, KycSumSubLauncher, KycSumSubStatus, KycUserStatus, KycVendor } from
|
|
1
|
+
import type { ControllerGetStateAction, ControllerStateChangeEvent } from '@metamask/base-controller';
|
|
2
|
+
import { BaseController } from '@metamask/base-controller';
|
|
3
|
+
import type { Messenger } from '@metamask/messenger';
|
|
4
|
+
import type { UserStorageControllerPerformGetStorageAction, UserStorageControllerPerformSetStorageAction } from '@metamask/profile-sync-controller/user-storage';
|
|
5
|
+
import type { Json } from '@metamask/utils';
|
|
6
|
+
import type { KycControllerMethodActions } from './KycController-method-action-types.js';
|
|
7
|
+
import type { KycServiceMethodActions } from './KycService-method-action-types.js';
|
|
8
|
+
import type { KycConsentRecord, KycCustomerIdentity, KycDisclaimer, KycDisclaimersCatalog, KycPhase, KycProduct, KycProviderDisclaimersAccepted, KycSessionDisclaimers, KycSessionStatus, KycSumSubLauncher, KycSumSubStatus, KycUserStatus, KycVendor, KycVendorDisclaimersAccepted } from './types.js';
|
|
9
9
|
export declare const controllerName = "KycController";
|
|
10
10
|
/**
|
|
11
11
|
* Describes the shape of the state object for {@link KycController}.
|
|
@@ -19,30 +19,27 @@ export type KycControllerState = {
|
|
|
19
19
|
error: string | null;
|
|
20
20
|
/** Email associated with the session (sourced from the account). */
|
|
21
21
|
email: string | null;
|
|
22
|
-
/** ISO-8601 timestamp of the customer's terms acceptance (persisted). */
|
|
23
|
-
termsAcceptedAt: string | null;
|
|
24
|
-
/** IDs of the disclaimers the customer accepted (persisted). */
|
|
25
|
-
acceptedDisclaimerIds: string[];
|
|
26
22
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
23
|
+
* Persisted vendor-disclaimer acceptance (T&C1) with fixed `moonpay` and
|
|
24
|
+
* `iron` keys. MoonPay stores only `termsAcceptedAt`; Iron stores
|
|
25
|
+
* `disclaimerIds`.
|
|
30
26
|
*/
|
|
31
|
-
|
|
27
|
+
vendorDisclaimersAccepted: KycVendorDisclaimersAccepted;
|
|
32
28
|
/**
|
|
33
|
-
*
|
|
34
|
-
* terms acceptance (persisted
|
|
35
|
-
* when resuming a session. `null` for
|
|
36
|
-
* field existed (treated as requiring
|
|
29
|
+
* KYC-provider disclaimer documents the customer accepted during the last
|
|
30
|
+
* terms acceptance (persisted `{ key, version }` records under `sumsub`).
|
|
31
|
+
* Consents-path vendors require this when resuming a session. `null` for
|
|
32
|
+
* acceptance recorded before this field existed (treated as requiring
|
|
33
|
+
* reacceptance).
|
|
37
34
|
*/
|
|
38
|
-
|
|
35
|
+
providerDisclaimersAccepted: KycProviderDisclaimersAccepted;
|
|
39
36
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* when resuming a session. `null` for acceptance recorded
|
|
43
|
-
* field existed (treated as requiring reacceptance).
|
|
37
|
+
* idOS disclaimer documents the customer accepted during the last terms
|
|
38
|
+
* acceptance (persisted `{ key, version }` records). Consents-path vendors
|
|
39
|
+
* require this when resuming a session. `null` for acceptance recorded
|
|
40
|
+
* before this field existed (treated as requiring reacceptance).
|
|
44
41
|
*/
|
|
45
|
-
|
|
42
|
+
idosDisclaimersAccepted: KycConsentRecord[] | null;
|
|
46
43
|
/**
|
|
47
44
|
* Whether the customer consented to reuse existing idOS credentials
|
|
48
45
|
* during this session. Applied when recording session-scoped disclaimers.
|
|
@@ -50,10 +47,10 @@ export type KycControllerState = {
|
|
|
50
47
|
* `null` when never set (treated as `false`).
|
|
51
48
|
*/
|
|
52
49
|
credentialReusabilityConsentGiven: boolean | null;
|
|
53
|
-
/**
|
|
54
|
-
|
|
55
|
-
/** Error encountered while loading disclaimers, or `null`. */
|
|
56
|
-
|
|
50
|
+
/** Vendor disclaimers fetched for the current country. */
|
|
51
|
+
vendorDisclaimers: KycDisclaimer[];
|
|
52
|
+
/** Error encountered while loading vendor disclaimers, or `null`. */
|
|
53
|
+
vendorError: string | null;
|
|
57
54
|
/**
|
|
58
55
|
* idOS / KYC-provider disclaimer catalog from `GET /disclaimers` or
|
|
59
56
|
* `GET /sessions/{sessionId}/disclaimers`. `null` until the catalog has
|
|
@@ -62,10 +59,10 @@ export type KycControllerState = {
|
|
|
62
59
|
sessionDisclaimers: KycSessionDisclaimers | null;
|
|
63
60
|
/** Resolved ISO 3166-1 alpha-3 country code. */
|
|
64
61
|
geoCountry: string | null;
|
|
65
|
-
/**
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
|
|
62
|
+
/** MoonPay session token (not persisted, not logged). */
|
|
63
|
+
moonpaySessionToken: string | null;
|
|
64
|
+
/** MoonPay access token (not persisted, not logged). */
|
|
65
|
+
moonpayAccessToken: string | null;
|
|
69
66
|
/** Vendor customer id, used for the SumSub hand-off. */
|
|
70
67
|
moonpayCustomerId: string | null;
|
|
71
68
|
/**
|
|
@@ -109,12 +106,32 @@ export type KycControllerState = {
|
|
|
109
106
|
sessionStatus: KycSessionStatus | null;
|
|
110
107
|
};
|
|
111
108
|
};
|
|
109
|
+
/**
|
|
110
|
+
* Constructs the default {@link KycVendorDisclaimersAccepted} value.
|
|
111
|
+
*
|
|
112
|
+
* @returns The default vendor-disclaimer acceptance map.
|
|
113
|
+
*/
|
|
114
|
+
export declare function getDefaultKycVendorDisclaimersAccepted(): KycVendorDisclaimersAccepted;
|
|
115
|
+
export declare function getDefaultKycProviderDisclaimersAccepted(): KycProviderDisclaimersAccepted;
|
|
112
116
|
/**
|
|
113
117
|
* Constructs the default {@link KycController} state.
|
|
114
118
|
*
|
|
115
119
|
* @returns The default state.
|
|
116
120
|
*/
|
|
117
121
|
export declare function getDefaultKycControllerState(): KycControllerState;
|
|
122
|
+
/**
|
|
123
|
+
* Parameters for {@link KycController.fetchSessionDisclaimers}. Provide
|
|
124
|
+
* exactly one of `sessionId` or `country`.
|
|
125
|
+
*/
|
|
126
|
+
export type FetchSessionDisclaimersParams = {
|
|
127
|
+
/** UKYC session id from `KycService.createUkycSession`. */
|
|
128
|
+
sessionId: string;
|
|
129
|
+
country?: never;
|
|
130
|
+
} | {
|
|
131
|
+
/** ISO 3166-1 alpha-3 country code for `GET /disclaimers?country=`. */
|
|
132
|
+
country: string;
|
|
133
|
+
sessionId?: never;
|
|
134
|
+
};
|
|
118
135
|
export type KycControllerGetStateAction = ControllerGetStateAction<typeof controllerName, KycControllerState>;
|
|
119
136
|
export type KycControllerActions = KycControllerGetStateAction | KycControllerMethodActions;
|
|
120
137
|
type AllowedActions = KycServiceMethodActions | UserStorageControllerPerformGetStorageAction | UserStorageControllerPerformSetStorageAction;
|
|
@@ -162,9 +179,9 @@ export type KycControllerOptions = {
|
|
|
162
179
|
/**
|
|
163
180
|
* `KycController` orchestrates the vendor-backed KYC / identity-verification
|
|
164
181
|
* flow (MoonPay identity + SumSub documents) behind a vendor-neutral, per
|
|
165
|
-
* product surface used by ramps and card. It owns all state
|
|
166
|
-
* orchestration (via `KycService`),
|
|
167
|
-
* platform-specific presentation (WebView/iframe, SumSub SDK)
|
|
182
|
+
* product surface used by ramps and card. It owns all state and HTTP
|
|
183
|
+
* orchestration (via `KycService`), while vendor protocol handling and
|
|
184
|
+
* platform-specific presentation (WebView/iframe, SumSub SDK) are delegated.
|
|
168
185
|
*/
|
|
169
186
|
export declare class KycController extends BaseController<typeof controllerName, KycControllerState, KycControllerMessenger> {
|
|
170
187
|
#private;
|
|
@@ -226,6 +243,25 @@ export declare class KycController extends BaseController<typeof controllerName,
|
|
|
226
243
|
loadDisclaimers(params?: {
|
|
227
244
|
country?: string;
|
|
228
245
|
}): Promise<void>;
|
|
246
|
+
/**
|
|
247
|
+
* Fetches the idOS + KYC-provider disclaimer catalog. Pass exactly one of
|
|
248
|
+
* `sessionId` or `country`:
|
|
249
|
+
*
|
|
250
|
+
* - `{ sessionId }` → {@link KycService.fetchSessionDisclaimersBySessionId}
|
|
251
|
+
* (`GET /sessions/{sessionId}/disclaimers`)
|
|
252
|
+
* - `{ country }` → {@link KycService.fetchSessionDisclaimersByCountry}
|
|
253
|
+
* (`GET /disclaimers?country=`)
|
|
254
|
+
*
|
|
255
|
+
* A session-id fetch also writes the catalog to `sessionDisclaimers`.
|
|
256
|
+
*
|
|
257
|
+
* @param params - The parameters. Provide exactly one of `sessionId` or
|
|
258
|
+
* `country`.
|
|
259
|
+
* @param params.sessionId - The UKYC session id.
|
|
260
|
+
* @param params.country - ISO 3166-1 alpha-3 country code.
|
|
261
|
+
* @returns The catalog. Session fetches include consent state; country
|
|
262
|
+
* fetches do not.
|
|
263
|
+
*/
|
|
264
|
+
fetchSessionDisclaimers(params: FetchSessionDisclaimersParams): Promise<KycSessionDisclaimers | KycDisclaimersCatalog>;
|
|
229
265
|
/**
|
|
230
266
|
* Captures terms acceptance for the currently loaded disclaimers and creates
|
|
231
267
|
* a session.
|
|
@@ -235,19 +271,21 @@ export declare class KycController extends BaseController<typeof controllerName,
|
|
|
235
271
|
* @param params.product - The consuming feature the flow runs for. See
|
|
236
272
|
* {@link initialize} for how the product drives the automatic post
|
|
237
273
|
* authentication continuation.
|
|
238
|
-
* @param params.
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
274
|
+
* @param params.providerDisclaimersAccepted - Sumsub disclaimer documents the
|
|
275
|
+
* customer accepted (`{ key, version }` records). Required for every vendor
|
|
276
|
+
* so callers explicitly declare acceptance.
|
|
277
|
+
* @param params.idosDisclaimersAccepted - idOS disclaimer documents the
|
|
278
|
+
* customer accepted (`{ key, version }` records). Required for every vendor
|
|
279
|
+
* so callers explicitly declare acceptance.
|
|
242
280
|
* @param params.credentialReusabilityConsentGiven - Whether the customer
|
|
243
281
|
* consented to reuse existing idOS credentials. Used when recording
|
|
244
282
|
* session-scoped disclaimers on the consents path. Defaults to `false`.
|
|
245
283
|
*/
|
|
246
|
-
acceptTermsAndStartSession(params
|
|
284
|
+
acceptTermsAndStartSession(params?: {
|
|
247
285
|
email?: string;
|
|
248
286
|
product?: KycProduct;
|
|
249
|
-
|
|
250
|
-
|
|
287
|
+
providerDisclaimersAccepted: KycConsentRecord[];
|
|
288
|
+
idosDisclaimersAccepted: KycConsentRecord[];
|
|
251
289
|
credentialReusabilityConsentGiven?: boolean;
|
|
252
290
|
}): Promise<void>;
|
|
253
291
|
/**
|
|
@@ -360,6 +398,10 @@ export declare class KycController extends BaseController<typeof controllerName,
|
|
|
360
398
|
* stores it on state, publishes {@link KycControllerStatusChangedEvent}, and
|
|
361
399
|
* schedules short-interval polling while the status is `pending`.
|
|
362
400
|
*
|
|
401
|
+
* Skipped when `userStatus` is already `completed`: a follow-up
|
|
402
|
+
* `GET /kyc/status` can still read a stale `pending` (for example after
|
|
403
|
+
* `session_not_in_valid_state`) and must not undo that decision.
|
|
404
|
+
*
|
|
363
405
|
* @returns The latest status payload.
|
|
364
406
|
*/
|
|
365
407
|
refreshKycStatus(): Promise<{
|
|
@@ -392,4 +434,4 @@ export declare class KycController extends BaseController<typeof controllerName,
|
|
|
392
434
|
clearState(): void;
|
|
393
435
|
}
|
|
394
436
|
export {};
|
|
395
|
-
//# sourceMappingURL=KycController.d.
|
|
437
|
+
//# sourceMappingURL=KycController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KycController.d.ts","sourceRoot":"","sources":["../src/KycController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAE3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EACV,4CAA4C,EAC5C,4CAA4C,EAC7C,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAK5C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAMnF,OAAO,KAAK,EAEV,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,qBAAqB,EACrB,QAAQ,EACR,UAAU,EACV,8B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