@metamask/profile-sync-controller 30.0.0 → 31.0.0
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 +19 -1
- package/dist/controllers/authentication/{AuthenticationController-method-action-types.d.mts → AuthenticationController-method-action-types.d.ts} +2 -2
- package/dist/controllers/authentication/AuthenticationController-method-action-types.d.ts.map +1 -0
- package/dist/controllers/authentication/{AuthenticationController-method-action-types.mjs → AuthenticationController-method-action-types.js} +1 -1
- package/dist/controllers/authentication/AuthenticationController-method-action-types.js.map +1 -0
- package/dist/controllers/authentication/{AuthenticationController.d.mts → AuthenticationController.d.ts} +10 -10
- package/dist/controllers/authentication/AuthenticationController.d.ts.map +1 -0
- package/dist/controllers/authentication/AuthenticationController.js +656 -0
- package/dist/controllers/authentication/AuthenticationController.js.map +1 -0
- package/dist/controllers/authentication/{index.d.cts → index.d.ts} +5 -5
- package/dist/controllers/authentication/index.d.ts.map +1 -0
- package/dist/controllers/authentication/index.js +6 -0
- package/dist/controllers/authentication/index.js.map +1 -0
- package/dist/controllers/authentication/mocks/index.d.ts +2 -0
- package/dist/controllers/authentication/mocks/index.d.ts.map +1 -0
- package/dist/controllers/authentication/mocks/index.js +2 -0
- package/dist/controllers/authentication/mocks/index.js.map +1 -0
- package/dist/controllers/authentication/mocks/{mockResponses.d.mts → mockResponses.d.ts} +1 -1
- package/dist/controllers/authentication/mocks/mockResponses.d.ts.map +1 -0
- package/dist/controllers/authentication/mocks/{mockResponses.mjs → mockResponses.js} +2 -2
- package/dist/controllers/authentication/mocks/mockResponses.js.map +1 -0
- package/dist/controllers/index.d.ts +3 -0
- package/dist/controllers/index.d.ts.map +1 -0
- package/dist/controllers/index.js +3 -0
- package/dist/controllers/index.js.map +1 -0
- package/dist/controllers/user-storage/{UserStorageController-method-action-types.d.mts → UserStorageController-method-action-types.d.ts} +2 -2
- package/dist/controllers/user-storage/UserStorageController-method-action-types.d.ts.map +1 -0
- package/dist/controllers/user-storage/{UserStorageController-method-action-types.mjs → UserStorageController-method-action-types.js} +1 -1
- package/dist/controllers/user-storage/UserStorageController-method-action-types.js.map +1 -0
- package/dist/controllers/user-storage/{UserStorageController.d.mts → UserStorageController.d.ts} +14 -14
- package/dist/controllers/user-storage/UserStorageController.d.ts.map +1 -0
- package/dist/controllers/user-storage/UserStorageController.js +429 -0
- package/dist/controllers/user-storage/UserStorageController.js.map +1 -0
- package/dist/controllers/user-storage/constants.d.ts +15 -0
- package/dist/controllers/user-storage/constants.d.ts.map +1 -0
- package/dist/controllers/user-storage/{constants.mjs → constants.js} +1 -1
- package/dist/controllers/user-storage/constants.js.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{constants.d.cts → constants.d.ts} +1 -1
- package/dist/controllers/user-storage/contact-syncing/constants.d.ts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{constants.mjs → constants.js} +1 -1
- package/dist/controllers/user-storage/contact-syncing/constants.js.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{controller-integration.d.cts → controller-integration.d.ts} +3 -3
- package/dist/controllers/user-storage/contact-syncing/controller-integration.d.ts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{controller-integration.mjs → controller-integration.js} +6 -6
- package/dist/controllers/user-storage/contact-syncing/controller-integration.js.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{setup-subscriptions.d.cts → setup-subscriptions.d.ts} +2 -2
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.ts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{setup-subscriptions.mjs → setup-subscriptions.js} +4 -4
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.js.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{sync-utils.d.cts → sync-utils.d.ts} +2 -2
- package/dist/controllers/user-storage/contact-syncing/sync-utils.d.ts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{sync-utils.mjs → sync-utils.js} +1 -1
- package/dist/controllers/user-storage/contact-syncing/sync-utils.js.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{types.d.mts → types.d.ts} +6 -6
- package/dist/controllers/user-storage/contact-syncing/types.d.ts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/types.js +2 -0
- package/dist/controllers/user-storage/contact-syncing/types.js.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{utils.d.mts → utils.d.ts} +3 -3
- package/dist/controllers/user-storage/contact-syncing/utils.d.ts.map +1 -0
- package/dist/controllers/user-storage/contact-syncing/{utils.mjs → utils.js} +2 -2
- package/dist/controllers/user-storage/contact-syncing/utils.js.map +1 -0
- package/dist/controllers/user-storage/{index.d.cts → index.d.ts} +8 -8
- package/dist/controllers/user-storage/index.d.ts.map +1 -0
- package/dist/controllers/user-storage/index.js +9 -0
- package/dist/controllers/user-storage/index.js.map +1 -0
- package/dist/controllers/user-storage/mocks/index.d.ts +3 -0
- package/dist/controllers/user-storage/mocks/index.d.ts.map +1 -0
- package/dist/controllers/user-storage/mocks/index.js +3 -0
- package/dist/controllers/user-storage/mocks/index.js.map +1 -0
- package/dist/controllers/user-storage/mocks/{mockResponses.d.mts → mockResponses.d.ts} +3 -3
- package/dist/controllers/user-storage/mocks/mockResponses.d.ts.map +1 -0
- package/dist/controllers/user-storage/mocks/{mockResponses.mjs → mockResponses.js} +4 -4
- package/dist/controllers/user-storage/mocks/mockResponses.js.map +1 -0
- package/dist/controllers/user-storage/mocks/{mockStorage.d.cts → mockStorage.d.ts} +1 -1
- package/dist/controllers/user-storage/mocks/mockStorage.d.ts.map +1 -0
- package/dist/controllers/user-storage/mocks/{mockStorage.mjs → mockStorage.js} +3 -3
- package/dist/controllers/user-storage/mocks/mockStorage.js.map +1 -0
- package/dist/controllers/user-storage/{types.d.cts → types.d.ts} +3 -3
- package/dist/controllers/user-storage/types.d.ts.map +1 -0
- package/dist/controllers/user-storage/types.js +2 -0
- package/dist/controllers/user-storage/types.js.map +1 -0
- package/dist/controllers/user-storage/{utils.d.cts → utils.d.ts} +1 -1
- package/dist/controllers/user-storage/utils.d.ts.map +1 -0
- package/dist/controllers/user-storage/{utils.mjs → utils.js} +1 -1
- package/dist/controllers/user-storage/utils.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/{flow-siwe.d.cts → flow-siwe.d.ts} +2 -2
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.ts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.js +99 -0
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.js.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/{flow-srp.d.mts → flow-srp.d.ts} +5 -5
- package/dist/sdk/authentication-jwt-bearer/flow-srp.d.ts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/flow-srp.js +258 -0
- package/dist/sdk/authentication-jwt-bearer/flow-srp.js.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/{services.d.cts → services.d.ts} +5 -5
- package/dist/sdk/authentication-jwt-bearer/services.d.ts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/{services.mjs → services.js} +6 -6
- package/dist/sdk/authentication-jwt-bearer/{services.cjs.map → services.js.map} +1 -1
- package/dist/sdk/authentication-jwt-bearer/{types.d.cts → types.d.ts} +2 -2
- package/dist/sdk/authentication-jwt-bearer/types.d.ts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/{types.mjs → types.js} +1 -1
- package/dist/sdk/authentication-jwt-bearer/types.js.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/utils/{identifier.d.cts → identifier.d.ts} +2 -2
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.ts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/utils/{identifier.mjs → identifier.js} +2 -2
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.js.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/utils/{time.d.cts → time.d.ts} +1 -1
- package/dist/sdk/authentication-jwt-bearer/utils/time.d.ts.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/utils/{time.mjs → time.js} +1 -1
- package/dist/sdk/authentication-jwt-bearer/utils/time.js.map +1 -0
- package/dist/sdk/{authentication.d.cts → authentication.d.ts} +9 -9
- package/dist/sdk/authentication.d.ts.map +1 -0
- package/dist/sdk/authentication.js +104 -0
- package/dist/sdk/authentication.js.map +1 -0
- package/dist/sdk/{constants.d.cts → constants.d.ts} +1 -1
- package/dist/sdk/constants.d.ts.map +1 -0
- package/dist/sdk/{constants.mjs → constants.js} +1 -1
- package/dist/sdk/constants.js.map +1 -0
- package/dist/sdk/{errors.d.cts → errors.d.ts} +1 -1
- package/dist/sdk/errors.d.ts.map +1 -0
- package/dist/sdk/{errors.mjs → errors.js} +5 -4
- package/dist/sdk/errors.js.map +1 -0
- package/dist/sdk/index.d.ts +8 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js +8 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/sdk/mocks/{auth.d.cts → auth.d.ts} +2 -2
- package/dist/sdk/mocks/auth.d.ts.map +1 -0
- package/dist/sdk/mocks/{auth.mjs → auth.js} +3 -3
- package/dist/sdk/mocks/auth.js.map +1 -0
- package/dist/sdk/mocks/{userstorage.d.cts → userstorage.d.ts} +1 -1
- package/dist/sdk/mocks/userstorage.d.ts.map +1 -0
- package/dist/sdk/mocks/{userstorage.mjs → userstorage.js} +5 -5
- package/dist/sdk/mocks/userstorage.js.map +1 -0
- package/dist/sdk/{user-storage.d.mts → user-storage.d.ts} +5 -5
- package/dist/sdk/user-storage.d.ts.map +1 -0
- package/dist/sdk/user-storage.js +364 -0
- package/dist/sdk/user-storage.js.map +1 -0
- package/dist/sdk/utils/{eip-6963-metamask-provider.d.cts → eip-6963-metamask-provider.d.ts} +2 -2
- package/dist/sdk/utils/eip-6963-metamask-provider.d.ts.map +1 -0
- package/dist/sdk/utils/{eip-6963-metamask-provider.mjs → eip-6963-metamask-provider.js} +1 -1
- package/dist/sdk/utils/eip-6963-metamask-provider.js.map +1 -0
- package/dist/sdk/utils/{messaging-signing-snap-requests.d.cts → messaging-signing-snap-requests.d.ts} +2 -2
- package/dist/sdk/utils/messaging-signing-snap-requests.d.ts.map +1 -0
- package/dist/sdk/utils/{messaging-signing-snap-requests.mjs → messaging-signing-snap-requests.js} +1 -1
- package/dist/sdk/utils/messaging-signing-snap-requests.js.map +1 -0
- package/dist/sdk/utils/{validate-login-response.d.mts → validate-login-response.d.ts} +2 -2
- package/dist/sdk/utils/validate-login-response.d.ts.map +1 -0
- package/dist/sdk/utils/{validate-login-response.mjs → validate-login-response.js} +1 -1
- package/dist/sdk/utils/validate-login-response.js.map +1 -0
- package/dist/sdk/utils/{validate-pair-response.d.cts → validate-pair-response.d.ts} +1 -1
- package/dist/sdk/utils/validate-pair-response.d.ts.map +1 -0
- package/dist/sdk/utils/{validate-pair-response.mjs → validate-pair-response.js} +1 -1
- package/dist/sdk/utils/validate-pair-response.js.map +1 -0
- package/dist/shared/encryption/{cache.d.cts → cache.d.ts} +1 -1
- package/dist/shared/encryption/cache.d.ts.map +1 -0
- package/dist/shared/encryption/{cache.mjs → cache.js} +4 -4
- package/dist/shared/encryption/cache.js.map +1 -0
- package/dist/shared/encryption/{constants.d.cts → constants.d.ts} +2 -2
- package/dist/shared/encryption/constants.d.ts.map +1 -0
- package/dist/shared/encryption/{constants.mjs → constants.js} +1 -1
- package/dist/shared/encryption/constants.js.map +1 -0
- package/dist/shared/encryption/{encryption.d.cts → encryption.d.ts} +3 -3
- package/dist/shared/encryption/encryption.d.ts.map +1 -0
- package/dist/shared/encryption/encryption.js +202 -0
- package/dist/shared/encryption/encryption.js.map +1 -0
- package/dist/shared/encryption/index.d.ts +5 -0
- package/dist/shared/encryption/index.d.ts.map +1 -0
- package/dist/shared/encryption/index.js +5 -0
- package/dist/shared/encryption/index.js.map +1 -0
- package/dist/shared/encryption/{utils.d.cts → utils.d.ts} +3 -3
- package/dist/shared/encryption/utils.d.ts.map +1 -0
- package/dist/shared/encryption/{utils.mjs → utils.js} +1 -1
- package/dist/shared/encryption/utils.js.map +1 -0
- package/dist/shared/{env.d.cts → env.d.ts} +1 -1
- package/dist/shared/env.d.ts.map +1 -0
- package/dist/shared/{env.mjs → env.js} +1 -1
- package/dist/shared/env.js.map +1 -0
- package/dist/shared/{storage-schema.d.mts → storage-schema.d.ts} +1 -1
- package/dist/shared/storage-schema.d.ts.map +1 -0
- package/dist/shared/{storage-schema.mjs → storage-schema.js} +2 -2
- package/dist/shared/storage-schema.js.map +1 -0
- package/dist/shared/types/{encryption.d.cts → encryption.d.ts} +1 -1
- package/dist/shared/types/encryption.d.ts.map +1 -0
- package/dist/shared/types/encryption.js +2 -0
- package/dist/shared/types/encryption.js.map +1 -0
- package/dist/shared/types/{services.d.cts → services.d.ts} +2 -2
- package/dist/shared/types/services.d.ts.map +1 -0
- package/dist/shared/types/services.js +2 -0
- package/dist/shared/types/services.js.map +1 -0
- package/dist/shared/utils/{entropy-source.d.cts → entropy-source.d.ts} +2 -2
- package/dist/shared/utils/entropy-source.d.ts.map +1 -0
- package/dist/shared/utils/{entropy-source.mjs → entropy-source.js} +2 -2
- package/dist/shared/utils/entropy-source.js.map +1 -0
- package/dist/shared/utils/{event-queue.d.cts → event-queue.d.ts} +1 -1
- package/dist/shared/utils/event-queue.d.ts.map +1 -0
- package/dist/shared/utils/{event-queue.mjs → event-queue.js} +2 -4
- package/dist/shared/utils/event-queue.js.map +1 -0
- package/dist/shared/utils/{hd-keyring-seed.d.mts → hd-keyring-seed.d.ts} +3 -3
- package/dist/shared/utils/hd-keyring-seed.d.ts.map +1 -0
- package/dist/shared/utils/{hd-keyring-seed.mjs → hd-keyring-seed.js} +1 -1
- package/dist/shared/utils/hd-keyring-seed.js.map +1 -0
- package/dist/shared/utils/{message-signing.d.mts → message-signing.d.ts} +1 -1
- package/dist/shared/utils/message-signing.d.ts.map +1 -0
- package/dist/shared/utils/{message-signing.mjs → message-signing.js} +7 -7
- package/dist/shared/utils/message-signing.js.map +1 -0
- package/package.json +29 -63
- package/dist/controllers/authentication/AuthenticationController-method-action-types.cjs +0 -7
- package/dist/controllers/authentication/AuthenticationController-method-action-types.cjs.map +0 -1
- package/dist/controllers/authentication/AuthenticationController-method-action-types.d.cts +0 -102
- package/dist/controllers/authentication/AuthenticationController-method-action-types.d.cts.map +0 -1
- package/dist/controllers/authentication/AuthenticationController-method-action-types.d.mts.map +0 -1
- package/dist/controllers/authentication/AuthenticationController-method-action-types.mjs.map +0 -1
- package/dist/controllers/authentication/AuthenticationController.cjs +0 -596
- package/dist/controllers/authentication/AuthenticationController.cjs.map +0 -1
- package/dist/controllers/authentication/AuthenticationController.d.cts +0 -149
- package/dist/controllers/authentication/AuthenticationController.d.cts.map +0 -1
- package/dist/controllers/authentication/AuthenticationController.d.mts.map +0 -1
- package/dist/controllers/authentication/AuthenticationController.mjs +0 -592
- package/dist/controllers/authentication/AuthenticationController.mjs.map +0 -1
- package/dist/controllers/authentication/index.cjs +0 -35
- package/dist/controllers/authentication/index.cjs.map +0 -1
- package/dist/controllers/authentication/index.d.cts.map +0 -1
- package/dist/controllers/authentication/index.d.mts +0 -7
- package/dist/controllers/authentication/index.d.mts.map +0 -1
- package/dist/controllers/authentication/index.mjs +0 -6
- package/dist/controllers/authentication/index.mjs.map +0 -1
- package/dist/controllers/authentication/mocks/index.cjs +0 -18
- package/dist/controllers/authentication/mocks/index.cjs.map +0 -1
- package/dist/controllers/authentication/mocks/index.d.cts +0 -2
- package/dist/controllers/authentication/mocks/index.d.cts.map +0 -1
- package/dist/controllers/authentication/mocks/index.d.mts +0 -2
- package/dist/controllers/authentication/mocks/index.d.mts.map +0 -1
- package/dist/controllers/authentication/mocks/index.mjs +0 -2
- package/dist/controllers/authentication/mocks/index.mjs.map +0 -1
- package/dist/controllers/authentication/mocks/mockResponses.cjs +0 -135
- package/dist/controllers/authentication/mocks/mockResponses.cjs.map +0 -1
- package/dist/controllers/authentication/mocks/mockResponses.d.cts +0 -69
- package/dist/controllers/authentication/mocks/mockResponses.d.cts.map +0 -1
- package/dist/controllers/authentication/mocks/mockResponses.d.mts.map +0 -1
- package/dist/controllers/authentication/mocks/mockResponses.mjs.map +0 -1
- package/dist/controllers/index.cjs +0 -29
- package/dist/controllers/index.cjs.map +0 -1
- package/dist/controllers/index.d.cts +0 -3
- package/dist/controllers/index.d.cts.map +0 -1
- package/dist/controllers/index.d.mts +0 -3
- package/dist/controllers/index.d.mts.map +0 -1
- package/dist/controllers/index.mjs +0 -3
- package/dist/controllers/index.mjs.map +0 -1
- package/dist/controllers/user-storage/UserStorageController-method-action-types.cjs +0 -7
- package/dist/controllers/user-storage/UserStorageController-method-action-types.cjs.map +0 -1
- package/dist/controllers/user-storage/UserStorageController-method-action-types.d.cts +0 -137
- package/dist/controllers/user-storage/UserStorageController-method-action-types.d.cts.map +0 -1
- package/dist/controllers/user-storage/UserStorageController-method-action-types.d.mts.map +0 -1
- package/dist/controllers/user-storage/UserStorageController-method-action-types.mjs.map +0 -1
- package/dist/controllers/user-storage/UserStorageController.cjs +0 -412
- package/dist/controllers/user-storage/UserStorageController.cjs.map +0 -1
- package/dist/controllers/user-storage/UserStorageController.d.cts +0 -182
- package/dist/controllers/user-storage/UserStorageController.d.cts.map +0 -1
- package/dist/controllers/user-storage/UserStorageController.d.mts.map +0 -1
- package/dist/controllers/user-storage/UserStorageController.mjs +0 -408
- package/dist/controllers/user-storage/UserStorageController.mjs.map +0 -1
- package/dist/controllers/user-storage/constants.cjs +0 -19
- package/dist/controllers/user-storage/constants.cjs.map +0 -1
- package/dist/controllers/user-storage/constants.d.cts +0 -15
- package/dist/controllers/user-storage/constants.d.cts.map +0 -1
- package/dist/controllers/user-storage/constants.d.mts +0 -15
- package/dist/controllers/user-storage/constants.d.mts.map +0 -1
- package/dist/controllers/user-storage/constants.mjs.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/constants.cjs +0 -12
- package/dist/controllers/user-storage/contact-syncing/constants.cjs.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/constants.d.cts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/constants.d.mts +0 -9
- package/dist/controllers/user-storage/contact-syncing/constants.d.mts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/constants.mjs.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/controller-integration.cjs +0 -346
- package/dist/controllers/user-storage/contact-syncing/controller-integration.cjs.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/controller-integration.d.cts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/controller-integration.d.mts +0 -47
- package/dist/controllers/user-storage/contact-syncing/controller-integration.d.mts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/controller-integration.mjs.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.cjs +0 -50
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.cjs.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.cts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.mts +0 -8
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.d.mts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/setup-subscriptions.mjs.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/sync-utils.cjs +0 -23
- package/dist/controllers/user-storage/contact-syncing/sync-utils.cjs.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/sync-utils.d.cts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/sync-utils.d.mts +0 -9
- package/dist/controllers/user-storage/contact-syncing/sync-utils.d.mts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/sync-utils.mjs.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/types.cjs +0 -3
- package/dist/controllers/user-storage/contact-syncing/types.cjs.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/types.d.cts +0 -37
- package/dist/controllers/user-storage/contact-syncing/types.d.cts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/types.d.mts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/types.mjs +0 -2
- package/dist/controllers/user-storage/contact-syncing/types.mjs.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/utils.cjs +0 -64
- package/dist/controllers/user-storage/contact-syncing/utils.cjs.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/utils.d.cts +0 -36
- package/dist/controllers/user-storage/contact-syncing/utils.d.cts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/utils.d.mts.map +0 -1
- package/dist/controllers/user-storage/contact-syncing/utils.mjs.map +0 -1
- package/dist/controllers/user-storage/index.cjs +0 -38
- package/dist/controllers/user-storage/index.cjs.map +0 -1
- package/dist/controllers/user-storage/index.d.cts.map +0 -1
- package/dist/controllers/user-storage/index.d.mts +0 -10
- package/dist/controllers/user-storage/index.d.mts.map +0 -1
- package/dist/controllers/user-storage/index.mjs +0 -9
- package/dist/controllers/user-storage/index.mjs.map +0 -1
- package/dist/controllers/user-storage/mocks/index.cjs +0 -19
- package/dist/controllers/user-storage/mocks/index.cjs.map +0 -1
- package/dist/controllers/user-storage/mocks/index.d.cts +0 -3
- package/dist/controllers/user-storage/mocks/index.d.cts.map +0 -1
- package/dist/controllers/user-storage/mocks/index.d.mts +0 -3
- package/dist/controllers/user-storage/mocks/index.d.mts.map +0 -1
- package/dist/controllers/user-storage/mocks/index.mjs +0 -3
- package/dist/controllers/user-storage/mocks/index.mjs.map +0 -1
- package/dist/controllers/user-storage/mocks/mockResponses.cjs +0 -113
- package/dist/controllers/user-storage/mocks/mockResponses.cjs.map +0 -1
- package/dist/controllers/user-storage/mocks/mockResponses.d.cts +0 -66
- package/dist/controllers/user-storage/mocks/mockResponses.d.cts.map +0 -1
- package/dist/controllers/user-storage/mocks/mockResponses.d.mts.map +0 -1
- package/dist/controllers/user-storage/mocks/mockResponses.mjs.map +0 -1
- package/dist/controllers/user-storage/mocks/mockStorage.cjs +0 -36
- package/dist/controllers/user-storage/mocks/mockStorage.cjs.map +0 -1
- package/dist/controllers/user-storage/mocks/mockStorage.d.cts.map +0 -1
- package/dist/controllers/user-storage/mocks/mockStorage.d.mts +0 -5
- package/dist/controllers/user-storage/mocks/mockStorage.d.mts.map +0 -1
- package/dist/controllers/user-storage/mocks/mockStorage.mjs.map +0 -1
- package/dist/controllers/user-storage/types.cjs +0 -3
- package/dist/controllers/user-storage/types.cjs.map +0 -1
- package/dist/controllers/user-storage/types.d.cts.map +0 -1
- package/dist/controllers/user-storage/types.d.mts +0 -23
- package/dist/controllers/user-storage/types.d.mts.map +0 -1
- package/dist/controllers/user-storage/types.mjs +0 -2
- package/dist/controllers/user-storage/types.mjs.map +0 -1
- package/dist/controllers/user-storage/utils.cjs +0 -32
- package/dist/controllers/user-storage/utils.cjs.map +0 -1
- package/dist/controllers/user-storage/utils.d.cts.map +0 -1
- package/dist/controllers/user-storage/utils.d.mts +0 -19
- package/dist/controllers/user-storage/utils.d.mts.map +0 -1
- package/dist/controllers/user-storage/utils.mjs.map +0 -1
- package/dist/index.cjs +0 -30
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -4
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts +0 -4
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs +0 -4
- package/dist/index.mjs.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.cjs +0 -114
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.cjs.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.cts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.mts +0 -25
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.d.mts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.mjs +0 -110
- package/dist/sdk/authentication-jwt-bearer/flow-siwe.mjs.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/flow-srp.cjs +0 -293
- package/dist/sdk/authentication-jwt-bearer/flow-srp.cjs.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/flow-srp.d.cts +0 -45
- package/dist/sdk/authentication-jwt-bearer/flow-srp.d.cts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/flow-srp.d.mts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/flow-srp.mjs +0 -266
- package/dist/sdk/authentication-jwt-bearer/flow-srp.mjs.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/services.cjs +0 -443
- package/dist/sdk/authentication-jwt-bearer/services.d.cts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/services.d.mts +0 -120
- package/dist/sdk/authentication-jwt-bearer/services.d.mts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/services.mjs.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/types.cjs +0 -12
- package/dist/sdk/authentication-jwt-bearer/types.cjs.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/types.d.cts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/types.d.mts +0 -133
- package/dist/sdk/authentication-jwt-bearer/types.d.mts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/types.mjs.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.cjs +0 -27
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.cjs.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.cts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.mts +0 -13
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.d.mts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/utils/identifier.mjs.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/utils/time.cjs +0 -17
- package/dist/sdk/authentication-jwt-bearer/utils/time.cjs.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/utils/time.d.cts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/utils/time.d.mts +0 -8
- package/dist/sdk/authentication-jwt-bearer/utils/time.d.mts.map +0 -1
- package/dist/sdk/authentication-jwt-bearer/utils/time.mjs.map +0 -1
- package/dist/sdk/authentication.cjs +0 -136
- package/dist/sdk/authentication.cjs.map +0 -1
- package/dist/sdk/authentication.d.cts.map +0 -1
- package/dist/sdk/authentication.d.mts +0 -39
- package/dist/sdk/authentication.d.mts.map +0 -1
- package/dist/sdk/authentication.mjs +0 -116
- package/dist/sdk/authentication.mjs.map +0 -1
- package/dist/sdk/constants.cjs +0 -8
- package/dist/sdk/constants.cjs.map +0 -1
- package/dist/sdk/constants.d.cts.map +0 -1
- package/dist/sdk/constants.d.mts +0 -5
- package/dist/sdk/constants.d.mts.map +0 -1
- package/dist/sdk/constants.mjs.map +0 -1
- package/dist/sdk/errors.cjs +0 -89
- package/dist/sdk/errors.cjs.map +0 -1
- package/dist/sdk/errors.d.cts.map +0 -1
- package/dist/sdk/errors.d.mts +0 -43
- package/dist/sdk/errors.d.mts.map +0 -1
- package/dist/sdk/errors.mjs.map +0 -1
- package/dist/sdk/index.cjs +0 -24
- package/dist/sdk/index.cjs.map +0 -1
- package/dist/sdk/index.d.cts +0 -8
- package/dist/sdk/index.d.cts.map +0 -1
- package/dist/sdk/index.d.mts +0 -8
- package/dist/sdk/index.d.mts.map +0 -1
- package/dist/sdk/index.mjs +0 -8
- package/dist/sdk/index.mjs.map +0 -1
- package/dist/sdk/mocks/auth.cjs +0 -93
- package/dist/sdk/mocks/auth.cjs.map +0 -1
- package/dist/sdk/mocks/auth.d.cts.map +0 -1
- package/dist/sdk/mocks/auth.d.mts +0 -80
- package/dist/sdk/mocks/auth.d.mts.map +0 -1
- package/dist/sdk/mocks/auth.mjs.map +0 -1
- package/dist/sdk/mocks/userstorage.cjs +0 -43
- package/dist/sdk/mocks/userstorage.cjs.map +0 -1
- package/dist/sdk/mocks/userstorage.d.cts.map +0 -1
- package/dist/sdk/mocks/userstorage.d.mts +0 -10
- package/dist/sdk/mocks/userstorage.d.mts.map +0 -1
- package/dist/sdk/mocks/userstorage.mjs.map +0 -1
- package/dist/sdk/user-storage.cjs +0 -386
- package/dist/sdk/user-storage.cjs.map +0 -1
- package/dist/sdk/user-storage.d.cts +0 -47
- package/dist/sdk/user-storage.d.cts.map +0 -1
- package/dist/sdk/user-storage.d.mts.map +0 -1
- package/dist/sdk/user-storage.mjs +0 -358
- package/dist/sdk/user-storage.mjs.map +0 -1
- package/dist/sdk/utils/eip-6963-metamask-provider.cjs +0 -70
- package/dist/sdk/utils/eip-6963-metamask-provider.cjs.map +0 -1
- package/dist/sdk/utils/eip-6963-metamask-provider.d.cts.map +0 -1
- package/dist/sdk/utils/eip-6963-metamask-provider.d.mts +0 -25
- package/dist/sdk/utils/eip-6963-metamask-provider.d.mts.map +0 -1
- package/dist/sdk/utils/eip-6963-metamask-provider.mjs.map +0 -1
- package/dist/sdk/utils/messaging-signing-snap-requests.cjs +0 -96
- package/dist/sdk/utils/messaging-signing-snap-requests.cjs.map +0 -1
- package/dist/sdk/utils/messaging-signing-snap-requests.d.cts.map +0 -1
- package/dist/sdk/utils/messaging-signing-snap-requests.d.mts +0 -41
- package/dist/sdk/utils/messaging-signing-snap-requests.d.mts.map +0 -1
- package/dist/sdk/utils/messaging-signing-snap-requests.mjs.map +0 -1
- package/dist/sdk/utils/validate-login-response.cjs +0 -49
- package/dist/sdk/utils/validate-login-response.cjs.map +0 -1
- package/dist/sdk/utils/validate-login-response.d.cts +0 -14
- package/dist/sdk/utils/validate-login-response.d.cts.map +0 -1
- package/dist/sdk/utils/validate-login-response.d.mts.map +0 -1
- package/dist/sdk/utils/validate-login-response.mjs.map +0 -1
- package/dist/sdk/utils/validate-pair-response.cjs +0 -29
- package/dist/sdk/utils/validate-pair-response.cjs.map +0 -1
- package/dist/sdk/utils/validate-pair-response.d.cts.map +0 -1
- package/dist/sdk/utils/validate-pair-response.d.mts +0 -26
- package/dist/sdk/utils/validate-pair-response.d.mts.map +0 -1
- package/dist/sdk/utils/validate-pair-response.mjs.map +0 -1
- package/dist/shared/encryption/cache.cjs +0 -77
- package/dist/shared/encryption/cache.cjs.map +0 -1
- package/dist/shared/encryption/cache.d.cts.map +0 -1
- package/dist/shared/encryption/cache.d.mts +0 -32
- package/dist/shared/encryption/cache.d.mts.map +0 -1
- package/dist/shared/encryption/cache.mjs.map +0 -1
- package/dist/shared/encryption/constants.cjs +0 -17
- package/dist/shared/encryption/constants.cjs.map +0 -1
- package/dist/shared/encryption/constants.d.cts.map +0 -1
- package/dist/shared/encryption/constants.d.mts +0 -9
- package/dist/shared/encryption/constants.d.mts.map +0 -1
- package/dist/shared/encryption/constants.mjs.map +0 -1
- package/dist/shared/encryption/encryption.cjs +0 -209
- package/dist/shared/encryption/encryption.cjs.map +0 -1
- package/dist/shared/encryption/encryption.d.cts.map +0 -1
- package/dist/shared/encryption/encryption.d.mts +0 -30
- package/dist/shared/encryption/encryption.d.mts.map +0 -1
- package/dist/shared/encryption/encryption.mjs +0 -205
- package/dist/shared/encryption/encryption.mjs.map +0 -1
- package/dist/shared/encryption/index.cjs +0 -25
- package/dist/shared/encryption/index.cjs.map +0 -1
- package/dist/shared/encryption/index.d.cts +0 -5
- package/dist/shared/encryption/index.d.cts.map +0 -1
- package/dist/shared/encryption/index.d.mts +0 -5
- package/dist/shared/encryption/index.d.mts.map +0 -1
- package/dist/shared/encryption/index.mjs +0 -5
- package/dist/shared/encryption/index.mjs.map +0 -1
- package/dist/shared/encryption/utils.cjs +0 -21
- package/dist/shared/encryption/utils.cjs.map +0 -1
- package/dist/shared/encryption/utils.d.cts.map +0 -1
- package/dist/shared/encryption/utils.d.mts +0 -5
- package/dist/shared/encryption/utils.d.mts.map +0 -1
- package/dist/shared/encryption/utils.mjs.map +0 -1
- package/dist/shared/env.cjs +0 -85
- package/dist/shared/env.cjs.map +0 -1
- package/dist/shared/env.d.cts.map +0 -1
- package/dist/shared/env.d.mts +0 -34
- package/dist/shared/env.d.mts.map +0 -1
- package/dist/shared/env.mjs.map +0 -1
- package/dist/shared/storage-schema.cjs +0 -42
- package/dist/shared/storage-schema.cjs.map +0 -1
- package/dist/shared/storage-schema.d.cts +0 -34
- package/dist/shared/storage-schema.d.cts.map +0 -1
- package/dist/shared/storage-schema.d.mts.map +0 -1
- package/dist/shared/storage-schema.mjs.map +0 -1
- package/dist/shared/types/encryption.cjs +0 -3
- package/dist/shared/types/encryption.cjs.map +0 -1
- package/dist/shared/types/encryption.d.cts.map +0 -1
- package/dist/shared/types/encryption.d.mts +0 -2
- package/dist/shared/types/encryption.d.mts.map +0 -1
- package/dist/shared/types/encryption.mjs +0 -2
- package/dist/shared/types/encryption.mjs.map +0 -1
- package/dist/shared/types/services.cjs +0 -3
- package/dist/shared/types/services.cjs.map +0 -1
- package/dist/shared/types/services.d.cts.map +0 -1
- package/dist/shared/types/services.d.mts +0 -17
- package/dist/shared/types/services.d.mts.map +0 -1
- package/dist/shared/types/services.mjs +0 -2
- package/dist/shared/types/services.mjs.map +0 -1
- package/dist/shared/utils/entropy-source.cjs +0 -37
- package/dist/shared/utils/entropy-source.cjs.map +0 -1
- package/dist/shared/utils/entropy-source.d.cts.map +0 -1
- package/dist/shared/utils/entropy-source.d.mts +0 -22
- package/dist/shared/utils/entropy-source.d.mts.map +0 -1
- package/dist/shared/utils/entropy-source.mjs.map +0 -1
- package/dist/shared/utils/event-queue.cjs +0 -24
- package/dist/shared/utils/event-queue.cjs.map +0 -1
- package/dist/shared/utils/event-queue.d.cts.map +0 -1
- package/dist/shared/utils/event-queue.d.mts +0 -6
- package/dist/shared/utils/event-queue.d.mts.map +0 -1
- package/dist/shared/utils/event-queue.mjs.map +0 -1
- package/dist/shared/utils/hd-keyring-seed.cjs +0 -49
- package/dist/shared/utils/hd-keyring-seed.cjs.map +0 -1
- package/dist/shared/utils/hd-keyring-seed.d.cts +0 -27
- package/dist/shared/utils/hd-keyring-seed.d.cts.map +0 -1
- package/dist/shared/utils/hd-keyring-seed.d.mts.map +0 -1
- package/dist/shared/utils/hd-keyring-seed.mjs.map +0 -1
- package/dist/shared/utils/message-signing.cjs +0 -147
- package/dist/shared/utils/message-signing.cjs.map +0 -1
- package/dist/shared/utils/message-signing.d.cts +0 -73
- package/dist/shared/utils/message-signing.d.cts.map +0 -1
- package/dist/shared/utils/message-signing.d.mts.map +0 -1
- package/dist/shared/utils/message-signing.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-signing.js","sourceRoot":"","sources":["../../../src/shared/utils/message-signing.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACL,MAAM,EACN,UAAU,EACV,WAAW,EACX,cAAc,EACd,UAAU,EACV,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,oCAAoC,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,aAA6B,CAAC;AAExD,MAAM,cAAc,GAAG,UAAU,CAAC;AAElC;;;;;;;GAOG;AACH,MAAM,iBAAiB,GAAG;IACxB,UAAU,EAAE,KAAK,EAAE,GAAe,EAAE,IAAgB,EAAuB,EAAE,CAC3E,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC;CAC1B,CAAC;AAEF;;;;;;;GAOG;AACH,SAAS,sBAAsB,CAAC,IAAgB;IAC9C,MAAM,KAAK,GAAwB,EAAE,CAAC;IACtC,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAElC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;QACvC,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QACzC,sCAAsC;QACtC,MAAM,SAAS,GAAG,CAAC,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;QAClD,KAAK,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,cAAc,GAAY,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EACzC,IAAI,EACJ,KAAK,EACL,IAAI,GAAG,EAAE,GAKV;IACC,MAAM,IAAI,GAAG,SAAS,CACpB,WAAW,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CACpE,CAAC;IACF,MAAM,sBAAsB,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAC;IAE5D,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,UAAU,CAAC,QAAQ,CAC9C;QACE,cAAc,EAAE;YACd,IAAI;YACJ,SAAS,iBAAiB,EAAE;YAC5B,GAAG,sBAAsB;SAC1B;QACD,KAAK,EAAE,WAAW;KACnB,EACD,iBAAiB,CAClB,CAAC;IAEF,MAAM,CAAC,UAAU,EAAE,iCAAiC,CAAC,CAAC;IACtD,OAAO,UAAU,CAAC,UAAU,CAAC,CAAC;AAChC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAClD,IAAgB,EAChB,IAAI,GAAG,EAAE;IAET,OAAO,oBAAoB,CAAC;QAC1B,IAAI;QACJ,KAAK,EAAE,uBAAuB;QAC9B,IAAI;KACL,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,IAAgB,EAChB,IAAI,GAAG,EAAE;IAET,MAAM,UAAU,GAAG,MAAM,8BAA8B,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpE,OAAO,UAAU,CAAC,SAAS,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC;AACxD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,gCAAgC,CACpD,OAAe,EACf,IAAgB,EAChB,IAAI,GAAG,EAAE;IAET,MAAM,UAAU,GAAG,MAAM,8BAA8B,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpE,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAC/B,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACrD,OAAO,KAAK,SAAS,CAAC,YAAY,EAAE,EAAE,CAAC;AACzC,CAAC","sourcesContent":["import type { HardenedBIP32Node } from '@metamask/key-tree';\nimport { SLIP10Node } from '@metamask/key-tree';\nimport {\n assert,\n bytesToHex,\n concatBytes,\n createDataView,\n hexToBytes,\n stringToBytes,\n} from '@metamask/utils';\nimport { secp256k1 } from '@noble/curves/secp256k1';\nimport { hmac } from '@noble/hashes/hmac';\nimport { sha256, sha512 } from '@noble/hashes/sha2';\nimport { keccak_256 as keccak256 } from '@noble/hashes/sha3';\n\n/**\n * Native SIP-6 message-signing helpers for AuthenticationController /\n * UserStorageController.\n *\n * These are intentional copies of the message-signing snap crypto path so auth\n * and user-storage can derive/sign without booting\n * `npm:@metamask/message-signing-snap`. Behavior must stay byte-identical to:\n *\n * - SIP-6 derivation:\n * `@metamask/snaps-rpc-methods` `deriveEntropyFromSeed` /\n * `getEntropyDerivationPath` / `getDerivationPathArray`\n * (https://github.com/MetaMask/snaps/blob/main/packages/snaps-rpc-methods/src/utils.ts)\n * - Magic constant:\n * `@metamask/snaps-utils` `SIP_6_MAGIC_VALUE`\n * - Pubkey + `metamask:…` signing:\n * `@metamask/message-signing-snap` `getPublicEntropyKey` /\n * `signMessageWithEntropyKey`\n * (https://github.com/MetaMask/message-signing-snap/blob/main/src/entropy-keys.ts)\n *\n * `deriveEntropyFromSeed` is not a public export of\n * `@metamask/snaps-rpc-methods` today (and no core package depends on that\n * package), so the SIP-6 math is vendored here rather than imported.\n */\n\n/**\n * Snap ID used as the SIP-6 `input` so derived keys match\n * `@metamask/message-signing-snap` (`snap_getEntropy` origin).\n */\nexport const MESSAGE_SIGNING_SNAP_ID = 'npm:@metamask/message-signing-snap';\n\n/**\n * Copy of `@metamask/snaps-utils` `SIP_6_MAGIC_VALUE`\n * (`0xd36e6170 - 0x80000000`).\n *\n * @see https://metamask.github.io/SIPs/SIPS/sip-6\n */\nconst SIP_6_MAGIC_VALUE = `1399742832'` as `${number}'`;\n\nconst HARDENED_VALUE = 0x80000000;\n\n/**\n * HMAC-SHA-512 for `@metamask/key-tree`.\n *\n * Passed into `SLIP10Node.fromSeed` so SIP-6 never uses Web Crypto.\n * `@metamask/key-tree` treats any `crypto.subtle` as complete and then HMAC\n * via `importKey` / `sign`. React Native only implements `digest`; its\n * SubtleCrypto cannot HMAC. Noble HMAC is byte-identical without SubtleCrypto.\n */\nconst NOBLE_HMAC_SHA512 = {\n hmacSha512: async (key: Uint8Array, data: Uint8Array): Promise<Uint8Array> =>\n hmac(sha512, key, data),\n};\n\n/**\n * Copy of `@metamask/snaps-rpc-methods` `getDerivationPathArray`.\n *\n * Maps a 32-byte hash to eight hardened BIP-32 indices for `@metamask/key-tree`.\n *\n * @param hash - 32-byte hash.\n * @returns Hardened BIP-32 path nodes.\n */\nfunction getDerivationPathArray(hash: Uint8Array): HardenedBIP32Node[] {\n const array: HardenedBIP32Node[] = [];\n const view = createDataView(hash);\n\n for (let index = 0; index < 8; index++) {\n const uint32 = view.getUint32(index * 4);\n // eslint-disable-next-line no-bitwise\n const pathIndex = (uint32 | HARDENED_VALUE) >>> 0;\n array.push(`bip32:${pathIndex - HARDENED_VALUE}'` as const);\n }\n\n return array;\n}\n\n/**\n * Copy of `@metamask/snaps-rpc-methods` `deriveEntropyFromSeed` (SIP-6),\n * returning raw private-key bytes instead of a `0x`-prefixed hex string.\n *\n * @param options - Derivation options.\n * @param options.seed - BIP-39 mnemonic seed.\n * @param options.input - SIP-6 input (snap ID for `snap_getEntropy`).\n * @param options.salt - Optional salt. Internal auth uses `''`.\n * @returns 32-byte private key.\n */\nexport async function deriveSip6PrivateKey({\n seed,\n input,\n salt = '',\n}: {\n seed: Uint8Array;\n input: string;\n salt?: string;\n}): Promise<Uint8Array> {\n const hash = keccak256(\n concatBytes([stringToBytes(input), keccak256(stringToBytes(salt))]),\n );\n const computedDerivationPath = getDerivationPathArray(hash);\n\n const { privateKey } = await SLIP10Node.fromSeed(\n {\n derivationPath: [\n seed,\n `bip32:${SIP_6_MAGIC_VALUE}`,\n ...computedDerivationPath,\n ],\n curve: 'secp256k1',\n },\n NOBLE_HMAC_SHA512,\n );\n\n assert(privateKey, 'Failed to derive SIP-6 entropy.');\n return hexToBytes(privateKey);\n}\n\n/**\n * Derives the message-signing private key via SIP-6, matching\n * `snap_getEntropy` for the message-signing snap with empty salt\n * (internal `metamask` origin).\n *\n * @param seed - BIP-39 mnemonic seed from an HD keyring.\n * @param salt - Optional SIP-6 salt. Auth / user-storage use `''`.\n * @returns 32-byte private key.\n */\nexport async function deriveMessageSigningPrivateKey(\n seed: Uint8Array,\n salt = '',\n): Promise<Uint8Array> {\n return deriveSip6PrivateKey({\n seed,\n input: MESSAGE_SIGNING_SNAP_ID,\n salt,\n });\n}\n\n/**\n * Copy of message-signing-snap `getPublicEntropyKey`: secp256k1 pubkey hex\n * for the SIP-6 message-signing private key.\n *\n * @param seed - BIP-39 mnemonic seed from an HD keyring.\n * @param salt - Optional SIP-6 salt. Auth / user-storage use `''`.\n * @returns Public key hex with `0x` prefix.\n */\nexport async function getMessageSigningPublicKey(\n seed: Uint8Array,\n salt = '',\n): Promise<string> {\n const privateKey = await deriveMessageSigningPrivateKey(seed, salt);\n return bytesToHex(secp256k1.getPublicKey(privateKey));\n}\n\n/**\n * Copy of message-signing-snap `signMessageWithEntropyKey`: sha256(message)\n * then compact secp256k1 signature.\n *\n * @param message - Message to sign (must be validated by the caller).\n * @param seed - BIP-39 mnemonic seed from an HD keyring.\n * @param salt - Optional SIP-6 salt. Auth / user-storage use `''`.\n * @returns Compact secp256k1 signature hex with `0x` prefix.\n */\nexport async function signMessageWithMessageSigningKey(\n message: string,\n seed: Uint8Array,\n salt = '',\n): Promise<string> {\n const privateKey = await deriveMessageSigningPrivateKey(seed, salt);\n const digest = sha256(message);\n const signature = secp256k1.sign(digest, privateKey);\n return `0x${signature.toCompactHex()}`;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/profile-sync-controller",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "31.0.0",
|
|
4
4
|
"description": "The profile sync helps developers synchronize data across multiple clients and devices in a privacy-preserving way. All data saved in the user storage database is encrypted client-side to preserve privacy. The user storage provides a modular design, giving developers the flexibility to construct and manage their storage spaces in a way that best suits their needs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Ethereum",
|
|
@@ -21,69 +21,32 @@
|
|
|
21
21
|
"user-storage/",
|
|
22
22
|
"sdk/"
|
|
23
23
|
],
|
|
24
|
+
"type": "module",
|
|
24
25
|
"sideEffects": false,
|
|
25
|
-
"main": "./dist/index.cjs",
|
|
26
|
-
"types": "./dist/index.d.cts",
|
|
27
26
|
"exports": {
|
|
28
27
|
".": {
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
"default": "./dist/index.mjs"
|
|
32
|
-
},
|
|
33
|
-
"require": {
|
|
34
|
-
"types": "./dist/index.d.cts",
|
|
35
|
-
"default": "./dist/index.cjs"
|
|
36
|
-
}
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"default": "./dist/index.js"
|
|
37
30
|
},
|
|
38
31
|
"./sdk": {
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
"default": "./dist/sdk/index.mjs"
|
|
42
|
-
},
|
|
43
|
-
"require": {
|
|
44
|
-
"types": "./dist/sdk/index.d.cts",
|
|
45
|
-
"default": "./dist/sdk/index.cjs"
|
|
46
|
-
}
|
|
32
|
+
"types": "./dist/sdk/index.d.ts",
|
|
33
|
+
"default": "./dist/sdk/index.js"
|
|
47
34
|
},
|
|
48
35
|
"./auth": {
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
"default": "./dist/controllers/authentication/index.mjs"
|
|
52
|
-
},
|
|
53
|
-
"require": {
|
|
54
|
-
"types": "./dist/controllers/authentication/index.d.cts",
|
|
55
|
-
"default": "./dist/controllers/authentication/index.cjs"
|
|
56
|
-
}
|
|
36
|
+
"types": "./dist/controllers/authentication/index.d.ts",
|
|
37
|
+
"default": "./dist/controllers/authentication/index.js"
|
|
57
38
|
},
|
|
58
39
|
"./auth/mocks": {
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
"default": "./dist/controllers/authentication/mocks/index.mjs"
|
|
62
|
-
},
|
|
63
|
-
"require": {
|
|
64
|
-
"types": "./dist/controllers/authentication/mocks/index.d.cts",
|
|
65
|
-
"default": "./dist/controllers/authentication/mocks/index.cjs"
|
|
66
|
-
}
|
|
40
|
+
"types": "./dist/controllers/authentication/mocks/index.d.ts",
|
|
41
|
+
"default": "./dist/controllers/authentication/mocks/index.js"
|
|
67
42
|
},
|
|
68
43
|
"./user-storage": {
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
"default": "./dist/controllers/user-storage/index.mjs"
|
|
72
|
-
},
|
|
73
|
-
"require": {
|
|
74
|
-
"types": "./dist/controllers/user-storage/index.d.cts",
|
|
75
|
-
"default": "./dist/controllers/user-storage/index.cjs"
|
|
76
|
-
}
|
|
44
|
+
"types": "./dist/controllers/user-storage/index.d.ts",
|
|
45
|
+
"default": "./dist/controllers/user-storage/index.js"
|
|
77
46
|
},
|
|
78
47
|
"./user-storage/mocks": {
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
"default": "./dist/controllers/user-storage/mocks/index.mjs"
|
|
82
|
-
},
|
|
83
|
-
"require": {
|
|
84
|
-
"types": "./dist/controllers/user-storage/mocks/index.d.cts",
|
|
85
|
-
"default": "./dist/controllers/user-storage/mocks/index.cjs"
|
|
86
|
-
}
|
|
48
|
+
"types": "./dist/controllers/user-storage/mocks/index.d.ts",
|
|
49
|
+
"default": "./dist/controllers/user-storage/mocks/index.js"
|
|
87
50
|
},
|
|
88
51
|
"./package.json": "./package.json"
|
|
89
52
|
},
|
|
@@ -92,9 +55,11 @@
|
|
|
92
55
|
"registry": "https://registry.npmjs.org/"
|
|
93
56
|
},
|
|
94
57
|
"scripts": {
|
|
95
|
-
"build": "
|
|
96
|
-
"build:all": "
|
|
58
|
+
"build": "tsc --project tsconfig.build.json",
|
|
59
|
+
"build:all": "tsc --build tsconfig.build.json --verbose",
|
|
60
|
+
"build:clean": "yarn build:only-clean && yarn build",
|
|
97
61
|
"build:docs": "typedoc",
|
|
62
|
+
"build:only-clean": "rimraf './dist' './tsconfig.build.tsbuildinfo'",
|
|
98
63
|
"changelog:update": "../../scripts/update-changelog.sh @metamask/profile-sync-controller",
|
|
99
64
|
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/profile-sync-controller",
|
|
100
65
|
"lint:tsconfigs": "tsx ../../scripts/lint-tsconfigs/lint-tsconfigs.mts",
|
|
@@ -108,19 +73,19 @@
|
|
|
108
73
|
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
|
|
109
74
|
},
|
|
110
75
|
"dependencies": {
|
|
111
|
-
"@metamask/address-book-controller": "^
|
|
112
|
-
"@metamask/base-controller": "^
|
|
76
|
+
"@metamask/address-book-controller": "^8.0.0",
|
|
77
|
+
"@metamask/base-controller": "^10.0.0",
|
|
113
78
|
"@metamask/key-tree": "^10.1.1",
|
|
114
|
-
"@metamask/keyring-controller": "^
|
|
115
|
-
"@metamask/messenger": "^
|
|
116
|
-
"@metamask/seedless-onboarding-controller": "^
|
|
79
|
+
"@metamask/keyring-controller": "^28.0.0",
|
|
80
|
+
"@metamask/messenger": "^3.0.0",
|
|
81
|
+
"@metamask/seedless-onboarding-controller": "^11.0.0",
|
|
117
82
|
"@metamask/utils": "^11.12.0",
|
|
118
83
|
"@noble/ciphers": "^1.3.0",
|
|
119
84
|
"@noble/curves": "^1.9.2",
|
|
120
85
|
"@noble/hashes": "^1.8.0",
|
|
86
|
+
"@signinwithethereum/siwe": "^4.2.1",
|
|
121
87
|
"immer": "^9.0.6",
|
|
122
|
-
"loglevel": "^1.8.1"
|
|
123
|
-
"siwe": "^2.3.2"
|
|
88
|
+
"loglevel": "^1.8.1"
|
|
124
89
|
},
|
|
125
90
|
"devDependencies": {
|
|
126
91
|
"@lavamoat/allow-scripts": "^3.0.4",
|
|
@@ -130,18 +95,19 @@
|
|
|
130
95
|
"@metamask/keyring-api": "^24.0.0",
|
|
131
96
|
"@metamask/keyring-internal-api": "^12.0.0",
|
|
132
97
|
"@metamask/providers": "^22.1.0",
|
|
133
|
-
"@ts-bridge/cli": "^0.6.4",
|
|
134
98
|
"@types/jest": "^30.0.0",
|
|
99
|
+
"@typescript/native": "npm:typescript@^7.0.2",
|
|
135
100
|
"deepmerge": "^4.2.2",
|
|
136
101
|
"ethers": "^6.12.0",
|
|
137
102
|
"jest": "^30.4.2",
|
|
138
103
|
"jest-environment-jsdom": "^30.4.1",
|
|
139
104
|
"nock": "^13.3.1",
|
|
105
|
+
"rimraf": "^5.0.5",
|
|
140
106
|
"ts-jest": "^29.4.11",
|
|
141
107
|
"tsx": "^4.20.5",
|
|
142
108
|
"typedoc": "^0.25.13",
|
|
143
109
|
"typedoc-plugin-missing-exports": "^2.0.0",
|
|
144
|
-
"typescript": "
|
|
110
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
145
111
|
"webextension-polyfill": "^0.12.0"
|
|
146
112
|
},
|
|
147
113
|
"peerDependencies": {
|
|
@@ -149,7 +115,7 @@
|
|
|
149
115
|
"webextension-polyfill": "^0.10.0 || ^0.11.0 || ^0.12.0"
|
|
150
116
|
},
|
|
151
117
|
"engines": {
|
|
152
|
-
"node": "^
|
|
118
|
+
"node": "^22.14.0 || ^24"
|
|
153
119
|
},
|
|
154
120
|
"lavamoat": {
|
|
155
121
|
"allowScripts": {}
|
package/dist/controllers/authentication/AuthenticationController-method-action-types.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationController-method-action-types.cjs","sourceRoot":"","sources":["../../../src/controllers/authentication/AuthenticationController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AuthenticationController } from './AuthenticationController.js';\n\nexport type AuthenticationControllerPerformSignInAction = {\n type: `AuthenticationController:performSignIn`;\n handler: AuthenticationController['performSignIn'];\n};\n\n/**\n * Marks profile pairing as needed. Clients call this when the SRP set\n * changes (e.g. a new keyring was added) so the next auto-sign-in cycle\n * re-runs `performSignIn` and re-pairs.\n */\nexport type AuthenticationControllerRequestProfilePairingAction = {\n type: `AuthenticationController:requestProfilePairing`;\n handler: AuthenticationController['requestProfilePairing'];\n};\n\nexport type AuthenticationControllerPerformSignOutAction = {\n type: `AuthenticationController:performSignOut`;\n handler: AuthenticationController['performSignOut'];\n};\n\n/**\n * Returns a bearer token for the specified SRP, logging in if needed.\n *\n * When called without `entropySourceId`, returns the primary (first) SRP's\n * access token, which is effectively the canonical\n * profile's token that can be used by alias-aware consumers for cross-SRP\n * operations.\n *\n * @param entropySourceId - The entropy source ID. Omit for the primary SRP.\n * @returns The OIDC access token.\n */\nexport type AuthenticationControllerGetBearerTokenAction = {\n type: `AuthenticationController:getBearerToken`;\n handler: AuthenticationController['getBearerToken'];\n};\n\n/**\n * Returns the cached session profile, logging in if no session exists.\n *\n * The returned `canonicalProfileId` reflects the value from the most recent\n * login or pairing. In the rare event where a canonical changed because of\n * a pairing that happened on another device, the cached value may be stale\n * until the next login. For guaranteed freshness, call\n * `refreshCanonicalProfileId()` before reading `canonicalProfileId`.\n *\n * @param entropySourceId - The entropy source ID used to derive the key,\n * when multiple sources are available (Multi-SRP).\n * @returns profile for the session.\n */\nexport type AuthenticationControllerGetSessionProfileAction = {\n type: `AuthenticationController:getSessionProfile`;\n handler: AuthenticationController['getSessionProfile'];\n};\n\n/**\n * Forces a fresh retrieval of the canonical profile ID from the server\n * and propagates it to all cached SRP sessions.\n *\n * This method invalidates the primary SRP's cached session and forces a\n * re-login. Use it before operations that require a guaranteed-fresh\n * canonical (e.g. storage key derivation for Accounts ADR 0005). For\n * best-effort reads, use\n * `getSessionProfile().canonicalProfileId` instead.\n *\n * Only the primary SRP is re-logged-in regardless of how many SRPs exist —\n * the server returns the current canonical for the entire pairing group\n * from any single SRP login.\n *\n * @returns The refreshed canonical profile ID.\n */\nexport type AuthenticationControllerRefreshCanonicalProfileIdAction = {\n type: `AuthenticationController:refreshCanonicalProfileId`;\n handler: AuthenticationController['refreshCanonicalProfileId'];\n};\n\nexport type AuthenticationControllerGetUserProfileLineageAction = {\n type: `AuthenticationController:getUserProfileLineage`;\n handler: AuthenticationController['getUserProfileLineage'];\n};\n\n/**\n * Returns a Customer Service specific access token for the specified SRP,\n * logging in if needed.\n *\n * Exchanges the OIDC access token for a short-lived token scoped to the\n * customer-service audience. Customer Service tooling consumes this token to\n * identify and authenticate the user.\n *\n * @param entropySourceId - The entropy source ID. Omit for the primary SRP.\n * @returns The customer-service access token.\n */\nexport type AuthenticationControllerGetCustomerServiceTokenAction = {\n type: `AuthenticationController:getCustomerServiceToken`;\n handler: AuthenticationController['getCustomerServiceToken'];\n};\n\nexport type AuthenticationControllerIsSignedInAction = {\n type: `AuthenticationController:isSignedIn`;\n handler: AuthenticationController['isSignedIn'];\n};\n\n/**\n * Union of all AuthenticationController action types.\n */\nexport type AuthenticationControllerMethodActions =\n | AuthenticationControllerPerformSignInAction\n | AuthenticationControllerRequestProfilePairingAction\n | AuthenticationControllerPerformSignOutAction\n | AuthenticationControllerGetBearerTokenAction\n | AuthenticationControllerGetSessionProfileAction\n | AuthenticationControllerRefreshCanonicalProfileIdAction\n | AuthenticationControllerGetUserProfileLineageAction\n | AuthenticationControllerGetCustomerServiceTokenAction\n | AuthenticationControllerIsSignedInAction;\n"]}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is auto generated.
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
*/
|
|
5
|
-
import type { AuthenticationController } from "./AuthenticationController.cjs";
|
|
6
|
-
export type AuthenticationControllerPerformSignInAction = {
|
|
7
|
-
type: `AuthenticationController:performSignIn`;
|
|
8
|
-
handler: AuthenticationController['performSignIn'];
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Marks profile pairing as needed. Clients call this when the SRP set
|
|
12
|
-
* changes (e.g. a new keyring was added) so the next auto-sign-in cycle
|
|
13
|
-
* re-runs `performSignIn` and re-pairs.
|
|
14
|
-
*/
|
|
15
|
-
export type AuthenticationControllerRequestProfilePairingAction = {
|
|
16
|
-
type: `AuthenticationController:requestProfilePairing`;
|
|
17
|
-
handler: AuthenticationController['requestProfilePairing'];
|
|
18
|
-
};
|
|
19
|
-
export type AuthenticationControllerPerformSignOutAction = {
|
|
20
|
-
type: `AuthenticationController:performSignOut`;
|
|
21
|
-
handler: AuthenticationController['performSignOut'];
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Returns a bearer token for the specified SRP, logging in if needed.
|
|
25
|
-
*
|
|
26
|
-
* When called without `entropySourceId`, returns the primary (first) SRP's
|
|
27
|
-
* access token, which is effectively the canonical
|
|
28
|
-
* profile's token that can be used by alias-aware consumers for cross-SRP
|
|
29
|
-
* operations.
|
|
30
|
-
*
|
|
31
|
-
* @param entropySourceId - The entropy source ID. Omit for the primary SRP.
|
|
32
|
-
* @returns The OIDC access token.
|
|
33
|
-
*/
|
|
34
|
-
export type AuthenticationControllerGetBearerTokenAction = {
|
|
35
|
-
type: `AuthenticationController:getBearerToken`;
|
|
36
|
-
handler: AuthenticationController['getBearerToken'];
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Returns the cached session profile, logging in if no session exists.
|
|
40
|
-
*
|
|
41
|
-
* The returned `canonicalProfileId` reflects the value from the most recent
|
|
42
|
-
* login or pairing. In the rare event where a canonical changed because of
|
|
43
|
-
* a pairing that happened on another device, the cached value may be stale
|
|
44
|
-
* until the next login. For guaranteed freshness, call
|
|
45
|
-
* `refreshCanonicalProfileId()` before reading `canonicalProfileId`.
|
|
46
|
-
*
|
|
47
|
-
* @param entropySourceId - The entropy source ID used to derive the key,
|
|
48
|
-
* when multiple sources are available (Multi-SRP).
|
|
49
|
-
* @returns profile for the session.
|
|
50
|
-
*/
|
|
51
|
-
export type AuthenticationControllerGetSessionProfileAction = {
|
|
52
|
-
type: `AuthenticationController:getSessionProfile`;
|
|
53
|
-
handler: AuthenticationController['getSessionProfile'];
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Forces a fresh retrieval of the canonical profile ID from the server
|
|
57
|
-
* and propagates it to all cached SRP sessions.
|
|
58
|
-
*
|
|
59
|
-
* This method invalidates the primary SRP's cached session and forces a
|
|
60
|
-
* re-login. Use it before operations that require a guaranteed-fresh
|
|
61
|
-
* canonical (e.g. storage key derivation for Accounts ADR 0005). For
|
|
62
|
-
* best-effort reads, use
|
|
63
|
-
* `getSessionProfile().canonicalProfileId` instead.
|
|
64
|
-
*
|
|
65
|
-
* Only the primary SRP is re-logged-in regardless of how many SRPs exist —
|
|
66
|
-
* the server returns the current canonical for the entire pairing group
|
|
67
|
-
* from any single SRP login.
|
|
68
|
-
*
|
|
69
|
-
* @returns The refreshed canonical profile ID.
|
|
70
|
-
*/
|
|
71
|
-
export type AuthenticationControllerRefreshCanonicalProfileIdAction = {
|
|
72
|
-
type: `AuthenticationController:refreshCanonicalProfileId`;
|
|
73
|
-
handler: AuthenticationController['refreshCanonicalProfileId'];
|
|
74
|
-
};
|
|
75
|
-
export type AuthenticationControllerGetUserProfileLineageAction = {
|
|
76
|
-
type: `AuthenticationController:getUserProfileLineage`;
|
|
77
|
-
handler: AuthenticationController['getUserProfileLineage'];
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* Returns a Customer Service specific access token for the specified SRP,
|
|
81
|
-
* logging in if needed.
|
|
82
|
-
*
|
|
83
|
-
* Exchanges the OIDC access token for a short-lived token scoped to the
|
|
84
|
-
* customer-service audience. Customer Service tooling consumes this token to
|
|
85
|
-
* identify and authenticate the user.
|
|
86
|
-
*
|
|
87
|
-
* @param entropySourceId - The entropy source ID. Omit for the primary SRP.
|
|
88
|
-
* @returns The customer-service access token.
|
|
89
|
-
*/
|
|
90
|
-
export type AuthenticationControllerGetCustomerServiceTokenAction = {
|
|
91
|
-
type: `AuthenticationController:getCustomerServiceToken`;
|
|
92
|
-
handler: AuthenticationController['getCustomerServiceToken'];
|
|
93
|
-
};
|
|
94
|
-
export type AuthenticationControllerIsSignedInAction = {
|
|
95
|
-
type: `AuthenticationController:isSignedIn`;
|
|
96
|
-
handler: AuthenticationController['isSignedIn'];
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* Union of all AuthenticationController action types.
|
|
100
|
-
*/
|
|
101
|
-
export type AuthenticationControllerMethodActions = AuthenticationControllerPerformSignInAction | AuthenticationControllerRequestProfilePairingAction | AuthenticationControllerPerformSignOutAction | AuthenticationControllerGetBearerTokenAction | AuthenticationControllerGetSessionProfileAction | AuthenticationControllerRefreshCanonicalProfileIdAction | AuthenticationControllerGetUserProfileLineageAction | AuthenticationControllerGetCustomerServiceTokenAction | AuthenticationControllerIsSignedInAction;
|
|
102
|
-
//# sourceMappingURL=AuthenticationController-method-action-types.d.cts.map
|
package/dist/controllers/authentication/AuthenticationController-method-action-types.d.cts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationController-method-action-types.d.cts","sourceRoot":"","sources":["../../../src/controllers/authentication/AuthenticationController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAsC;AAE9E,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,wBAAwB,CAAC,eAAe,CAAC,CAAC;CACpD,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,mDAAmD,GAAG;IAChE,IAAI,EAAE,gDAAgD,CAAC;IACvD,OAAO,EAAE,wBAAwB,CAAC,uBAAuB,CAAC,CAAC;CAC5D,CAAC;AAEF,MAAM,MAAM,4CAA4C,GAAG;IACzD,IAAI,EAAE,yCAAyC,CAAC;IAChD,OAAO,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;CACrD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,4CAA4C,GAAG;IACzD,IAAI,EAAE,yCAAyC,CAAC;IAChD,OAAO,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;CACrD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,+CAA+C,GAAG;IAC5D,IAAI,EAAE,4CAA4C,CAAC;IACnD,OAAO,EAAE,wBAAwB,CAAC,mBAAmB,CAAC,CAAC;CACxD,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,uDAAuD,GAAG;IACpE,IAAI,EAAE,oDAAoD,CAAC;IAC3D,OAAO,EAAE,wBAAwB,CAAC,2BAA2B,CAAC,CAAC;CAChE,CAAC;AAEF,MAAM,MAAM,mDAAmD,GAAG;IAChE,IAAI,EAAE,gDAAgD,CAAC;IACvD,OAAO,EAAE,wBAAwB,CAAC,uBAAuB,CAAC,CAAC;CAC5D,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,qDAAqD,GAAG;IAClE,IAAI,EAAE,kDAAkD,CAAC;IACzD,OAAO,EAAE,wBAAwB,CAAC,yBAAyB,CAAC,CAAC;CAC9D,CAAC;AAEF,MAAM,MAAM,wCAAwC,GAAG;IACrD,IAAI,EAAE,qCAAqC,CAAC;IAC5C,OAAO,EAAE,wBAAwB,CAAC,YAAY,CAAC,CAAC;CACjD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAC7C,2CAA2C,GAC3C,mDAAmD,GACnD,4CAA4C,GAC5C,4CAA4C,GAC5C,+CAA+C,GAC/C,uDAAuD,GACvD,mDAAmD,GACnD,qDAAqD,GACrD,wCAAwC,CAAC"}
|
package/dist/controllers/authentication/AuthenticationController-method-action-types.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationController-method-action-types.d.mts","sourceRoot":"","sources":["../../../src/controllers/authentication/AuthenticationController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAsC;AAE9E,MAAM,MAAM,2CAA2C,GAAG;IACxD,IAAI,EAAE,wCAAwC,CAAC;IAC/C,OAAO,EAAE,wBAAwB,CAAC,eAAe,CAAC,CAAC;CACpD,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,mDAAmD,GAAG;IAChE,IAAI,EAAE,gDAAgD,CAAC;IACvD,OAAO,EAAE,wBAAwB,CAAC,uBAAuB,CAAC,CAAC;CAC5D,CAAC;AAEF,MAAM,MAAM,4CAA4C,GAAG;IACzD,IAAI,EAAE,yCAAyC,CAAC;IAChD,OAAO,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;CACrD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,4CAA4C,GAAG;IACzD,IAAI,EAAE,yCAAyC,CAAC;IAChD,OAAO,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;CACrD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,+CAA+C,GAAG;IAC5D,IAAI,EAAE,4CAA4C,CAAC;IACnD,OAAO,EAAE,wBAAwB,CAAC,mBAAmB,CAAC,CAAC;CACxD,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,uDAAuD,GAAG;IACpE,IAAI,EAAE,oDAAoD,CAAC;IAC3D,OAAO,EAAE,wBAAwB,CAAC,2BAA2B,CAAC,CAAC;CAChE,CAAC;AAEF,MAAM,MAAM,mDAAmD,GAAG;IAChE,IAAI,EAAE,gDAAgD,CAAC;IACvD,OAAO,EAAE,wBAAwB,CAAC,uBAAuB,CAAC,CAAC;CAC5D,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,qDAAqD,GAAG;IAClE,IAAI,EAAE,kDAAkD,CAAC;IACzD,OAAO,EAAE,wBAAwB,CAAC,yBAAyB,CAAC,CAAC;CAC9D,CAAC;AAEF,MAAM,MAAM,wCAAwC,GAAG;IACrD,IAAI,EAAE,qCAAqC,CAAC;IAC5C,OAAO,EAAE,wBAAwB,CAAC,YAAY,CAAC,CAAC;CACjD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAC7C,2CAA2C,GAC3C,mDAAmD,GACnD,4CAA4C,GAC5C,4CAA4C,GAC5C,+CAA+C,GAC/C,uDAAuD,GACvD,mDAAmD,GACnD,qDAAqD,GACrD,wCAAwC,CAAC"}
|
package/dist/controllers/authentication/AuthenticationController-method-action-types.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthenticationController-method-action-types.mjs","sourceRoot":"","sources":["../../../src/controllers/authentication/AuthenticationController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { AuthenticationController } from './AuthenticationController.js';\n\nexport type AuthenticationControllerPerformSignInAction = {\n type: `AuthenticationController:performSignIn`;\n handler: AuthenticationController['performSignIn'];\n};\n\n/**\n * Marks profile pairing as needed. Clients call this when the SRP set\n * changes (e.g. a new keyring was added) so the next auto-sign-in cycle\n * re-runs `performSignIn` and re-pairs.\n */\nexport type AuthenticationControllerRequestProfilePairingAction = {\n type: `AuthenticationController:requestProfilePairing`;\n handler: AuthenticationController['requestProfilePairing'];\n};\n\nexport type AuthenticationControllerPerformSignOutAction = {\n type: `AuthenticationController:performSignOut`;\n handler: AuthenticationController['performSignOut'];\n};\n\n/**\n * Returns a bearer token for the specified SRP, logging in if needed.\n *\n * When called without `entropySourceId`, returns the primary (first) SRP's\n * access token, which is effectively the canonical\n * profile's token that can be used by alias-aware consumers for cross-SRP\n * operations.\n *\n * @param entropySourceId - The entropy source ID. Omit for the primary SRP.\n * @returns The OIDC access token.\n */\nexport type AuthenticationControllerGetBearerTokenAction = {\n type: `AuthenticationController:getBearerToken`;\n handler: AuthenticationController['getBearerToken'];\n};\n\n/**\n * Returns the cached session profile, logging in if no session exists.\n *\n * The returned `canonicalProfileId` reflects the value from the most recent\n * login or pairing. In the rare event where a canonical changed because of\n * a pairing that happened on another device, the cached value may be stale\n * until the next login. For guaranteed freshness, call\n * `refreshCanonicalProfileId()` before reading `canonicalProfileId`.\n *\n * @param entropySourceId - The entropy source ID used to derive the key,\n * when multiple sources are available (Multi-SRP).\n * @returns profile for the session.\n */\nexport type AuthenticationControllerGetSessionProfileAction = {\n type: `AuthenticationController:getSessionProfile`;\n handler: AuthenticationController['getSessionProfile'];\n};\n\n/**\n * Forces a fresh retrieval of the canonical profile ID from the server\n * and propagates it to all cached SRP sessions.\n *\n * This method invalidates the primary SRP's cached session and forces a\n * re-login. Use it before operations that require a guaranteed-fresh\n * canonical (e.g. storage key derivation for Accounts ADR 0005). For\n * best-effort reads, use\n * `getSessionProfile().canonicalProfileId` instead.\n *\n * Only the primary SRP is re-logged-in regardless of how many SRPs exist —\n * the server returns the current canonical for the entire pairing group\n * from any single SRP login.\n *\n * @returns The refreshed canonical profile ID.\n */\nexport type AuthenticationControllerRefreshCanonicalProfileIdAction = {\n type: `AuthenticationController:refreshCanonicalProfileId`;\n handler: AuthenticationController['refreshCanonicalProfileId'];\n};\n\nexport type AuthenticationControllerGetUserProfileLineageAction = {\n type: `AuthenticationController:getUserProfileLineage`;\n handler: AuthenticationController['getUserProfileLineage'];\n};\n\n/**\n * Returns a Customer Service specific access token for the specified SRP,\n * logging in if needed.\n *\n * Exchanges the OIDC access token for a short-lived token scoped to the\n * customer-service audience. Customer Service tooling consumes this token to\n * identify and authenticate the user.\n *\n * @param entropySourceId - The entropy source ID. Omit for the primary SRP.\n * @returns The customer-service access token.\n */\nexport type AuthenticationControllerGetCustomerServiceTokenAction = {\n type: `AuthenticationController:getCustomerServiceToken`;\n handler: AuthenticationController['getCustomerServiceToken'];\n};\n\nexport type AuthenticationControllerIsSignedInAction = {\n type: `AuthenticationController:isSignedIn`;\n handler: AuthenticationController['isSignedIn'];\n};\n\n/**\n * Union of all AuthenticationController action types.\n */\nexport type AuthenticationControllerMethodActions =\n | AuthenticationControllerPerformSignInAction\n | AuthenticationControllerRequestProfilePairingAction\n | AuthenticationControllerPerformSignOutAction\n | AuthenticationControllerGetBearerTokenAction\n | AuthenticationControllerGetSessionProfileAction\n | AuthenticationControllerRefreshCanonicalProfileIdAction\n | AuthenticationControllerGetUserProfileLineageAction\n | AuthenticationControllerGetCustomerServiceTokenAction\n | AuthenticationControllerIsSignedInAction;\n"]}
|