@metamask-previews/kyc-controller 0.0.0-preview-c34a16a37 → 0.0.0-preview-72d4782

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.
Files changed (155) hide show
  1. package/CHANGELOG.md +1 -21
  2. package/README.md +1 -9
  3. package/dist/index.cjs +10 -34
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.cts +7 -18
  6. package/dist/index.d.cts.map +1 -1
  7. package/dist/index.d.mts +7 -18
  8. package/dist/index.d.mts.map +1 -1
  9. package/dist/index.mjs +9 -11
  10. package/dist/index.mjs.map +1 -1
  11. package/package.json +3 -24
  12. package/dist/KycController-method-action-types.cjs +0 -7
  13. package/dist/KycController-method-action-types.cjs.map +0 -1
  14. package/dist/KycController-method-action-types.d.cts +0 -213
  15. package/dist/KycController-method-action-types.d.cts.map +0 -1
  16. package/dist/KycController-method-action-types.d.mts +0 -213
  17. package/dist/KycController-method-action-types.d.mts.map +0 -1
  18. package/dist/KycController-method-action-types.mjs +0 -6
  19. package/dist/KycController-method-action-types.mjs.map +0 -1
  20. package/dist/KycController.cjs +0 -1441
  21. package/dist/KycController.cjs.map +0 -1
  22. package/dist/KycController.d.cts +0 -337
  23. package/dist/KycController.d.cts.map +0 -1
  24. package/dist/KycController.d.mts +0 -337
  25. package/dist/KycController.d.mts.map +0 -1
  26. package/dist/KycController.mjs +0 -1436
  27. package/dist/KycController.mjs.map +0 -1
  28. package/dist/KycService-method-action-types.cjs +0 -7
  29. package/dist/KycService-method-action-types.cjs.map +0 -1
  30. package/dist/KycService-method-action-types.d.cts +0 -176
  31. package/dist/KycService-method-action-types.d.cts.map +0 -1
  32. package/dist/KycService-method-action-types.d.mts +0 -176
  33. package/dist/KycService-method-action-types.d.mts.map +0 -1
  34. package/dist/KycService-method-action-types.mjs +0 -6
  35. package/dist/KycService-method-action-types.mjs.map +0 -1
  36. package/dist/KycService.cjs +0 -574
  37. package/dist/KycService.cjs.map +0 -1
  38. package/dist/KycService.d.cts +0 -380
  39. package/dist/KycService.d.cts.map +0 -1
  40. package/dist/KycService.d.mts +0 -380
  41. package/dist/KycService.d.mts.map +0 -1
  42. package/dist/KycService.mjs +0 -570
  43. package/dist/KycService.mjs.map +0 -1
  44. package/dist/countryCodes.cjs +0 -274
  45. package/dist/countryCodes.cjs.map +0 -1
  46. package/dist/countryCodes.d.cts +0 -18
  47. package/dist/countryCodes.d.cts.map +0 -1
  48. package/dist/countryCodes.d.mts +0 -18
  49. package/dist/countryCodes.d.mts.map +0 -1
  50. package/dist/countryCodes.mjs +0 -270
  51. package/dist/countryCodes.mjs.map +0 -1
  52. package/dist/crypto.cjs +0 -154
  53. package/dist/crypto.cjs.map +0 -1
  54. package/dist/crypto.d.cts +0 -84
  55. package/dist/crypto.d.cts.map +0 -1
  56. package/dist/crypto.d.mts +0 -84
  57. package/dist/crypto.d.mts.map +0 -1
  58. package/dist/crypto.mjs +0 -149
  59. package/dist/crypto.mjs.map +0 -1
  60. package/dist/encoding.cjs +0 -40
  61. package/dist/encoding.cjs.map +0 -1
  62. package/dist/encoding.d.cts +0 -24
  63. package/dist/encoding.d.cts.map +0 -1
  64. package/dist/encoding.d.mts +0 -24
  65. package/dist/encoding.d.mts.map +0 -1
  66. package/dist/encoding.mjs +0 -35
  67. package/dist/encoding.mjs.map +0 -1
  68. package/dist/selectors.cjs +0 -30
  69. package/dist/selectors.cjs.map +0 -1
  70. package/dist/selectors.d.cts +0 -24
  71. package/dist/selectors.d.cts.map +0 -1
  72. package/dist/selectors.d.mts +0 -24
  73. package/dist/selectors.d.mts.map +0 -1
  74. package/dist/selectors.mjs +0 -24
  75. package/dist/selectors.mjs.map +0 -1
  76. package/dist/types.cjs +0 -10
  77. package/dist/types.cjs.map +0 -1
  78. package/dist/types.d.cts +0 -162
  79. package/dist/types.d.cts.map +0 -1
  80. package/dist/types.d.mts +0 -162
  81. package/dist/types.d.mts.map +0 -1
  82. package/dist/types.mjs +0 -9
  83. package/dist/types.mjs.map +0 -1
  84. package/dist/ukyc/constants.cjs +0 -75
  85. package/dist/ukyc/constants.cjs.map +0 -1
  86. package/dist/ukyc/constants.d.cts +0 -69
  87. package/dist/ukyc/constants.d.cts.map +0 -1
  88. package/dist/ukyc/constants.d.mts +0 -69
  89. package/dist/ukyc/constants.d.mts.map +0 -1
  90. package/dist/ukyc/constants.mjs +0 -72
  91. package/dist/ukyc/constants.mjs.map +0 -1
  92. package/dist/ukyc/deriveClientMaterial.cjs +0 -65
  93. package/dist/ukyc/deriveClientMaterial.cjs.map +0 -1
  94. package/dist/ukyc/deriveClientMaterial.d.cts +0 -54
  95. package/dist/ukyc/deriveClientMaterial.d.cts.map +0 -1
  96. package/dist/ukyc/deriveClientMaterial.d.mts +0 -54
  97. package/dist/ukyc/deriveClientMaterial.d.mts.map +0 -1
  98. package/dist/ukyc/deriveClientMaterial.mjs +0 -60
  99. package/dist/ukyc/deriveClientMaterial.mjs.map +0 -1
  100. package/dist/ukyc/jwtChain.cjs +0 -54
  101. package/dist/ukyc/jwtChain.cjs.map +0 -1
  102. package/dist/ukyc/jwtChain.d.cts +0 -40
  103. package/dist/ukyc/jwtChain.d.cts.map +0 -1
  104. package/dist/ukyc/jwtChain.d.mts +0 -40
  105. package/dist/ukyc/jwtChain.d.mts.map +0 -1
  106. package/dist/ukyc/jwtChain.mjs +0 -50
  107. package/dist/ukyc/jwtChain.mjs.map +0 -1
  108. package/dist/ukyc/localUserSecret.cjs +0 -98
  109. package/dist/ukyc/localUserSecret.cjs.map +0 -1
  110. package/dist/ukyc/localUserSecret.d.cts +0 -65
  111. package/dist/ukyc/localUserSecret.d.cts.map +0 -1
  112. package/dist/ukyc/localUserSecret.d.mts +0 -65
  113. package/dist/ukyc/localUserSecret.d.mts.map +0 -1
  114. package/dist/ukyc/localUserSecret.mjs +0 -92
  115. package/dist/ukyc/localUserSecret.mjs.map +0 -1
  116. package/dist/ukyc/storageAccessToken.cjs +0 -139
  117. package/dist/ukyc/storageAccessToken.cjs.map +0 -1
  118. package/dist/ukyc/storageAccessToken.d.cts +0 -99
  119. package/dist/ukyc/storageAccessToken.d.cts.map +0 -1
  120. package/dist/ukyc/storageAccessToken.d.mts +0 -99
  121. package/dist/ukyc/storageAccessToken.d.mts.map +0 -1
  122. package/dist/ukyc/storageAccessToken.mjs +0 -133
  123. package/dist/ukyc/storageAccessToken.mjs.map +0 -1
  124. package/dist/ukyc/testToken.cjs +0 -61
  125. package/dist/ukyc/testToken.cjs.map +0 -1
  126. package/dist/ukyc/testToken.d.cts +0 -50
  127. package/dist/ukyc/testToken.d.cts.map +0 -1
  128. package/dist/ukyc/testToken.d.mts +0 -50
  129. package/dist/ukyc/testToken.d.mts.map +0 -1
  130. package/dist/ukyc/testToken.mjs +0 -57
  131. package/dist/ukyc/testToken.mjs.map +0 -1
  132. package/dist/ukyc/wrapEncryptionKey.cjs +0 -28
  133. package/dist/ukyc/wrapEncryptionKey.cjs.map +0 -1
  134. package/dist/ukyc/wrapEncryptionKey.d.cts +0 -34
  135. package/dist/ukyc/wrapEncryptionKey.d.cts.map +0 -1
  136. package/dist/ukyc/wrapEncryptionKey.d.mts +0 -34
  137. package/dist/ukyc/wrapEncryptionKey.d.mts.map +0 -1
  138. package/dist/ukyc/wrapEncryptionKey.mjs +0 -25
  139. package/dist/ukyc/wrapEncryptionKey.mjs.map +0 -1
  140. package/dist/ukyc/wrapUserKey.cjs +0 -80
  141. package/dist/ukyc/wrapUserKey.cjs.map +0 -1
  142. package/dist/ukyc/wrapUserKey.d.cts +0 -26
  143. package/dist/ukyc/wrapUserKey.d.cts.map +0 -1
  144. package/dist/ukyc/wrapUserKey.d.mts +0 -26
  145. package/dist/ukyc/wrapUserKey.d.mts.map +0 -1
  146. package/dist/ukyc/wrapUserKey.mjs +0 -76
  147. package/dist/ukyc/wrapUserKey.mjs.map +0 -1
  148. package/dist/ukyc/wrappedRelayPayload.cjs +0 -32
  149. package/dist/ukyc/wrappedRelayPayload.cjs.map +0 -1
  150. package/dist/ukyc/wrappedRelayPayload.d.cts +0 -35
  151. package/dist/ukyc/wrappedRelayPayload.d.cts.map +0 -1
  152. package/dist/ukyc/wrappedRelayPayload.d.mts +0 -35
  153. package/dist/ukyc/wrappedRelayPayload.d.mts.map +0 -1
  154. package/dist/ukyc/wrappedRelayPayload.mjs +0 -28
  155. package/dist/ukyc/wrappedRelayPayload.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -9,26 +9,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ### Added
11
11
 
12
- - Add `KycController.getCustomerIdentity()` method and the `KycController:getCustomerIdentity` messenger action (plus the exported `KycControllerGetCustomerIdentityAction` and `KycCustomerIdentity` types). Returns the vendor-scoped `{ vendor, id }` for the currently authenticated customer, or `null` before authentication and after `reset()`. Lets consumers (e.g. ramps autoramp creation) attach the vendor customer id to downstream calls without reading the full KYC state, which also holds session/access tokens. The id is session-scoped and never persisted. ([#9853](https://github.com/MetaMask/core/pull/9853))
13
- - Add Iron (Money/VBA) KYC path to `@metamask/kyc-controller`: `vendor: 'iron'` skips MoonPay Check/Auth frames; `KycService` clients for `/vendors/iron/*`, `POST /consents`, and `GET /kyc/status`; `refreshKycStatus` + `statusChanged` for Money toast state ([#9852](https://github.com/MetaMask/core/pull/9852), [#9853](https://github.com/MetaMask/core/pull/9853))
14
- - Initial release of the `@metamask/kyc-controller` package for managing KYC / identity verification state across MetaMask clients ([#9781](https://github.com/MetaMask/core/pull/9781), [#9853](https://github.com/MetaMask/core/pull/9853))
15
- - Add `KycController` and `KycService` for managing KYC / identity verification state across MetaMask clients ([#9615](https://github.com/MetaMask/core/pull/9615), [#9853](https://github.com/MetaMask/core/pull/9853))
16
- - `KycController` (`BaseController`) owns the flow state machine, the Check/Auth frame message protocol, X25519 credential decryption, and SumSub orchestration via an injected `KycSumSubLauncher` adapter.
17
- - `KycService` extends `BaseDataService` and performs the Universal KYC (UKYC) HTTP calls via an injected `fetch`, sourcing the auth bearer token and geolocation through the messenger.
18
- - Exposes a vendor-neutral, per-product surface (`ramps`, `card`) plus reselect selectors.
19
- - Add automatic post-authentication continuation to `KycController`
20
- - Add optional `baseUrl` option to `KycService` constructor that overrides the base URL derived from `env`, enabling clients to target a custom (e.g. local or staging) KYC API
21
- - Add UKYC session-status polling to `KycController`
22
- - Add handling in `KycController.startSumSub` for applicants already being processed by the vendor
23
-
24
- ### Removed
25
-
26
- - Move Money Account wallet registration to `@metamask/ramps-controller`: removes `KycController.registerMoneyAccountWallet`, the `KycService` wallet-registration methods (`getMoonpayCustomerId`, `getWalletRegistrationStatus`, `registerSelfHostedWallet`), the `neobankBaseUrl` service option, and the wallet registration exports (`WalletRegistrationError`, `SelfHostedRegistration`, `MoneyAccountWalletRegistrationResult`, and related types). Wallet ownership signing is a Money Movement (neobank-proxy) concern, so it now lives on `RampsController` / `NeoBankService`. ([#9853](https://github.com/MetaMask/core/pull/9853))
27
-
28
- ### Fixed
29
-
30
- - Clear `moonpayCustomerId` when the active vendor changes, so `getCustomerIdentity()` can no longer report a MoonPay customer id under another vendor. The id is dropped when `initialize` starts a non-MoonPay flow and when `createIronCustomer` switches to Iron. ([#9861](https://github.com/MetaMask/core/pull/9861), [#9853](https://github.com/MetaMask/core/pull/9853))
31
- - Call `unref()` on the user-status poll timer only when it exists. React Native and browser timers are numbers, so the unconditional call threw when Money status polling started outside Node. ([#9861](https://github.com/MetaMask/core/pull/9861), [#9853](https://github.com/MetaMask/core/pull/9853))
32
- - Skip the `session_not_in_valid_state` completion write when a `reset()` superseded the SumSub flow, so a late vendor response can no longer force `userStatus` to `completed` (and publish `statusChanged`) on an idle controller. ([#9861](https://github.com/MetaMask/core/pull/9861), [#9853](https://github.com/MetaMask/core/pull/9853))
12
+ - Initial release of the `@metamask/kyc-controller` package for managing KYC / identity verification state across MetaMask clients ([#9781](https://github.com/MetaMask/core/pull/9781))
33
13
 
34
14
  [Unreleased]: https://github.com/MetaMask/core/
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # KYC Controller `@metamask/kyc-controller`
1
+ # `@metamask/kyc-controller`
2
2
 
3
3
  Shared KYC / identity verification controller used across MetaMask clients
4
4
 
@@ -10,14 +10,6 @@ or
10
10
 
11
11
  `npm install @metamask/kyc-controller`
12
12
 
13
- ## Development
14
-
15
- To rebuild the package automatically whenever you change a source file, run the `build:watch` script from core repository root folder:
16
-
17
- `yarn workspace @metamask/kyc-controller run build:watch`
18
-
19
- This watches `src/**/*.ts` and re-runs the build on each change (it also performs an initial build on start), which is useful when developing against a client that consumes this package locally.
20
-
21
13
  ## Contributing
22
14
 
23
15
  This package is part of a monorepo. Instructions for contributing can be found in the [monorepo README](https://github.com/MetaMask/core#readme).
package/dist/index.cjs CHANGED
@@ -1,37 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mintUkycTestToken = exports.signStorageAccessToken = exports.encodeStorageAccessTokenForHeader = exports.encodeClientMaterial = exports.deriveClientMaterial = exports.UKYC_STORAGE_ACCESS_TOKEN_VERSION = exports.UKYC_STORAGE_ACCESS_TOKEN_AUDIENCES = exports.UKYC_STORAGE_ACCESS_TOKEN_AUDIENCE = exports.UKYC_KWIL_AUDIENCE = exports.UKYC_CAPABILITY_AUTH_SCHEME = exports.generateKeyPair = exports.decryptCredentials = exports.ALPHA2_TO_ALPHA3 = exports.alpha2ToAlpha3 = exports.selectKycSumSub = exports.selectKycPhase = exports.selectIsKycRequiredForProduct = exports.serviceName = exports.KycService = exports.controllerName = exports.getDefaultKycControllerState = exports.KycController = void 0;
4
- var KycController_js_1 = require("./KycController.cjs");
5
- Object.defineProperty(exports, "KycController", { enumerable: true, get: function () { return KycController_js_1.KycController; } });
6
- Object.defineProperty(exports, "getDefaultKycControllerState", { enumerable: true, get: function () { return KycController_js_1.getDefaultKycControllerState; } });
7
- Object.defineProperty(exports, "controllerName", { enumerable: true, get: function () { return KycController_js_1.controllerName; } });
8
- var KycService_js_1 = require("./KycService.cjs");
9
- Object.defineProperty(exports, "KycService", { enumerable: true, get: function () { return KycService_js_1.KycService; } });
10
- Object.defineProperty(exports, "serviceName", { enumerable: true, get: function () { return KycService_js_1.serviceName; } });
11
- var selectors_js_1 = require("./selectors.cjs");
12
- Object.defineProperty(exports, "selectIsKycRequiredForProduct", { enumerable: true, get: function () { return selectors_js_1.selectIsKycRequiredForProduct; } });
13
- Object.defineProperty(exports, "selectKycPhase", { enumerable: true, get: function () { return selectors_js_1.selectKycPhase; } });
14
- Object.defineProperty(exports, "selectKycSumSub", { enumerable: true, get: function () { return selectors_js_1.selectKycSumSub; } });
15
- var countryCodes_js_1 = require("./countryCodes.cjs");
16
- Object.defineProperty(exports, "alpha2ToAlpha3", { enumerable: true, get: function () { return countryCodes_js_1.alpha2ToAlpha3; } });
17
- Object.defineProperty(exports, "ALPHA2_TO_ALPHA3", { enumerable: true, get: function () { return countryCodes_js_1.ALPHA2_TO_ALPHA3; } });
18
- var crypto_js_1 = require("./crypto.cjs");
19
- Object.defineProperty(exports, "decryptCredentials", { enumerable: true, get: function () { return crypto_js_1.decryptCredentials; } });
20
- Object.defineProperty(exports, "generateKeyPair", { enumerable: true, get: function () { return crypto_js_1.generateKeyPair; } });
21
- // UKYC storage-access-token utilities. Exported so a signed capability token can
22
- // be minted for testing UKYC Storage (see `mintUkycTestToken`).
23
- var constants_js_1 = require("./ukyc/constants.cjs");
24
- Object.defineProperty(exports, "UKYC_CAPABILITY_AUTH_SCHEME", { enumerable: true, get: function () { return constants_js_1.UKYC_CAPABILITY_AUTH_SCHEME; } });
25
- Object.defineProperty(exports, "UKYC_KWIL_AUDIENCE", { enumerable: true, get: function () { return constants_js_1.UKYC_KWIL_AUDIENCE; } });
26
- Object.defineProperty(exports, "UKYC_STORAGE_ACCESS_TOKEN_AUDIENCE", { enumerable: true, get: function () { return constants_js_1.UKYC_STORAGE_ACCESS_TOKEN_AUDIENCE; } });
27
- Object.defineProperty(exports, "UKYC_STORAGE_ACCESS_TOKEN_AUDIENCES", { enumerable: true, get: function () { return constants_js_1.UKYC_STORAGE_ACCESS_TOKEN_AUDIENCES; } });
28
- Object.defineProperty(exports, "UKYC_STORAGE_ACCESS_TOKEN_VERSION", { enumerable: true, get: function () { return constants_js_1.UKYC_STORAGE_ACCESS_TOKEN_VERSION; } });
29
- var deriveClientMaterial_js_1 = require("./ukyc/deriveClientMaterial.cjs");
30
- Object.defineProperty(exports, "deriveClientMaterial", { enumerable: true, get: function () { return deriveClientMaterial_js_1.deriveClientMaterial; } });
31
- Object.defineProperty(exports, "encodeClientMaterial", { enumerable: true, get: function () { return deriveClientMaterial_js_1.encodeClientMaterial; } });
32
- var storageAccessToken_js_1 = require("./ukyc/storageAccessToken.cjs");
33
- Object.defineProperty(exports, "encodeStorageAccessTokenForHeader", { enumerable: true, get: function () { return storageAccessToken_js_1.encodeStorageAccessTokenForHeader; } });
34
- Object.defineProperty(exports, "signStorageAccessToken", { enumerable: true, get: function () { return storageAccessToken_js_1.signStorageAccessToken; } });
35
- var testToken_js_1 = require("./ukyc/testToken.cjs");
36
- Object.defineProperty(exports, "mintUkycTestToken", { enumerable: true, get: function () { return testToken_js_1.mintUkycTestToken; } });
3
+ /**
4
+ * Example function that returns a greeting for the given name.
5
+ *
6
+ * @param name - The name to greet.
7
+ * @returns The greeting.
8
+ */
9
+ function greeter(name) {
10
+ return `Hello, ${name}!`;
11
+ }
12
+ exports.default = greeter;
37
13
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,wDAI4B;AAH1B,iHAAA,aAAa,OAAA;AACb,gIAAA,4BAA4B,OAAA;AAC5B,kHAAA,cAAc,OAAA;AA+BhB,kDAA0D;AAAjD,2GAAA,UAAU,OAAA;AAAE,4GAAA,WAAW,OAAA;AAwChC,gDAIwB;AAHtB,6HAAA,6BAA6B,OAAA;AAC7B,8GAAA,cAAc,OAAA;AACd,+GAAA,eAAe,OAAA;AAGjB,sDAAqE;AAA5D,iHAAA,cAAc,OAAA;AAAE,mHAAA,gBAAgB,OAAA;AACzC,0CAAkE;AAAzD,+GAAA,kBAAkB,OAAA;AAAE,4GAAA,eAAe,OAAA;AAsB5C,iFAAiF;AACjF,gEAAgE;AAChE,qDAM6B;AAL3B,2HAAA,2BAA2B,OAAA;AAC3B,kHAAA,kBAAkB,OAAA;AAClB,kIAAA,kCAAkC,OAAA;AAClC,mIAAA,mCAAmC,OAAA;AACnC,iIAAA,iCAAiC,OAAA;AAEnC,2EAGwC;AAFtC,+HAAA,oBAAoB,OAAA;AACpB,+HAAA,oBAAoB,OAAA;AAMtB,uEAGsC;AAFpC,0IAAA,iCAAiC,OAAA;AACjC,+HAAA,sBAAsB,OAAA;AASxB,qDAAwD;AAA/C,iHAAA,iBAAiB,OAAA","sourcesContent":["export {\n KycController,\n getDefaultKycControllerState,\n controllerName,\n} from './KycController.js';\nexport type {\n KycControllerActions,\n KycControllerEvents,\n KycControllerGetStateAction,\n KycControllerMessenger,\n KycControllerOptions,\n KycControllerState,\n KycControllerStateChangeEvent,\n KycControllerStatusChangedEvent,\n} from './KycController.js';\nexport type {\n KycControllerAcceptTermsAndStartSessionAction,\n KycControllerBuildAuthFrameUrlAction,\n KycControllerBuildCheckFrameUrlAction,\n KycControllerBuildResetFrameUrlAction,\n KycControllerCheckKycRequiredAction,\n KycControllerClearSavedTermsAction,\n KycControllerCreateIronCustomerAction,\n KycControllerGetCustomerIdentityAction,\n KycControllerGetKycStatusAction,\n KycControllerGetSessionStatusAction,\n KycControllerHandleFrameMessageAction,\n KycControllerInitializeAction,\n KycControllerLoadDisclaimersAction,\n KycControllerRefreshKycStatusAction,\n KycControllerResetAction,\n KycControllerStartSumSubAction,\n} from './KycController-method-action-types.js';\n\nexport { KycService, serviceName } from './KycService.js';\nexport type {\n ApplicantAccessTokenResponse,\n CheckKycRequiredParams,\n CreateIronCustomerParams,\n CreateSessionParams,\n CreateUkycSessionParams,\n GetSessionStatusParams,\n GetWrappingKeyParams,\n IronCustomerResponse,\n JwksResponse,\n KycServiceActions,\n KycServiceCacheUpdatedEvent,\n KycServiceEvents,\n KycServiceGranularCacheUpdatedEvent,\n KycServiceInvalidateQueriesAction,\n KycServiceMessenger,\n KycServiceOptions,\n SubmitConsentsParams,\n UkycSessionResponse,\n WrappedEncryptionKey,\n WrappingKeyResponse,\n} from './KycService.js';\nexport type {\n KycServiceCheckIronKycRequiredAction,\n KycServiceCheckKycRequiredAction,\n KycServiceCreateIronCustomerAction,\n KycServiceCreateJourneyAction,\n KycServiceCreateSessionAction,\n KycServiceCreateUkycSessionAction,\n KycServiceFetchDisclaimersAction,\n KycServiceFetchIronDisclaimersAction,\n KycServiceFetchJwksAction,\n KycServiceFetchKycStatusAction,\n KycServiceGetGeoCountryAction,\n KycServiceGetSessionStatusAction,\n KycServiceGetWrappingKeyAction,\n KycServiceSubmitConsentsAction,\n} from './KycService-method-action-types.js';\n\nexport {\n selectIsKycRequiredForProduct,\n selectKycPhase,\n selectKycSumSub,\n} from './selectors.js';\n\nexport { alpha2ToAlpha3, ALPHA2_TO_ALPHA3 } from './countryCodes.js';\nexport { decryptCredentials, generateKeyPair } from './crypto.js';\nexport type {\n DecryptedCredentials,\n DecryptResult,\n EncryptedCredentialsEnvelope,\n X25519KeyPair,\n} from './crypto.js';\n\nexport type {\n KycCustomerIdentity,\n KycDisclaimer,\n KycPhase,\n KycProduct,\n KycSessionStatus,\n KycSumSubLaunchParams,\n KycSumSubLauncher,\n KycSumSubStatus,\n KycUserStatus,\n KycUserStatusResponse,\n KycVendor,\n} from './types.js';\n\n// UKYC storage-access-token utilities. Exported so a signed capability token can\n// be minted for testing UKYC Storage (see `mintUkycTestToken`).\nexport {\n UKYC_CAPABILITY_AUTH_SCHEME,\n UKYC_KWIL_AUDIENCE,\n UKYC_STORAGE_ACCESS_TOKEN_AUDIENCE,\n UKYC_STORAGE_ACCESS_TOKEN_AUDIENCES,\n UKYC_STORAGE_ACCESS_TOKEN_VERSION,\n} from './ukyc/constants.js';\nexport {\n deriveClientMaterial,\n encodeClientMaterial,\n} from './ukyc/deriveClientMaterial.js';\nexport type {\n EncodedUkycClientMaterial,\n UkycClientMaterial,\n} from './ukyc/deriveClientMaterial.js';\nexport {\n encodeStorageAccessTokenForHeader,\n signStorageAccessToken,\n} from './ukyc/storageAccessToken.js';\nexport type {\n SignStorageAccessTokenParams,\n UkycStorageAccessToken,\n UkycStorageAccessTokenPayload,\n UkycStorageOperation,\n UkycTokenPresenter,\n} from './ukyc/storageAccessToken.js';\nexport { mintUkycTestToken } from './ukyc/testToken.js';\nexport type {\n MintedUkycTestToken,\n MintUkycTestTokenParams,\n} from './ukyc/testToken.js';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,SAAwB,OAAO,CAAC,IAAY;IAC1C,OAAO,UAAU,IAAI,GAAG,CAAC;AAC3B,CAAC;AAFD,0BAEC","sourcesContent":["/**\n * Example function that returns a greeting for the given name.\n *\n * @param name - The name to greet.\n * @returns The greeting.\n */\nexport default function greeter(name: string): string {\n return `Hello, ${name}!`;\n}\n"]}
package/dist/index.d.cts CHANGED
@@ -1,19 +1,8 @@
1
- export { KycController, getDefaultKycControllerState, controllerName, } from "./KycController.cjs";
2
- export type { KycControllerActions, KycControllerEvents, KycControllerGetStateAction, KycControllerMessenger, KycControllerOptions, KycControllerState, KycControllerStateChangeEvent, KycControllerStatusChangedEvent, } from "./KycController.cjs";
3
- export type { KycControllerAcceptTermsAndStartSessionAction, KycControllerBuildAuthFrameUrlAction, KycControllerBuildCheckFrameUrlAction, KycControllerBuildResetFrameUrlAction, KycControllerCheckKycRequiredAction, KycControllerClearSavedTermsAction, KycControllerCreateIronCustomerAction, KycControllerGetCustomerIdentityAction, KycControllerGetKycStatusAction, KycControllerGetSessionStatusAction, KycControllerHandleFrameMessageAction, KycControllerInitializeAction, KycControllerLoadDisclaimersAction, KycControllerRefreshKycStatusAction, KycControllerResetAction, KycControllerStartSumSubAction, } from "./KycController-method-action-types.cjs";
4
- export { KycService, serviceName } from "./KycService.cjs";
5
- export type { ApplicantAccessTokenResponse, CheckKycRequiredParams, CreateIronCustomerParams, CreateSessionParams, CreateUkycSessionParams, GetSessionStatusParams, GetWrappingKeyParams, IronCustomerResponse, JwksResponse, KycServiceActions, KycServiceCacheUpdatedEvent, KycServiceEvents, KycServiceGranularCacheUpdatedEvent, KycServiceInvalidateQueriesAction, KycServiceMessenger, KycServiceOptions, SubmitConsentsParams, UkycSessionResponse, WrappedEncryptionKey, WrappingKeyResponse, } from "./KycService.cjs";
6
- export type { KycServiceCheckIronKycRequiredAction, KycServiceCheckKycRequiredAction, KycServiceCreateIronCustomerAction, KycServiceCreateJourneyAction, KycServiceCreateSessionAction, KycServiceCreateUkycSessionAction, KycServiceFetchDisclaimersAction, KycServiceFetchIronDisclaimersAction, KycServiceFetchJwksAction, KycServiceFetchKycStatusAction, KycServiceGetGeoCountryAction, KycServiceGetSessionStatusAction, KycServiceGetWrappingKeyAction, KycServiceSubmitConsentsAction, } from "./KycService-method-action-types.cjs";
7
- export { selectIsKycRequiredForProduct, selectKycPhase, selectKycSumSub, } from "./selectors.cjs";
8
- export { alpha2ToAlpha3, ALPHA2_TO_ALPHA3 } from "./countryCodes.cjs";
9
- export { decryptCredentials, generateKeyPair } from "./crypto.cjs";
10
- export type { DecryptedCredentials, DecryptResult, EncryptedCredentialsEnvelope, X25519KeyPair, } from "./crypto.cjs";
11
- export type { KycCustomerIdentity, KycDisclaimer, KycPhase, KycProduct, KycSessionStatus, KycSumSubLaunchParams, KycSumSubLauncher, KycSumSubStatus, KycUserStatus, KycUserStatusResponse, KycVendor, } from "./types.cjs";
12
- export { UKYC_CAPABILITY_AUTH_SCHEME, UKYC_KWIL_AUDIENCE, UKYC_STORAGE_ACCESS_TOKEN_AUDIENCE, UKYC_STORAGE_ACCESS_TOKEN_AUDIENCES, UKYC_STORAGE_ACCESS_TOKEN_VERSION, } from "./ukyc/constants.cjs";
13
- export { deriveClientMaterial, encodeClientMaterial, } from "./ukyc/deriveClientMaterial.cjs";
14
- export type { EncodedUkycClientMaterial, UkycClientMaterial, } from "./ukyc/deriveClientMaterial.cjs";
15
- export { encodeStorageAccessTokenForHeader, signStorageAccessToken, } from "./ukyc/storageAccessToken.cjs";
16
- export type { SignStorageAccessTokenParams, UkycStorageAccessToken, UkycStorageAccessTokenPayload, UkycStorageOperation, UkycTokenPresenter, } from "./ukyc/storageAccessToken.cjs";
17
- export { mintUkycTestToken } from "./ukyc/testToken.cjs";
18
- export type { MintedUkycTestToken, MintUkycTestTokenParams, } from "./ukyc/testToken.cjs";
1
+ /**
2
+ * Example function that returns a greeting for the given name.
3
+ *
4
+ * @param name - The name to greet.
5
+ * @returns The greeting.
6
+ */
7
+ export default function greeter(name: string): string;
19
8
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,4BAA4B,EAC5B,cAAc,GACf,4BAA2B;AAC5B,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,2BAA2B,EAC3B,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,6BAA6B,EAC7B,+BAA+B,GAChC,4BAA2B;AAC5B,YAAY,EACV,6CAA6C,EAC7C,oCAAoC,EACpC,qCAAqC,EACrC,qCAAqC,EACrC,mCAAmC,EACnC,kCAAkC,EAClC,qCAAqC,EACrC,sCAAsC,EACtC,+BAA+B,EAC/B,mCAAmC,EACnC,qCAAqC,EACrC,6BAA6B,EAC7B,kCAAkC,EAClC,mCAAmC,EACnC,wBAAwB,EACxB,8BAA8B,GAC/B,gDAA+C;AAEhD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,yBAAwB;AAC1D,YAAY,EACV,4BAA4B,EAC5B,sBAAsB,EACtB,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,2BAA2B,EAC3B,gBAAgB,EAChB,mCAAmC,EACnC,iCAAiC,EACjC,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,GACpB,yBAAwB;AACzB,YAAY,EACV,oCAAoC,EACpC,gCAAgC,EAChC,kCAAkC,EAClC,6BAA6B,EAC7B,6BAA6B,EAC7B,iCAAiC,EACjC,gCAAgC,EAChC,oCAAoC,EACpC,yBAAyB,EACzB,8BAA8B,EAC9B,6BAA6B,EAC7B,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,GAC/B,6CAA4C;AAE7C,OAAO,EACL,6BAA6B,EAC7B,cAAc,EACd,eAAe,GAChB,wBAAuB;AAExB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,2BAA0B;AACrE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,qBAAoB;AAClE,YAAY,EACV,oBAAoB,EACpB,aAAa,EACb,4BAA4B,EAC5B,aAAa,GACd,qBAAoB;AAErB,YAAY,EACV,mBAAmB,EACnB,aAAa,EACb,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,SAAS,GACV,oBAAmB;AAIpB,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,kCAAkC,EAClC,mCAAmC,EACnC,iCAAiC,GAClC,6BAA4B;AAC7B,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,wCAAuC;AACxC,YAAY,EACV,yBAAyB,EACzB,kBAAkB,GACnB,wCAAuC;AACxC,OAAO,EACL,iCAAiC,EACjC,sBAAsB,GACvB,sCAAqC;AACtC,YAAY,EACV,4BAA4B,EAC5B,sBAAsB,EACtB,6BAA6B,EAC7B,oBAAoB,EACpB,kBAAkB,GACnB,sCAAqC;AACtC,OAAO,EAAE,iBAAiB,EAAE,6BAA4B;AACxD,YAAY,EACV,mBAAmB,EACnB,uBAAuB,GACxB,6BAA4B"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpD"}
package/dist/index.d.mts CHANGED
@@ -1,19 +1,8 @@
1
- export { KycController, getDefaultKycControllerState, controllerName, } from "./KycController.mjs";
2
- export type { KycControllerActions, KycControllerEvents, KycControllerGetStateAction, KycControllerMessenger, KycControllerOptions, KycControllerState, KycControllerStateChangeEvent, KycControllerStatusChangedEvent, } from "./KycController.mjs";
3
- export type { KycControllerAcceptTermsAndStartSessionAction, KycControllerBuildAuthFrameUrlAction, KycControllerBuildCheckFrameUrlAction, KycControllerBuildResetFrameUrlAction, KycControllerCheckKycRequiredAction, KycControllerClearSavedTermsAction, KycControllerCreateIronCustomerAction, KycControllerGetCustomerIdentityAction, KycControllerGetKycStatusAction, KycControllerGetSessionStatusAction, KycControllerHandleFrameMessageAction, KycControllerInitializeAction, KycControllerLoadDisclaimersAction, KycControllerRefreshKycStatusAction, KycControllerResetAction, KycControllerStartSumSubAction, } from "./KycController-method-action-types.mjs";
4
- export { KycService, serviceName } from "./KycService.mjs";
5
- export type { ApplicantAccessTokenResponse, CheckKycRequiredParams, CreateIronCustomerParams, CreateSessionParams, CreateUkycSessionParams, GetSessionStatusParams, GetWrappingKeyParams, IronCustomerResponse, JwksResponse, KycServiceActions, KycServiceCacheUpdatedEvent, KycServiceEvents, KycServiceGranularCacheUpdatedEvent, KycServiceInvalidateQueriesAction, KycServiceMessenger, KycServiceOptions, SubmitConsentsParams, UkycSessionResponse, WrappedEncryptionKey, WrappingKeyResponse, } from "./KycService.mjs";
6
- export type { KycServiceCheckIronKycRequiredAction, KycServiceCheckKycRequiredAction, KycServiceCreateIronCustomerAction, KycServiceCreateJourneyAction, KycServiceCreateSessionAction, KycServiceCreateUkycSessionAction, KycServiceFetchDisclaimersAction, KycServiceFetchIronDisclaimersAction, KycServiceFetchJwksAction, KycServiceFetchKycStatusAction, KycServiceGetGeoCountryAction, KycServiceGetSessionStatusAction, KycServiceGetWrappingKeyAction, KycServiceSubmitConsentsAction, } from "./KycService-method-action-types.mjs";
7
- export { selectIsKycRequiredForProduct, selectKycPhase, selectKycSumSub, } from "./selectors.mjs";
8
- export { alpha2ToAlpha3, ALPHA2_TO_ALPHA3 } from "./countryCodes.mjs";
9
- export { decryptCredentials, generateKeyPair } from "./crypto.mjs";
10
- export type { DecryptedCredentials, DecryptResult, EncryptedCredentialsEnvelope, X25519KeyPair, } from "./crypto.mjs";
11
- export type { KycCustomerIdentity, KycDisclaimer, KycPhase, KycProduct, KycSessionStatus, KycSumSubLaunchParams, KycSumSubLauncher, KycSumSubStatus, KycUserStatus, KycUserStatusResponse, KycVendor, } from "./types.mjs";
12
- export { UKYC_CAPABILITY_AUTH_SCHEME, UKYC_KWIL_AUDIENCE, UKYC_STORAGE_ACCESS_TOKEN_AUDIENCE, UKYC_STORAGE_ACCESS_TOKEN_AUDIENCES, UKYC_STORAGE_ACCESS_TOKEN_VERSION, } from "./ukyc/constants.mjs";
13
- export { deriveClientMaterial, encodeClientMaterial, } from "./ukyc/deriveClientMaterial.mjs";
14
- export type { EncodedUkycClientMaterial, UkycClientMaterial, } from "./ukyc/deriveClientMaterial.mjs";
15
- export { encodeStorageAccessTokenForHeader, signStorageAccessToken, } from "./ukyc/storageAccessToken.mjs";
16
- export type { SignStorageAccessTokenParams, UkycStorageAccessToken, UkycStorageAccessTokenPayload, UkycStorageOperation, UkycTokenPresenter, } from "./ukyc/storageAccessToken.mjs";
17
- export { mintUkycTestToken } from "./ukyc/testToken.mjs";
18
- export type { MintedUkycTestToken, MintUkycTestTokenParams, } from "./ukyc/testToken.mjs";
1
+ /**
2
+ * Example function that returns a greeting for the given name.
3
+ *
4
+ * @param name - The name to greet.
5
+ * @returns The greeting.
6
+ */
7
+ export default function greeter(name: string): string;
19
8
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,4BAA4B,EAC5B,cAAc,GACf,4BAA2B;AAC5B,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,2BAA2B,EAC3B,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,6BAA6B,EAC7B,+BAA+B,GAChC,4BAA2B;AAC5B,YAAY,EACV,6CAA6C,EAC7C,oCAAoC,EACpC,qCAAqC,EACrC,qCAAqC,EACrC,mCAAmC,EACnC,kCAAkC,EAClC,qCAAqC,EACrC,sCAAsC,EACtC,+BAA+B,EAC/B,mCAAmC,EACnC,qCAAqC,EACrC,6BAA6B,EAC7B,kCAAkC,EAClC,mCAAmC,EACnC,wBAAwB,EACxB,8BAA8B,GAC/B,gDAA+C;AAEhD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,yBAAwB;AAC1D,YAAY,EACV,4BAA4B,EAC5B,sBAAsB,EACtB,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,2BAA2B,EAC3B,gBAAgB,EAChB,mCAAmC,EACnC,iCAAiC,EACjC,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,GACpB,yBAAwB;AACzB,YAAY,EACV,oCAAoC,EACpC,gCAAgC,EAChC,kCAAkC,EAClC,6BAA6B,EAC7B,6BAA6B,EAC7B,iCAAiC,EACjC,gCAAgC,EAChC,oCAAoC,EACpC,yBAAyB,EACzB,8BAA8B,EAC9B,6BAA6B,EAC7B,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,GAC/B,6CAA4C;AAE7C,OAAO,EACL,6BAA6B,EAC7B,cAAc,EACd,eAAe,GAChB,wBAAuB;AAExB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,2BAA0B;AACrE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,qBAAoB;AAClE,YAAY,EACV,oBAAoB,EACpB,aAAa,EACb,4BAA4B,EAC5B,aAAa,GACd,qBAAoB;AAErB,YAAY,EACV,mBAAmB,EACnB,aAAa,EACb,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,SAAS,GACV,oBAAmB;AAIpB,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,kCAAkC,EAClC,mCAAmC,EACnC,iCAAiC,GAClC,6BAA4B;AAC7B,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,wCAAuC;AACxC,YAAY,EACV,yBAAyB,EACzB,kBAAkB,GACnB,wCAAuC;AACxC,OAAO,EACL,iCAAiC,EACjC,sBAAsB,GACvB,sCAAqC;AACtC,YAAY,EACV,4BAA4B,EAC5B,sBAAsB,EACtB,6BAA6B,EAC7B,oBAAoB,EACpB,kBAAkB,GACnB,sCAAqC;AACtC,OAAO,EAAE,iBAAiB,EAAE,6BAA4B;AACxD,YAAY,EACV,mBAAmB,EACnB,uBAAuB,GACxB,6BAA4B"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpD"}
package/dist/index.mjs CHANGED
@@ -1,12 +1,10 @@
1
- export { KycController, getDefaultKycControllerState, controllerName } from "./KycController.mjs";
2
- export { KycService, serviceName } from "./KycService.mjs";
3
- export { selectIsKycRequiredForProduct, selectKycPhase, selectKycSumSub } from "./selectors.mjs";
4
- export { alpha2ToAlpha3, ALPHA2_TO_ALPHA3 } from "./countryCodes.mjs";
5
- export { decryptCredentials, generateKeyPair } from "./crypto.mjs";
6
- // UKYC storage-access-token utilities. Exported so a signed capability token can
7
- // be minted for testing UKYC Storage (see `mintUkycTestToken`).
8
- export { UKYC_CAPABILITY_AUTH_SCHEME, UKYC_KWIL_AUDIENCE, UKYC_STORAGE_ACCESS_TOKEN_AUDIENCE, UKYC_STORAGE_ACCESS_TOKEN_AUDIENCES, UKYC_STORAGE_ACCESS_TOKEN_VERSION } from "./ukyc/constants.mjs";
9
- export { deriveClientMaterial, encodeClientMaterial } from "./ukyc/deriveClientMaterial.mjs";
10
- export { encodeStorageAccessTokenForHeader, signStorageAccessToken } from "./ukyc/storageAccessToken.mjs";
11
- export { mintUkycTestToken } from "./ukyc/testToken.mjs";
1
+ /**
2
+ * Example function that returns a greeting for the given name.
3
+ *
4
+ * @param name - The name to greet.
5
+ * @returns The greeting.
6
+ */
7
+ export default function greeter(name) {
8
+ return `Hello, ${name}!`;
9
+ }
12
10
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,4BAA4B,EAC5B,cAAc,EACf,4BAA2B;AA8B5B,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,yBAAwB;AAwC1D,OAAO,EACL,6BAA6B,EAC7B,cAAc,EACd,eAAe,EAChB,wBAAuB;AAExB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,2BAA0B;AACrE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,qBAAoB;AAsBlE,iFAAiF;AACjF,gEAAgE;AAChE,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,kCAAkC,EAClC,mCAAmC,EACnC,iCAAiC,EAClC,6BAA4B;AAC7B,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACrB,wCAAuC;AAKxC,OAAO,EACL,iCAAiC,EACjC,sBAAsB,EACvB,sCAAqC;AAQtC,OAAO,EAAE,iBAAiB,EAAE,6BAA4B","sourcesContent":["export {\n KycController,\n getDefaultKycControllerState,\n controllerName,\n} from './KycController.js';\nexport type {\n KycControllerActions,\n KycControllerEvents,\n KycControllerGetStateAction,\n KycControllerMessenger,\n KycControllerOptions,\n KycControllerState,\n KycControllerStateChangeEvent,\n KycControllerStatusChangedEvent,\n} from './KycController.js';\nexport type {\n KycControllerAcceptTermsAndStartSessionAction,\n KycControllerBuildAuthFrameUrlAction,\n KycControllerBuildCheckFrameUrlAction,\n KycControllerBuildResetFrameUrlAction,\n KycControllerCheckKycRequiredAction,\n KycControllerClearSavedTermsAction,\n KycControllerCreateIronCustomerAction,\n KycControllerGetCustomerIdentityAction,\n KycControllerGetKycStatusAction,\n KycControllerGetSessionStatusAction,\n KycControllerHandleFrameMessageAction,\n KycControllerInitializeAction,\n KycControllerLoadDisclaimersAction,\n KycControllerRefreshKycStatusAction,\n KycControllerResetAction,\n KycControllerStartSumSubAction,\n} from './KycController-method-action-types.js';\n\nexport { KycService, serviceName } from './KycService.js';\nexport type {\n ApplicantAccessTokenResponse,\n CheckKycRequiredParams,\n CreateIronCustomerParams,\n CreateSessionParams,\n CreateUkycSessionParams,\n GetSessionStatusParams,\n GetWrappingKeyParams,\n IronCustomerResponse,\n JwksResponse,\n KycServiceActions,\n KycServiceCacheUpdatedEvent,\n KycServiceEvents,\n KycServiceGranularCacheUpdatedEvent,\n KycServiceInvalidateQueriesAction,\n KycServiceMessenger,\n KycServiceOptions,\n SubmitConsentsParams,\n UkycSessionResponse,\n WrappedEncryptionKey,\n WrappingKeyResponse,\n} from './KycService.js';\nexport type {\n KycServiceCheckIronKycRequiredAction,\n KycServiceCheckKycRequiredAction,\n KycServiceCreateIronCustomerAction,\n KycServiceCreateJourneyAction,\n KycServiceCreateSessionAction,\n KycServiceCreateUkycSessionAction,\n KycServiceFetchDisclaimersAction,\n KycServiceFetchIronDisclaimersAction,\n KycServiceFetchJwksAction,\n KycServiceFetchKycStatusAction,\n KycServiceGetGeoCountryAction,\n KycServiceGetSessionStatusAction,\n KycServiceGetWrappingKeyAction,\n KycServiceSubmitConsentsAction,\n} from './KycService-method-action-types.js';\n\nexport {\n selectIsKycRequiredForProduct,\n selectKycPhase,\n selectKycSumSub,\n} from './selectors.js';\n\nexport { alpha2ToAlpha3, ALPHA2_TO_ALPHA3 } from './countryCodes.js';\nexport { decryptCredentials, generateKeyPair } from './crypto.js';\nexport type {\n DecryptedCredentials,\n DecryptResult,\n EncryptedCredentialsEnvelope,\n X25519KeyPair,\n} from './crypto.js';\n\nexport type {\n KycCustomerIdentity,\n KycDisclaimer,\n KycPhase,\n KycProduct,\n KycSessionStatus,\n KycSumSubLaunchParams,\n KycSumSubLauncher,\n KycSumSubStatus,\n KycUserStatus,\n KycUserStatusResponse,\n KycVendor,\n} from './types.js';\n\n// UKYC storage-access-token utilities. Exported so a signed capability token can\n// be minted for testing UKYC Storage (see `mintUkycTestToken`).\nexport {\n UKYC_CAPABILITY_AUTH_SCHEME,\n UKYC_KWIL_AUDIENCE,\n UKYC_STORAGE_ACCESS_TOKEN_AUDIENCE,\n UKYC_STORAGE_ACCESS_TOKEN_AUDIENCES,\n UKYC_STORAGE_ACCESS_TOKEN_VERSION,\n} from './ukyc/constants.js';\nexport {\n deriveClientMaterial,\n encodeClientMaterial,\n} from './ukyc/deriveClientMaterial.js';\nexport type {\n EncodedUkycClientMaterial,\n UkycClientMaterial,\n} from './ukyc/deriveClientMaterial.js';\nexport {\n encodeStorageAccessTokenForHeader,\n signStorageAccessToken,\n} from './ukyc/storageAccessToken.js';\nexport type {\n SignStorageAccessTokenParams,\n UkycStorageAccessToken,\n UkycStorageAccessTokenPayload,\n UkycStorageOperation,\n UkycTokenPresenter,\n} from './ukyc/storageAccessToken.js';\nexport { mintUkycTestToken } from './ukyc/testToken.js';\nexport type {\n MintedUkycTestToken,\n MintUkycTestTokenParams,\n} from './ukyc/testToken.js';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,IAAY;IAC1C,OAAO,UAAU,IAAI,GAAG,CAAC;AAC3B,CAAC","sourcesContent":["/**\n * Example function that returns a greeting for the given name.\n *\n * @param name - The name to greet.\n * @returns The greeting.\n */\nexport default function greeter(name: string): string {\n return `Hello, ${name}!`;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/kyc-controller",
3
- "version": "0.0.0-preview-c34a16a37",
3
+ "version": "0.0.0-preview-72d4782",
4
4
  "description": "Shared KYC / identity verification controller used across MetaMask clients",
5
5
  "keywords": [
6
6
  "Ethereum",
@@ -42,45 +42,24 @@
42
42
  "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
43
43
  "build:all": "ts-bridge --project tsconfig.build.json --verbose --clean",
44
44
  "build:docs": "typedoc",
45
- "build:watch": "yarn build && chokidar 'src/**/*.ts' -c 'ts-bridge --project tsconfig.build.json --verbose --no-references' --initial",
46
45
  "changelog:update": "../../scripts/update-changelog.sh @metamask/kyc-controller",
47
46
  "changelog:validate": "../../scripts/validate-changelog.sh @metamask/kyc-controller",
48
47
  "lint:tsconfigs": "tsx ../../scripts/lint-tsconfigs/lint-tsconfigs.mts",
49
48
  "lint:tsconfigs:fix": "tsx ../../scripts/lint-tsconfigs/lint-tsconfigs.mts --fix",
50
- "messenger-action-types:check": "tsx ../../packages/messenger-cli/src/cli.ts --formatter oxfmt --esm --check",
51
- "messenger-action-types:generate": "tsx ../../packages/messenger-cli/src/cli.ts --formatter oxfmt --esm --generate",
52
- "mint:ukyc-token": "tsx scripts/mint-ukyc-test-token.ts",
49
+ "messenger-action-types:check": "tsx ../../packages/messenger-cli/src/cli.ts --formatter oxfmt --check",
50
+ "messenger-action-types:generate": "tsx ../../packages/messenger-cli/src/cli.ts --formatter oxfmt --generate",
53
51
  "since-latest-release": "../../scripts/since-latest-release.sh",
54
52
  "test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
55
53
  "test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
56
54
  "test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
57
55
  "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
58
56
  },
59
- "dependencies": {
60
- "@metamask/base-controller": "^9.1.0",
61
- "@metamask/base-data-service": "^0.1.3",
62
- "@metamask/controller-utils": "^12.3.0",
63
- "@metamask/geolocation-controller": "^1.0.0",
64
- "@metamask/messenger": "^2.0.0",
65
- "@metamask/profile-sync-controller": "^29.0.0",
66
- "@metamask/superstruct": "^3.4.1",
67
- "@metamask/utils": "^11.11.0",
68
- "@noble/ciphers": "^1.3.0",
69
- "@noble/curves": "^1.9.2",
70
- "@noble/hashes": "^1.8.0",
71
- "@scure/base": "^1.2.6",
72
- "@tanstack/query-core": "^4.43.0",
73
- "reselect": "^5.1.1",
74
- "tweetnacl": "^1.0.3"
75
- },
76
57
  "devDependencies": {
77
58
  "@metamask/auto-changelog": "^6.1.0",
78
59
  "@ts-bridge/cli": "^0.6.4",
79
60
  "@types/jest": "^30.0.0",
80
- "chokidar-cli": "^3.0.0",
81
61
  "deepmerge": "^4.2.2",
82
62
  "jest": "^30.4.2",
83
- "nock": "^13.3.1",
84
63
  "ts-jest": "^29.4.11",
85
64
  "tsx": "^4.20.5",
86
65
  "typedoc": "^0.25.13",
@@ -1,7 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file is auto generated.
4
- * Do not edit manually.
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- //# sourceMappingURL=KycController-method-action-types.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"KycController-method-action-types.cjs","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. Pass `iron` for the\n * Money/VBA path (no MoonPay Check/Auth frames). Defaults to `moonpay`.\n */\nexport type KycControllerInitializeAction = {\n type: `KycController:initialize`;\n handler: KycController['initialize'];\n};\n\n/**\n * Creates (or resumes) an Iron empty-shell customer. Exposed so Money can\n * ensure the customer exists before showing T&C screens independently of\n * {@link initialize}.\n *\n * @param params - The parameters.\n * @param params.email - Email for the Iron customer.\n */\nexport type KycControllerCreateIronCustomerAction = {\n type: `KycController:createIronCustomer`;\n handler: KycController['createIronCustomer'];\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 * Captures terms acceptance for the currently loaded disclaimers and creates\n * a session.\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. See\n * {@link initialize} for how the product drives the automatic post\n * authentication continuation.\n * @param params.sumsubTncSigned - Iron path: whether Sumsub T&C were\n * accepted (T&C2). Defaults to `true` when omitted.\n * @param params.idosTncSigned - Iron path: whether idOS T&C were accepted\n * (T&C2). Defaults to `true` when omitted.\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}).\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. requests a per-session wrapping key from the UKYC backend;\n * 2. verifies its `jwtChain` against the Fractal JWKS and confirms the\n * attested session server public 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` and creates\n * the UKYC session (handing over the wrapped key and the token);\n * 5. fetches the SumSub applicant access token; and\n * 6. presents the SDK via the injected launcher.\n *\n * If session creation reports 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 * @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 * Union of all KycController action types.\n */\nexport type KycControllerMethodActions =\n | KycControllerInitializeAction\n | KycControllerCreateIronCustomerAction\n | KycControllerLoadDisclaimersAction\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"]}
@@ -1,213 +0,0 @@
1
- /**
2
- * This file is auto generated.
3
- * Do not edit manually.
4
- */
5
- import type { KycController } from "./KycController.cjs";
6
- /**
7
- * Resolves persisted terms + geolocation, and auto-creates a session when
8
- * terms are already accepted and an email is available.
9
- *
10
- * @param params - Optional parameters.
11
- * @param params.email - The account email to associate with the session.
12
- * @param params.product - The consuming feature the flow runs for. When
13
- * provided, the controller automatically runs the KYC-required check once
14
- * authentication completes (and chains into document verification when KYC
15
- * is required). When omitted, the flow stops at `form` and the consumer must
16
- * call `checkKycRequired` manually.
17
- * @param params.vendor - Identity vendor for this flow. Pass `iron` for the
18
- * Money/VBA path (no MoonPay Check/Auth frames). Defaults to `moonpay`.
19
- */
20
- export type KycControllerInitializeAction = {
21
- type: `KycController:initialize`;
22
- handler: KycController['initialize'];
23
- };
24
- /**
25
- * Creates (or resumes) an Iron empty-shell customer. Exposed so Money can
26
- * ensure the customer exists before showing T&C screens independently of
27
- * {@link initialize}.
28
- *
29
- * @param params - The parameters.
30
- * @param params.email - Email for the Iron customer.
31
- */
32
- export type KycControllerCreateIronCustomerAction = {
33
- type: `KycController:createIronCustomer`;
34
- handler: KycController['createIronCustomer'];
35
- };
36
- /**
37
- * Loads the disclaimers for the resolved (or provided) country.
38
- *
39
- * @param params - Optional parameters.
40
- * @param params.country - ISO 3166-1 alpha-3 country code override.
41
- */
42
- export type KycControllerLoadDisclaimersAction = {
43
- type: `KycController:loadDisclaimers`;
44
- handler: KycController['loadDisclaimers'];
45
- };
46
- /**
47
- * Captures terms acceptance for the currently loaded disclaimers and creates
48
- * a session.
49
- *
50
- * @param params - Optional parameters.
51
- * @param params.email - The account email to associate with the session.
52
- * @param params.product - The consuming feature the flow runs for. See
53
- * {@link initialize} for how the product drives the automatic post
54
- * authentication continuation.
55
- * @param params.sumsubTncSigned - Iron path: whether Sumsub T&C were
56
- * accepted (T&C2). Defaults to `true` when omitted.
57
- * @param params.idosTncSigned - Iron path: whether idOS T&C were accepted
58
- * (T&C2). Defaults to `true` when omitted.
59
- */
60
- export type KycControllerAcceptTermsAndStartSessionAction = {
61
- type: `KycController:acceptTermsAndStartSession`;
62
- handler: KycController['acceptTermsAndStartSession'];
63
- };
64
- /**
65
- * Clears the persisted terms acceptance.
66
- */
67
- export type KycControllerClearSavedTermsAction = {
68
- type: `KycController:clearSavedTerms`;
69
- handler: KycController['clearSavedTerms'];
70
- };
71
- /**
72
- * Handles a message posted by a Check/Auth frame and advances the flow.
73
- *
74
- * The transport-agnostic caller (WebView on mobile, iframe on web) forwards
75
- * the raw message and injects the returned `reply` back into the frame.
76
- *
77
- * @param params - The parameters.
78
- * @param params.message - The raw message posted by the frame.
79
- * @returns An object whose optional `reply` should be posted back.
80
- */
81
- export type KycControllerHandleFrameMessageAction = {
82
- type: `KycController:handleFrameMessage`;
83
- handler: KycController['handleFrameMessage'];
84
- };
85
- /**
86
- * Builds the Check-frame URL, or `null` when no session exists yet.
87
- *
88
- * @returns The Check-frame URL or `null`.
89
- */
90
- export type KycControllerBuildCheckFrameUrlAction = {
91
- type: `KycController:buildCheckFrameUrl`;
92
- handler: KycController['buildCheckFrameUrl'];
93
- };
94
- /**
95
- * Builds the Auth-frame URL, or `null` when no client token is available.
96
- *
97
- * @returns The Auth-frame URL or `null`.
98
- */
99
- export type KycControllerBuildAuthFrameUrlAction = {
100
- type: `KycController:buildAuthFrameUrl`;
101
- handler: KycController['buildAuthFrameUrl'];
102
- };
103
- /**
104
- * Builds the Reset-frame URL.
105
- *
106
- * @returns The Reset-frame URL.
107
- */
108
- export type KycControllerBuildResetFrameUrlAction = {
109
- type: `KycController:buildResetFrameUrl`;
110
- handler: KycController['buildResetFrameUrl'];
111
- };
112
- /**
113
- * Checks whether KYC is required for a product and caches the result.
114
- *
115
- * @param params - The parameters.
116
- * @param params.product - The consuming feature.
117
- * @param params.country - Optional alpha-3 country override.
118
- * @returns Whether KYC is required.
119
- */
120
- export type KycControllerCheckKycRequiredAction = {
121
- type: `KycController:checkKycRequired`;
122
- handler: KycController['checkKycRequired'];
123
- };
124
- /**
125
- * Reads the cached "is KYC required" result for a product.
126
- *
127
- * @param params - The parameters.
128
- * @param params.product - The consuming feature.
129
- * @returns The cached value, or `undefined` if not yet checked.
130
- */
131
- export type KycControllerGetKycStatusAction = {
132
- type: `KycController:getKycStatus`;
133
- handler: KycController['getKycStatus'];
134
- };
135
- /**
136
- * Returns the vendor-scoped identity for the currently authenticated
137
- * customer, or `null` when the flow has not yet captured a vendor customer
138
- * id (before authentication or after {@link reset}).
139
- *
140
- * Exposed so consumers (e.g. ramps autoramp creation) can attach the vendor
141
- * customer id to downstream calls without reading the full KYC state, which
142
- * also holds session/access tokens. The id is session-scoped and never
143
- * persisted.
144
- *
145
- * @returns The current {@link KycCustomerIdentity}, or `null`.
146
- */
147
- export type KycControllerGetCustomerIdentityAction = {
148
- type: `KycController:getCustomerIdentity`;
149
- handler: KycController['getCustomerIdentity'];
150
- };
151
- /**
152
- * Runs the SumSub document-verification sub-flow end to end:
153
- *
154
- * 1. requests a per-session wrapping key from the UKYC backend;
155
- * 2. verifies its `jwtChain` against the Fractal JWKS and confirms the
156
- * attested session server public key;
157
- * 3. derives the `data_encryption_key` from the wallet's UKYC
158
- * `local_user_secret` and wraps it for the session server;
159
- * 4. mints a client-signed, read-only `ukyc_capability_token` and creates
160
- * the UKYC session (handing over the wrapped key and the token);
161
- * 5. fetches the SumSub applicant access token; and
162
- * 6. presents the SDK via the injected launcher.
163
- *
164
- * If session creation reports the applicant is already approved on the relay
165
- * while the vendor is still finalizing (`kycStatus: approved`,
166
- * `finalStatus: pending`), the sub-flow stops at step 4 with a
167
- * `vendorProcessing` status and a message rather than launching the SDK.
168
- *
169
- * @param params - Optional parameters.
170
- * @param params.locale - BCP-47 locale for the SDK UI.
171
- * @param params.debug - Enables SDK debug logging.
172
- * @returns The SDK result.
173
- */
174
- export type KycControllerStartSumSubAction = {
175
- type: `KycController:startSumSub`;
176
- handler: KycController['startSumSub'];
177
- };
178
- /**
179
- * Refreshes the user-keyed simplified KYC status from `GET /kyc/status`,
180
- * stores it on state, publishes {@link KycControllerStatusChangedEvent}, and
181
- * schedules short-interval polling while the status is `pending`.
182
- *
183
- * @returns The latest status payload.
184
- */
185
- export type KycControllerRefreshKycStatusAction = {
186
- type: `KycController:refreshKycStatus`;
187
- handler: KycController['refreshKycStatus'];
188
- };
189
- /**
190
- * Fetches the current UKYC session status for the active sub-flow and records
191
- * it on state. Useful for a one-off refresh outside the automatic polling
192
- * loop that {@link startSumSub} runs.
193
- *
194
- * @returns The fetched session status.
195
- * @throws If there is no active SumSub session to query.
196
- */
197
- export type KycControllerGetSessionStatusAction = {
198
- type: `KycController:getSessionStatus`;
199
- handler: KycController['getSessionStatus'];
200
- };
201
- /**
202
- * Resets the flow to idle, clearing session tokens and sub-flow state while
203
- * preserving persisted terms acceptance and the per-product cache.
204
- */
205
- export type KycControllerResetAction = {
206
- type: `KycController:reset`;
207
- handler: KycController['reset'];
208
- };
209
- /**
210
- * Union of all KycController action types.
211
- */
212
- export type KycControllerMethodActions = KycControllerInitializeAction | KycControllerCreateIronCustomerAction | KycControllerLoadDisclaimersAction | KycControllerAcceptTermsAndStartSessionAction | KycControllerClearSavedTermsAction | KycControllerHandleFrameMessageAction | KycControllerBuildCheckFrameUrlAction | KycControllerBuildAuthFrameUrlAction | KycControllerBuildResetFrameUrlAction | KycControllerCheckKycRequiredAction | KycControllerGetKycStatusAction | KycControllerGetCustomerIdentityAction | KycControllerStartSumSubAction | KycControllerRefreshKycStatusAction | KycControllerGetSessionStatusAction | KycControllerResetAction;
213
- //# sourceMappingURL=KycController-method-action-types.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"KycController-method-action-types.d.cts","sourceRoot":"","sources":["../src/KycController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,4BAA2B;AAExD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CACtC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,+BAA+B,CAAC;IACtC,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,6CAA6C,GAAG;IAC1D,IAAI,EAAE,0CAA0C,CAAC;IACjD,OAAO,EAAE,aAAa,CAAC,4BAA4B,CAAC,CAAC;CACtD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,+BAA+B,CAAC;IACtC,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,gCAAgC,CAAC;IACvC,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,4BAA4B,CAAC;IACnC,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,sCAAsC,GAAG;IACnD,IAAI,EAAE,mCAAmC,CAAC;IAC1C,OAAO,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CAC/C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,2BAA2B,CAAC;IAClC,OAAO,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;CACvC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,gCAAgC,CAAC;IACvC,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,gCAAgC,CAAC;IACvC,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CAC5C,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAClC,6BAA6B,GAC7B,qCAAqC,GACrC,kCAAkC,GAClC,6CAA6C,GAC7C,kCAAkC,GAClC,qCAAqC,GACrC,qCAAqC,GACrC,oCAAoC,GACpC,qCAAqC,GACrC,mCAAmC,GACnC,+BAA+B,GAC/B,sCAAsC,GACtC,8BAA8B,GAC9B,mCAAmC,GACnC,mCAAmC,GACnC,wBAAwB,CAAC"}