@metamask-previews/kyc-controller 0.0.0-preview-e68ab1498 → 0.0.0-preview-4b37525
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 +7 -1
- package/dist/KycController-method-action-types.cjs.map +1 -1
- package/dist/KycController-method-action-types.d.cts +12 -6
- package/dist/KycController-method-action-types.d.cts.map +1 -1
- package/dist/KycController-method-action-types.d.mts +12 -6
- package/dist/KycController-method-action-types.d.mts.map +1 -1
- package/dist/KycController-method-action-types.mjs.map +1 -1
- package/dist/KycController.cjs +313 -72
- package/dist/KycController.cjs.map +1 -1
- package/dist/KycController.d.cts +27 -7
- package/dist/KycController.d.cts.map +1 -1
- package/dist/KycController.d.mts +27 -7
- package/dist/KycController.d.mts.map +1 -1
- package/dist/KycController.mjs +314 -73
- package/dist/KycController.mjs.map +1 -1
- package/dist/KycService-method-action-types.cjs.map +1 -1
- package/dist/KycService-method-action-types.d.cts +60 -31
- package/dist/KycService-method-action-types.d.cts.map +1 -1
- package/dist/KycService-method-action-types.d.mts +60 -31
- package/dist/KycService-method-action-types.d.mts.map +1 -1
- package/dist/KycService-method-action-types.mjs.map +1 -1
- package/dist/KycService.cjs +140 -75
- package/dist/KycService.cjs.map +1 -1
- package/dist/KycService.d.cts +181 -74
- package/dist/KycService.d.cts.map +1 -1
- package/dist/KycService.d.mts +181 -74
- package/dist/KycService.d.mts.map +1 -1
- package/dist/KycService.mjs +140 -75
- package/dist/KycService.mjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +49 -4
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +49 -4
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/dist/ukyc/jwtChain.cjs +1 -1
- package/dist/ukyc/jwtChain.cjs.map +1 -1
- package/dist/ukyc/jwtChain.d.cts +2 -2
- package/dist/ukyc/jwtChain.d.mts +2 -2
- package/dist/ukyc/jwtChain.mjs +1 -1
- package/dist/ukyc/jwtChain.mjs.map +1 -1
- package/dist/ukyc/wrapEncryptionKey.cjs +16 -7
- package/dist/ukyc/wrapEncryptionKey.cjs.map +1 -1
- package/dist/ukyc/wrapEncryptionKey.d.cts +23 -16
- package/dist/ukyc/wrapEncryptionKey.d.cts.map +1 -1
- package/dist/ukyc/wrapEncryptionKey.d.mts +23 -16
- package/dist/ukyc/wrapEncryptionKey.d.mts.map +1 -1
- package/dist/ukyc/wrapEncryptionKey.mjs +16 -7
- package/dist/ukyc/wrapEncryptionKey.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KycService-method-action-types.cjs","sourceRoot":"","sources":["../src/KycService-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { KycService } from './KycService.js';\n\n/**\n * Resolves the customer's country from the geolocation source and converts it\n * to an ISO 3166-1 alpha-3 code.\n *\n * @returns The alpha-3 country code.\n * @throws If the country cannot be determined or mapped.\n */\nexport type KycServiceGetGeoCountryAction = {\n type: `KycService:getGeoCountry`;\n handler: KycService['getGeoCountry'];\n};\n\n/**\n * Fetches the disclaimers the customer must accept before a session is\n * created.\n *\n * @param params - The parameters.\n * @param params.vendor - Identity vendor. Defaults to `moonpay`.\n * @param params.country - ISO 3166-1 alpha-3 country code.\n * @returns The disclaimers.\n */\nexport type KycServiceFetchDisclaimersAction = {\n type: `KycService:fetchDisclaimers`;\n handler: KycService['fetchDisclaimers'];\n};\n\n/**\n * Creates a vendor session via the UKYC backend.\n *\n * @param params - The session parameters.\n * @returns The created session token.\n */\nexport type KycServiceCreateSessionAction = {\n type: `KycService:createSession`;\n handler: KycService['createSession'];\n};\n\n/**\n * Checks whether KYC is required for the given vendor, country, and\n * capabilities.\n *\n * @param params - The check parameters.\n * @returns Whether KYC is required.\n */\nexport type KycServiceCheckKycRequiredAction = {\n type: `KycService:checkKycRequired`;\n handler: KycService['checkKycRequired'];\n};\n\n/**\n * Creates (or resumes) an empty-shell customer for the authenticated\n * canonical user on the given identity vendor. Must run before showing\n * vendor T&C so the customer exists and resume logic can key off vendor\n * status.\n *\n * @param params - The parameters.\n * @param params.vendor - Identity vendor (e.g. `iron` for Money/VBA).\n * @param params.email - Email associated with the customer.\n * @returns The vendor customer record (subset validated for controller use).\n */\nexport type KycServiceCreateVendorCustomerAction = {\n type: `KycService:createVendorCustomer`;\n handler: KycService['createVendorCustomer'];\n};\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"KycService-method-action-types.cjs","sourceRoot":"","sources":["../src/KycService-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { KycService } from './KycService.js';\n\n/**\n * Resolves the customer's country from the geolocation source and converts it\n * to an ISO 3166-1 alpha-3 code.\n *\n * @returns The alpha-3 country code.\n * @throws If the country cannot be determined or mapped.\n */\nexport type KycServiceGetGeoCountryAction = {\n type: `KycService:getGeoCountry`;\n handler: KycService['getGeoCountry'];\n};\n\n/**\n * Fetches the disclaimers the customer must accept before a session is\n * created.\n *\n * @param params - The parameters.\n * @param params.vendor - Identity vendor. Defaults to `moonpay`.\n * @param params.country - ISO 3166-1 alpha-3 country code.\n * @returns The disclaimers.\n */\nexport type KycServiceFetchDisclaimersAction = {\n type: `KycService:fetchDisclaimers`;\n handler: KycService['fetchDisclaimers'];\n};\n\n/**\n * Creates a vendor session via the UKYC backend.\n *\n * @param params - The session parameters.\n * @returns The created session token.\n */\nexport type KycServiceCreateSessionAction = {\n type: `KycService:createSession`;\n handler: KycService['createSession'];\n};\n\n/**\n * Checks whether KYC is required for the given vendor, country, and\n * capabilities.\n *\n * @param params - The check parameters.\n * @returns Whether KYC is required.\n */\nexport type KycServiceCheckKycRequiredAction = {\n type: `KycService:checkKycRequired`;\n handler: KycService['checkKycRequired'];\n};\n\n/**\n * Creates (or resumes) an empty-shell customer for the authenticated\n * canonical user on the given identity vendor. Must run before showing\n * vendor T&C so the customer exists and resume logic can key off vendor\n * status.\n *\n * @param params - The parameters.\n * @param params.vendor - Identity vendor (e.g. `iron` for Money/VBA).\n * @param params.email - Email associated with the customer.\n * @returns The vendor customer record (subset validated for controller use).\n */\nexport type KycServiceCreateVendorCustomerAction = {\n type: `KycService:createVendorCustomer`;\n handler: KycService['createVendorCustomer'];\n};\n\n/**\n * Records vendor T&C acceptance (`POST /vendors/{vendor}/disclaimers`).\n * For Iron this creates content signings from the disclaimer ids the\n * customer accepted. Session-scoped idOS / KYC-provider consents are\n * recorded separately via {@link submitSessionDisclaimers}. Retries re-POST\n * the same ids, matching the legacy `POST /consents` signing step.\n *\n * @param params - The parameters.\n * @param params.vendor - Identity vendor (e.g. `iron`).\n * @param params.disclaimerIds - Accepted vendor T&C ids.\n * @returns The vendor signing records.\n */\nexport type KycServiceSubmitVendorDisclaimersAction = {\n type: `KycService:submitVendorDisclaimers`;\n handler: KycService['submitVendorDisclaimers'];\n};\n\n/**\n * Fetches the session-scoped idOS + KYC-provider disclaimer catalog\n * (`GET /sessions/{sessionId}/disclaimers`). Requires an existing UKYC\n * session; vendor T&Cs continue to come from {@link fetchDisclaimers}.\n *\n * @param params - The parameters.\n * @param params.sessionId - The UKYC session id.\n * @returns The catalog, including which documents are already consented.\n */\nexport type KycServiceFetchSessionDisclaimersAction = {\n type: `KycService:fetchSessionDisclaimers`;\n handler: KycService['fetchSessionDisclaimers'];\n};\n\n/**\n * Records idOS + KYC-provider consents for a UKYC session\n * (`POST /sessions/{sessionId}/disclaimers`). `key`/`version` pairs must\n * match the current catalog from {@link fetchSessionDisclaimers}. A 409\n * means those document versions were already recorded for the session.\n *\n * @param params - The consent parameters.\n * @returns The updated catalog after recording.\n */\nexport type KycServiceSubmitSessionDisclaimersAction = {\n type: `KycService:submitSessionDisclaimers`;\n handler: KycService['submitSessionDisclaimers'];\n};\n\n/**\n * Fetches the user-keyed simplified KYC status used by Money toast / banner\n * surfaces (`GET /kyc/status`).\n *\n * @returns The simplified status payload.\n */\nexport type KycServiceFetchKycStatusAction = {\n type: `KycService:fetchKycStatus`;\n handler: KycService['fetchKycStatus'];\n};\n\n/**\n * Fetches the Fractal encryption service JWKS used to verify the `jwtChain`s\n * returned inside encryption schemas from {@link KycService.createUkycSession}.\n *\n * This is an unauthenticated request to a well-known path on the Fractal\n * host, distinct from the UKYC base URL.\n *\n * @returns The JWKS keys.\n */\nexport type KycServiceFetchJwksAction = {\n type: `KycService:fetchJwks`;\n handler: KycService['fetchJwks'];\n};\n\n/**\n * Creates a UKYC session for the SumSub document-verification sub-flow.\n *\n * The response carries per-secret encryption schemas (`encryptionDataKey` and\n * `ukycCapabilityToken`) so the client can wrap the `data_encryption_key` and\n * the read-only `ukyc_capability_token` and submit them via\n * {@link KycService.setAuthorizations}.\n *\n * @param params - The session parameters.\n * @returns The UKYC session id and encryption schemas.\n */\nexport type KycServiceCreateUkycSessionAction = {\n type: `KycService:createUkycSession`;\n handler: KycService['createUkycSession'];\n};\n\n/**\n * Submits the wrapped `data_encryption_key` and wrapped\n * `ukyc_capability_token` for a UKYC session. Both secrets are sealed with\n * `wrapEncryptionKey` against the encryption schemas returned by\n * {@link KycService.createUkycSession}.\n *\n * @param params - The wrapped authorizations.\n * @returns The session status after the authorizations are applied.\n */\nexport type KycServiceSetAuthorizationsAction = {\n type: `KycService:setAuthorizations`;\n handler: KycService['setAuthorizations'];\n};\n\n/**\n * Creates (or refreshes) the SumSub verification journey for a UKYC session,\n * returning the applicant access token used to launch the SDK.\n *\n * @param sessionId - The UKYC session id from `createUkycSession`.\n * @returns The applicant access token and status.\n */\nexport type KycServiceCreateJourneyAction = {\n type: `KycService:createJourney`;\n handler: KycService['createJourney'];\n};\n\n/**\n * Fetches the current status of a UKYC session. Polled after the SumSub SDK\n * completes to determine the final verification decision.\n *\n * @param params - The parameters.\n * @param params.sessionId - The UKYC session id.\n * @returns The session status.\n */\nexport type KycServiceGetSessionStatusAction = {\n type: `KycService:getSessionStatus`;\n handler: KycService['getSessionStatus'];\n};\n\n/**\n * Union of all KycService action types.\n */\nexport type KycServiceMethodActions =\n | KycServiceGetGeoCountryAction\n | KycServiceFetchDisclaimersAction\n | KycServiceCreateSessionAction\n | KycServiceCheckKycRequiredAction\n | KycServiceCreateVendorCustomerAction\n | KycServiceSubmitVendorDisclaimersAction\n | KycServiceFetchSessionDisclaimersAction\n | KycServiceSubmitSessionDisclaimersAction\n | KycServiceFetchKycStatusAction\n | KycServiceFetchJwksAction\n | KycServiceCreateUkycSessionAction\n | KycServiceSetAuthorizationsAction\n | KycServiceCreateJourneyAction\n | KycServiceGetSessionStatusAction;\n"]}
|
|
@@ -64,14 +64,46 @@ export type KycServiceCreateVendorCustomerAction = {
|
|
|
64
64
|
handler: KycService['createVendorCustomer'];
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
67
|
+
* Records vendor T&C acceptance (`POST /vendors/{vendor}/disclaimers`).
|
|
68
|
+
* For Iron this creates content signings from the disclaimer ids the
|
|
69
|
+
* customer accepted. Session-scoped idOS / KYC-provider consents are
|
|
70
|
+
* recorded separately via {@link submitSessionDisclaimers}. Retries re-POST
|
|
71
|
+
* the same ids, matching the legacy `POST /consents` signing step.
|
|
72
|
+
*
|
|
73
|
+
* @param params - The parameters.
|
|
74
|
+
* @param params.vendor - Identity vendor (e.g. `iron`).
|
|
75
|
+
* @param params.disclaimerIds - Accepted vendor T&C ids.
|
|
76
|
+
* @returns The vendor signing records.
|
|
77
|
+
*/
|
|
78
|
+
export type KycServiceSubmitVendorDisclaimersAction = {
|
|
79
|
+
type: `KycService:submitVendorDisclaimers`;
|
|
80
|
+
handler: KycService['submitVendorDisclaimers'];
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Fetches the session-scoped idOS + KYC-provider disclaimer catalog
|
|
84
|
+
* (`GET /sessions/{sessionId}/disclaimers`). Requires an existing UKYC
|
|
85
|
+
* session; vendor T&Cs continue to come from {@link fetchDisclaimers}.
|
|
86
|
+
*
|
|
87
|
+
* @param params - The parameters.
|
|
88
|
+
* @param params.sessionId - The UKYC session id.
|
|
89
|
+
* @returns The catalog, including which documents are already consented.
|
|
90
|
+
*/
|
|
91
|
+
export type KycServiceFetchSessionDisclaimersAction = {
|
|
92
|
+
type: `KycService:fetchSessionDisclaimers`;
|
|
93
|
+
handler: KycService['fetchSessionDisclaimers'];
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Records idOS + KYC-provider consents for a UKYC session
|
|
97
|
+
* (`POST /sessions/{sessionId}/disclaimers`). `key`/`version` pairs must
|
|
98
|
+
* match the current catalog from {@link fetchSessionDisclaimers}. A 409
|
|
99
|
+
* means those document versions were already recorded for the session.
|
|
69
100
|
*
|
|
70
101
|
* @param params - The consent parameters.
|
|
102
|
+
* @returns The updated catalog after recording.
|
|
71
103
|
*/
|
|
72
|
-
export type
|
|
73
|
-
type: `KycService:
|
|
74
|
-
handler: KycService['
|
|
104
|
+
export type KycServiceSubmitSessionDisclaimersAction = {
|
|
105
|
+
type: `KycService:submitSessionDisclaimers`;
|
|
106
|
+
handler: KycService['submitSessionDisclaimers'];
|
|
75
107
|
};
|
|
76
108
|
/**
|
|
77
109
|
* Fetches the user-keyed simplified KYC status used by Money toast / banner
|
|
@@ -84,26 +116,8 @@ export type KycServiceFetchKycStatusAction = {
|
|
|
84
116
|
handler: KycService['fetchKycStatus'];
|
|
85
117
|
};
|
|
86
118
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* The client sends its ephemeral X25519 public key; the backend responds with
|
|
90
|
-
* its session public key (`sessionServerPublicKey`) and a `jwtChain` that
|
|
91
|
-
* attests it. The caller must verify `jwtChain` against the Fractal JWKS
|
|
92
|
-
* (see {@link KycService.fetchJwks}) before trusting the key to wrap the
|
|
93
|
-
* `data_encryption_key`.
|
|
94
|
-
*
|
|
95
|
-
* @param params - The parameters.
|
|
96
|
-
* @param params.sessionClientPublicKey - Our ephemeral X25519 public key
|
|
97
|
-
* (base64url).
|
|
98
|
-
* @returns The wrapping key id, `jwtChain`, and session server public key.
|
|
99
|
-
*/
|
|
100
|
-
export type KycServiceGetWrappingKeyAction = {
|
|
101
|
-
type: `KycService:getWrappingKey`;
|
|
102
|
-
handler: KycService['getWrappingKey'];
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Fetches the Fractal encryption service JWKS used to verify the `jwtChain`
|
|
106
|
-
* returned by {@link KycService.getWrappingKey}.
|
|
119
|
+
* Fetches the Fractal encryption service JWKS used to verify the `jwtChain`s
|
|
120
|
+
* returned inside encryption schemas from {@link KycService.createUkycSession}.
|
|
107
121
|
*
|
|
108
122
|
* This is an unauthenticated request to a well-known path on the Fractal
|
|
109
123
|
* host, distinct from the UKYC base URL.
|
|
@@ -115,18 +129,33 @@ export type KycServiceFetchJwksAction = {
|
|
|
115
129
|
handler: KycService['fetchJwks'];
|
|
116
130
|
};
|
|
117
131
|
/**
|
|
118
|
-
* Creates a UKYC session for the SumSub document-verification sub-flow
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
* the
|
|
132
|
+
* Creates a UKYC session for the SumSub document-verification sub-flow.
|
|
133
|
+
*
|
|
134
|
+
* The response carries per-secret encryption schemas (`encryptionDataKey` and
|
|
135
|
+
* `ukycCapabilityToken`) so the client can wrap the `data_encryption_key` and
|
|
136
|
+
* the read-only `ukyc_capability_token` and submit them via
|
|
137
|
+
* {@link KycService.setAuthorizations}.
|
|
122
138
|
*
|
|
123
139
|
* @param params - The session parameters.
|
|
124
|
-
* @returns The UKYC session
|
|
140
|
+
* @returns The UKYC session id and encryption schemas.
|
|
125
141
|
*/
|
|
126
142
|
export type KycServiceCreateUkycSessionAction = {
|
|
127
143
|
type: `KycService:createUkycSession`;
|
|
128
144
|
handler: KycService['createUkycSession'];
|
|
129
145
|
};
|
|
146
|
+
/**
|
|
147
|
+
* Submits the wrapped `data_encryption_key` and wrapped
|
|
148
|
+
* `ukyc_capability_token` for a UKYC session. Both secrets are sealed with
|
|
149
|
+
* `wrapEncryptionKey` against the encryption schemas returned by
|
|
150
|
+
* {@link KycService.createUkycSession}.
|
|
151
|
+
*
|
|
152
|
+
* @param params - The wrapped authorizations.
|
|
153
|
+
* @returns The session status after the authorizations are applied.
|
|
154
|
+
*/
|
|
155
|
+
export type KycServiceSetAuthorizationsAction = {
|
|
156
|
+
type: `KycService:setAuthorizations`;
|
|
157
|
+
handler: KycService['setAuthorizations'];
|
|
158
|
+
};
|
|
130
159
|
/**
|
|
131
160
|
* Creates (or refreshes) the SumSub verification journey for a UKYC session,
|
|
132
161
|
* returning the applicant access token used to launch the SDK.
|
|
@@ -153,5 +182,5 @@ export type KycServiceGetSessionStatusAction = {
|
|
|
153
182
|
/**
|
|
154
183
|
* Union of all KycService action types.
|
|
155
184
|
*/
|
|
156
|
-
export type KycServiceMethodActions = KycServiceGetGeoCountryAction | KycServiceFetchDisclaimersAction | KycServiceCreateSessionAction | KycServiceCheckKycRequiredAction | KycServiceCreateVendorCustomerAction |
|
|
185
|
+
export type KycServiceMethodActions = KycServiceGetGeoCountryAction | KycServiceFetchDisclaimersAction | KycServiceCreateSessionAction | KycServiceCheckKycRequiredAction | KycServiceCreateVendorCustomerAction | KycServiceSubmitVendorDisclaimersAction | KycServiceFetchSessionDisclaimersAction | KycServiceSubmitSessionDisclaimersAction | KycServiceFetchKycStatusAction | KycServiceFetchJwksAction | KycServiceCreateUkycSessionAction | KycServiceSetAuthorizationsAction | KycServiceCreateJourneyAction | KycServiceGetSessionStatusAction;
|
|
157
186
|
//# sourceMappingURL=KycService-method-action-types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KycService-method-action-types.d.cts","sourceRoot":"","sources":["../src/KycService-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,yBAAwB;AAElD;;;;;;GAMG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;CACtC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C,IAAI,EAAE,6BAA6B,CAAC;IACpC,OAAO,EAAE,UAAU,CAAC,kBAAkB,CAAC,CAAC;CACzC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;CACtC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C,IAAI,EAAE,6BAA6B,CAAC;IACpC,OAAO,EAAE,UAAU,CAAC,kBAAkB,CAAC,CAAC;CACzC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,UAAU,CAAC,sBAAsB,CAAC,CAAC;CAC7C,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"KycService-method-action-types.d.cts","sourceRoot":"","sources":["../src/KycService-method-action-types.ts"],"names":[],"mappings":"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"}
|
|
@@ -64,14 +64,46 @@ export type KycServiceCreateVendorCustomerAction = {
|
|
|
64
64
|
handler: KycService['createVendorCustomer'];
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
67
|
+
* Records vendor T&C acceptance (`POST /vendors/{vendor}/disclaimers`).
|
|
68
|
+
* For Iron this creates content signings from the disclaimer ids the
|
|
69
|
+
* customer accepted. Session-scoped idOS / KYC-provider consents are
|
|
70
|
+
* recorded separately via {@link submitSessionDisclaimers}. Retries re-POST
|
|
71
|
+
* the same ids, matching the legacy `POST /consents` signing step.
|
|
72
|
+
*
|
|
73
|
+
* @param params - The parameters.
|
|
74
|
+
* @param params.vendor - Identity vendor (e.g. `iron`).
|
|
75
|
+
* @param params.disclaimerIds - Accepted vendor T&C ids.
|
|
76
|
+
* @returns The vendor signing records.
|
|
77
|
+
*/
|
|
78
|
+
export type KycServiceSubmitVendorDisclaimersAction = {
|
|
79
|
+
type: `KycService:submitVendorDisclaimers`;
|
|
80
|
+
handler: KycService['submitVendorDisclaimers'];
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Fetches the session-scoped idOS + KYC-provider disclaimer catalog
|
|
84
|
+
* (`GET /sessions/{sessionId}/disclaimers`). Requires an existing UKYC
|
|
85
|
+
* session; vendor T&Cs continue to come from {@link fetchDisclaimers}.
|
|
86
|
+
*
|
|
87
|
+
* @param params - The parameters.
|
|
88
|
+
* @param params.sessionId - The UKYC session id.
|
|
89
|
+
* @returns The catalog, including which documents are already consented.
|
|
90
|
+
*/
|
|
91
|
+
export type KycServiceFetchSessionDisclaimersAction = {
|
|
92
|
+
type: `KycService:fetchSessionDisclaimers`;
|
|
93
|
+
handler: KycService['fetchSessionDisclaimers'];
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Records idOS + KYC-provider consents for a UKYC session
|
|
97
|
+
* (`POST /sessions/{sessionId}/disclaimers`). `key`/`version` pairs must
|
|
98
|
+
* match the current catalog from {@link fetchSessionDisclaimers}. A 409
|
|
99
|
+
* means those document versions were already recorded for the session.
|
|
69
100
|
*
|
|
70
101
|
* @param params - The consent parameters.
|
|
102
|
+
* @returns The updated catalog after recording.
|
|
71
103
|
*/
|
|
72
|
-
export type
|
|
73
|
-
type: `KycService:
|
|
74
|
-
handler: KycService['
|
|
104
|
+
export type KycServiceSubmitSessionDisclaimersAction = {
|
|
105
|
+
type: `KycService:submitSessionDisclaimers`;
|
|
106
|
+
handler: KycService['submitSessionDisclaimers'];
|
|
75
107
|
};
|
|
76
108
|
/**
|
|
77
109
|
* Fetches the user-keyed simplified KYC status used by Money toast / banner
|
|
@@ -84,26 +116,8 @@ export type KycServiceFetchKycStatusAction = {
|
|
|
84
116
|
handler: KycService['fetchKycStatus'];
|
|
85
117
|
};
|
|
86
118
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* The client sends its ephemeral X25519 public key; the backend responds with
|
|
90
|
-
* its session public key (`sessionServerPublicKey`) and a `jwtChain` that
|
|
91
|
-
* attests it. The caller must verify `jwtChain` against the Fractal JWKS
|
|
92
|
-
* (see {@link KycService.fetchJwks}) before trusting the key to wrap the
|
|
93
|
-
* `data_encryption_key`.
|
|
94
|
-
*
|
|
95
|
-
* @param params - The parameters.
|
|
96
|
-
* @param params.sessionClientPublicKey - Our ephemeral X25519 public key
|
|
97
|
-
* (base64url).
|
|
98
|
-
* @returns The wrapping key id, `jwtChain`, and session server public key.
|
|
99
|
-
*/
|
|
100
|
-
export type KycServiceGetWrappingKeyAction = {
|
|
101
|
-
type: `KycService:getWrappingKey`;
|
|
102
|
-
handler: KycService['getWrappingKey'];
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Fetches the Fractal encryption service JWKS used to verify the `jwtChain`
|
|
106
|
-
* returned by {@link KycService.getWrappingKey}.
|
|
119
|
+
* Fetches the Fractal encryption service JWKS used to verify the `jwtChain`s
|
|
120
|
+
* returned inside encryption schemas from {@link KycService.createUkycSession}.
|
|
107
121
|
*
|
|
108
122
|
* This is an unauthenticated request to a well-known path on the Fractal
|
|
109
123
|
* host, distinct from the UKYC base URL.
|
|
@@ -115,18 +129,33 @@ export type KycServiceFetchJwksAction = {
|
|
|
115
129
|
handler: KycService['fetchJwks'];
|
|
116
130
|
};
|
|
117
131
|
/**
|
|
118
|
-
* Creates a UKYC session for the SumSub document-verification sub-flow
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
* the
|
|
132
|
+
* Creates a UKYC session for the SumSub document-verification sub-flow.
|
|
133
|
+
*
|
|
134
|
+
* The response carries per-secret encryption schemas (`encryptionDataKey` and
|
|
135
|
+
* `ukycCapabilityToken`) so the client can wrap the `data_encryption_key` and
|
|
136
|
+
* the read-only `ukyc_capability_token` and submit them via
|
|
137
|
+
* {@link KycService.setAuthorizations}.
|
|
122
138
|
*
|
|
123
139
|
* @param params - The session parameters.
|
|
124
|
-
* @returns The UKYC session
|
|
140
|
+
* @returns The UKYC session id and encryption schemas.
|
|
125
141
|
*/
|
|
126
142
|
export type KycServiceCreateUkycSessionAction = {
|
|
127
143
|
type: `KycService:createUkycSession`;
|
|
128
144
|
handler: KycService['createUkycSession'];
|
|
129
145
|
};
|
|
146
|
+
/**
|
|
147
|
+
* Submits the wrapped `data_encryption_key` and wrapped
|
|
148
|
+
* `ukyc_capability_token` for a UKYC session. Both secrets are sealed with
|
|
149
|
+
* `wrapEncryptionKey` against the encryption schemas returned by
|
|
150
|
+
* {@link KycService.createUkycSession}.
|
|
151
|
+
*
|
|
152
|
+
* @param params - The wrapped authorizations.
|
|
153
|
+
* @returns The session status after the authorizations are applied.
|
|
154
|
+
*/
|
|
155
|
+
export type KycServiceSetAuthorizationsAction = {
|
|
156
|
+
type: `KycService:setAuthorizations`;
|
|
157
|
+
handler: KycService['setAuthorizations'];
|
|
158
|
+
};
|
|
130
159
|
/**
|
|
131
160
|
* Creates (or refreshes) the SumSub verification journey for a UKYC session,
|
|
132
161
|
* returning the applicant access token used to launch the SDK.
|
|
@@ -153,5 +182,5 @@ export type KycServiceGetSessionStatusAction = {
|
|
|
153
182
|
/**
|
|
154
183
|
* Union of all KycService action types.
|
|
155
184
|
*/
|
|
156
|
-
export type KycServiceMethodActions = KycServiceGetGeoCountryAction | KycServiceFetchDisclaimersAction | KycServiceCreateSessionAction | KycServiceCheckKycRequiredAction | KycServiceCreateVendorCustomerAction |
|
|
185
|
+
export type KycServiceMethodActions = KycServiceGetGeoCountryAction | KycServiceFetchDisclaimersAction | KycServiceCreateSessionAction | KycServiceCheckKycRequiredAction | KycServiceCreateVendorCustomerAction | KycServiceSubmitVendorDisclaimersAction | KycServiceFetchSessionDisclaimersAction | KycServiceSubmitSessionDisclaimersAction | KycServiceFetchKycStatusAction | KycServiceFetchJwksAction | KycServiceCreateUkycSessionAction | KycServiceSetAuthorizationsAction | KycServiceCreateJourneyAction | KycServiceGetSessionStatusAction;
|
|
157
186
|
//# sourceMappingURL=KycService-method-action-types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KycService-method-action-types.d.mts","sourceRoot":"","sources":["../src/KycService-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,yBAAwB;AAElD;;;;;;GAMG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;CACtC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C,IAAI,EAAE,6BAA6B,CAAC;IACpC,OAAO,EAAE,UAAU,CAAC,kBAAkB,CAAC,CAAC;CACzC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;CACtC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,gCAAgC,GAAG;IAC7C,IAAI,EAAE,6BAA6B,CAAC;IACpC,OAAO,EAAE,UAAU,CAAC,kBAAkB,CAAC,CAAC;CACzC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,UAAU,CAAC,sBAAsB,CAAC,CAAC;CAC7C,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"KycService-method-action-types.d.mts","sourceRoot":"","sources":["../src/KycService-method-action-types.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KycService-method-action-types.mjs","sourceRoot":"","sources":["../src/KycService-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { KycService } from './KycService.js';\n\n/**\n * Resolves the customer's country from the geolocation source and converts it\n * to an ISO 3166-1 alpha-3 code.\n *\n * @returns The alpha-3 country code.\n * @throws If the country cannot be determined or mapped.\n */\nexport type KycServiceGetGeoCountryAction = {\n type: `KycService:getGeoCountry`;\n handler: KycService['getGeoCountry'];\n};\n\n/**\n * Fetches the disclaimers the customer must accept before a session is\n * created.\n *\n * @param params - The parameters.\n * @param params.vendor - Identity vendor. Defaults to `moonpay`.\n * @param params.country - ISO 3166-1 alpha-3 country code.\n * @returns The disclaimers.\n */\nexport type KycServiceFetchDisclaimersAction = {\n type: `KycService:fetchDisclaimers`;\n handler: KycService['fetchDisclaimers'];\n};\n\n/**\n * Creates a vendor session via the UKYC backend.\n *\n * @param params - The session parameters.\n * @returns The created session token.\n */\nexport type KycServiceCreateSessionAction = {\n type: `KycService:createSession`;\n handler: KycService['createSession'];\n};\n\n/**\n * Checks whether KYC is required for the given vendor, country, and\n * capabilities.\n *\n * @param params - The check parameters.\n * @returns Whether KYC is required.\n */\nexport type KycServiceCheckKycRequiredAction = {\n type: `KycService:checkKycRequired`;\n handler: KycService['checkKycRequired'];\n};\n\n/**\n * Creates (or resumes) an empty-shell customer for the authenticated\n * canonical user on the given identity vendor. Must run before showing\n * vendor T&C so the customer exists and resume logic can key off vendor\n * status.\n *\n * @param params - The parameters.\n * @param params.vendor - Identity vendor (e.g. `iron` for Money/VBA).\n * @param params.email - Email associated with the customer.\n * @returns The vendor customer record (subset validated for controller use).\n */\nexport type KycServiceCreateVendorCustomerAction = {\n type: `KycService:createVendorCustomer`;\n handler: KycService['createVendorCustomer'];\n};\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"KycService-method-action-types.mjs","sourceRoot":"","sources":["../src/KycService-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { KycService } from './KycService.js';\n\n/**\n * Resolves the customer's country from the geolocation source and converts it\n * to an ISO 3166-1 alpha-3 code.\n *\n * @returns The alpha-3 country code.\n * @throws If the country cannot be determined or mapped.\n */\nexport type KycServiceGetGeoCountryAction = {\n type: `KycService:getGeoCountry`;\n handler: KycService['getGeoCountry'];\n};\n\n/**\n * Fetches the disclaimers the customer must accept before a session is\n * created.\n *\n * @param params - The parameters.\n * @param params.vendor - Identity vendor. Defaults to `moonpay`.\n * @param params.country - ISO 3166-1 alpha-3 country code.\n * @returns The disclaimers.\n */\nexport type KycServiceFetchDisclaimersAction = {\n type: `KycService:fetchDisclaimers`;\n handler: KycService['fetchDisclaimers'];\n};\n\n/**\n * Creates a vendor session via the UKYC backend.\n *\n * @param params - The session parameters.\n * @returns The created session token.\n */\nexport type KycServiceCreateSessionAction = {\n type: `KycService:createSession`;\n handler: KycService['createSession'];\n};\n\n/**\n * Checks whether KYC is required for the given vendor, country, and\n * capabilities.\n *\n * @param params - The check parameters.\n * @returns Whether KYC is required.\n */\nexport type KycServiceCheckKycRequiredAction = {\n type: `KycService:checkKycRequired`;\n handler: KycService['checkKycRequired'];\n};\n\n/**\n * Creates (or resumes) an empty-shell customer for the authenticated\n * canonical user on the given identity vendor. Must run before showing\n * vendor T&C so the customer exists and resume logic can key off vendor\n * status.\n *\n * @param params - The parameters.\n * @param params.vendor - Identity vendor (e.g. `iron` for Money/VBA).\n * @param params.email - Email associated with the customer.\n * @returns The vendor customer record (subset validated for controller use).\n */\nexport type KycServiceCreateVendorCustomerAction = {\n type: `KycService:createVendorCustomer`;\n handler: KycService['createVendorCustomer'];\n};\n\n/**\n * Records vendor T&C acceptance (`POST /vendors/{vendor}/disclaimers`).\n * For Iron this creates content signings from the disclaimer ids the\n * customer accepted. Session-scoped idOS / KYC-provider consents are\n * recorded separately via {@link submitSessionDisclaimers}. Retries re-POST\n * the same ids, matching the legacy `POST /consents` signing step.\n *\n * @param params - The parameters.\n * @param params.vendor - Identity vendor (e.g. `iron`).\n * @param params.disclaimerIds - Accepted vendor T&C ids.\n * @returns The vendor signing records.\n */\nexport type KycServiceSubmitVendorDisclaimersAction = {\n type: `KycService:submitVendorDisclaimers`;\n handler: KycService['submitVendorDisclaimers'];\n};\n\n/**\n * Fetches the session-scoped idOS + KYC-provider disclaimer catalog\n * (`GET /sessions/{sessionId}/disclaimers`). Requires an existing UKYC\n * session; vendor T&Cs continue to come from {@link fetchDisclaimers}.\n *\n * @param params - The parameters.\n * @param params.sessionId - The UKYC session id.\n * @returns The catalog, including which documents are already consented.\n */\nexport type KycServiceFetchSessionDisclaimersAction = {\n type: `KycService:fetchSessionDisclaimers`;\n handler: KycService['fetchSessionDisclaimers'];\n};\n\n/**\n * Records idOS + KYC-provider consents for a UKYC session\n * (`POST /sessions/{sessionId}/disclaimers`). `key`/`version` pairs must\n * match the current catalog from {@link fetchSessionDisclaimers}. A 409\n * means those document versions were already recorded for the session.\n *\n * @param params - The consent parameters.\n * @returns The updated catalog after recording.\n */\nexport type KycServiceSubmitSessionDisclaimersAction = {\n type: `KycService:submitSessionDisclaimers`;\n handler: KycService['submitSessionDisclaimers'];\n};\n\n/**\n * Fetches the user-keyed simplified KYC status used by Money toast / banner\n * surfaces (`GET /kyc/status`).\n *\n * @returns The simplified status payload.\n */\nexport type KycServiceFetchKycStatusAction = {\n type: `KycService:fetchKycStatus`;\n handler: KycService['fetchKycStatus'];\n};\n\n/**\n * Fetches the Fractal encryption service JWKS used to verify the `jwtChain`s\n * returned inside encryption schemas from {@link KycService.createUkycSession}.\n *\n * This is an unauthenticated request to a well-known path on the Fractal\n * host, distinct from the UKYC base URL.\n *\n * @returns The JWKS keys.\n */\nexport type KycServiceFetchJwksAction = {\n type: `KycService:fetchJwks`;\n handler: KycService['fetchJwks'];\n};\n\n/**\n * Creates a UKYC session for the SumSub document-verification sub-flow.\n *\n * The response carries per-secret encryption schemas (`encryptionDataKey` and\n * `ukycCapabilityToken`) so the client can wrap the `data_encryption_key` and\n * the read-only `ukyc_capability_token` and submit them via\n * {@link KycService.setAuthorizations}.\n *\n * @param params - The session parameters.\n * @returns The UKYC session id and encryption schemas.\n */\nexport type KycServiceCreateUkycSessionAction = {\n type: `KycService:createUkycSession`;\n handler: KycService['createUkycSession'];\n};\n\n/**\n * Submits the wrapped `data_encryption_key` and wrapped\n * `ukyc_capability_token` for a UKYC session. Both secrets are sealed with\n * `wrapEncryptionKey` against the encryption schemas returned by\n * {@link KycService.createUkycSession}.\n *\n * @param params - The wrapped authorizations.\n * @returns The session status after the authorizations are applied.\n */\nexport type KycServiceSetAuthorizationsAction = {\n type: `KycService:setAuthorizations`;\n handler: KycService['setAuthorizations'];\n};\n\n/**\n * Creates (or refreshes) the SumSub verification journey for a UKYC session,\n * returning the applicant access token used to launch the SDK.\n *\n * @param sessionId - The UKYC session id from `createUkycSession`.\n * @returns The applicant access token and status.\n */\nexport type KycServiceCreateJourneyAction = {\n type: `KycService:createJourney`;\n handler: KycService['createJourney'];\n};\n\n/**\n * Fetches the current status of a UKYC session. Polled after the SumSub SDK\n * completes to determine the final verification decision.\n *\n * @param params - The parameters.\n * @param params.sessionId - The UKYC session id.\n * @returns The session status.\n */\nexport type KycServiceGetSessionStatusAction = {\n type: `KycService:getSessionStatus`;\n handler: KycService['getSessionStatus'];\n};\n\n/**\n * Union of all KycService action types.\n */\nexport type KycServiceMethodActions =\n | KycServiceGetGeoCountryAction\n | KycServiceFetchDisclaimersAction\n | KycServiceCreateSessionAction\n | KycServiceCheckKycRequiredAction\n | KycServiceCreateVendorCustomerAction\n | KycServiceSubmitVendorDisclaimersAction\n | KycServiceFetchSessionDisclaimersAction\n | KycServiceSubmitSessionDisclaimersAction\n | KycServiceFetchKycStatusAction\n | KycServiceFetchJwksAction\n | KycServiceCreateUkycSessionAction\n | KycServiceSetAuthorizationsAction\n | KycServiceCreateJourneyAction\n | KycServiceGetSessionStatusAction;\n"]}
|