@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
package/dist/index.d.cts
CHANGED
|
@@ -2,13 +2,13 @@ export { KycController, getDefaultKycControllerState, controllerName, } from "./
|
|
|
2
2
|
export type { KycControllerActions, KycControllerEvents, KycControllerGetStateAction, KycControllerMessenger, KycControllerOptions, KycControllerState, KycControllerStateChangeEvent, KycControllerStatusChangedEvent, } from "./KycController.cjs";
|
|
3
3
|
export type { KycControllerAcceptTermsAndStartSessionAction, KycControllerBuildAuthFrameUrlAction, KycControllerBuildCheckFrameUrlAction, KycControllerBuildResetFrameUrlAction, KycControllerCheckKycRequiredAction, KycControllerClearSavedTermsAction, KycControllerClearStateAction, KycControllerCreateVendorCustomerAction, KycControllerGetCustomerIdentityAction, KycControllerGetKycStatusAction, KycControllerGetSessionStatusAction, KycControllerHandleFrameMessageAction, KycControllerInitializeAction, KycControllerLoadDisclaimersAction, KycControllerRefreshKycStatusAction, KycControllerResetAction, KycControllerStartSumSubAction, } from "./KycController-method-action-types.cjs";
|
|
4
4
|
export { KycService, serviceName } from "./KycService.cjs";
|
|
5
|
-
export type { ApplicantAccessTokenResponse, CheckKycRequiredParams, CreateVendorCustomerParams, CreateSessionParams, CreateUkycSessionParams,
|
|
6
|
-
export type { KycServiceCheckKycRequiredAction, KycServiceCreateVendorCustomerAction, KycServiceCreateJourneyAction, KycServiceCreateSessionAction, KycServiceCreateUkycSessionAction, KycServiceFetchDisclaimersAction, KycServiceFetchJwksAction, KycServiceFetchKycStatusAction, KycServiceGetGeoCountryAction, KycServiceGetSessionStatusAction,
|
|
5
|
+
export type { ApplicantAccessTokenResponse, CapabilityAuthorization, CheckKycRequiredParams, CreateVendorCustomerParams, CreateSessionParams, CreateUkycSessionParams, EncryptionSchema, FetchSessionDisclaimersParams, GetSessionStatusParams, VendorCustomerResponse, JwksResponse, KycServiceActions, KycServiceCacheUpdatedEvent, KycServiceEvents, KycServiceGranularCacheUpdatedEvent, KycServiceInvalidateQueriesAction, KycServiceMessenger, KycServiceOptions, SetAuthorizationsParams, SubmitSessionDisclaimersParams, SubmitVendorDisclaimersParams, UkycSessionResponse, } from "./KycService.cjs";
|
|
6
|
+
export type { KycServiceCheckKycRequiredAction, KycServiceCreateVendorCustomerAction, KycServiceCreateJourneyAction, KycServiceCreateSessionAction, KycServiceCreateUkycSessionAction, KycServiceFetchDisclaimersAction, KycServiceFetchJwksAction, KycServiceFetchKycStatusAction, KycServiceFetchSessionDisclaimersAction, KycServiceGetGeoCountryAction, KycServiceGetSessionStatusAction, KycServiceSetAuthorizationsAction, KycServiceSubmitSessionDisclaimersAction, KycServiceSubmitVendorDisclaimersAction, } from "./KycService-method-action-types.cjs";
|
|
7
7
|
export { selectIsKycRequiredForProduct, selectKycPhase, selectKycSumSub, } from "./selectors.cjs";
|
|
8
8
|
export { alpha2ToAlpha3, ALPHA2_TO_ALPHA3 } from "./countryCodes.cjs";
|
|
9
9
|
export { decryptCredentials, generateKeyPair } from "./crypto.cjs";
|
|
10
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";
|
|
11
|
+
export type { KycConsentDocument, KycConsentRecord, KycCustomerIdentity, KycDisclaimer, KycPhase, KycProduct, KycSessionDisclaimers, KycSessionStatus, KycSumSubLaunchParams, KycSumSubLauncher, KycSumSubStatus, KycUserStatus, KycUserStatusResponse, KycVendor, KycVendorSigning, } from "./types.cjs";
|
|
12
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
13
|
export { deriveClientMaterial, encodeClientMaterial, } from "./ukyc/deriveClientMaterial.cjs";
|
|
14
14
|
export type { EncodedUkycClientMaterial, UkycClientMaterial, } from "./ukyc/deriveClientMaterial.cjs";
|
package/dist/index.d.cts.map
CHANGED
|
@@ -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,6BAA6B,EAC7B,uCAAuC,EACvC,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,0BAA0B,EAC1B,mBAAmB,EACnB,uBAAuB,EACvB,
|
|
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,6BAA6B,EAC7B,uCAAuC,EACvC,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,uBAAuB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,mBAAmB,EACnB,uBAAuB,EACvB,gBAAgB,EAChB,6BAA6B,EAC7B,sBAAsB,EACtB,sBAAsB,EACtB,YAAY,EACZ,iBAAiB,EACjB,2BAA2B,EAC3B,gBAAgB,EAChB,mCAAmC,EACnC,iCAAiC,EACjC,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,8BAA8B,EAC9B,6BAA6B,EAC7B,mBAAmB,GACpB,yBAAwB;AACzB,YAAY,EACV,gCAAgC,EAChC,oCAAoC,EACpC,6BAA6B,EAC7B,6BAA6B,EAC7B,iCAAiC,EACjC,gCAAgC,EAChC,yBAAyB,EACzB,8BAA8B,EAC9B,uCAAuC,EACvC,6BAA6B,EAC7B,gCAAgC,EAChC,iCAAiC,EACjC,wCAAwC,EACxC,uCAAuC,GACxC,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,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,QAAQ,EACR,UAAU,EACV,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,SAAS,EACT,gBAAgB,GACjB,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"}
|
package/dist/index.d.mts
CHANGED
|
@@ -2,13 +2,13 @@ export { KycController, getDefaultKycControllerState, controllerName, } from "./
|
|
|
2
2
|
export type { KycControllerActions, KycControllerEvents, KycControllerGetStateAction, KycControllerMessenger, KycControllerOptions, KycControllerState, KycControllerStateChangeEvent, KycControllerStatusChangedEvent, } from "./KycController.mjs";
|
|
3
3
|
export type { KycControllerAcceptTermsAndStartSessionAction, KycControllerBuildAuthFrameUrlAction, KycControllerBuildCheckFrameUrlAction, KycControllerBuildResetFrameUrlAction, KycControllerCheckKycRequiredAction, KycControllerClearSavedTermsAction, KycControllerClearStateAction, KycControllerCreateVendorCustomerAction, KycControllerGetCustomerIdentityAction, KycControllerGetKycStatusAction, KycControllerGetSessionStatusAction, KycControllerHandleFrameMessageAction, KycControllerInitializeAction, KycControllerLoadDisclaimersAction, KycControllerRefreshKycStatusAction, KycControllerResetAction, KycControllerStartSumSubAction, } from "./KycController-method-action-types.mjs";
|
|
4
4
|
export { KycService, serviceName } from "./KycService.mjs";
|
|
5
|
-
export type { ApplicantAccessTokenResponse, CheckKycRequiredParams, CreateVendorCustomerParams, CreateSessionParams, CreateUkycSessionParams,
|
|
6
|
-
export type { KycServiceCheckKycRequiredAction, KycServiceCreateVendorCustomerAction, KycServiceCreateJourneyAction, KycServiceCreateSessionAction, KycServiceCreateUkycSessionAction, KycServiceFetchDisclaimersAction, KycServiceFetchJwksAction, KycServiceFetchKycStatusAction, KycServiceGetGeoCountryAction, KycServiceGetSessionStatusAction,
|
|
5
|
+
export type { ApplicantAccessTokenResponse, CapabilityAuthorization, CheckKycRequiredParams, CreateVendorCustomerParams, CreateSessionParams, CreateUkycSessionParams, EncryptionSchema, FetchSessionDisclaimersParams, GetSessionStatusParams, VendorCustomerResponse, JwksResponse, KycServiceActions, KycServiceCacheUpdatedEvent, KycServiceEvents, KycServiceGranularCacheUpdatedEvent, KycServiceInvalidateQueriesAction, KycServiceMessenger, KycServiceOptions, SetAuthorizationsParams, SubmitSessionDisclaimersParams, SubmitVendorDisclaimersParams, UkycSessionResponse, } from "./KycService.mjs";
|
|
6
|
+
export type { KycServiceCheckKycRequiredAction, KycServiceCreateVendorCustomerAction, KycServiceCreateJourneyAction, KycServiceCreateSessionAction, KycServiceCreateUkycSessionAction, KycServiceFetchDisclaimersAction, KycServiceFetchJwksAction, KycServiceFetchKycStatusAction, KycServiceFetchSessionDisclaimersAction, KycServiceGetGeoCountryAction, KycServiceGetSessionStatusAction, KycServiceSetAuthorizationsAction, KycServiceSubmitSessionDisclaimersAction, KycServiceSubmitVendorDisclaimersAction, } from "./KycService-method-action-types.mjs";
|
|
7
7
|
export { selectIsKycRequiredForProduct, selectKycPhase, selectKycSumSub, } from "./selectors.mjs";
|
|
8
8
|
export { alpha2ToAlpha3, ALPHA2_TO_ALPHA3 } from "./countryCodes.mjs";
|
|
9
9
|
export { decryptCredentials, generateKeyPair } from "./crypto.mjs";
|
|
10
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";
|
|
11
|
+
export type { KycConsentDocument, KycConsentRecord, KycCustomerIdentity, KycDisclaimer, KycPhase, KycProduct, KycSessionDisclaimers, KycSessionStatus, KycSumSubLaunchParams, KycSumSubLauncher, KycSumSubStatus, KycUserStatus, KycUserStatusResponse, KycVendor, KycVendorSigning, } from "./types.mjs";
|
|
12
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
13
|
export { deriveClientMaterial, encodeClientMaterial, } from "./ukyc/deriveClientMaterial.mjs";
|
|
14
14
|
export type { EncodedUkycClientMaterial, UkycClientMaterial, } from "./ukyc/deriveClientMaterial.mjs";
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aA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,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"}
|
package/dist/index.mjs.map
CHANGED
|
@@ -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;AA+B5B,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,yBAAwB;
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,4BAA4B,EAC5B,cAAc,EACf,4BAA2B;AA+B5B,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,yBAAwB;AA0C1D,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;AA0BlE,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 KycControllerClearStateAction,\n KycControllerCreateVendorCustomerAction,\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 CapabilityAuthorization,\n CheckKycRequiredParams,\n CreateVendorCustomerParams,\n CreateSessionParams,\n CreateUkycSessionParams,\n EncryptionSchema,\n FetchSessionDisclaimersParams,\n GetSessionStatusParams,\n VendorCustomerResponse,\n JwksResponse,\n KycServiceActions,\n KycServiceCacheUpdatedEvent,\n KycServiceEvents,\n KycServiceGranularCacheUpdatedEvent,\n KycServiceInvalidateQueriesAction,\n KycServiceMessenger,\n KycServiceOptions,\n SetAuthorizationsParams,\n SubmitSessionDisclaimersParams,\n SubmitVendorDisclaimersParams,\n UkycSessionResponse,\n} from './KycService.js';\nexport type {\n KycServiceCheckKycRequiredAction,\n KycServiceCreateVendorCustomerAction,\n KycServiceCreateJourneyAction,\n KycServiceCreateSessionAction,\n KycServiceCreateUkycSessionAction,\n KycServiceFetchDisclaimersAction,\n KycServiceFetchJwksAction,\n KycServiceFetchKycStatusAction,\n KycServiceFetchSessionDisclaimersAction,\n KycServiceGetGeoCountryAction,\n KycServiceGetSessionStatusAction,\n KycServiceSetAuthorizationsAction,\n KycServiceSubmitSessionDisclaimersAction,\n KycServiceSubmitVendorDisclaimersAction,\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 KycConsentDocument,\n KycConsentRecord,\n KycCustomerIdentity,\n KycDisclaimer,\n KycPhase,\n KycProduct,\n KycSessionDisclaimers,\n KycSessionStatus,\n KycSumSubLaunchParams,\n KycSumSubLauncher,\n KycSumSubStatus,\n KycUserStatus,\n KycUserStatusResponse,\n KycVendor,\n KycVendorSigning,\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"]}
|
package/dist/types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG","sourcesContent":["/**\n * Shared types for the KYC controller and service.\n *\n * The KYC flow is vendor-backed (currently MoonPay for identity + SumSub for\n * document verification) but the surface exposed to consumers (ramps, card) is\n * intentionally vendor-neutral so a future vendor swap does not ripple out.\n */\n\n/**\n * A MetaMask feature that consumes KYC. Used to key the per-product\n * \"is KYC required\" cache so ramps, card, and money can share one controller.\n */\nexport type KycProduct = 'ramps' | 'card' | 'money';\n\n/**\n * Identity vendors supported behind the KYC surface.\n *\n * - `moonpay` — MoonPay Check/Auth frames + SumSub documents.\n * - `iron` — Iron-only Money/VBA path: empty-shell customer → consents →\n * SumSub, with no MoonPay Check/Auth frames.\n */\nexport type KycVendor = 'moonpay' | 'iron';\n\n/**\n * Vendor-scoped identity for the currently authenticated KYC customer.\n *\n * Exposed to consumers (e.g. ramps) that must attach the vendor customer id to\n * downstream provider calls without reading the full KYC state, which also\n * holds session/access tokens. The identifier is session-scoped: it is only\n * available once the customer has authenticated through the current flow and\n * is cleared on `reset()`.\n */\nexport type KycCustomerIdentity = {\n /** The identity vendor that issued {@link KycCustomerIdentity.id}. */\n vendor: KycVendor;\n /** The vendor customer id (e.g. MoonPay customer UUID). */\n id: string;\n};\n\n/**\n * User-keyed KYC status returned by `GET /kyc/status` and stored for toast /\n * banner rendering. Collapses vendor + SumSub / relay state into the offsite\n * contract.\n */\nexport type KycUserStatus =\n | 'not-started'\n | 'pending'\n | 'need-more-information'\n | 'terminal-failure'\n | 'completed';\n\n/**\n * Payload from `GET /kyc/status`, including optional fields that power the\n * 3-state error contract (retryable SumSub vs terminal vs EDD).\n */\nexport type KycUserStatusResponse = {\n status: KycUserStatus;\n /** Present when the user can reopen a SumSub session (retryable path). */\n sumsubSessionId?: string;\n /** Machine-readable error code for terminal / EDD UX. */\n errorCode?: string;\n};\n\n/**\n * Phases of the end-to-end identity flow.\n *\n * - `idle` — nothing started.\n * - `terms` — waiting for the customer to accept the vendor terms.\n * - `session` — creating the vendor session (MoonPay) or
|
|
1
|
+
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG","sourcesContent":["/**\n * Shared types for the KYC controller and service.\n *\n * The KYC flow is vendor-backed (currently MoonPay for identity + SumSub for\n * document verification) but the surface exposed to consumers (ramps, card) is\n * intentionally vendor-neutral so a future vendor swap does not ripple out.\n */\n\n/**\n * A MetaMask feature that consumes KYC. Used to key the per-product\n * \"is KYC required\" cache so ramps, card, and money can share one controller.\n */\nexport type KycProduct = 'ramps' | 'card' | 'money';\n\n/**\n * Identity vendors supported behind the KYC surface.\n *\n * - `moonpay` — MoonPay Check/Auth frames + SumSub documents.\n * - `iron` — Iron-only Money/VBA path: empty-shell customer → consents →\n * SumSub, with no MoonPay Check/Auth frames.\n */\nexport type KycVendor = 'moonpay' | 'iron';\n\n/**\n * Vendor-scoped identity for the currently authenticated KYC customer.\n *\n * Exposed to consumers (e.g. ramps) that must attach the vendor customer id to\n * downstream provider calls without reading the full KYC state, which also\n * holds session/access tokens. The identifier is session-scoped: it is only\n * available once the customer has authenticated through the current flow and\n * is cleared on `reset()`.\n */\nexport type KycCustomerIdentity = {\n /** The identity vendor that issued {@link KycCustomerIdentity.id}. */\n vendor: KycVendor;\n /** The vendor customer id (e.g. MoonPay customer UUID). */\n id: string;\n};\n\n/**\n * User-keyed KYC status returned by `GET /kyc/status` and stored for toast /\n * banner rendering. Collapses vendor + SumSub / relay state into the offsite\n * contract.\n */\nexport type KycUserStatus =\n | 'not-started'\n | 'pending'\n | 'need-more-information'\n | 'terminal-failure'\n | 'completed';\n\n/**\n * Payload from `GET /kyc/status`, including optional fields that power the\n * 3-state error contract (retryable SumSub vs terminal vs EDD).\n */\nexport type KycUserStatusResponse = {\n status: KycUserStatus;\n /** Present when the user can reopen a SumSub session (retryable path). */\n sumsubSessionId?: string;\n /** Machine-readable error code for terminal / EDD UX. */\n errorCode?: string;\n};\n\n/**\n * Phases of the end-to-end identity flow.\n *\n * - `idle` — nothing started.\n * - `terms` — waiting for the customer to accept the vendor terms.\n * - `session` — creating the vendor session (MoonPay) or creating the UKYC\n * session and recording session-scoped disclaimers (non-MoonPay vendors).\n * - `check` — running the invisible connection-check frame (MoonPay only).\n * - `auth` — running the visible authentication (OTP) frame (MoonPay only).\n * - `form` — authenticated. When the flow is scoped to a product, the\n * KYC-required check runs automatically from here; otherwise the consumer\n * drives it manually via `checkKycRequired`. Consents-path vendors skip\n * this phase.\n * - `submit` — submitting the KYC-required check / launching SumSub.\n * - `done` — flow complete; see `kycRequiredByProduct` / `sumsub` /\n * `userStatus`. When KYC is required, the document-verification sub-flow is\n * launched automatically.\n * - `error` — flow halted; see `error`.\n */\nexport type KycPhase =\n | 'idle'\n | 'terms'\n | 'session'\n | 'check'\n | 'auth'\n | 'form'\n | 'submit'\n | 'done'\n | 'error';\n\n/**\n * Progress of the SumSub document-verification sub-flow.\n *\n * - `polling` — the SDK finished and the controller is polling the UKYC\n * backend for the session's final decision (see `KycSessionStatus`). The\n * sub-flow resolves to `complete` or `failed` once a terminal status arrives.\n * - `vendorProcessing` — session creation reported that the applicant is\n * already approved on the relay (`kycStatus`) while the vendor is still\n * finalizing its own decision (`finalStatus`). There is nothing left for the\n * applicant to do, so the SDK is not launched; see `statusMessage`.\n */\nexport type KycSumSubStatus =\n | 'idle'\n | 'creatingSession'\n | 'fetchingToken'\n | 'launching'\n | 'inProgress'\n | 'polling'\n | 'complete'\n | 'failed'\n | 'vendorProcessing';\n\n/**\n * The status of a UKYC session, returned by the `GET /sessions/{id}/status`\n * endpoint and polled after the SumSub SDK completes to determine the final\n * verification decision.\n */\nexport type KycSessionStatus = {\n /**\n * The overall status of the session. Terminal values (e.g. `approved`,\n * `completed`, `rejected`, `failed`, `blocked`) end polling; any other value\n * keeps polling.\n */\n finalStatus: string;\n /** Optional human-readable message describing the status. */\n statusMessage?: string;\n /** The vendor-agnostic external user id associated with the session. */\n externalUserId: string;\n /** The KYC decision status. */\n kycStatus: string;\n /** The identity vendor that handled the session. */\n vendor: string;\n /** The vendor-specific status. */\n vendorStatus: string;\n};\n\n/**\n * A single disclaimer/term the customer must accept before a vendor session is\n * created (`GET /vendors/{vendor}/disclaimers`).\n */\nexport type KycDisclaimer = {\n id: string;\n // Mirrors the vendor API response field, which is snake_case.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n display_name: string;\n url: string;\n};\n\n/**\n * A vendor T&C signing returned by `POST /vendors/{vendor}/disclaimers`.\n */\nexport type KycVendorSigning = {\n /** Iron signing id. */\n id: string;\n // Mirrors the vendor API response field, which is snake_case.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customer_id: string;\n // Mirrors the vendor API response field, which is snake_case.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n content_id?: string;\n};\n\n/**\n * A legal document in the session-scoped idOS / KYC-provider catalog\n * (`GET`/`POST /sessions/{sessionId}/disclaimers`).\n */\nexport type KycConsentDocument = {\n /** Stable identifier of the legal document. */\n key: string;\n /** Version of the document currently in force. */\n version: string;\n /** Human-readable document title. */\n title: string;\n /** URL the document body is hosted at. */\n url: string;\n /** Whether this session already consented to this document version. */\n consented: boolean;\n};\n\n/**\n * A consent record posted for a catalog document. `key` and `version` must\n * match the current session catalog.\n */\nexport type KycConsentRecord = {\n key: string;\n version: string;\n};\n\n/**\n * Session-scoped disclaimer catalog returned by\n * `GET`/`POST /sessions/{sessionId}/disclaimers`.\n */\nexport type KycSessionDisclaimers = {\n /** idOS legal documents. */\n idOS: KycConsentDocument[];\n /** KYC provider (SumSub) legal documents. */\n kycProvider: KycConsentDocument[];\n /** Whether the user consented to reuse existing idOS credentials. */\n credentialReusabilityConsentGiven: boolean;\n};\n\n/**\n * Parameters passed to a platform SumSub launcher.\n */\nexport type KycSumSubLaunchParams = {\n /**\n * The applicant access token used to initialize the SumSub SDK.\n */\n applicantAccessToken: string;\n\n /**\n * Called by the SDK when the access token expires; must resolve with a fresh\n * applicant access token.\n */\n onTokenExpiration: () => Promise<string>;\n\n /**\n * Called when the SDK reports a status transition.\n */\n onStatusChange?: (prevStatus: string, newStatus: string) => void;\n\n /**\n * BCP-47 locale for the SDK UI.\n */\n locale?: string;\n\n /**\n * Enables SDK debug logging.\n */\n debug?: boolean;\n};\n\n/**\n * Platform adapter that launches the native/web SumSub SDK.\n *\n * The KYC controller is platform-agnostic and does not import any SDK; each\n * client (mobile / extension / web) injects an implementation of this\n * interface. The controller owns all orchestration (session creation, token\n * exchange, token refresh, state) and only delegates the actual SDK\n * presentation to `launch`.\n */\nexport type KycSumSubLauncher = {\n /**\n * Whether the underlying SDK is available in the current runtime (e.g. the\n * native module is linked). When `false`, `startSumSub` fails fast.\n */\n isAvailable(): boolean;\n\n /**\n * Presents the SumSub verification flow and resolves with the SDK result.\n */\n launch(params: KycSumSubLaunchParams): Promise<Record<string, unknown>>;\n};\n"]}
|
package/dist/types.d.cts
CHANGED
|
@@ -55,8 +55,8 @@ export type KycUserStatusResponse = {
|
|
|
55
55
|
*
|
|
56
56
|
* - `idle` — nothing started.
|
|
57
57
|
* - `terms` — waiting for the customer to accept the vendor terms.
|
|
58
|
-
* - `session` — creating the vendor session (MoonPay) or
|
|
59
|
-
* (non-MoonPay vendors).
|
|
58
|
+
* - `session` — creating the vendor session (MoonPay) or creating the UKYC
|
|
59
|
+
* session and recording session-scoped disclaimers (non-MoonPay vendors).
|
|
60
60
|
* - `check` — running the invisible connection-check frame (MoonPay only).
|
|
61
61
|
* - `auth` — running the visible authentication (OTP) frame (MoonPay only).
|
|
62
62
|
* - `form` — authenticated. When the flow is scoped to a product, the
|
|
@@ -106,14 +106,59 @@ export type KycSessionStatus = {
|
|
|
106
106
|
vendorStatus: string;
|
|
107
107
|
};
|
|
108
108
|
/**
|
|
109
|
-
* A single disclaimer/term the customer must accept before a session is
|
|
110
|
-
* created.
|
|
109
|
+
* A single disclaimer/term the customer must accept before a vendor session is
|
|
110
|
+
* created (`GET /vendors/{vendor}/disclaimers`).
|
|
111
111
|
*/
|
|
112
112
|
export type KycDisclaimer = {
|
|
113
113
|
id: string;
|
|
114
114
|
display_name: string;
|
|
115
115
|
url: string;
|
|
116
116
|
};
|
|
117
|
+
/**
|
|
118
|
+
* A vendor T&C signing returned by `POST /vendors/{vendor}/disclaimers`.
|
|
119
|
+
*/
|
|
120
|
+
export type KycVendorSigning = {
|
|
121
|
+
/** Iron signing id. */
|
|
122
|
+
id: string;
|
|
123
|
+
customer_id: string;
|
|
124
|
+
content_id?: string;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* A legal document in the session-scoped idOS / KYC-provider catalog
|
|
128
|
+
* (`GET`/`POST /sessions/{sessionId}/disclaimers`).
|
|
129
|
+
*/
|
|
130
|
+
export type KycConsentDocument = {
|
|
131
|
+
/** Stable identifier of the legal document. */
|
|
132
|
+
key: string;
|
|
133
|
+
/** Version of the document currently in force. */
|
|
134
|
+
version: string;
|
|
135
|
+
/** Human-readable document title. */
|
|
136
|
+
title: string;
|
|
137
|
+
/** URL the document body is hosted at. */
|
|
138
|
+
url: string;
|
|
139
|
+
/** Whether this session already consented to this document version. */
|
|
140
|
+
consented: boolean;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* A consent record posted for a catalog document. `key` and `version` must
|
|
144
|
+
* match the current session catalog.
|
|
145
|
+
*/
|
|
146
|
+
export type KycConsentRecord = {
|
|
147
|
+
key: string;
|
|
148
|
+
version: string;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Session-scoped disclaimer catalog returned by
|
|
152
|
+
* `GET`/`POST /sessions/{sessionId}/disclaimers`.
|
|
153
|
+
*/
|
|
154
|
+
export type KycSessionDisclaimers = {
|
|
155
|
+
/** idOS legal documents. */
|
|
156
|
+
idOS: KycConsentDocument[];
|
|
157
|
+
/** KYC provider (SumSub) legal documents. */
|
|
158
|
+
kycProvider: KycConsentDocument[];
|
|
159
|
+
/** Whether the user consented to reuse existing idOS credentials. */
|
|
160
|
+
credentialReusabilityConsentGiven: boolean;
|
|
161
|
+
};
|
|
117
162
|
/**
|
|
118
163
|
* Parameters passed to a platform SumSub launcher.
|
|
119
164
|
*/
|
package/dist/types.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAE3C;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,sEAAsE;IACtE,MAAM,EAAE,SAAS,CAAC;IAClB,2DAA2D;IAC3D,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB,aAAa,GACb,SAAS,GACT,uBAAuB,GACvB,kBAAkB,GAClB,WAAW,CAAC;AAEhB;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,aAAa,CAAC;IACtB,0EAA0E;IAC1E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,OAAO,GACP,SAAS,GACT,OAAO,GACP,MAAM,GACN,MAAM,GACN,QAAQ,GACR,MAAM,GACN,OAAO,CAAC;AAEZ;;;;;;;;;;GAUG;AACH,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,iBAAiB,GACjB,eAAe,GACf,WAAW,GACX,YAAY,GACZ,SAAS,GACT,UAAU,GACV,QAAQ,GACR,kBAAkB,CAAC;AAEvB;;;;GAIG;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C,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,WAAW,IAAI,OAAO,CAAC;IAEvB;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACzE,CAAC"}
|
package/dist/types.d.mts
CHANGED
|
@@ -55,8 +55,8 @@ export type KycUserStatusResponse = {
|
|
|
55
55
|
*
|
|
56
56
|
* - `idle` — nothing started.
|
|
57
57
|
* - `terms` — waiting for the customer to accept the vendor terms.
|
|
58
|
-
* - `session` — creating the vendor session (MoonPay) or
|
|
59
|
-
* (non-MoonPay vendors).
|
|
58
|
+
* - `session` — creating the vendor session (MoonPay) or creating the UKYC
|
|
59
|
+
* session and recording session-scoped disclaimers (non-MoonPay vendors).
|
|
60
60
|
* - `check` — running the invisible connection-check frame (MoonPay only).
|
|
61
61
|
* - `auth` — running the visible authentication (OTP) frame (MoonPay only).
|
|
62
62
|
* - `form` — authenticated. When the flow is scoped to a product, the
|
|
@@ -106,14 +106,59 @@ export type KycSessionStatus = {
|
|
|
106
106
|
vendorStatus: string;
|
|
107
107
|
};
|
|
108
108
|
/**
|
|
109
|
-
* A single disclaimer/term the customer must accept before a session is
|
|
110
|
-
* created.
|
|
109
|
+
* A single disclaimer/term the customer must accept before a vendor session is
|
|
110
|
+
* created (`GET /vendors/{vendor}/disclaimers`).
|
|
111
111
|
*/
|
|
112
112
|
export type KycDisclaimer = {
|
|
113
113
|
id: string;
|
|
114
114
|
display_name: string;
|
|
115
115
|
url: string;
|
|
116
116
|
};
|
|
117
|
+
/**
|
|
118
|
+
* A vendor T&C signing returned by `POST /vendors/{vendor}/disclaimers`.
|
|
119
|
+
*/
|
|
120
|
+
export type KycVendorSigning = {
|
|
121
|
+
/** Iron signing id. */
|
|
122
|
+
id: string;
|
|
123
|
+
customer_id: string;
|
|
124
|
+
content_id?: string;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* A legal document in the session-scoped idOS / KYC-provider catalog
|
|
128
|
+
* (`GET`/`POST /sessions/{sessionId}/disclaimers`).
|
|
129
|
+
*/
|
|
130
|
+
export type KycConsentDocument = {
|
|
131
|
+
/** Stable identifier of the legal document. */
|
|
132
|
+
key: string;
|
|
133
|
+
/** Version of the document currently in force. */
|
|
134
|
+
version: string;
|
|
135
|
+
/** Human-readable document title. */
|
|
136
|
+
title: string;
|
|
137
|
+
/** URL the document body is hosted at. */
|
|
138
|
+
url: string;
|
|
139
|
+
/** Whether this session already consented to this document version. */
|
|
140
|
+
consented: boolean;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* A consent record posted for a catalog document. `key` and `version` must
|
|
144
|
+
* match the current session catalog.
|
|
145
|
+
*/
|
|
146
|
+
export type KycConsentRecord = {
|
|
147
|
+
key: string;
|
|
148
|
+
version: string;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Session-scoped disclaimer catalog returned by
|
|
152
|
+
* `GET`/`POST /sessions/{sessionId}/disclaimers`.
|
|
153
|
+
*/
|
|
154
|
+
export type KycSessionDisclaimers = {
|
|
155
|
+
/** idOS legal documents. */
|
|
156
|
+
idOS: KycConsentDocument[];
|
|
157
|
+
/** KYC provider (SumSub) legal documents. */
|
|
158
|
+
kycProvider: KycConsentDocument[];
|
|
159
|
+
/** Whether the user consented to reuse existing idOS credentials. */
|
|
160
|
+
credentialReusabilityConsentGiven: boolean;
|
|
161
|
+
};
|
|
117
162
|
/**
|
|
118
163
|
* Parameters passed to a platform SumSub launcher.
|
|
119
164
|
*/
|
package/dist/types.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GA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ourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/**\n * Shared types for the KYC controller and service.\n *\n * The KYC flow is vendor-backed (currently MoonPay for identity + SumSub for\n * document verification) but the surface exposed to consumers (ramps, card) is\n * intentionally vendor-neutral so a future vendor swap does not ripple out.\n */\n\n/**\n * A MetaMask feature that consumes KYC. Used to key the per-product\n * \"is KYC required\" cache so ramps, card, and money can share one controller.\n */\nexport type KycProduct = 'ramps' | 'card' | 'money';\n\n/**\n * Identity vendors supported behind the KYC surface.\n *\n * - `moonpay` — MoonPay Check/Auth frames + SumSub documents.\n * - `iron` — Iron-only Money/VBA path: empty-shell customer → consents →\n * SumSub, with no MoonPay Check/Auth frames.\n */\nexport type KycVendor = 'moonpay' | 'iron';\n\n/**\n * Vendor-scoped identity for the currently authenticated KYC customer.\n *\n * Exposed to consumers (e.g. ramps) that must attach the vendor customer id to\n * downstream provider calls without reading the full KYC state, which also\n * holds session/access tokens. The identifier is session-scoped: it is only\n * available once the customer has authenticated through the current flow and\n * is cleared on `reset()`.\n */\nexport type KycCustomerIdentity = {\n /** The identity vendor that issued {@link KycCustomerIdentity.id}. */\n vendor: KycVendor;\n /** The vendor customer id (e.g. MoonPay customer UUID). */\n id: string;\n};\n\n/**\n * User-keyed KYC status returned by `GET /kyc/status` and stored for toast /\n * banner rendering. Collapses vendor + SumSub / relay state into the offsite\n * contract.\n */\nexport type KycUserStatus =\n | 'not-started'\n | 'pending'\n | 'need-more-information'\n | 'terminal-failure'\n | 'completed';\n\n/**\n * Payload from `GET /kyc/status`, including optional fields that power the\n * 3-state error contract (retryable SumSub vs terminal vs EDD).\n */\nexport type KycUserStatusResponse = {\n status: KycUserStatus;\n /** Present when the user can reopen a SumSub session (retryable path). */\n sumsubSessionId?: string;\n /** Machine-readable error code for terminal / EDD UX. */\n errorCode?: string;\n};\n\n/**\n * Phases of the end-to-end identity flow.\n *\n * - `idle` — nothing started.\n * - `terms` — waiting for the customer to accept the vendor terms.\n * - `session` — creating the vendor session (MoonPay) or
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/**\n * Shared types for the KYC controller and service.\n *\n * The KYC flow is vendor-backed (currently MoonPay for identity + SumSub for\n * document verification) but the surface exposed to consumers (ramps, card) is\n * intentionally vendor-neutral so a future vendor swap does not ripple out.\n */\n\n/**\n * A MetaMask feature that consumes KYC. Used to key the per-product\n * \"is KYC required\" cache so ramps, card, and money can share one controller.\n */\nexport type KycProduct = 'ramps' | 'card' | 'money';\n\n/**\n * Identity vendors supported behind the KYC surface.\n *\n * - `moonpay` — MoonPay Check/Auth frames + SumSub documents.\n * - `iron` — Iron-only Money/VBA path: empty-shell customer → consents →\n * SumSub, with no MoonPay Check/Auth frames.\n */\nexport type KycVendor = 'moonpay' | 'iron';\n\n/**\n * Vendor-scoped identity for the currently authenticated KYC customer.\n *\n * Exposed to consumers (e.g. ramps) that must attach the vendor customer id to\n * downstream provider calls without reading the full KYC state, which also\n * holds session/access tokens. The identifier is session-scoped: it is only\n * available once the customer has authenticated through the current flow and\n * is cleared on `reset()`.\n */\nexport type KycCustomerIdentity = {\n /** The identity vendor that issued {@link KycCustomerIdentity.id}. */\n vendor: KycVendor;\n /** The vendor customer id (e.g. MoonPay customer UUID). */\n id: string;\n};\n\n/**\n * User-keyed KYC status returned by `GET /kyc/status` and stored for toast /\n * banner rendering. Collapses vendor + SumSub / relay state into the offsite\n * contract.\n */\nexport type KycUserStatus =\n | 'not-started'\n | 'pending'\n | 'need-more-information'\n | 'terminal-failure'\n | 'completed';\n\n/**\n * Payload from `GET /kyc/status`, including optional fields that power the\n * 3-state error contract (retryable SumSub vs terminal vs EDD).\n */\nexport type KycUserStatusResponse = {\n status: KycUserStatus;\n /** Present when the user can reopen a SumSub session (retryable path). */\n sumsubSessionId?: string;\n /** Machine-readable error code for terminal / EDD UX. */\n errorCode?: string;\n};\n\n/**\n * Phases of the end-to-end identity flow.\n *\n * - `idle` — nothing started.\n * - `terms` — waiting for the customer to accept the vendor terms.\n * - `session` — creating the vendor session (MoonPay) or creating the UKYC\n * session and recording session-scoped disclaimers (non-MoonPay vendors).\n * - `check` — running the invisible connection-check frame (MoonPay only).\n * - `auth` — running the visible authentication (OTP) frame (MoonPay only).\n * - `form` — authenticated. When the flow is scoped to a product, the\n * KYC-required check runs automatically from here; otherwise the consumer\n * drives it manually via `checkKycRequired`. Consents-path vendors skip\n * this phase.\n * - `submit` — submitting the KYC-required check / launching SumSub.\n * - `done` — flow complete; see `kycRequiredByProduct` / `sumsub` /\n * `userStatus`. When KYC is required, the document-verification sub-flow is\n * launched automatically.\n * - `error` — flow halted; see `error`.\n */\nexport type KycPhase =\n | 'idle'\n | 'terms'\n | 'session'\n | 'check'\n | 'auth'\n | 'form'\n | 'submit'\n | 'done'\n | 'error';\n\n/**\n * Progress of the SumSub document-verification sub-flow.\n *\n * - `polling` — the SDK finished and the controller is polling the UKYC\n * backend for the session's final decision (see `KycSessionStatus`). The\n * sub-flow resolves to `complete` or `failed` once a terminal status arrives.\n * - `vendorProcessing` — session creation reported that the applicant is\n * already approved on the relay (`kycStatus`) while the vendor is still\n * finalizing its own decision (`finalStatus`). There is nothing left for the\n * applicant to do, so the SDK is not launched; see `statusMessage`.\n */\nexport type KycSumSubStatus =\n | 'idle'\n | 'creatingSession'\n | 'fetchingToken'\n | 'launching'\n | 'inProgress'\n | 'polling'\n | 'complete'\n | 'failed'\n | 'vendorProcessing';\n\n/**\n * The status of a UKYC session, returned by the `GET /sessions/{id}/status`\n * endpoint and polled after the SumSub SDK completes to determine the final\n * verification decision.\n */\nexport type KycSessionStatus = {\n /**\n * The overall status of the session. Terminal values (e.g. `approved`,\n * `completed`, `rejected`, `failed`, `blocked`) end polling; any other value\n * keeps polling.\n */\n finalStatus: string;\n /** Optional human-readable message describing the status. */\n statusMessage?: string;\n /** The vendor-agnostic external user id associated with the session. */\n externalUserId: string;\n /** The KYC decision status. */\n kycStatus: string;\n /** The identity vendor that handled the session. */\n vendor: string;\n /** The vendor-specific status. */\n vendorStatus: string;\n};\n\n/**\n * A single disclaimer/term the customer must accept before a vendor session is\n * created (`GET /vendors/{vendor}/disclaimers`).\n */\nexport type KycDisclaimer = {\n id: string;\n // Mirrors the vendor API response field, which is snake_case.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n display_name: string;\n url: string;\n};\n\n/**\n * A vendor T&C signing returned by `POST /vendors/{vendor}/disclaimers`.\n */\nexport type KycVendorSigning = {\n /** Iron signing id. */\n id: string;\n // Mirrors the vendor API response field, which is snake_case.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n customer_id: string;\n // Mirrors the vendor API response field, which is snake_case.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n content_id?: string;\n};\n\n/**\n * A legal document in the session-scoped idOS / KYC-provider catalog\n * (`GET`/`POST /sessions/{sessionId}/disclaimers`).\n */\nexport type KycConsentDocument = {\n /** Stable identifier of the legal document. */\n key: string;\n /** Version of the document currently in force. */\n version: string;\n /** Human-readable document title. */\n title: string;\n /** URL the document body is hosted at. */\n url: string;\n /** Whether this session already consented to this document version. */\n consented: boolean;\n};\n\n/**\n * A consent record posted for a catalog document. `key` and `version` must\n * match the current session catalog.\n */\nexport type KycConsentRecord = {\n key: string;\n version: string;\n};\n\n/**\n * Session-scoped disclaimer catalog returned by\n * `GET`/`POST /sessions/{sessionId}/disclaimers`.\n */\nexport type KycSessionDisclaimers = {\n /** idOS legal documents. */\n idOS: KycConsentDocument[];\n /** KYC provider (SumSub) legal documents. */\n kycProvider: KycConsentDocument[];\n /** Whether the user consented to reuse existing idOS credentials. */\n credentialReusabilityConsentGiven: boolean;\n};\n\n/**\n * Parameters passed to a platform SumSub launcher.\n */\nexport type KycSumSubLaunchParams = {\n /**\n * The applicant access token used to initialize the SumSub SDK.\n */\n applicantAccessToken: string;\n\n /**\n * Called by the SDK when the access token expires; must resolve with a fresh\n * applicant access token.\n */\n onTokenExpiration: () => Promise<string>;\n\n /**\n * Called when the SDK reports a status transition.\n */\n onStatusChange?: (prevStatus: string, newStatus: string) => void;\n\n /**\n * BCP-47 locale for the SDK UI.\n */\n locale?: string;\n\n /**\n * Enables SDK debug logging.\n */\n debug?: boolean;\n};\n\n/**\n * Platform adapter that launches the native/web SumSub SDK.\n *\n * The KYC controller is platform-agnostic and does not import any SDK; each\n * client (mobile / extension / web) injects an implementation of this\n * interface. The controller owns all orchestration (session creation, token\n * exchange, token refresh, state) and only delegates the actual SDK\n * presentation to `launch`.\n */\nexport type KycSumSubLauncher = {\n /**\n * Whether the underlying SDK is available in the current runtime (e.g. the\n * native module is linked). When `false`, `startSumSub` fails fast.\n */\n isAvailable(): boolean;\n\n /**\n * Presents the SumSub verification flow and resolves with the SDK result.\n */\n launch(params: KycSumSubLaunchParams): Promise<Record<string, unknown>>;\n};\n"]}
|
package/dist/ukyc/jwtChain.cjs
CHANGED
|
@@ -25,7 +25,7 @@ function decodeJsonSegment(segment, label) {
|
|
|
25
25
|
* `header.payload` input. Returns the decoded, verified payload.
|
|
26
26
|
*
|
|
27
27
|
* @param keys - The JWKS keys published by the Fractal encryption service.
|
|
28
|
-
* @param jwtChain - The compact-serialized EdDSA JWT from
|
|
28
|
+
* @param jwtChain - The compact-serialized EdDSA JWT from an encryption schema.
|
|
29
29
|
* @returns The verified JWT payload.
|
|
30
30
|
*/
|
|
31
31
|
function verifyJwtChain(keys, jwtChain) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwtChain.cjs","sourceRoot":"","sources":["../../src/ukyc/jwtChain.ts"],"names":[],"mappings":";;;AAAA,2CAAgD;AAChD,mDAAgD;AAEhD,iDAAkD;AA0ClD;;;;;;GAMG;AACH,SAAS,iBAAiB,CAAO,OAAe,EAAE,KAAa;IAC7D,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAA,qBAAa,EAAC,IAAA,8BAAgB,EAAC,OAAO,CAAC,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AAO,CAAC,MAAM,CAC5B,IAAA,8BAAgB,EAAC,gBAAgB,CAAC,EAClC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,aAAa,IAAI,cAAc,EAAE,CAAC,EAC9D,IAAA,8BAAgB,EAAC,GAAG,CAAC,CAAC,CAAC,CACxB,CAAC;IACF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D,CAAC;IACJ,CAAC;IAED,OAAO,iBAAiB,CAAkB,cAAc,EAAE,SAAS,CAAC,CAAC;AACvE,CAAC;AAzCD,wCAyCC","sourcesContent":["import { bytesToString } from '@metamask/utils';\nimport { ed25519 } from '@noble/curves/ed25519';\n\nimport { base64UrlToBytes } from '../encoding.js';\n\n/**\n * Verifies the `jwtChain` returned by the Fractal encryption service against\n * its published JWKS.\n *\n * The signature check is done with `@noble/curves` (rather than WebCrypto\n * `subtle`) because not every MetaMask runtime exposes a `subtle`\n * implementation for Ed25519; JWT parsing is a plain base64url/JSON decode, so\n * no `jose` dependency is required.\n */\n\n/**\n * A single Ed25519 (OKP) JSON Web Key from the Fractal JWKS.\n */\nexport type Jwk = {\n kty: string;\n crv: string;\n x: string;\n kid: string;\n use?: string;\n alg?: string;\n};\n\n/**\n * The verified `jwtChain` payload. `sessionServerPublicKeyX` attests the\n * server's X25519 public key so the client can confirm the value returned\n * out-of-band
|
|
1
|
+
{"version":3,"file":"jwtChain.cjs","sourceRoot":"","sources":["../../src/ukyc/jwtChain.ts"],"names":[],"mappings":";;;AAAA,2CAAgD;AAChD,mDAAgD;AAEhD,iDAAkD;AA0ClD;;;;;;GAMG;AACH,SAAS,iBAAiB,CAAO,OAAe,EAAE,KAAa;IAC7D,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAA,qBAAa,EAAC,IAAA,8BAAgB,EAAC,OAAO,CAAC,CAAC,CAAS,CAAC;IACtE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf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,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,aAAa,IAAI,cAAc,EAAE,CAAC,EAC9D,IAAA,8BAAgB,EAAC,GAAG,CAAC,CAAC,CAAC,CACxB,CAAC;IACF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D,CAAC;IACJ,CAAC;IAED,OAAO,iBAAiB,CAAkB,cAAc,EAAE,SAAS,CAAC,CAAC;AACvE,CAAC;AAzCD,wCAyCC","sourcesContent":["import { bytesToString } from '@metamask/utils';\nimport { ed25519 } from '@noble/curves/ed25519';\n\nimport { base64UrlToBytes } from '../encoding.js';\n\n/**\n * Verifies the `jwtChain` returned by the Fractal encryption service against\n * its published JWKS.\n *\n * The signature check is done with `@noble/curves` (rather than WebCrypto\n * `subtle`) because not every MetaMask runtime exposes a `subtle`\n * implementation for Ed25519; JWT parsing is a plain base64url/JSON decode, so\n * no `jose` dependency is required.\n */\n\n/**\n * A single Ed25519 (OKP) JSON Web Key from the Fractal JWKS.\n */\nexport type Jwk = {\n kty: string;\n crv: string;\n x: string;\n kid: string;\n use?: string;\n alg?: string;\n};\n\n/**\n * The verified `jwtChain` payload. `sessionServerPublicKeyX` attests the\n * server's X25519 public key so the client can confirm the value returned\n * out-of-band in an encryption schema was not tampered with.\n */\nexport type JwtChainPayload = {\n sessionServerPublicKeyX: string;\n nonce: string;\n};\n\n/**\n * The protected header of a compact JWT.\n */\ntype JwtHeader = {\n alg?: string;\n kid?: string;\n};\n\n/**\n * Decodes a base64url JWT segment into a parsed JSON object.\n *\n * @param segment - The base64url-encoded segment.\n * @param label - Human-readable segment name for error messages.\n * @returns The parsed JSON object.\n */\nfunction decodeJsonSegment<Type>(segment: string, label: string): Type {\n try {\n return JSON.parse(bytesToString(base64UrlToBytes(segment))) as Type;\n } catch (error) {\n throw new Error(\n `UKYC: failed to decode jwtChain ${label}: ${String(error)}`,\n );\n }\n}\n\n/**\n * Verifies `jwtChain` against `keys`: matches the JWT header `kid` to a\n * published Ed25519 signing key and checks the EdDSA signature over the\n * `header.payload` input. Returns the decoded, verified payload.\n *\n * @param keys - The JWKS keys published by the Fractal encryption service.\n * @param jwtChain - The compact-serialized EdDSA JWT from an encryption schema.\n * @returns The verified JWT payload.\n */\nexport function verifyJwtChain(keys: Jwk[], jwtChain: string): JwtChainPayload {\n const [headerSegment, payloadSegment, signatureSegment] = jwtChain.split('.');\n if (!headerSegment || !payloadSegment || !signatureSegment) {\n throw new Error(\n 'UKYC: jwtChain is not a well-formed JWT (expected 3 segments).',\n );\n }\n\n const header = decodeJsonSegment<JwtHeader>(headerSegment, 'header');\n if (header.alg !== 'EdDSA') {\n throw new Error(\n `UKYC: unsupported jwtChain alg \"${String(\n header.alg,\n )}\" (expected EdDSA).`,\n );\n }\n\n const jwk = keys.find((key) => key.kid === header.kid);\n if (!jwk) {\n throw new Error(\n `UKYC: no JWKS key matches jwtChain kid \"${String(header.kid)}\".`,\n );\n }\n if (jwk.kty !== 'OKP' || jwk.crv !== 'Ed25519') {\n throw new Error(\n `UKYC: JWKS key ${jwk.kid} is not an Ed25519 OKP key (kty=${jwk.kty}, crv=${jwk.crv}).`,\n );\n }\n\n const isValid = ed25519.verify(\n base64UrlToBytes(signatureSegment),\n new TextEncoder().encode(`${headerSegment}.${payloadSegment}`),\n base64UrlToBytes(jwk.x),\n );\n if (!isValid) {\n throw new Error(\n 'UKYC: jwtChain signature verification failed against JWKS.',\n );\n }\n\n return decodeJsonSegment<JwtChainPayload>(payloadSegment, 'payload');\n}\n"]}
|
package/dist/ukyc/jwtChain.d.cts
CHANGED
|
@@ -21,7 +21,7 @@ export type Jwk = {
|
|
|
21
21
|
/**
|
|
22
22
|
* The verified `jwtChain` payload. `sessionServerPublicKeyX` attests the
|
|
23
23
|
* server's X25519 public key so the client can confirm the value returned
|
|
24
|
-
* out-of-band
|
|
24
|
+
* out-of-band in an encryption schema was not tampered with.
|
|
25
25
|
*/
|
|
26
26
|
export type JwtChainPayload = {
|
|
27
27
|
sessionServerPublicKeyX: string;
|
|
@@ -33,7 +33,7 @@ export type JwtChainPayload = {
|
|
|
33
33
|
* `header.payload` input. Returns the decoded, verified payload.
|
|
34
34
|
*
|
|
35
35
|
* @param keys - The JWKS keys published by the Fractal encryption service.
|
|
36
|
-
* @param jwtChain - The compact-serialized EdDSA JWT from
|
|
36
|
+
* @param jwtChain - The compact-serialized EdDSA JWT from an encryption schema.
|
|
37
37
|
* @returns The verified JWT payload.
|
|
38
38
|
*/
|
|
39
39
|
export declare function verifyJwtChain(keys: Jwk[], jwtChain: string): JwtChainPayload;
|
package/dist/ukyc/jwtChain.d.mts
CHANGED
|
@@ -21,7 +21,7 @@ export type Jwk = {
|
|
|
21
21
|
/**
|
|
22
22
|
* The verified `jwtChain` payload. `sessionServerPublicKeyX` attests the
|
|
23
23
|
* server's X25519 public key so the client can confirm the value returned
|
|
24
|
-
* out-of-band
|
|
24
|
+
* out-of-band in an encryption schema was not tampered with.
|
|
25
25
|
*/
|
|
26
26
|
export type JwtChainPayload = {
|
|
27
27
|
sessionServerPublicKeyX: string;
|
|
@@ -33,7 +33,7 @@ export type JwtChainPayload = {
|
|
|
33
33
|
* `header.payload` input. Returns the decoded, verified payload.
|
|
34
34
|
*
|
|
35
35
|
* @param keys - The JWKS keys published by the Fractal encryption service.
|
|
36
|
-
* @param jwtChain - The compact-serialized EdDSA JWT from
|
|
36
|
+
* @param jwtChain - The compact-serialized EdDSA JWT from an encryption schema.
|
|
37
37
|
* @returns The verified JWT payload.
|
|
38
38
|
*/
|
|
39
39
|
export declare function verifyJwtChain(keys: Jwk[], jwtChain: string): JwtChainPayload;
|
package/dist/ukyc/jwtChain.mjs
CHANGED
|
@@ -22,7 +22,7 @@ function decodeJsonSegment(segment, label) {
|
|
|
22
22
|
* `header.payload` input. Returns the decoded, verified payload.
|
|
23
23
|
*
|
|
24
24
|
* @param keys - The JWKS keys published by the Fractal encryption service.
|
|
25
|
-
* @param jwtChain - The compact-serialized EdDSA JWT from
|
|
25
|
+
* @param jwtChain - The compact-serialized EdDSA JWT from an encryption schema.
|
|
26
26
|
* @returns The verified JWT payload.
|
|
27
27
|
*/
|
|
28
28
|
export function verifyJwtChain(keys, jwtChain) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwtChain.mjs","sourceRoot":"","sources":["../../src/ukyc/jwtChain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,wBAAwB;AAChD,OAAO,EAAE,OAAO,EAAE,8BAA8B;AAEhD,OAAO,EAAE,gBAAgB,EAAE,wBAAuB;AA0ClD;;;;;;GAMG;AACH,SAAS,iBAAiB,CAAO,OAAe,EAAE,KAAa;IAC7D,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAS,CAAC;IACtE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,mCAAmC,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC,EAAE,CAC7D,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,IAAW,EAAE,QAAgB;IAC1D,MAAM,CAAC,aAAa,EAAE,cAAc,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9E,IAAI,CAAC,aAAa,IAAI,CAAC,cAAc,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC3D,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,iBAAiB,CAAY,aAAa,EAAE,QAAQ,CAAC,CAAC;IACrE,IAAI,MAAM,CAAC,GAAG,KAAK,OAAO,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CACb,mCAAmC,MAAM,CACvC,MAAM,CAAC,GAAG,CACX,qBAAqB,CACvB,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC;IACvD,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,2CAA2C,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAClE,CAAC;IACJ,CAAC;IACD,IAAI,GAAG,CAAC,GAAG,KAAK,KAAK,IAAI,GAAG,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CACb,kBAAkB,GAAG,CAAC,GAAG,mCAAmC,GAAG,CAAC,GAAG,SAAS,GAAG,CAAC,GAAG,IAAI,CACxF,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAC5B,gBAAgB,CAAC,gBAAgB,CAAC,EAClC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,aAAa,IAAI,cAAc,EAAE,CAAC,EAC9D,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,CACxB,CAAC;IACF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D,CAAC;IACJ,CAAC;IAED,OAAO,iBAAiB,CAAkB,cAAc,EAAE,SAAS,CAAC,CAAC;AACvE,CAAC","sourcesContent":["import { bytesToString } from '@metamask/utils';\nimport { ed25519 } from '@noble/curves/ed25519';\n\nimport { base64UrlToBytes } from '../encoding.js';\n\n/**\n * Verifies the `jwtChain` returned by the Fractal encryption service against\n * its published JWKS.\n *\n * The signature check is done with `@noble/curves` (rather than WebCrypto\n * `subtle`) because not every MetaMask runtime exposes a `subtle`\n * implementation for Ed25519; JWT parsing is a plain base64url/JSON decode, so\n * no `jose` dependency is required.\n */\n\n/**\n * A single Ed25519 (OKP) JSON Web Key from the Fractal JWKS.\n */\nexport type Jwk = {\n kty: string;\n crv: string;\n x: string;\n kid: string;\n use?: string;\n alg?: string;\n};\n\n/**\n * The verified `jwtChain` payload. `sessionServerPublicKeyX` attests the\n * server's X25519 public key so the client can confirm the value returned\n * out-of-band
|
|
1
|
+
{"version":3,"file":"jwtChain.mjs","sourceRoot":"","sources":["../../src/ukyc/jwtChain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,wBAAwB;AAChD,OAAO,EAAE,OAAO,EAAE,8BAA8B;AAEhD,OAAO,EAAE,gBAAgB,EAAE,wBAAuB;AA0ClD;;;;;;GAMG;AACH,SAAS,iBAAiB,CAAO,OAAe,EAAE,KAAa;IAC7D,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAS,CAAC;IACtE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,mCAAmC,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC,EAAE,CAC7D,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,IAAW,EAAE,QAAgB;IAC1D,MAAM,CAAC,aAAa,EAAE,cAAc,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9E,IAAI,CAAC,aAAa,IAAI,CAAC,cAAc,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC3D,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,iBAAiB,CAAY,aAAa,EAAE,QAAQ,CAAC,CAAC;IACrE,IAAI,MAAM,CAAC,GAAG,KAAK,OAAO,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CACb,mCAAmC,MAAM,CACvC,MAAM,CAAC,GAAG,CACX,qBAAqB,CACvB,CAAC;IACJ,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC;IACvD,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,2CAA2C,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAClE,CAAC;IACJ,CAAC;IACD,IAAI,GAAG,CAAC,GAAG,KAAK,KAAK,IAAI,GAAG,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CACb,kBAAkB,GAAG,CAAC,GAAG,mCAAmC,GAAG,CAAC,GAAG,SAAS,GAAG,CAAC,GAAG,IAAI,CACxF,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAC5B,gBAAgB,CAAC,gBAAgB,CAAC,EAClC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,aAAa,IAAI,cAAc,EAAE,CAAC,EAC9D,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,CACxB,CAAC;IACF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D,CAAC;IACJ,CAAC;IAED,OAAO,iBAAiB,CAAkB,cAAc,EAAE,SAAS,CAAC,CAAC;AACvE,CAAC","sourcesContent":["import { bytesToString } from '@metamask/utils';\nimport { ed25519 } from '@noble/curves/ed25519';\n\nimport { base64UrlToBytes } from '../encoding.js';\n\n/**\n * Verifies the `jwtChain` returned by the Fractal encryption service against\n * its published JWKS.\n *\n * The signature check is done with `@noble/curves` (rather than WebCrypto\n * `subtle`) because not every MetaMask runtime exposes a `subtle`\n * implementation for Ed25519; JWT parsing is a plain base64url/JSON decode, so\n * no `jose` dependency is required.\n */\n\n/**\n * A single Ed25519 (OKP) JSON Web Key from the Fractal JWKS.\n */\nexport type Jwk = {\n kty: string;\n crv: string;\n x: string;\n kid: string;\n use?: string;\n alg?: string;\n};\n\n/**\n * The verified `jwtChain` payload. `sessionServerPublicKeyX` attests the\n * server's X25519 public key so the client can confirm the value returned\n * out-of-band in an encryption schema was not tampered with.\n */\nexport type JwtChainPayload = {\n sessionServerPublicKeyX: string;\n nonce: string;\n};\n\n/**\n * The protected header of a compact JWT.\n */\ntype JwtHeader = {\n alg?: string;\n kid?: string;\n};\n\n/**\n * Decodes a base64url JWT segment into a parsed JSON object.\n *\n * @param segment - The base64url-encoded segment.\n * @param label - Human-readable segment name for error messages.\n * @returns The parsed JSON object.\n */\nfunction decodeJsonSegment<Type>(segment: string, label: string): Type {\n try {\n return JSON.parse(bytesToString(base64UrlToBytes(segment))) as Type;\n } catch (error) {\n throw new Error(\n `UKYC: failed to decode jwtChain ${label}: ${String(error)}`,\n );\n }\n}\n\n/**\n * Verifies `jwtChain` against `keys`: matches the JWT header `kid` to a\n * published Ed25519 signing key and checks the EdDSA signature over the\n * `header.payload` input. Returns the decoded, verified payload.\n *\n * @param keys - The JWKS keys published by the Fractal encryption service.\n * @param jwtChain - The compact-serialized EdDSA JWT from an encryption schema.\n * @returns The verified JWT payload.\n */\nexport function verifyJwtChain(keys: Jwk[], jwtChain: string): JwtChainPayload {\n const [headerSegment, payloadSegment, signatureSegment] = jwtChain.split('.');\n if (!headerSegment || !payloadSegment || !signatureSegment) {\n throw new Error(\n 'UKYC: jwtChain is not a well-formed JWT (expected 3 segments).',\n );\n }\n\n const header = decodeJsonSegment<JwtHeader>(headerSegment, 'header');\n if (header.alg !== 'EdDSA') {\n throw new Error(\n `UKYC: unsupported jwtChain alg \"${String(\n header.alg,\n )}\" (expected EdDSA).`,\n );\n }\n\n const jwk = keys.find((key) => key.kid === header.kid);\n if (!jwk) {\n throw new Error(\n `UKYC: no JWKS key matches jwtChain kid \"${String(header.kid)}\".`,\n );\n }\n if (jwk.kty !== 'OKP' || jwk.crv !== 'Ed25519') {\n throw new Error(\n `UKYC: JWKS key ${jwk.kid} is not an Ed25519 OKP key (kty=${jwk.kty}, crv=${jwk.crv}).`,\n );\n }\n\n const isValid = ed25519.verify(\n base64UrlToBytes(signatureSegment),\n new TextEncoder().encode(`${headerSegment}.${payloadSegment}`),\n base64UrlToBytes(jwk.x),\n );\n if (!isValid) {\n throw new Error(\n 'UKYC: jwtChain signature verification failed against JWKS.',\n );\n }\n\n return decodeJsonSegment<JwtChainPayload>(payloadSegment, 'payload');\n}\n"]}
|
|
@@ -4,23 +4,32 @@ exports.wrapEncryptionKey = void 0;
|
|
|
4
4
|
const tweetnacl_1 = require("tweetnacl");
|
|
5
5
|
const encoding_js_1 = require("../encoding.cjs");
|
|
6
6
|
/**
|
|
7
|
-
* Wraps `
|
|
7
|
+
* Wraps `plaintext` for the UKYC session server.
|
|
8
8
|
*
|
|
9
9
|
* The box is sealed with NaCl's `crypto_box`, keyed by the X25519 shared secret
|
|
10
10
|
* between our session client private key and the session server public key
|
|
11
|
-
*
|
|
11
|
+
* from an encryption schema (`encryptionDataKey` or `ukycCapabilityToken`)
|
|
12
|
+
* returned by `createUkycSession`. The 32-byte client public key is prefixed
|
|
13
|
+
* onto `data` so the server can open the box without a prior key-registration
|
|
14
|
+
* step.
|
|
12
15
|
*
|
|
13
16
|
* @param sessionClientPrivateKey - Our session's X25519 private key.
|
|
14
17
|
* @param sessionServerPublicKey - The server's X25519 public key (base64url).
|
|
15
|
-
* @param
|
|
16
|
-
*
|
|
18
|
+
* @param plaintext - The raw bytes to encrypt (e.g. the `data_encryption_key`
|
|
19
|
+
* or the encoded `ukyc_capability_token`).
|
|
20
|
+
* @returns The base64url `data` (`clientPublicKey || ciphertext+tag`) and
|
|
21
|
+
* `nonce`.
|
|
17
22
|
*/
|
|
18
|
-
function wrapEncryptionKey(sessionClientPrivateKey, sessionServerPublicKey,
|
|
23
|
+
function wrapEncryptionKey(sessionClientPrivateKey, sessionServerPublicKey, plaintext) {
|
|
19
24
|
const serverPublicKey = (0, encoding_js_1.base64UrlToBytes)(sessionServerPublicKey);
|
|
25
|
+
const { publicKey: clientPublicKey } = tweetnacl_1.box.keyPair.fromSecretKey(sessionClientPrivateKey);
|
|
20
26
|
const nonce = (0, tweetnacl_1.randomBytes)(tweetnacl_1.box.nonceLength);
|
|
21
|
-
const
|
|
27
|
+
const ciphertext = (0, tweetnacl_1.box)(plaintext, nonce, serverPublicKey, sessionClientPrivateKey);
|
|
28
|
+
const data = new Uint8Array(clientPublicKey.length + ciphertext.length);
|
|
29
|
+
data.set(clientPublicKey, 0);
|
|
30
|
+
data.set(ciphertext, clientPublicKey.length);
|
|
22
31
|
return {
|
|
23
|
-
|
|
32
|
+
data: (0, encoding_js_1.toBase64Url)(data),
|
|
24
33
|
nonce: (0, encoding_js_1.toBase64Url)(nonce),
|
|
25
34
|
};
|
|
26
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapEncryptionKey.cjs","sourceRoot":"","sources":["../../src/ukyc/wrapEncryptionKey.ts"],"names":[],"mappings":";;;AAAA,yCAA6C;AAE7C,iDAA+D;
|
|
1
|
+
{"version":3,"file":"wrapEncryptionKey.cjs","sourceRoot":"","sources":["../../src/ukyc/wrapEncryptionKey.ts"],"names":[],"mappings":";;;AAAA,yCAA6C;AAE7C,iDAA+D;AA0B/D;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,iBAAiB,CAC/B,uBAAmC,EACnC,sBAA8B,EAC9B,SAAqB;IAErB,MAAM,eAAe,GAAG,IAAA,8BAAgB,EAAC,sBAAsB,CAAC,CAAC;IACjE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,eAAG,CAAC,OAAO,CAAC,aAAa,CAC9D,uBAAuB,CACxB,CAAC;IACF,MAAM,KAAK,GAAG,IAAA,uBAAW,EAAC,eAAG,CAAC,WAAW,CAAC,CAAC;IAC3C,MAAM,UAAU,GAAG,IAAA,eAAG,EACpB,SAAS,EACT,KAAK,EACL,eAAe,EACf,uBAAuB,CACxB,CAAC;IACF,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,eAAe,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACxE,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;IAC7B,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC7C,OAAO;QACL,IAAI,EAAE,IAAA,yBAAW,EAAC,IAAI,CAAC;QACvB,KAAK,EAAE,IAAA,yBAAW,EAAC,KAAK,CAAC;KAC1B,CAAC;AACJ,CAAC;AAvBD,8CAuBC","sourcesContent":["import { randomBytes, box } from 'tweetnacl';\n\nimport { base64UrlToBytes, toBase64Url } from '../encoding.js';\n\n/**\n * Wraps a secret for the UKYC session server using NaCl's `crypto_box`\n * (X25519 + XSalsa20-Poly1305) established with a per-secret wrapping key\n * returned inside an encryption schema from `createUkycSession`.\n *\n * Unlike {@link wrapUserKey} (which generates a fresh ephemeral keypair per\n * call), this reuses a session client keypair. There is no prior wrapping-key\n * exchange to register that public key, so `data` is\n * `clientPublicKey (32) || ciphertext+tag` and only `{ data, nonce }` need be\n * transmitted. Used for both the `data_encryption_key` and the\n * `ukyc_capability_token`.\n */\n\n/**\n * The transmitted portion of a wrapped secret: the sender public key prefixed\n * to the `crypto_box` ciphertext (which includes the 16-byte Poly1305 auth\n * tag), and the nonce, both unpadded base64url-encoded. Matches the KYC API\n * `CapabilityAuthorization` wire shape.\n */\nexport type WrappedEncryptionKeyParts = {\n data: string;\n nonce: string;\n};\n\n/**\n * Wraps `plaintext` for the UKYC session server.\n *\n * The box is sealed with NaCl's `crypto_box`, keyed by the X25519 shared secret\n * between our session client private key and the session server public key\n * from an encryption schema (`encryptionDataKey` or `ukycCapabilityToken`)\n * returned by `createUkycSession`. The 32-byte client public key is prefixed\n * onto `data` so the server can open the box without a prior key-registration\n * step.\n *\n * @param sessionClientPrivateKey - Our session's X25519 private key.\n * @param sessionServerPublicKey - The server's X25519 public key (base64url).\n * @param plaintext - The raw bytes to encrypt (e.g. the `data_encryption_key`\n * or the encoded `ukyc_capability_token`).\n * @returns The base64url `data` (`clientPublicKey || ciphertext+tag`) and\n * `nonce`.\n */\nexport function wrapEncryptionKey(\n sessionClientPrivateKey: Uint8Array,\n sessionServerPublicKey: string,\n plaintext: Uint8Array,\n): WrappedEncryptionKeyParts {\n const serverPublicKey = base64UrlToBytes(sessionServerPublicKey);\n const { publicKey: clientPublicKey } = box.keyPair.fromSecretKey(\n sessionClientPrivateKey,\n );\n const nonce = randomBytes(box.nonceLength);\n const ciphertext = box(\n plaintext,\n nonce,\n serverPublicKey,\n sessionClientPrivateKey,\n );\n const data = new Uint8Array(clientPublicKey.length + ciphertext.length);\n data.set(clientPublicKey, 0);\n data.set(ciphertext, clientPublicKey.length);\n return {\n data: toBase64Url(data),\n nonce: toBase64Url(nonce),\n };\n}\n"]}
|
|
@@ -1,34 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Wraps
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Wraps a secret for the UKYC session server using NaCl's `crypto_box`
|
|
3
|
+
* (X25519 + XSalsa20-Poly1305) established with a per-secret wrapping key
|
|
4
|
+
* returned inside an encryption schema from `createUkycSession`.
|
|
5
5
|
*
|
|
6
6
|
* Unlike {@link wrapUserKey} (which generates a fresh ephemeral keypair per
|
|
7
|
-
* call), this
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* call), this reuses a session client keypair. There is no prior wrapping-key
|
|
8
|
+
* exchange to register that public key, so `data` is
|
|
9
|
+
* `clientPublicKey (32) || ciphertext+tag` and only `{ data, nonce }` need be
|
|
10
|
+
* transmitted. Used for both the `data_encryption_key` and the
|
|
11
|
+
* `ukyc_capability_token`.
|
|
11
12
|
*/
|
|
12
13
|
/**
|
|
13
|
-
* The transmitted portion of a wrapped
|
|
14
|
-
* ciphertext (which includes the 16-byte Poly1305 auth
|
|
15
|
-
* both unpadded base64url-encoded.
|
|
14
|
+
* The transmitted portion of a wrapped secret: the sender public key prefixed
|
|
15
|
+
* to the `crypto_box` ciphertext (which includes the 16-byte Poly1305 auth
|
|
16
|
+
* tag), and the nonce, both unpadded base64url-encoded. Matches the KYC API
|
|
17
|
+
* `CapabilityAuthorization` wire shape.
|
|
16
18
|
*/
|
|
17
19
|
export type WrappedEncryptionKeyParts = {
|
|
18
|
-
|
|
20
|
+
data: string;
|
|
19
21
|
nonce: string;
|
|
20
22
|
};
|
|
21
23
|
/**
|
|
22
|
-
* Wraps `
|
|
24
|
+
* Wraps `plaintext` for the UKYC session server.
|
|
23
25
|
*
|
|
24
26
|
* The box is sealed with NaCl's `crypto_box`, keyed by the X25519 shared secret
|
|
25
27
|
* between our session client private key and the session server public key
|
|
26
|
-
*
|
|
28
|
+
* from an encryption schema (`encryptionDataKey` or `ukycCapabilityToken`)
|
|
29
|
+
* returned by `createUkycSession`. The 32-byte client public key is prefixed
|
|
30
|
+
* onto `data` so the server can open the box without a prior key-registration
|
|
31
|
+
* step.
|
|
27
32
|
*
|
|
28
33
|
* @param sessionClientPrivateKey - Our session's X25519 private key.
|
|
29
34
|
* @param sessionServerPublicKey - The server's X25519 public key (base64url).
|
|
30
|
-
* @param
|
|
31
|
-
*
|
|
35
|
+
* @param plaintext - The raw bytes to encrypt (e.g. the `data_encryption_key`
|
|
36
|
+
* or the encoded `ukyc_capability_token`).
|
|
37
|
+
* @returns The base64url `data` (`clientPublicKey || ciphertext+tag`) and
|
|
38
|
+
* `nonce`.
|
|
32
39
|
*/
|
|
33
|
-
export declare function wrapEncryptionKey(sessionClientPrivateKey: Uint8Array, sessionServerPublicKey: string,
|
|
40
|
+
export declare function wrapEncryptionKey(sessionClientPrivateKey: Uint8Array, sessionServerPublicKey: string, plaintext: Uint8Array): WrappedEncryptionKeyParts;
|
|
34
41
|
//# sourceMappingURL=wrapEncryptionKey.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapEncryptionKey.d.cts","sourceRoot":"","sources":["../../src/ukyc/wrapEncryptionKey.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"wrapEncryptionKey.d.cts","sourceRoot":"","sources":["../../src/ukyc/wrapEncryptionKey.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAC/B,uBAAuB,EAAE,UAAU,EACnC,sBAAsB,EAAE,MAAM,EAC9B,SAAS,EAAE,UAAU,GACpB,yBAAyB,CAmB3B"}
|