@metamask-previews/profile-sync-controller 29.0.0-preview-3866c0ff1 → 29.0.0-preview-e3275932a
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 +0 -1
- package/dist/controllers/authentication/AuthenticationController-method-action-types.cjs +7 -0
- package/dist/controllers/authentication/AuthenticationController-method-action-types.cjs.map +1 -0
- package/dist/controllers/authentication/{AuthenticationController-method-action-types.d.ts → AuthenticationController-method-action-types.d.cts} +2 -2
- package/dist/controllers/authentication/AuthenticationController-method-action-types.d.cts.map +1 -0
- package/dist/controllers/authentication/AuthenticationController-method-action-types.d.mts +102 -0
- package/dist/controllers/authentication/AuthenticationController-method-action-types.d.mts.map +1 -0
- package/dist/controllers/authentication/{AuthenticationController-method-action-types.js → AuthenticationController-method-action-types.mjs} +1 -1
- package/dist/controllers/authentication/AuthenticationController-method-action-types.mjs.map +1 -0
- package/dist/controllers/authentication/AuthenticationController.cjs +489 -0
- package/dist/controllers/authentication/AuthenticationController.cjs.map +1 -0
- package/dist/controllers/authentication/{AuthenticationController.d.ts → AuthenticationController.d.cts} +10 -10
- package/dist/controllers/authentication/AuthenticationController.d.cts.map +1 -0
- package/dist/controllers/authentication/AuthenticationController.d.mts +130 -0
- package/dist/controllers/authentication/AuthenticationController.d.mts.map +1 -0
- package/dist/controllers/authentication/AuthenticationController.mjs +485 -0
- package/dist/controllers/authentication/AuthenticationController.mjs.map +1 -0
- package/dist/controllers/authentication/index.cjs +35 -0
- package/dist/controllers/authentication/index.cjs.map +1 -0
- package/dist/controllers/authentication/{index.d.ts → index.d.cts} +5 -5
- package/dist/controllers/authentication/index.d.cts.map +1 -0
- package/dist/controllers/authentication/index.d.mts +7 -0
- package/dist/controllers/authentication/index.d.mts.map +1 -0
- package/dist/controllers/authentication/index.mjs +6 -0
- package/dist/controllers/authentication/index.mjs.map +1 -0
- package/dist/controllers/authentication/mocks/index.cjs +18 -0
- package/dist/controllers/authentication/mocks/index.cjs.map +1 -0
- package/dist/controllers/authentication/mocks/index.d.cts +2 -0
- package/dist/controllers/authentication/mocks/index.d.cts.map +1 -0
- package/dist/controllers/authentication/mocks/index.d.mts +2 -0
- package/dist/controllers/authentication/mocks/index.d.mts.map +1 -0
- package/dist/controllers/authentication/mocks/index.mjs +2 -0
- package/dist/controllers/authentication/mocks/index.mjs.map +1 -0
- package/dist/controllers/authentication/mocks/mockResponses.cjs +126 -0
- package/dist/controllers/authentication/mocks/mockResponses.cjs.map +1 -0
- package/dist/controllers/authentication/mocks/{mockResponses.d.ts → mockResponses.d.cts} +1 -1
- package/dist/controllers/authentication/mocks/mockResponses.d.cts.map +1 -0
- package/dist/controllers/authentication/mocks/mockResponses.d.mts +58 -0
- package/dist/controllers/authentication/mocks/mockResponses.d.mts.map +1 -0
- package/dist/controllers/authentication/mocks/{mockResponses.js → mockResponses.mjs} +2 -2
- package/dist/controllers/authentication/mocks/mockResponses.mjs.map +1 -0
- package/dist/controllers/index.cjs +29 -0
- package/dist/controllers/index.cjs.map +1 -0
- package/dist/controllers/index.d.cts +3 -0
- package/dist/controllers/index.d.cts.map +1 -0
- package/dist/controllers/index.d.mts +3 -0
- package/dist/controllers/index.d.mts.map +1 -0
- package/dist/controllers/index.mjs +3 -0
- package/dist/controllers/index.mjs.map +1 -0
- package/dist/controllers/user-storage/UserStorageController-method-action-types.cjs +7 -0
- package/dist/controllers/user-storage/UserStorageController-method-action-types.cjs.map +1 -0
- package/dist/controllers/user-storage/{UserStorageController-method-action-types.d.ts → UserStorageController-method-action-types.d.cts} +2 -2
- package/dist/controllers/user-storage/UserStorageController-method-action-types.d.cts.map +1 -0
- package/dist/controllers/user-storage/UserStorageController-method-action-types.d.mts +137 -0
- package/dist/controllers/user-storage/UserStorageController-method-action-types.d.mts.map +1 -0
- package/dist/controllers/user-storage/{UserStorageController-method-action-types.js → UserStorageController-method-action-types.mjs} +1 -1
- package/dist/controllers/user-storage/UserStorageController-method-action-types.mjs.map +1 -0
- package/dist/controllers/user-storage/UserStorageController.cjs +412 -0
- package/dist/controllers/user-storage/UserStorageController.cjs.map +1 -0
- package/dist/controllers/user-storage/{UserStorageController.d.ts → UserStorageController.d.cts} +14 -14
- package/dist/controllers/user-storage/UserStorageController.d.cts.map +1 -0
- package/dist/controllers/user-storage/UserStorageController.d.mts +182 -0
- package/dist/controllers/user-storage/UserStorageController.d.mts.map +1 -0
- package/dist/controllers/user-storage/UserStorageController.mjs +408 -0
- package/dist/controllers/user-storage/UserStorageController.mjs.map +1 -0
- package/dist/controllers/user-storage/constants.cjs +19 -0
- package/dist/controllers/user-storage/constants.cjs.map +1 -0
- package/dist/controllers/user-storage/constants.d.cts +15 -0
- package/dist/controllers/user-storage/constants.d.cts.map +1 -0
- package/dist/controllers/user-storage/constants.d.mts +15 -0
- package/dist/controllers/user-storage/constants.d.mts.map +1 -0
- package/dist/controllers/user-storage/{constants.js → constants.mjs} +1 -1
- package/dist/controllers/user-storage/constants.mjs.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/constants.cjs +12 -0
- package/dist/controllers/user-storage/contact-syncing/constants.cjs.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{constants.d.ts → constants.d.cts} +1 -1
- package/dist/controllers/user-storage/contact-syncing/constants.d.cts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/constants.d.mts +9 -0
- package/dist/controllers/user-storage/contact-syncing/constants.d.mts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{constants.js → constants.mjs} +1 -1
- package/dist/controllers/user-storage/contact-syncing/constants.mjs.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/controller-integration.cjs +346 -0
- package/dist/controllers/user-storage/contact-syncing/controller-integration.cjs.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{controller-integration.d.ts → controller-integration.d.cts} +3 -3
- package/dist/controllers/user-storage/contact-syncing/controller-integration.d.cts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/controller-integration.d.mts +47 -0
- package/dist/controllers/user-storage/contact-syncing/controller-integration.d.mts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{controller-integration.js → controller-integration.mjs} +6 -6
- package/dist/controllers/user-storage/contact-syncing/controller-integration.mjs.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.cjs +50 -0
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.cjs.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{setup-subscriptions.d.ts → setup-subscriptions.d.cts} +2 -2
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.cts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.mts +8 -0
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.mts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{setup-subscriptions.js → setup-subscriptions.mjs} +4 -4
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.mjs.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/sync-utils.cjs +23 -0
- package/dist/controllers/user-storage/contact-syncing/sync-utils.cjs.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{sync-utils.d.ts → sync-utils.d.cts} +2 -2
- package/dist/controllers/user-storage/contact-syncing/sync-utils.d.cts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/sync-utils.d.mts +9 -0
- package/dist/controllers/user-storage/contact-syncing/sync-utils.d.mts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{sync-utils.js → sync-utils.mjs} +1 -1
- package/dist/controllers/user-storage/contact-syncing/sync-utils.mjs.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/types.cjs +3 -0
- package/dist/controllers/user-storage/contact-syncing/types.cjs.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{types.d.ts → types.d.cts} +6 -6
- package/dist/controllers/user-storage/contact-syncing/types.d.cts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/types.d.mts +37 -0
- package/dist/controllers/user-storage/contact-syncing/types.d.mts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/types.mjs +2 -0
- package/dist/controllers/user-storage/contact-syncing/types.mjs.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/utils.cjs +64 -0
- package/dist/controllers/user-storage/contact-syncing/utils.cjs.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{utils.d.ts → utils.d.cts} +3 -3
- package/dist/controllers/user-storage/contact-syncing/utils.d.cts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/utils.d.mts +36 -0
- package/dist/controllers/user-storage/contact-syncing/utils.d.mts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{utils.js → utils.mjs} +2 -2
- package/dist/controllers/user-storage/contact-syncing/utils.mjs.map +1 -0
- package/dist/controllers/user-storage/index.cjs +38 -0
- package/dist/controllers/user-storage/index.cjs.map +1 -0
- package/dist/controllers/user-storage/{index.d.ts → index.d.cts} +8 -8
- package/dist/controllers/user-storage/index.d.cts.map +1 -0
- package/dist/controllers/user-storage/index.d.mts +10 -0
- package/dist/controllers/user-storage/index.d.mts.map +1 -0
- package/dist/controllers/user-storage/index.mjs +9 -0
- package/dist/controllers/user-storage/index.mjs.map +1 -0
- package/dist/controllers/user-storage/mocks/index.cjs +19 -0
- package/dist/controllers/user-storage/mocks/index.cjs.map +1 -0
- package/dist/controllers/user-storage/mocks/index.d.cts +3 -0
- package/dist/controllers/user-storage/mocks/index.d.cts.map +1 -0
- package/dist/controllers/user-storage/mocks/index.d.mts +3 -0
- package/dist/controllers/user-storage/mocks/index.d.mts.map +1 -0
- package/dist/controllers/user-storage/mocks/index.mjs +3 -0
- package/dist/controllers/user-storage/mocks/index.mjs.map +1 -0
- package/dist/controllers/user-storage/mocks/mockResponses.cjs +113 -0
- package/dist/controllers/user-storage/mocks/mockResponses.cjs.map +1 -0
- package/dist/controllers/user-storage/mocks/{mockResponses.d.ts → mockResponses.d.cts} +3 -3
- package/dist/controllers/user-storage/mocks/mockResponses.d.cts.map +1 -0
- package/dist/controllers/user-storage/mocks/mockResponses.d.mts +66 -0
- package/dist/controllers/user-storage/mocks/mockResponses.d.mts.map +1 -0
- package/dist/controllers/user-storage/mocks/{mockResponses.js → mockResponses.mjs} +4 -4
- package/dist/controllers/user-storage/mocks/mockResponses.mjs.map +1 -0
- package/dist/controllers/user-storage/mocks/mockStorage.cjs +36 -0
- package/dist/controllers/user-storage/mocks/mockStorage.cjs.map +1 -0
- package/dist/controllers/user-storage/mocks/{mockStorage.d.ts → mockStorage.d.cts} +1 -1
- package/dist/controllers/user-storage/mocks/mockStorage.d.cts.map +1 -0
- package/dist/controllers/user-storage/mocks/mockStorage.d.mts +5 -0
- package/dist/controllers/user-storage/mocks/mockStorage.d.mts.map +1 -0
- package/dist/controllers/user-storage/mocks/{mockStorage.js → mockStorage.mjs} +3 -3
- package/dist/controllers/user-storage/mocks/mockStorage.mjs.map +1 -0
- package/dist/controllers/user-storage/types.cjs +3 -0
- package/dist/controllers/user-storage/types.cjs.map +1 -0
- package/dist/controllers/user-storage/{types.d.ts → types.d.cts} +3 -3
- package/dist/controllers/user-storage/types.d.cts.map +1 -0
- package/dist/controllers/user-storage/types.d.mts +23 -0
- package/dist/controllers/user-storage/types.d.mts.map +1 -0
- package/dist/controllers/user-storage/types.mjs +2 -0
- package/dist/controllers/user-storage/types.mjs.map +1 -0
- package/dist/controllers/user-storage/utils.cjs +32 -0
- package/dist/controllers/user-storage/utils.cjs.map +1 -0
- package/dist/controllers/user-storage/{utils.d.ts → utils.d.cts} +1 -1
- package/dist/controllers/user-storage/utils.d.cts.map +1 -0
- package/dist/controllers/user-storage/utils.d.mts +19 -0
- package/dist/controllers/user-storage/utils.d.mts.map +1 -0
- package/dist/controllers/user-storage/{utils.js → utils.mjs} +1 -1
- package/dist/controllers/user-storage/utils.mjs.map +1 -0
- package/dist/index.cjs +30 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +4 -0
- package/dist/index.mjs.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.cjs +114 -0
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.cjs.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/{flow-siwe.d.ts → flow-siwe.d.cts} +2 -2
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.cts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.mts +25 -0
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.mts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.mjs +110 -0
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.mjs.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/flow-srp.cjs +290 -0
- package/dist/sdk/authentication-jwt-bearer/flow-srp.cjs.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/{flow-srp.d.ts → flow-srp.d.cts} +5 -5
- package/dist/sdk/authentication-jwt-bearer/flow-srp.d.cts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/flow-srp.d.mts +44 -0
- package/dist/sdk/authentication-jwt-bearer/flow-srp.d.mts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/flow-srp.mjs +263 -0
- package/dist/sdk/authentication-jwt-bearer/flow-srp.mjs.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/services.cjs +400 -0
- package/dist/sdk/authentication-jwt-bearer/services.cjs.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/{services.d.ts → services.d.cts} +5 -5
- package/dist/sdk/authentication-jwt-bearer/services.d.cts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/services.d.mts +105 -0
- package/dist/sdk/authentication-jwt-bearer/services.d.mts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/{services.js → services.mjs} +6 -6
- package/dist/sdk/authentication-jwt-bearer/services.mjs.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/types.cjs +12 -0
- package/dist/sdk/authentication-jwt-bearer/types.cjs.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/{types.d.ts → types.d.cts} +2 -2
- package/dist/sdk/authentication-jwt-bearer/types.d.cts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/types.d.mts +114 -0
- package/dist/sdk/authentication-jwt-bearer/types.d.mts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/{types.js → types.mjs} +1 -1
- package/dist/sdk/authentication-jwt-bearer/types.mjs.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.cjs +27 -0
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.cjs.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/utils/{identifier.d.ts → identifier.d.cts} +2 -2
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.cts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.mts +13 -0
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.mts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/utils/{identifier.js → identifier.mjs} +2 -2
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.mjs.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/utils/time.cjs +17 -0
- package/dist/sdk/authentication-jwt-bearer/utils/time.cjs.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/utils/{time.d.ts → time.d.cts} +1 -1
- package/dist/sdk/authentication-jwt-bearer/utils/time.d.cts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/utils/time.d.mts +8 -0
- package/dist/sdk/authentication-jwt-bearer/utils/time.d.mts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/utils/{time.js → time.mjs} +1 -1
- package/dist/sdk/authentication-jwt-bearer/utils/time.mjs.map +1 -0
- package/dist/sdk/authentication.cjs +132 -0
- package/dist/sdk/authentication.cjs.map +1 -0
- package/dist/sdk/{authentication.d.ts → authentication.d.cts} +9 -9
- package/dist/sdk/authentication.d.cts.map +1 -0
- package/dist/sdk/authentication.d.mts +38 -0
- package/dist/sdk/authentication.d.mts.map +1 -0
- package/dist/sdk/authentication.mjs +112 -0
- package/dist/sdk/authentication.mjs.map +1 -0
- package/dist/sdk/constants.cjs +7 -0
- package/dist/sdk/constants.cjs.map +1 -0
- package/dist/sdk/{constants.d.ts → constants.d.cts} +1 -1
- package/dist/sdk/constants.d.cts.map +1 -0
- package/dist/sdk/constants.d.mts +4 -0
- package/dist/sdk/constants.d.mts.map +1 -0
- package/dist/sdk/{constants.js → constants.mjs} +1 -1
- package/dist/sdk/constants.mjs.map +1 -0
- package/dist/sdk/errors.cjs +76 -0
- package/dist/sdk/errors.cjs.map +1 -0
- package/dist/sdk/{errors.d.ts → errors.d.cts} +1 -1
- package/dist/sdk/errors.d.cts.map +1 -0
- package/dist/sdk/errors.d.mts +34 -0
- package/dist/sdk/errors.d.mts.map +1 -0
- package/dist/sdk/{errors.js → errors.mjs} +3 -4
- package/dist/sdk/errors.mjs.map +1 -0
- package/dist/sdk/index.cjs +24 -0
- package/dist/sdk/index.cjs.map +1 -0
- package/dist/sdk/index.d.cts +8 -0
- package/dist/sdk/index.d.cts.map +1 -0
- package/dist/sdk/index.d.mts +8 -0
- package/dist/sdk/index.d.mts.map +1 -0
- package/dist/sdk/index.mjs +8 -0
- package/dist/sdk/index.mjs.map +1 -0
- package/dist/sdk/mocks/auth.cjs +82 -0
- package/dist/sdk/mocks/auth.cjs.map +1 -0
- package/dist/sdk/mocks/{auth.d.ts → auth.d.cts} +2 -2
- package/dist/sdk/mocks/auth.d.cts.map +1 -0
- package/dist/sdk/mocks/auth.d.mts +69 -0
- package/dist/sdk/mocks/auth.d.mts.map +1 -0
- package/dist/sdk/mocks/{auth.js → auth.mjs} +3 -3
- package/dist/sdk/mocks/auth.mjs.map +1 -0
- package/dist/sdk/mocks/userstorage.cjs +43 -0
- package/dist/sdk/mocks/userstorage.cjs.map +1 -0
- package/dist/sdk/mocks/{userstorage.d.ts → userstorage.d.cts} +1 -1
- package/dist/sdk/mocks/userstorage.d.cts.map +1 -0
- package/dist/sdk/mocks/userstorage.d.mts +10 -0
- package/dist/sdk/mocks/userstorage.d.mts.map +1 -0
- package/dist/sdk/mocks/{userstorage.js → userstorage.mjs} +5 -5
- package/dist/sdk/mocks/userstorage.mjs.map +1 -0
- package/dist/sdk/user-storage.cjs +386 -0
- package/dist/sdk/user-storage.cjs.map +1 -0
- package/dist/sdk/{user-storage.d.ts → user-storage.d.cts} +5 -5
- package/dist/sdk/user-storage.d.cts.map +1 -0
- package/dist/sdk/user-storage.d.mts +47 -0
- package/dist/sdk/user-storage.d.mts.map +1 -0
- package/dist/sdk/user-storage.mjs +358 -0
- package/dist/sdk/user-storage.mjs.map +1 -0
- package/dist/sdk/utils/eip-6963-metamask-provider.cjs +70 -0
- package/dist/sdk/utils/eip-6963-metamask-provider.cjs.map +1 -0
- package/dist/sdk/utils/{eip-6963-metamask-provider.d.ts → eip-6963-metamask-provider.d.cts} +2 -2
- package/dist/sdk/utils/eip-6963-metamask-provider.d.cts.map +1 -0
- package/dist/sdk/utils/eip-6963-metamask-provider.d.mts +25 -0
- package/dist/sdk/utils/eip-6963-metamask-provider.d.mts.map +1 -0
- package/dist/sdk/utils/{eip-6963-metamask-provider.js → eip-6963-metamask-provider.mjs} +1 -1
- package/dist/sdk/utils/eip-6963-metamask-provider.mjs.map +1 -0
- package/dist/sdk/utils/messaging-signing-snap-requests.cjs +96 -0
- package/dist/sdk/utils/messaging-signing-snap-requests.cjs.map +1 -0
- package/dist/sdk/utils/{messaging-signing-snap-requests.d.ts → messaging-signing-snap-requests.d.cts} +2 -2
- package/dist/sdk/utils/messaging-signing-snap-requests.d.cts.map +1 -0
- package/dist/sdk/utils/messaging-signing-snap-requests.d.mts +41 -0
- package/dist/sdk/utils/messaging-signing-snap-requests.d.mts.map +1 -0
- package/dist/sdk/utils/{messaging-signing-snap-requests.js → messaging-signing-snap-requests.mjs} +1 -1
- package/dist/sdk/utils/messaging-signing-snap-requests.mjs.map +1 -0
- package/dist/sdk/utils/validate-login-response.cjs +49 -0
- package/dist/sdk/utils/validate-login-response.cjs.map +1 -0
- package/dist/sdk/utils/{validate-login-response.d.ts → validate-login-response.d.cts} +2 -2
- package/dist/sdk/utils/validate-login-response.d.cts.map +1 -0
- package/dist/sdk/utils/validate-login-response.d.mts +14 -0
- package/dist/sdk/utils/validate-login-response.d.mts.map +1 -0
- package/dist/sdk/utils/{validate-login-response.js → validate-login-response.mjs} +1 -1
- package/dist/sdk/utils/validate-login-response.mjs.map +1 -0
- package/dist/sdk/utils/validate-pair-response.cjs +29 -0
- package/dist/sdk/utils/validate-pair-response.cjs.map +1 -0
- package/dist/sdk/utils/{validate-pair-response.d.ts → validate-pair-response.d.cts} +1 -1
- package/dist/sdk/utils/validate-pair-response.d.cts.map +1 -0
- package/dist/sdk/utils/validate-pair-response.d.mts +26 -0
- package/dist/sdk/utils/validate-pair-response.d.mts.map +1 -0
- package/dist/sdk/utils/{validate-pair-response.js → validate-pair-response.mjs} +1 -1
- package/dist/sdk/utils/validate-pair-response.mjs.map +1 -0
- package/dist/shared/encryption/cache.cjs +77 -0
- package/dist/shared/encryption/cache.cjs.map +1 -0
- package/dist/shared/encryption/{cache.d.ts → cache.d.cts} +1 -1
- package/dist/shared/encryption/cache.d.cts.map +1 -0
- package/dist/shared/encryption/cache.d.mts +32 -0
- package/dist/shared/encryption/cache.d.mts.map +1 -0
- package/dist/shared/encryption/{cache.js → cache.mjs} +4 -4
- package/dist/shared/encryption/cache.mjs.map +1 -0
- package/dist/shared/encryption/constants.cjs +17 -0
- package/dist/shared/encryption/constants.cjs.map +1 -0
- package/dist/shared/encryption/{constants.d.ts → constants.d.cts} +2 -2
- package/dist/shared/encryption/constants.d.cts.map +1 -0
- package/dist/shared/encryption/constants.d.mts +9 -0
- package/dist/shared/encryption/constants.d.mts.map +1 -0
- package/dist/shared/encryption/{constants.js → constants.mjs} +1 -1
- package/dist/shared/encryption/constants.mjs.map +1 -0
- package/dist/shared/encryption/encryption.cjs +209 -0
- package/dist/shared/encryption/encryption.cjs.map +1 -0
- package/dist/shared/encryption/{encryption.d.ts → encryption.d.cts} +3 -3
- package/dist/shared/encryption/encryption.d.cts.map +1 -0
- package/dist/shared/encryption/encryption.d.mts +30 -0
- package/dist/shared/encryption/encryption.d.mts.map +1 -0
- package/dist/shared/encryption/encryption.mjs +205 -0
- package/dist/shared/encryption/encryption.mjs.map +1 -0
- package/dist/shared/encryption/index.cjs +25 -0
- package/dist/shared/encryption/index.cjs.map +1 -0
- package/dist/shared/encryption/index.d.cts +5 -0
- package/dist/shared/encryption/index.d.cts.map +1 -0
- package/dist/shared/encryption/index.d.mts +5 -0
- package/dist/shared/encryption/index.d.mts.map +1 -0
- package/dist/shared/encryption/index.mjs +5 -0
- package/dist/shared/encryption/index.mjs.map +1 -0
- package/dist/shared/encryption/utils.cjs +21 -0
- package/dist/shared/encryption/utils.cjs.map +1 -0
- package/dist/shared/encryption/{utils.d.ts → utils.d.cts} +3 -3
- package/dist/shared/encryption/utils.d.cts.map +1 -0
- package/dist/shared/encryption/utils.d.mts +5 -0
- package/dist/shared/encryption/utils.d.mts.map +1 -0
- package/dist/shared/encryption/{utils.js → utils.mjs} +1 -1
- package/dist/shared/encryption/utils.mjs.map +1 -0
- package/dist/shared/env.cjs +85 -0
- package/dist/shared/env.cjs.map +1 -0
- package/dist/shared/{env.d.ts → env.d.cts} +1 -1
- package/dist/shared/env.d.cts.map +1 -0
- package/dist/shared/env.d.mts +34 -0
- package/dist/shared/env.d.mts.map +1 -0
- package/dist/shared/{env.js → env.mjs} +1 -1
- package/dist/shared/env.mjs.map +1 -0
- package/dist/shared/storage-schema.cjs +42 -0
- package/dist/shared/storage-schema.cjs.map +1 -0
- package/dist/shared/{storage-schema.d.ts → storage-schema.d.cts} +1 -1
- package/dist/shared/storage-schema.d.cts.map +1 -0
- package/dist/shared/storage-schema.d.mts +34 -0
- package/dist/shared/storage-schema.d.mts.map +1 -0
- package/dist/shared/{storage-schema.js → storage-schema.mjs} +2 -2
- package/dist/shared/storage-schema.mjs.map +1 -0
- package/dist/shared/types/encryption.cjs +3 -0
- package/dist/shared/types/encryption.cjs.map +1 -0
- package/dist/shared/types/{encryption.d.ts → encryption.d.cts} +1 -1
- package/dist/shared/types/encryption.d.cts.map +1 -0
- package/dist/shared/types/encryption.d.mts +2 -0
- package/dist/shared/types/encryption.d.mts.map +1 -0
- package/dist/shared/types/encryption.mjs +2 -0
- package/dist/shared/types/encryption.mjs.map +1 -0
- package/dist/shared/types/services.cjs +3 -0
- package/dist/shared/types/services.cjs.map +1 -0
- package/dist/shared/types/{services.d.ts → services.d.cts} +2 -2
- package/dist/shared/types/services.d.cts.map +1 -0
- package/dist/shared/types/services.d.mts +17 -0
- package/dist/shared/types/services.d.mts.map +1 -0
- package/dist/shared/types/services.mjs +2 -0
- package/dist/shared/types/services.mjs.map +1 -0
- package/dist/shared/utils/entropy-source.cjs +37 -0
- package/dist/shared/utils/entropy-source.cjs.map +1 -0
- package/dist/shared/utils/{entropy-source.d.ts → entropy-source.d.cts} +2 -2
- package/dist/shared/utils/entropy-source.d.cts.map +1 -0
- package/dist/shared/utils/entropy-source.d.mts +22 -0
- package/dist/shared/utils/entropy-source.d.mts.map +1 -0
- package/dist/shared/utils/{entropy-source.js → entropy-source.mjs} +2 -2
- package/dist/shared/utils/entropy-source.mjs.map +1 -0
- package/dist/shared/utils/event-queue.cjs +24 -0
- package/dist/shared/utils/event-queue.cjs.map +1 -0
- package/dist/shared/utils/{event-queue.d.ts → event-queue.d.cts} +1 -1
- package/dist/shared/utils/event-queue.d.cts.map +1 -0
- package/dist/shared/utils/event-queue.d.mts +6 -0
- package/dist/shared/utils/event-queue.d.mts.map +1 -0
- package/dist/shared/utils/{event-queue.js → event-queue.mjs} +4 -2
- package/dist/shared/utils/event-queue.mjs.map +1 -0
- package/dist/shared/utils/hd-keyring-seed.cjs +49 -0
- package/dist/shared/utils/hd-keyring-seed.cjs.map +1 -0
- package/dist/shared/utils/{hd-keyring-seed.d.ts → hd-keyring-seed.d.cts} +3 -3
- package/dist/shared/utils/hd-keyring-seed.d.cts.map +1 -0
- package/dist/shared/utils/hd-keyring-seed.d.mts +27 -0
- package/dist/shared/utils/hd-keyring-seed.d.mts.map +1 -0
- package/dist/shared/utils/{hd-keyring-seed.js → hd-keyring-seed.mjs} +1 -1
- package/dist/shared/utils/hd-keyring-seed.mjs.map +1 -0
- package/dist/shared/utils/message-signing.cjs +147 -0
- package/dist/shared/utils/message-signing.cjs.map +1 -0
- package/dist/shared/utils/{message-signing.d.ts → message-signing.d.cts} +1 -1
- package/dist/shared/utils/message-signing.d.cts.map +1 -0
- package/dist/shared/utils/message-signing.d.mts +73 -0
- package/dist/shared/utils/message-signing.d.mts.map +1 -0
- package/dist/shared/utils/{message-signing.js → message-signing.mjs} +7 -7
- package/dist/shared/utils/message-signing.mjs.map +1 -0
- package/package.json +56 -22
- package/dist/controllers/authentication/AuthenticationController-method-action-types.d.ts.map +0 -1
- package/dist/controllers/authentication/AuthenticationController-method-action-types.js.map +0 -1
- package/dist/controllers/authentication/AuthenticationController.d.ts.map +0 -1
- package/dist/controllers/authentication/AuthenticationController.js +0 -536
- package/dist/controllers/authentication/AuthenticationController.js.map +0 -1
- package/dist/controllers/authentication/index.d.ts.map +0 -1
- package/dist/controllers/authentication/index.js +0 -6
- package/dist/controllers/authentication/index.js.map +0 -1
- package/dist/controllers/authentication/mocks/index.d.ts +0 -2
- package/dist/controllers/authentication/mocks/index.d.ts.map +0 -1
- package/dist/controllers/authentication/mocks/index.js +0 -2
- package/dist/controllers/authentication/mocks/index.js.map +0 -1
- package/dist/controllers/authentication/mocks/mockResponses.d.ts.map +0 -1
- package/dist/controllers/authentication/mocks/mockResponses.js.map +0 -1
- package/dist/controllers/index.d.ts +0 -3
- package/dist/controllers/index.d.ts.map +0 -1
- package/dist/controllers/index.js +0 -3
- package/dist/controllers/index.js.map +0 -1
- package/dist/controllers/user-storage/UserStorageController-method-action-types.d.ts.map +0 -1
- package/dist/controllers/user-storage/UserStorageController-method-action-types.js.map +0 -1
- package/dist/controllers/user-storage/UserStorageController.d.ts.map +0 -1
- package/dist/controllers/user-storage/UserStorageController.js +0 -429
- package/dist/controllers/user-storage/UserStorageController.js.map +0 -1
- package/dist/controllers/user-storage/constants.d.ts +0 -15
- package/dist/controllers/user-storage/constants.d.ts.map +0 -1
- package/dist/controllers/user-storage/constants.js.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/constants.d.ts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/constants.js.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/controller-integration.d.ts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/controller-integration.js.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.ts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.js.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/sync-utils.d.ts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/sync-utils.js.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/types.d.ts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/types.js +0 -2
- package/dist/controllers/user-storage/contact-syncing/types.js.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/utils.d.ts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/utils.js.map +0 -1
- package/dist/controllers/user-storage/index.d.ts.map +0 -1
- package/dist/controllers/user-storage/index.js +0 -9
- package/dist/controllers/user-storage/index.js.map +0 -1
- package/dist/controllers/user-storage/mocks/index.d.ts +0 -3
- package/dist/controllers/user-storage/mocks/index.d.ts.map +0 -1
- package/dist/controllers/user-storage/mocks/index.js +0 -3
- package/dist/controllers/user-storage/mocks/index.js.map +0 -1
- package/dist/controllers/user-storage/mocks/mockResponses.d.ts.map +0 -1
- package/dist/controllers/user-storage/mocks/mockResponses.js.map +0 -1
- package/dist/controllers/user-storage/mocks/mockStorage.d.ts.map +0 -1
- package/dist/controllers/user-storage/mocks/mockStorage.js.map +0 -1
- package/dist/controllers/user-storage/types.d.ts.map +0 -1
- package/dist/controllers/user-storage/types.js +0 -2
- package/dist/controllers/user-storage/types.js.map +0 -1
- package/dist/controllers/user-storage/utils.d.ts.map +0 -1
- package/dist/controllers/user-storage/utils.js.map +0 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.ts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.js +0 -99
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.js.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/flow-srp.d.ts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/flow-srp.js +0 -255
- package/dist/sdk/authentication-jwt-bearer/flow-srp.js.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/services.d.ts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/services.js.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/types.d.ts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/types.js.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.ts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.js.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/utils/time.d.ts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/utils/time.js.map +0 -1
- package/dist/sdk/authentication.d.ts.map +0 -1
- package/dist/sdk/authentication.js +0 -100
- package/dist/sdk/authentication.js.map +0 -1
- package/dist/sdk/constants.d.ts.map +0 -1
- package/dist/sdk/constants.js.map +0 -1
- package/dist/sdk/errors.d.ts.map +0 -1
- package/dist/sdk/errors.js.map +0 -1
- package/dist/sdk/index.d.ts +0 -8
- package/dist/sdk/index.d.ts.map +0 -1
- package/dist/sdk/index.js +0 -8
- package/dist/sdk/index.js.map +0 -1
- package/dist/sdk/mocks/auth.d.ts.map +0 -1
- package/dist/sdk/mocks/auth.js.map +0 -1
- package/dist/sdk/mocks/userstorage.d.ts.map +0 -1
- package/dist/sdk/mocks/userstorage.js.map +0 -1
- package/dist/sdk/user-storage.d.ts.map +0 -1
- package/dist/sdk/user-storage.js +0 -364
- package/dist/sdk/user-storage.js.map +0 -1
- package/dist/sdk/utils/eip-6963-metamask-provider.d.ts.map +0 -1
- package/dist/sdk/utils/eip-6963-metamask-provider.js.map +0 -1
- package/dist/sdk/utils/messaging-signing-snap-requests.d.ts.map +0 -1
- package/dist/sdk/utils/messaging-signing-snap-requests.js.map +0 -1
- package/dist/sdk/utils/validate-login-response.d.ts.map +0 -1
- package/dist/sdk/utils/validate-login-response.js.map +0 -1
- package/dist/sdk/utils/validate-pair-response.d.ts.map +0 -1
- package/dist/sdk/utils/validate-pair-response.js.map +0 -1
- package/dist/shared/encryption/cache.d.ts.map +0 -1
- package/dist/shared/encryption/cache.js.map +0 -1
- package/dist/shared/encryption/constants.d.ts.map +0 -1
- package/dist/shared/encryption/constants.js.map +0 -1
- package/dist/shared/encryption/encryption.d.ts.map +0 -1
- package/dist/shared/encryption/encryption.js +0 -202
- package/dist/shared/encryption/encryption.js.map +0 -1
- package/dist/shared/encryption/index.d.ts +0 -5
- package/dist/shared/encryption/index.d.ts.map +0 -1
- package/dist/shared/encryption/index.js +0 -5
- package/dist/shared/encryption/index.js.map +0 -1
- package/dist/shared/encryption/utils.d.ts.map +0 -1
- package/dist/shared/encryption/utils.js.map +0 -1
- package/dist/shared/env.d.ts.map +0 -1
- package/dist/shared/env.js.map +0 -1
- package/dist/shared/storage-schema.d.ts.map +0 -1
- package/dist/shared/storage-schema.js.map +0 -1
- package/dist/shared/types/encryption.d.ts.map +0 -1
- package/dist/shared/types/encryption.js +0 -2
- package/dist/shared/types/encryption.js.map +0 -1
- package/dist/shared/types/services.d.ts.map +0 -1
- package/dist/shared/types/services.js +0 -2
- package/dist/shared/types/services.js.map +0 -1
- package/dist/shared/utils/entropy-source.d.ts.map +0 -1
- package/dist/shared/utils/entropy-source.js.map +0 -1
- package/dist/shared/utils/event-queue.d.ts.map +0 -1
- package/dist/shared/utils/event-queue.js.map +0 -1
- package/dist/shared/utils/hd-keyring-seed.d.ts.map +0 -1
- package/dist/shared/utils/hd-keyring-seed.js.map +0 -1
- package/dist/shared/utils/message-signing.d.ts.map +0 -1
- package/dist/shared/utils/message-signing.js.map +0 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Eip1193Provider } from "ethers";
|
|
2
|
+
import { SIWEJwtBearerAuth } from "./authentication-jwt-bearer/flow-siwe.mjs";
|
|
3
|
+
import { SRPJwtBearerAuth } from "./authentication-jwt-bearer/flow-srp.mjs";
|
|
4
|
+
import type { PairProfilesResponse } from "./authentication-jwt-bearer/services.mjs";
|
|
5
|
+
import type { UserProfile, Pair, UserProfileLineage } from "./authentication-jwt-bearer/types.mjs";
|
|
6
|
+
type Compute<T> = T extends infer U ? {
|
|
7
|
+
[K in keyof U]: U[K];
|
|
8
|
+
} : never;
|
|
9
|
+
type SIWEInterface = Compute<SIWEJwtBearerAuth>;
|
|
10
|
+
export type SRPInterface = Compute<SRPJwtBearerAuth>;
|
|
11
|
+
type SiweParams = ConstructorParameters<typeof SIWEJwtBearerAuth>;
|
|
12
|
+
type SRPParams = ConstructorParameters<typeof SRPJwtBearerAuth>;
|
|
13
|
+
type JwtBearerAuthParams = SiweParams | SRPParams;
|
|
14
|
+
export declare class JwtBearerAuth implements SIWEInterface, SRPInterface {
|
|
15
|
+
#private;
|
|
16
|
+
constructor(...args: JwtBearerAuthParams);
|
|
17
|
+
setCustomProvider(provider: Eip1193Provider): void;
|
|
18
|
+
getAccessToken(entropySourceId?: string): Promise<string>;
|
|
19
|
+
connectSnap(): Promise<string>;
|
|
20
|
+
isSnapConnected(): Promise<boolean>;
|
|
21
|
+
getUserProfile(entropySourceId?: string): Promise<UserProfile>;
|
|
22
|
+
getIdentifier(entropySourceId?: string): Promise<string>;
|
|
23
|
+
getUserProfileLineage(entropySourceId?: string): Promise<UserProfileLineage>;
|
|
24
|
+
getCustomerServiceToken(entropySourceId?: string): Promise<string>;
|
|
25
|
+
pairSrpProfiles(accessTokens: string[], authAccessToken: string): Promise<PairProfilesResponse>;
|
|
26
|
+
signMessage(message: string, entropySourceId?: string): Promise<string>;
|
|
27
|
+
pairIdentifiers(pairing: Pair[]): Promise<void>;
|
|
28
|
+
prepare(signer: {
|
|
29
|
+
address: string;
|
|
30
|
+
chainId: number;
|
|
31
|
+
signMessage: (message: string) => Promise<string>;
|
|
32
|
+
domain: string;
|
|
33
|
+
}): void;
|
|
34
|
+
}
|
|
35
|
+
export { SIWEJwtBearerAuth } from "./authentication-jwt-bearer/flow-siwe.mjs";
|
|
36
|
+
export { SRPJwtBearerAuth } from "./authentication-jwt-bearer/flow-srp.mjs";
|
|
37
|
+
export * from "./authentication-jwt-bearer/types.mjs";
|
|
38
|
+
//# sourceMappingURL=authentication.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authentication.d.mts","sourceRoot":"","sources":["../../src/sdk/authentication.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe;AAG9C,OAAO,EAAE,iBAAiB,EAAE,kDAAiD;AAC7E,OAAO,EAAE,gBAAgB,EAAE,iDAAgD;AAK3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,iDAAgD;AACpF,OAAO,KAAK,EACV,WAAW,EACX,IAAI,EACJ,kBAAkB,EACnB,8CAA6C;AAM9C,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG,KAAK,CAAC;AACvE,KAAK,aAAa,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAChD,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAErD,KAAK,UAAU,GAAG,qBAAqB,CAAC,OAAO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AAiB,EAAE,kDAAiD;AAC7E,OAAO,EAAE,gBAAgB,EAAE,iDAAgD;AAC3E,sDAAqD"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _JwtBearerAuth_instances, _JwtBearerAuth_type, _JwtBearerAuth_env, _JwtBearerAuth_sdk, _JwtBearerAuth_assertSIWE, _JwtBearerAuth_assertSRP;
|
|
13
|
+
import { SIWEJwtBearerAuth } from "./authentication-jwt-bearer/flow-siwe.mjs";
|
|
14
|
+
import { SRPJwtBearerAuth } from "./authentication-jwt-bearer/flow-srp.mjs";
|
|
15
|
+
import { getNonce, pairIdentifiers } from "./authentication-jwt-bearer/services.mjs";
|
|
16
|
+
import { AuthType } from "./authentication-jwt-bearer/types.mjs";
|
|
17
|
+
import { PairError, UnsupportedAuthTypeError } from "./errors.mjs";
|
|
18
|
+
export class JwtBearerAuth {
|
|
19
|
+
constructor(...args) {
|
|
20
|
+
_JwtBearerAuth_instances.add(this);
|
|
21
|
+
_JwtBearerAuth_type.set(this, void 0);
|
|
22
|
+
_JwtBearerAuth_env.set(this, void 0);
|
|
23
|
+
_JwtBearerAuth_sdk.set(this, void 0);
|
|
24
|
+
__classPrivateFieldSet(this, _JwtBearerAuth_type, args[0].type, "f");
|
|
25
|
+
__classPrivateFieldSet(this, _JwtBearerAuth_env, args[0].env, "f");
|
|
26
|
+
if (args[0].type === AuthType.SRP) {
|
|
27
|
+
__classPrivateFieldSet(this, _JwtBearerAuth_sdk, new SRPJwtBearerAuth(args[0], args[1]), "f");
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (args[0].type === AuthType.SiWE) {
|
|
31
|
+
__classPrivateFieldSet(this, _JwtBearerAuth_sdk, new SIWEJwtBearerAuth(args[0], args[1]), "f");
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
throw new UnsupportedAuthTypeError('unsupported auth type');
|
|
35
|
+
}
|
|
36
|
+
setCustomProvider(provider) {
|
|
37
|
+
__classPrivateFieldGet(this, _JwtBearerAuth_instances, "m", _JwtBearerAuth_assertSRP).call(this, __classPrivateFieldGet(this, _JwtBearerAuth_type, "f"), __classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f"));
|
|
38
|
+
__classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f").setCustomProvider(provider);
|
|
39
|
+
}
|
|
40
|
+
async getAccessToken(entropySourceId) {
|
|
41
|
+
return await __classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f").getAccessToken(entropySourceId);
|
|
42
|
+
}
|
|
43
|
+
async connectSnap() {
|
|
44
|
+
__classPrivateFieldGet(this, _JwtBearerAuth_instances, "m", _JwtBearerAuth_assertSRP).call(this, __classPrivateFieldGet(this, _JwtBearerAuth_type, "f"), __classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f"));
|
|
45
|
+
return __classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f").connectSnap();
|
|
46
|
+
}
|
|
47
|
+
async isSnapConnected() {
|
|
48
|
+
__classPrivateFieldGet(this, _JwtBearerAuth_instances, "m", _JwtBearerAuth_assertSRP).call(this, __classPrivateFieldGet(this, _JwtBearerAuth_type, "f"), __classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f"));
|
|
49
|
+
return __classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f").isSnapConnected();
|
|
50
|
+
}
|
|
51
|
+
async getUserProfile(entropySourceId) {
|
|
52
|
+
return await __classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f").getUserProfile(entropySourceId);
|
|
53
|
+
}
|
|
54
|
+
async getIdentifier(entropySourceId) {
|
|
55
|
+
return await __classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f").getIdentifier(entropySourceId);
|
|
56
|
+
}
|
|
57
|
+
async getUserProfileLineage(entropySourceId) {
|
|
58
|
+
return await __classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f").getUserProfileLineage(entropySourceId);
|
|
59
|
+
}
|
|
60
|
+
async getCustomerServiceToken(entropySourceId) {
|
|
61
|
+
return await __classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f").getCustomerServiceToken(entropySourceId);
|
|
62
|
+
}
|
|
63
|
+
async pairSrpProfiles(accessTokens, authAccessToken) {
|
|
64
|
+
__classPrivateFieldGet(this, _JwtBearerAuth_instances, "m", _JwtBearerAuth_assertSRP).call(this, __classPrivateFieldGet(this, _JwtBearerAuth_type, "f"), __classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f"));
|
|
65
|
+
return await __classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f").pairSrpProfiles(accessTokens, authAccessToken);
|
|
66
|
+
}
|
|
67
|
+
async signMessage(message, entropySourceId) {
|
|
68
|
+
return await __classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f").signMessage(message, entropySourceId);
|
|
69
|
+
}
|
|
70
|
+
async pairIdentifiers(pairing) {
|
|
71
|
+
const profile = await this.getUserProfile();
|
|
72
|
+
const n = await getNonce(profile.profileId, __classPrivateFieldGet(this, _JwtBearerAuth_env, "f"));
|
|
73
|
+
const logins = await Promise.all(pairing.map(async (p) => {
|
|
74
|
+
try {
|
|
75
|
+
const raw = `metamask:${n.nonce}:${p.identifier}`;
|
|
76
|
+
const sig = await p.signMessage(raw);
|
|
77
|
+
return {
|
|
78
|
+
signature: sig,
|
|
79
|
+
raw_message: raw,
|
|
80
|
+
encrypted_storage_key: p.encryptedStorageKey,
|
|
81
|
+
identifier_type: p.identifierType,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
catch (e) {
|
|
85
|
+
/* istanbul ignore next */
|
|
86
|
+
const errorMessage = e instanceof Error ? e.message : JSON.stringify(e ?? '');
|
|
87
|
+
throw new PairError(`failed to sign pairing message: ${errorMessage}`);
|
|
88
|
+
}
|
|
89
|
+
}));
|
|
90
|
+
const accessToken = await this.getAccessToken();
|
|
91
|
+
await pairIdentifiers(n.nonce, logins, accessToken, __classPrivateFieldGet(this, _JwtBearerAuth_env, "f"));
|
|
92
|
+
}
|
|
93
|
+
prepare(signer) {
|
|
94
|
+
__classPrivateFieldGet(this, _JwtBearerAuth_instances, "m", _JwtBearerAuth_assertSIWE).call(this, __classPrivateFieldGet(this, _JwtBearerAuth_type, "f"), __classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f"));
|
|
95
|
+
__classPrivateFieldGet(this, _JwtBearerAuth_sdk, "f").prepare(signer);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
_JwtBearerAuth_type = new WeakMap(), _JwtBearerAuth_env = new WeakMap(), _JwtBearerAuth_sdk = new WeakMap(), _JwtBearerAuth_instances = new WeakSet(), _JwtBearerAuth_assertSIWE = function _JwtBearerAuth_assertSIWE(type, _sdk) {
|
|
99
|
+
if (type === AuthType.SiWE) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
throw new UnsupportedAuthTypeError('This method is only available via SIWE auth type');
|
|
103
|
+
}, _JwtBearerAuth_assertSRP = function _JwtBearerAuth_assertSRP(type, _sdk) {
|
|
104
|
+
if (type === AuthType.SRP) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
throw new UnsupportedAuthTypeError('This method is only available via SRP auth type');
|
|
108
|
+
};
|
|
109
|
+
export { SIWEJwtBearerAuth } from "./authentication-jwt-bearer/flow-siwe.mjs";
|
|
110
|
+
export { SRPJwtBearerAuth } from "./authentication-jwt-bearer/flow-srp.mjs";
|
|
111
|
+
export * from "./authentication-jwt-bearer/types.mjs";
|
|
112
|
+
//# sourceMappingURL=authentication.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authentication.mjs","sourceRoot":"","sources":["../../src/sdk/authentication.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,OAAO,EAAE,iBAAiB,EAAE,kDAAiD;AAC7E,OAAO,EAAE,gBAAgB,EAAE,iDAAgD;AAC3E,OAAO,EACL,QAAQ,EACR,eAAe,EAChB,iDAAgD;AAOjD,OAAO,EAAE,QAAQ,EAAE,8CAA6C;AAChE,OAAO,EAAE,SAAS,EAAE,wBAAwB,EAAE,qBAAoB;AAYlE,MAAM,OAAO,aAAa;IAOxB,YAAY,GAAG,IAAyB;;QAN/B,sCAAgB;QAEhB,qCAAU;QAEV,qCAA2C;QAGlD,uBAAA,IAAI,uBAAS,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,MAAA,CAAC;QAC1B,uBAAA,IAAI,sBAAQ,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,MAAA,CAAC;QAExB,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,GAAG,EAAE,CAAC;YAClC,uBAAA,IAAI,sBAAQ,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAA,CAAC;YACnD,OAAO;QACT,CAAC;QAED,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnC,uBAAA,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C;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,0BAA0B;gBAC1B,MAAM,YAAY,GAChB,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC3D,MAAM,IAAI,SAAS,CACjB,mCAAmC,YAAY,EAAE,CAClD,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CACH,CAAC;QAEF,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAChD,MAAM,eAAe,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,uBAAA,IAAI,0BAAK,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,CAAC,MAKP;QACC,uBAAA,IAAI,2DAAY,MAAhB,IAAI,EAAa,uBAAA,IAAI,2BAAM,EAAE,uBAAA,IAAI,0BAAK,CAAC,CAAC;QACxC,uBAAA,IAAI,0BAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;CA2BF;sNAxBG,IAAc,EACd,IAA0C;IAE1C,IAAI,IAAI,KAAK,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC3B,OAAO;IACT,CAAC;IAED,MAAM,IAAI,wBAAwB,CAChC,kDAAkD,CACnD,CAAC;AACJ,CAAC,+DAGC,IAAc,EACd,IAA0C;IAE1C,IAAI,IAAI,KAAK,QAAQ,CAAC,GAAG,EAAE,CAAC;QAC1B,OAAO;IACT,CAAC;IAED,MAAM,IAAI,wBAAwB,CAChC,iDAAiD,CAClD,CAAC;AACJ,CAAC;AAGH,OAAO,EAAE,iBAAiB,EAAE,kDAAiD;AAC7E,OAAO,EAAE,gBAAgB,EAAE,iDAAgD;AAC3E,sDAAqD","sourcesContent":["import type { Eip1193Provider } from 'ethers';\n\nimport type { Env } from '../shared/env.js';\nimport { SIWEJwtBearerAuth } from './authentication-jwt-bearer/flow-siwe.js';\nimport { SRPJwtBearerAuth } from './authentication-jwt-bearer/flow-srp.js';\nimport {\n getNonce,\n pairIdentifiers,\n} from './authentication-jwt-bearer/services.js';\nimport type { PairProfilesResponse } from './authentication-jwt-bearer/services.js';\nimport type {\n UserProfile,\n Pair,\n UserProfileLineage,\n} from './authentication-jwt-bearer/types.js';\nimport { AuthType } from './authentication-jwt-bearer/types.js';\nimport { PairError, UnsupportedAuthTypeError } from './errors.js';\n\n// Computing the Classes, so we only get back the public methods for the interface.\n\ntype Compute<T> = T extends infer U ? { [K in keyof U]: U[K] } : never;\ntype SIWEInterface = Compute<SIWEJwtBearerAuth>;\nexport type SRPInterface = Compute<SRPJwtBearerAuth>;\n\ntype SiweParams = ConstructorParameters<typeof SIWEJwtBearerAuth>;\ntype SRPParams = ConstructorParameters<typeof SRPJwtBearerAuth>;\ntype JwtBearerAuthParams = SiweParams | SRPParams;\n\nexport class JwtBearerAuth implements SIWEInterface, SRPInterface {\n readonly #type: AuthType;\n\n readonly #env: Env;\n\n readonly #sdk: SIWEJwtBearerAuth | SRPJwtBearerAuth;\n\n constructor(...args: JwtBearerAuthParams) {\n this.#type = args[0].type;\n this.#env = args[0].env;\n\n if (args[0].type === AuthType.SRP) {\n this.#sdk = new SRPJwtBearerAuth(args[0], args[1]);\n return;\n }\n\n if (args[0].type === AuthType.SiWE) {\n this.#sdk = new SIWEJwtBearerAuth(args[0], args[1]);\n return;\n }\n\n throw new UnsupportedAuthTypeError('unsupported auth type');\n }\n\n setCustomProvider(provider: Eip1193Provider) {\n this.#assertSRP(this.#type, this.#sdk);\n this.#sdk.setCustomProvider(provider);\n }\n\n async getAccessToken(entropySourceId?: string): Promise<string> {\n return await this.#sdk.getAccessToken(entropySourceId);\n }\n\n async connectSnap(): Promise<string> {\n this.#assertSRP(this.#type, this.#sdk);\n return this.#sdk.connectSnap();\n }\n\n async isSnapConnected(): Promise<boolean> {\n this.#assertSRP(this.#type, this.#sdk);\n return this.#sdk.isSnapConnected();\n }\n\n async getUserProfile(entropySourceId?: string): Promise<UserProfile> {\n return await this.#sdk.getUserProfile(entropySourceId);\n }\n\n async getIdentifier(entropySourceId?: string): Promise<string> {\n return await this.#sdk.getIdentifier(entropySourceId);\n }\n\n async getUserProfileLineage(\n entropySourceId?: string,\n ): Promise<UserProfileLineage> {\n return await this.#sdk.getUserProfileLineage(entropySourceId);\n }\n\n async getCustomerServiceToken(entropySourceId?: string): Promise<string> {\n return await this.#sdk.getCustomerServiceToken(entropySourceId);\n }\n\n async pairSrpProfiles(\n accessTokens: string[],\n authAccessToken: string,\n ): Promise<PairProfilesResponse> {\n this.#assertSRP(this.#type, this.#sdk);\n return await this.#sdk.pairSrpProfiles(accessTokens, authAccessToken);\n }\n\n async signMessage(\n message: string,\n entropySourceId?: string,\n ): Promise<string> {\n return await this.#sdk.signMessage(message, entropySourceId);\n }\n\n async pairIdentifiers(pairing: Pair[]): Promise<void> {\n const profile = await this.getUserProfile();\n const n = await getNonce(profile.profileId, this.#env);\n\n const logins = await Promise.all(\n pairing.map(async (p) => {\n try {\n const raw = `metamask:${n.nonce}:${p.identifier}`;\n const sig = await p.signMessage(raw);\n return {\n signature: sig,\n raw_message: raw,\n encrypted_storage_key: p.encryptedStorageKey,\n identifier_type: p.identifierType,\n };\n } catch (e) {\n /* istanbul ignore next */\n const errorMessage =\n e instanceof Error ? e.message : JSON.stringify(e ?? '');\n throw new PairError(\n `failed to sign pairing message: ${errorMessage}`,\n );\n }\n }),\n );\n\n const accessToken = await this.getAccessToken();\n await pairIdentifiers(n.nonce, logins, accessToken, this.#env);\n }\n\n prepare(signer: {\n address: string;\n chainId: number;\n signMessage: (message: string) => Promise<string>;\n domain: string;\n }): void {\n this.#assertSIWE(this.#type, this.#sdk);\n this.#sdk.prepare(signer);\n }\n\n #assertSIWE(\n type: AuthType,\n _sdk: SIWEJwtBearerAuth | SRPJwtBearerAuth,\n ): asserts _sdk is SIWEJwtBearerAuth {\n if (type === AuthType.SiWE) {\n return;\n }\n\n throw new UnsupportedAuthTypeError(\n 'This method is only available via SIWE auth type',\n );\n }\n\n #assertSRP(\n type: AuthType,\n _sdk: SIWEJwtBearerAuth | SRPJwtBearerAuth,\n ): asserts _sdk is SRPJwtBearerAuth {\n if (type === AuthType.SRP) {\n return;\n }\n\n throw new UnsupportedAuthTypeError(\n 'This method is only available via SRP auth type',\n );\n }\n}\n\nexport { SIWEJwtBearerAuth } from './authentication-jwt-bearer/flow-siwe.js';\nexport { SRPJwtBearerAuth } from './authentication-jwt-bearer/flow-srp.js';\nexport * from './authentication-jwt-bearer/types.js';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../src/sdk/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAC/B,iBAAiB,EAAE,GAAG;CACvB,CAAC","sourcesContent":["export const HTTP_STATUS_CODES = {\n TOO_MANY_REQUESTS: 429,\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../src/sdk/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;CAE7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../src/sdk/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;CAE7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../src/sdk/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,iBAAiB,EAAE,GAAG;CACvB,CAAC","sourcesContent":["export const HTTP_STATUS_CODES = {\n TOO_MANY_REQUESTS: 429,\n};\n"]}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RateLimitedError = exports.NotFoundError = exports.UnsupportedAuthTypeError = exports.ValidationError = exports.UserStorageError = exports.PairError = exports.SignInError = exports.NonceRetrievalError = void 0;
|
|
4
|
+
const constants_js_1 = require("./constants.cjs");
|
|
5
|
+
class NonceRetrievalError extends Error {
|
|
6
|
+
constructor(message) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.name = 'NonceRetrievalError';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.NonceRetrievalError = NonceRetrievalError;
|
|
12
|
+
class SignInError extends Error {
|
|
13
|
+
constructor(message) {
|
|
14
|
+
super(message);
|
|
15
|
+
this.name = 'SignInError';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.SignInError = SignInError;
|
|
19
|
+
class PairError extends Error {
|
|
20
|
+
constructor(message) {
|
|
21
|
+
super(message);
|
|
22
|
+
this.name = 'PairError';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.PairError = PairError;
|
|
26
|
+
class UserStorageError extends Error {
|
|
27
|
+
constructor(message) {
|
|
28
|
+
super(message);
|
|
29
|
+
this.name = 'UserStorageError';
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.UserStorageError = UserStorageError;
|
|
33
|
+
class ValidationError extends Error {
|
|
34
|
+
constructor(message) {
|
|
35
|
+
super(message);
|
|
36
|
+
this.name = 'ValidationError';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.ValidationError = ValidationError;
|
|
40
|
+
class UnsupportedAuthTypeError extends Error {
|
|
41
|
+
constructor(message) {
|
|
42
|
+
super(message);
|
|
43
|
+
this.name = 'UnsupportedAuthTypeError';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.UnsupportedAuthTypeError = UnsupportedAuthTypeError;
|
|
47
|
+
class NotFoundError extends Error {
|
|
48
|
+
constructor(message) {
|
|
49
|
+
super(message);
|
|
50
|
+
this.name = 'NotFoundError';
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.NotFoundError = NotFoundError;
|
|
54
|
+
class RateLimitedError extends Error {
|
|
55
|
+
constructor(message, retryAfterMs) {
|
|
56
|
+
super(message);
|
|
57
|
+
this.status = constants_js_1.HTTP_STATUS_CODES.TOO_MANY_REQUESTS;
|
|
58
|
+
this.name = 'RateLimitedError';
|
|
59
|
+
this.retryAfterMs = retryAfterMs;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Check if an unknown error is a rate limit error (429 status).
|
|
63
|
+
*
|
|
64
|
+
* @param e - The error to check
|
|
65
|
+
* @returns True if the error is a rate limit error
|
|
66
|
+
*/
|
|
67
|
+
static isRateLimitError(e) {
|
|
68
|
+
return (e instanceof RateLimitedError ||
|
|
69
|
+
(typeof e === 'object' &&
|
|
70
|
+
e !== null &&
|
|
71
|
+
'status' in e &&
|
|
72
|
+
e.status === constants_js_1.HTTP_STATUS_CODES.TOO_MANY_REQUESTS));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.RateLimitedError = RateLimitedError;
|
|
76
|
+
//# sourceMappingURL=errors.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.cjs","sourceRoot":"","sources":["../../src/sdk/errors.ts"],"names":[],"mappings":";;;AAAA,kDAAmD;AAEnD,MAAa,mBAAoB,SAAQ,KAAK;IAC5C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AALD,kDAKC;AAED,MAAa,WAAY,SAAQ,KAAK;IACpC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;CACF;AALD,kCAKC;AAED,MAAa,SAAU,SAAQ,KAAK;IAClC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,I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ent":["import { HTTP_STATUS_CODES } from './constants.js';\n\nexport class NonceRetrievalError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'NonceRetrievalError';\n }\n}\n\nexport class SignInError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'SignInError';\n }\n}\n\nexport class PairError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'PairError';\n }\n}\n\nexport class UserStorageError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UserStorageError';\n }\n}\n\nexport class ValidationError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'ValidationError';\n }\n}\n\nexport class UnsupportedAuthTypeError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UnsupportedAuthTypeError';\n }\n}\n\nexport class NotFoundError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'NotFoundError';\n }\n}\n\nexport class RateLimitedError extends Error {\n readonly status = HTTP_STATUS_CODES.TOO_MANY_REQUESTS;\n\n readonly retryAfterMs?: number;\n\n constructor(message: string, retryAfterMs?: number) {\n super(message);\n this.name = 'RateLimitedError';\n this.retryAfterMs = retryAfterMs;\n }\n\n /**\n * Check if an unknown error is a rate limit error (429 status).\n *\n * @param e - The error to check\n * @returns True if the error is a rate limit error\n */\n static isRateLimitError(e: unknown): e is RateLimitedError {\n return (\n e instanceof RateLimitedError ||\n (typeof e === 'object' &&\n e !== null &&\n 'status' in e &&\n e.status === HTTP_STATUS_CODES.TOO_MANY_REQUESTS)\n );\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.cts","sourceRoot":"","sources":["../../src/sdk/errors.ts"],"names":[],"mappings":"AAEA,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,WAAY,SAAQ,KAAK;gBACxB,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,SAAU,SAAQ,KAAK;gBACtB,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,MAAM,SAAuC;IAEtD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;gBAEnB,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAMlD;;;;;OAKG;IACH,MAAM,CAAC,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,gBAAgB;CAS3D"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare class NonceRetrievalError extends Error {
|
|
2
|
+
constructor(message: string);
|
|
3
|
+
}
|
|
4
|
+
export declare class SignInError extends Error {
|
|
5
|
+
constructor(message: string);
|
|
6
|
+
}
|
|
7
|
+
export declare class PairError extends Error {
|
|
8
|
+
constructor(message: string);
|
|
9
|
+
}
|
|
10
|
+
export declare class UserStorageError extends Error {
|
|
11
|
+
constructor(message: string);
|
|
12
|
+
}
|
|
13
|
+
export declare class ValidationError extends Error {
|
|
14
|
+
constructor(message: string);
|
|
15
|
+
}
|
|
16
|
+
export declare class UnsupportedAuthTypeError extends Error {
|
|
17
|
+
constructor(message: string);
|
|
18
|
+
}
|
|
19
|
+
export declare class NotFoundError extends Error {
|
|
20
|
+
constructor(message: string);
|
|
21
|
+
}
|
|
22
|
+
export declare class RateLimitedError extends Error {
|
|
23
|
+
readonly status: number;
|
|
24
|
+
readonly retryAfterMs?: number;
|
|
25
|
+
constructor(message: string, retryAfterMs?: number);
|
|
26
|
+
/**
|
|
27
|
+
* Check if an unknown error is a rate limit error (429 status).
|
|
28
|
+
*
|
|
29
|
+
* @param e - The error to check
|
|
30
|
+
* @returns True if the error is a rate limit error
|
|
31
|
+
*/
|
|
32
|
+
static isRateLimitError(e: unknown): e is RateLimitedError;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=errors.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.mts","sourceRoot":"","sources":["../../src/sdk/errors.ts"],"names":[],"mappings":"AAEA,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,WAAY,SAAQ,KAAK;gBACxB,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,SAAU,SAAQ,KAAK;gBACtB,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,MAAM,SAAuC;IAEtD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;gBAEnB,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAMlD;;;;;OAKG;IACH,MAAM,CAAC,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,gBAAgB;CAS3D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTTP_STATUS_CODES } from
|
|
1
|
+
import { HTTP_STATUS_CODES } from "./constants.mjs";
|
|
2
2
|
export class NonceRetrievalError extends Error {
|
|
3
3
|
constructor(message) {
|
|
4
4
|
super(message);
|
|
@@ -42,10 +42,9 @@ export class NotFoundError extends Error {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
export class RateLimitedError extends Error {
|
|
45
|
-
status = HTTP_STATUS_CODES.TOO_MANY_REQUESTS;
|
|
46
|
-
retryAfterMs;
|
|
47
45
|
constructor(message, retryAfterMs) {
|
|
48
46
|
super(message);
|
|
47
|
+
this.status = HTTP_STATUS_CODES.TOO_MANY_REQUESTS;
|
|
49
48
|
this.name = 'RateLimitedError';
|
|
50
49
|
this.retryAfterMs = retryAfterMs;
|
|
51
50
|
}
|
|
@@ -63,4 +62,4 @@ export class RateLimitedError extends Error {
|
|
|
63
62
|
e.status === HTTP_STATUS_CODES.TOO_MANY_REQUESTS));
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
|
-
//# sourceMappingURL=errors.
|
|
65
|
+
//# sourceMappingURL=errors.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.mjs","sourceRoot":"","sources":["../../src/sdk/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,wBAAuB;AAEnD,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC5C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AAED,MAAM,OAAO,WAAY,SAAQ,KAAK;IACpC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC5B,CAAC;CACF;AAED,MAAM,OAAO,SAAU,SAAQ,KAAK;IAClC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IAC1B,CAAC;CACF;AAED,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACzC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAED,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AAED,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IACjD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IACzC,CAAC;CACF;AAED,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAED,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAKzC,YAAY,OAAe,EAAE,YAAqB;QAChD,KAAK,CAAC,OAAO,CAAC,CAAC;QALR,WAAM,GAAG,iBAAiB,CAAC,iBAAiB,CAAC;QAMpD,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,gBAAgB,CAAC,CAAU;QAChC,OAAO,CACL,CAAC,YAAY,gBAAgB;YAC7B,CAAC,OAAO,CAAC,KAAK,QAAQ;gBACpB,CAAC,KAAK,IAAI;gBACV,QAAQ,IAAI,CAAC;gBACb,CAAC,CAAC,MAAM,KAAK,iBAAiB,CAAC,iBAAiB,CAAC,CACpD,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { HTTP_STATUS_CODES } from './constants.js';\n\nexport class NonceRetrievalError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'NonceRetrievalError';\n }\n}\n\nexport class SignInError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'SignInError';\n }\n}\n\nexport class PairError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'PairError';\n }\n}\n\nexport class UserStorageError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UserStorageError';\n }\n}\n\nexport class ValidationError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'ValidationError';\n }\n}\n\nexport class UnsupportedAuthTypeError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'UnsupportedAuthTypeError';\n }\n}\n\nexport class NotFoundError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'NotFoundError';\n }\n}\n\nexport class RateLimitedError extends Error {\n readonly status = HTTP_STATUS_CODES.TOO_MANY_REQUESTS;\n\n readonly retryAfterMs?: number;\n\n constructor(message: string, retryAfterMs?: number) {\n super(message);\n this.name = 'RateLimitedError';\n this.retryAfterMs = retryAfterMs;\n }\n\n /**\n * Check if an unknown error is a rate limit error (429 status).\n *\n * @param e - The error to check\n * @returns True if the error is a rate limit error\n */\n static isRateLimitError(e: unknown): e is RateLimitedError {\n return (\n e instanceof RateLimitedError ||\n (typeof e === 'object' &&\n e !== null &&\n 'status' in e &&\n e.status === HTTP_STATUS_CODES.TOO_MANY_REQUESTS)\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./authentication.cjs"), exports);
|
|
18
|
+
__exportStar(require("./user-storage.cjs"), exports);
|
|
19
|
+
__exportStar(require("./errors.cjs"), exports);
|
|
20
|
+
__exportStar(require("./utils/messaging-signing-snap-requests.cjs"), exports);
|
|
21
|
+
__exportStar(require("../shared/encryption/index.cjs"), exports);
|
|
22
|
+
__exportStar(require("../shared/env.cjs"), exports);
|
|
23
|
+
__exportStar(require("../shared/storage-schema.cjs"), exports);
|
|
24
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAoC;AACpC,qDAAkC;AAClC,+CAA4B;AAC5B,8EAA2D;AAC3D,iEAA8C;AAC9C,oDAAiC;AACjC,+DAA4C","sourcesContent":["export * from './authentication.js';\nexport * from './user-storage.js';\nexport * from './errors.js';\nexport * from './utils/messaging-signing-snap-requests.js';\nexport * from '../shared/encryption/index.js';\nexport * from '../shared/env.js';\nexport * from '../shared/storage-schema.js';\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./authentication.cjs";
|
|
2
|
+
export * from "./user-storage.cjs";
|
|
3
|
+
export * from "./errors.cjs";
|
|
4
|
+
export * from "./utils/messaging-signing-snap-requests.cjs";
|
|
5
|
+
export * from "../shared/encryption/index.cjs";
|
|
6
|
+
export * from "../shared/env.cjs";
|
|
7
|
+
export * from "../shared/storage-schema.cjs";
|
|
8
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,qCAAoC;AACpC,mCAAkC;AAClC,6BAA4B;AAC5B,4DAA2D;AAC3D,+CAA8C;AAC9C,kCAAiC;AACjC,6CAA4C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./authentication.mjs";
|
|
2
|
+
export * from "./user-storage.mjs";
|
|
3
|
+
export * from "./errors.mjs";
|
|
4
|
+
export * from "./utils/messaging-signing-snap-requests.mjs";
|
|
5
|
+
export * from "../shared/encryption/index.mjs";
|
|
6
|
+
export * from "../shared/env.mjs";
|
|
7
|
+
export * from "../shared/storage-schema.mjs";
|
|
8
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,qCAAoC;AACpC,mCAAkC;AAClC,6BAA4B;AAC5B,4DAA2D;AAC3D,+CAA8C;AAC9C,kCAAiC;AACjC,6CAA4C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./authentication.mjs";
|
|
2
|
+
export * from "./user-storage.mjs";
|
|
3
|
+
export * from "./errors.mjs";
|
|
4
|
+
export * from "./utils/messaging-signing-snap-requests.mjs";
|
|
5
|
+
export * from "../shared/encryption/index.mjs";
|
|
6
|
+
export * from "../shared/env.mjs";
|
|
7
|
+
export * from "../shared/storage-schema.mjs";
|
|
8
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,qCAAoC;AACpC,mCAAkC;AAClC,6BAA4B;AAC5B,4DAA2D;AAC3D,+CAA8C;AAC9C,kCAAiC;AACjC,6CAA4C","sourcesContent":["export * from './authentication.js';\nexport * from './user-storage.js';\nexport * from './errors.js';\nexport * from './utils/messaging-signing-snap-requests.js';\nexport * from '../shared/encryption/index.js';\nexport * from '../shared/env.js';\nexport * from '../shared/storage-schema.js';\n"]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MOCK_USER_PROFILE_LINEAGE_RESPONSE = exports.MOCK_PAIR_PROFILES_RESPONSE = exports.MOCK_CUSTOMER_SERVICE_TOKEN_RESPONSE = exports.MOCK_OIDC_TOKEN_RESPONSE = exports.MOCK_SRP_LOGIN_RESPONSE = exports.MOCK_SIWE_LOGIN_RESPONSE = exports.MOCK_NONCE_RESPONSE = exports.MOCK_ACCESS_JWT = exports.MOCK_JWT = exports.MOCK_CUSTOMER_SERVICE_TOKEN_URL = exports.MOCK_PROFILE_LINEAGE_URL = exports.MOCK_PAIR_PROFILES_URL = exports.MOCK_PAIR_IDENTIFIERS_URL = exports.MOCK_SIWE_LOGIN_URL = exports.MOCK_OIDC_TOKEN_URL = exports.MOCK_SRP_LOGIN_URL = exports.MOCK_NONCE_URL = void 0;
|
|
4
|
+
const env_js_1 = require("../../shared/env.cjs");
|
|
5
|
+
const services_js_1 = require("../authentication-jwt-bearer/services.cjs");
|
|
6
|
+
exports.MOCK_NONCE_URL = (0, services_js_1.NONCE_URL)(env_js_1.Env.PRD);
|
|
7
|
+
exports.MOCK_SRP_LOGIN_URL = (0, services_js_1.SRP_LOGIN_URL)(env_js_1.Env.PRD);
|
|
8
|
+
exports.MOCK_OIDC_TOKEN_URL = (0, services_js_1.OIDC_TOKEN_URL)(env_js_1.Env.PRD);
|
|
9
|
+
exports.MOCK_SIWE_LOGIN_URL = (0, services_js_1.SIWE_LOGIN_URL)(env_js_1.Env.PRD);
|
|
10
|
+
exports.MOCK_PAIR_IDENTIFIERS_URL = (0, services_js_1.PAIR_IDENTIFIERS)(env_js_1.Env.PRD);
|
|
11
|
+
exports.MOCK_PAIR_PROFILES_URL = (0, services_js_1.PAIR_PROFILES_URL)(env_js_1.Env.PRD);
|
|
12
|
+
exports.MOCK_PROFILE_LINEAGE_URL = (0, services_js_1.PROFILE_LINEAGE_URL)(env_js_1.Env.PRD);
|
|
13
|
+
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d8641601Cb79a94FD872fE42d5b4a067A44a7e88',
|
|
19
|
+
expires_in: 300,
|
|
20
|
+
};
|
|
21
|
+
exports.MOCK_SIWE_LOGIN_RESPONSE = {
|
|
22
|
+
token: exports.MOCK_JWT,
|
|
23
|
+
expires_in: 3600,
|
|
24
|
+
profile: {
|
|
25
|
+
profile_id: 'fa2bbf82-bd9a-4e6b-aabc-9ca0d0319b6e',
|
|
26
|
+
metametrics_id: 'de742679-4960-4977-a415-4718b5f8e86c',
|
|
27
|
+
identifier_id: 'ec9a4e9906836497efad2fd4d4290b34d2c6a2c0d93eb174aa3cd88a133adbaf',
|
|
28
|
+
identifier_type: 'SIWE',
|
|
29
|
+
encrypted_storage_key: '2c6a2c0d93eb174aa3cd88a133adbaf',
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
exports.MOCK_SRP_LOGIN_RESPONSE = {
|
|
33
|
+
token: exports.MOCK_JWT,
|
|
34
|
+
expires_in: 3600,
|
|
35
|
+
profile: {
|
|
36
|
+
profile_id: 'f88227bd-b615-41a3-b0be-467dd781a4ad',
|
|
37
|
+
metametrics_id: '561ec651-a844-4b36-a451-04d6eac35740',
|
|
38
|
+
identifier_id: 'da9a9fc7b09edde9cc23cec9b7e11a71fb0ab4d2ddd8af8af905306f3e1456fb',
|
|
39
|
+
identifier_type: 'SRP',
|
|
40
|
+
encrypted_storage_key: 'd2ddd8af8af905306f3e1456fb',
|
|
41
|
+
},
|
|
42
|
+
profile_aliases: [],
|
|
43
|
+
};
|
|
44
|
+
exports.MOCK_OIDC_TOKEN_RESPONSE = {
|
|
45
|
+
access_token: exports.MOCK_ACCESS_JWT,
|
|
46
|
+
expires_in: 3600,
|
|
47
|
+
};
|
|
48
|
+
exports.MOCK_CUSTOMER_SERVICE_TOKEN_RESPONSE = {
|
|
49
|
+
access_token: exports.MOCK_ACCESS_JWT,
|
|
50
|
+
refresh_token: 'ory_rt_mock_refresh_token',
|
|
51
|
+
expires_in: 3600,
|
|
52
|
+
token_type: 'bearer',
|
|
53
|
+
};
|
|
54
|
+
exports.MOCK_PAIR_PROFILES_RESPONSE = {
|
|
55
|
+
profile: {
|
|
56
|
+
identifier_id: exports.MOCK_SRP_LOGIN_RESPONSE.profile.identifier_id,
|
|
57
|
+
metametrics_id: exports.MOCK_SRP_LOGIN_RESPONSE.profile.metametrics_id,
|
|
58
|
+
profile_id: exports.MOCK_SRP_LOGIN_RESPONSE.profile.profile_id,
|
|
59
|
+
},
|
|
60
|
+
profile_aliases: [],
|
|
61
|
+
};
|
|
62
|
+
exports.MOCK_USER_PROFILE_LINEAGE_RESPONSE = {
|
|
63
|
+
profile_id: 'f88227bd-b615-41a3-b0be-467dd781a4ad',
|
|
64
|
+
created_at: '2025-10-01T12:00:00Z',
|
|
65
|
+
lineage: [
|
|
66
|
+
{
|
|
67
|
+
metametrics_id: '561ec651-a844-4b36-a451-04d6eac35740',
|
|
68
|
+
agent: env_js_1.Platform.MOBILE,
|
|
69
|
+
created_at: '2025-10-01T12:00:00Z',
|
|
70
|
+
updated_at: '2025-10-01T12:00:00Z',
|
|
71
|
+
counter: 1,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
metametrics_id: 'de742679-4960-4977-a415-4718b5f8e86c',
|
|
75
|
+
agent: env_js_1.Platform.EXTENSION,
|
|
76
|
+
created_at: '2025-10-01T12:00:00Z',
|
|
77
|
+
updated_at: '2025-10-01T12:00:00Z',
|
|
78
|
+
counter: 2,
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=auth.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.cjs","sourceRoot":"","sources":["../../../src/sdk/mocks/auth.ts"],"names":[],"mappings":";;;AAAA,iDAAoD;AACpD,2EASkD;AAErC,QAAA,cAAc,GAAG,IAAA,uBAAS,EAAC,YAAG,CAAC,GAAG,CAAC,CAAC;AACpC,QAAA,kBAAkB,GAAG,IAAA,2BAAa,EA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YAAY,EAAE,uBAAe;IAC7B,UAAU,EAAE,IAAI;CACjB,CAAC;AAEW,QAAA,oCAAoC,GAAG;IAClD,YAAY,EAAE,uBAAe;IAC7B,aAAa,EAAE,2BAA2B;IAC1C,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,QAAQ;CACrB,CAAC;AAEW,QAAA,2BAA2B,GAAG;IACzC,OAAO,EAAE;QACP,aAAa,EAAE,+BAAuB,CAAC,OAAO,CAAC,aAAa;QAC5D,cAAc,EAAE,+BAAuB,CAAC,OAAO,CAAC,cAAc;QAC9D,UAAU,EAAE,+BAAuB,CAAC,OAAO,CAAC,UAAU;KACvD;IACD,eAAe,EAAE,EAAE;CACpB,CAAC;AAEW,QAAA,kCAAkC,GAAG;IAChD,UAAU,EAAE,sCAAsC;IAClD,UAAU,EAAE,sBAAsB;IAClC,OAAO,EAAE;QACP;YACE,cAAc,EAAE,sCAAsC;YACtD,KAAK,EAAE,iBAAQ,CAAC,MAAM;YACtB,UAAU,EAAE,sBAAsB;YAClC,UAAU,EAAE,sBAAsB;YAClC,OAAO,EAAE,CAAC;SACX;QACD;YACE,cAAc,EAAE,sCAAsC;YACtD,KAAK,EAAE,iBAAQ,CAAC,SAAS;YACzB,UAAU,EAAE,sBAAsB;YAClC,UAAU,EAAE,sBAAsB;YAClC,OAAO,EAAE,CAAC;SACX;KACF;CACF,CAAC","sourcesContent":["import { Env, Platform } from '../../shared/env.js';\nimport {\n NONCE_URL,\n SIWE_LOGIN_URL,\n SRP_LOGIN_URL,\n OIDC_TOKEN_URL,\n PAIR_IDENTIFIERS,\n PAIR_PROFILES_URL,\n PROFILE_LINEAGE_URL,\n CUSTOMER_SERVICE_TOKEN_URL,\n} from '../authentication-jwt-bearer/services.js';\n\nexport const MOCK_NONCE_URL = NONCE_URL(Env.PRD);\nexport const MOCK_SRP_LOGIN_URL = SRP_LOGIN_URL(Env.PRD);\nexport const MOCK_OIDC_TOKEN_URL = OIDC_TOKEN_URL(Env.PRD);\nexport const MOCK_SIWE_LOGIN_URL = SIWE_LOGIN_URL(Env.PRD);\nexport const MOCK_PAIR_IDENTIFIERS_URL = PAIR_IDENTIFIERS(Env.PRD);\nexport const MOCK_PAIR_PROFILES_URL = PAIR_PROFILES_URL(Env.PRD);\nexport const MOCK_PROFILE_LINEAGE_URL = PROFILE_LINEAGE_URL(Env.PRD);\nexport const MOCK_CUSTOMER_SERVICE_TOKEN_URL = CUSTOMER_SERVICE_TOKEN_URL(\n Env.PRD,\n);\n\nexport const MOCK_JWT =\n 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImIwNzE2N2U2LWJjNWUtNDgyZC1hNjRhLWU1MjQ0MjY2MGU3NyJ9.eyJzdWIiOiI1MzE0ODc5YWM2NDU1OGI3OTQ5ZmI4NWIzMjg2ZjZjNjUwODAzYmFiMTY0Y2QyOWNmMmM3YzdmMjMzMWMwZTRlIiwiaWF0IjoxNzA2MTEzMDYyLCJleHAiOjE3NjkxODUwNjMsImlzcyI6ImF1dGgubWV0YW1hc2suaW8iLCJhdWQiOiJwb3J0Zm9saW8ubWV0YW1hc2suaW8ifQ.E5UL6oABNweS8t5a6IBTqTf7NLOJbrhJSmEcsr7kwLp4bGvcENJzACwnsHDkA6PlzfDV09ZhAGU_F3hlS0j-erbY0k0AFR-GAtyS7E9N02D8RgUDz5oDR65CKmzM8JilgFA8UvruJ6OJGogroaOSOqzRES_s8MjHpP47RJ9lXrUesajsbOudXbuksXWg5QmWip6LLvjwr8UUzcJzNQilyIhiEpo4WdzWM4R3VtTwr4rHnWEvtYnYCov1jmI2w3YQ48y0M-3Y9IOO0ov_vlITRrOnR7Y7fRUGLUFmU5msD8mNWRywjQFLHfJJ1yNP5aJ8TkuCK3sC6kcUH335IVvukQ';\n\nexport const MOCK_ACCESS_JWT =\n 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJleHAiOjQxMDI0NDQ4MDB9.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c';\n\nexport const MOCK_NONCE_RESPONSE = {\n nonce: 'xGMm9SoihEKeAEfV',\n identifier: '0xd8641601Cb79a94FD872fE42d5b4a067A44a7e88',\n expires_in: 300,\n};\n\nexport const MOCK_SIWE_LOGIN_RESPONSE = {\n token: MOCK_JWT,\n expires_in: 3600,\n profile: {\n profile_id: 'fa2bbf82-bd9a-4e6b-aabc-9ca0d0319b6e',\n metametrics_id: 'de742679-4960-4977-a415-4718b5f8e86c',\n identifier_id:\n 'ec9a4e9906836497efad2fd4d4290b34d2c6a2c0d93eb174aa3cd88a133adbaf',\n identifier_type: 'SIWE',\n encrypted_storage_key: '2c6a2c0d93eb174aa3cd88a133adbaf',\n },\n};\n\nexport const MOCK_SRP_LOGIN_RESPONSE = {\n token: MOCK_JWT,\n expires_in: 3600,\n profile: {\n profile_id: 'f88227bd-b615-41a3-b0be-467dd781a4ad',\n metametrics_id: '561ec651-a844-4b36-a451-04d6eac35740',\n identifier_id:\n 'da9a9fc7b09edde9cc23cec9b7e11a71fb0ab4d2ddd8af8af905306f3e1456fb',\n identifier_type: 'SRP',\n encrypted_storage_key: 'd2ddd8af8af905306f3e1456fb',\n },\n profile_aliases: [],\n};\n\nexport const MOCK_OIDC_TOKEN_RESPONSE = {\n access_token: MOCK_ACCESS_JWT,\n expires_in: 3600,\n};\n\nexport const MOCK_CUSTOMER_SERVICE_TOKEN_RESPONSE = {\n access_token: MOCK_ACCESS_JWT,\n refresh_token: 'ory_rt_mock_refresh_token',\n expires_in: 3600,\n token_type: 'bearer',\n};\n\nexport const MOCK_PAIR_PROFILES_RESPONSE = {\n profile: {\n identifier_id: MOCK_SRP_LOGIN_RESPONSE.profile.identifier_id,\n metametrics_id: MOCK_SRP_LOGIN_RESPONSE.profile.metametrics_id,\n profile_id: MOCK_SRP_LOGIN_RESPONSE.profile.profile_id,\n },\n profile_aliases: [],\n};\n\nexport const MOCK_USER_PROFILE_LINEAGE_RESPONSE = {\n profile_id: 'f88227bd-b615-41a3-b0be-467dd781a4ad',\n created_at: '2025-10-01T12:00:00Z',\n lineage: [\n {\n metametrics_id: '561ec651-a844-4b36-a451-04d6eac35740',\n agent: Platform.MOBILE,\n created_at: '2025-10-01T12:00:00Z',\n updated_at: '2025-10-01T12:00:00Z',\n counter: 1,\n },\n {\n metametrics_id: 'de742679-4960-4977-a415-4718b5f8e86c',\n agent: Platform.EXTENSION,\n created_at: '2025-10-01T12:00:00Z',\n updated_at: '2025-10-01T12:00:00Z',\n counter: 2,\n },\n ],\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Platform } from
|
|
1
|
+
import { Platform } from "../../shared/env.cjs";
|
|
2
2
|
export declare const MOCK_NONCE_URL: string;
|
|
3
3
|
export declare const MOCK_SRP_LOGIN_URL: string;
|
|
4
4
|
export declare const MOCK_OIDC_TOKEN_URL: string;
|
|
@@ -66,4 +66,4 @@ export declare const MOCK_USER_PROFILE_LINEAGE_RESPONSE: {
|
|
|
66
66
|
counter: number;
|
|
67
67
|
}[];
|
|
68
68
|
};
|
|
69
|
-
//# sourceMappingURL=auth.d.
|
|
69
|
+
//# sourceMappingURL=auth.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.cts","sourceRoot":"","sources":["../../../src/sdk/mocks/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAE,6BAA4B;AAYpD,eAAO,MAAM,cAAc,QAAqB,CAAC;AACjD,eAAO,MAAM,kBAAkB,QAAyB,CAAC;AACzD,eAAO,MAAM,mBAAmB,QAA0B,CAAC;AAC3D,eAAO,MAAM,mBAAmB,QAA0B,CAAC;AAC3D,eAAO,MAAM,yBAAyB,QAA4B,CAAC;AACnE,eAAO,MAAM,sBAAsB,QAA6B,CAAC;AACjE,eAAO,MAAM,wBAAwB,QAA+B,CAAC;AACrE,eAAO,MAAM,+BAA+B,QAE3C,CAAC;AAEF,eAAO,MAAM,QAAQ,upBACioB,CAAC;AAEvpB,eAAO,MAAM,eAAe,sLACyJ,CAAC;AAEtL,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;CAWpC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;CAYnC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;CAGpC,CAAC;AAEF,eAAO,MAAM,oCAAoC;;;;;CAKhD,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;CAOvC,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;;;;;;;CAmB9C,CAAC"}
|