@metamask-previews/passkey-controller 3.1.0-preview-3866c0ff1 → 3.1.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.
Files changed (209) hide show
  1. package/CHANGELOG.md +0 -1
  2. package/dist/PasskeyController-method-action-types.cjs +7 -0
  3. package/dist/PasskeyController-method-action-types.cjs.map +1 -0
  4. package/dist/{PasskeyController-method-action-types.d.ts → PasskeyController-method-action-types.d.cts} +2 -2
  5. package/dist/PasskeyController-method-action-types.d.cts.map +1 -0
  6. package/dist/PasskeyController-method-action-types.d.mts +204 -0
  7. package/dist/PasskeyController-method-action-types.d.mts.map +1 -0
  8. package/dist/{PasskeyController-method-action-types.js → PasskeyController-method-action-types.mjs} +1 -1
  9. package/dist/PasskeyController-method-action-types.mjs.map +1 -0
  10. package/dist/PasskeyController.cjs +685 -0
  11. package/dist/PasskeyController.cjs.map +1 -0
  12. package/dist/{PasskeyController.d.ts → PasskeyController.d.cts} +6 -6
  13. package/dist/PasskeyController.d.cts.map +1 -0
  14. package/dist/PasskeyController.d.mts +208 -0
  15. package/dist/PasskeyController.d.mts.map +1 -0
  16. package/dist/PasskeyController.mjs +680 -0
  17. package/dist/PasskeyController.mjs.map +1 -0
  18. package/dist/ceremony-manager.cjs +135 -0
  19. package/dist/ceremony-manager.cjs.map +1 -0
  20. package/dist/{ceremony-manager.d.ts → ceremony-manager.d.cts} +2 -2
  21. package/dist/ceremony-manager.d.cts.map +1 -0
  22. package/dist/ceremony-manager.d.mts +72 -0
  23. package/dist/ceremony-manager.d.mts.map +1 -0
  24. package/dist/ceremony-manager.mjs +131 -0
  25. package/dist/ceremony-manager.mjs.map +1 -0
  26. package/dist/constants.cjs +39 -0
  27. package/dist/constants.cjs.map +1 -0
  28. package/dist/{constants.d.ts → constants.d.cts} +12 -12
  29. package/dist/constants.d.cts.map +1 -0
  30. package/dist/constants.d.mts +36 -0
  31. package/dist/constants.d.mts.map +1 -0
  32. package/dist/{constants.js → constants.mjs} +1 -1
  33. package/dist/constants.mjs.map +1 -0
  34. package/dist/errors.cjs +57 -0
  35. package/dist/errors.cjs.map +1 -0
  36. package/dist/{errors.d.ts → errors.d.cts} +2 -2
  37. package/dist/errors.d.cts.map +1 -0
  38. package/dist/errors.d.mts +34 -0
  39. package/dist/errors.d.mts.map +1 -0
  40. package/dist/{errors.js → errors.mjs} +1 -4
  41. package/dist/errors.mjs.map +1 -0
  42. package/dist/index.cjs +15 -0
  43. package/dist/index.cjs.map +1 -0
  44. package/dist/{index.d.ts → index.d.cts} +8 -8
  45. package/dist/index.d.cts.map +1 -0
  46. package/dist/index.d.mts +8 -0
  47. package/dist/index.d.mts.map +1 -0
  48. package/dist/index.mjs +5 -0
  49. package/dist/index.mjs.map +1 -0
  50. package/dist/key-derivation.cjs +44 -0
  51. package/dist/key-derivation.cjs.map +1 -0
  52. package/dist/{key-derivation.d.ts → key-derivation.d.cts} +3 -3
  53. package/dist/key-derivation.d.cts.map +1 -0
  54. package/dist/key-derivation.d.mts +20 -0
  55. package/dist/key-derivation.d.mts.map +1 -0
  56. package/dist/{key-derivation.js → key-derivation.mjs} +5 -5
  57. package/dist/key-derivation.mjs.map +1 -0
  58. package/dist/logger.cjs +9 -0
  59. package/dist/logger.cjs.map +1 -0
  60. package/dist/logger.d.cts +5 -0
  61. package/dist/logger.d.cts.map +1 -0
  62. package/dist/logger.d.mts +5 -0
  63. package/dist/logger.d.mts.map +1 -0
  64. package/dist/logger.mjs +6 -0
  65. package/dist/logger.mjs.map +1 -0
  66. package/dist/types.cjs +4 -0
  67. package/dist/types.cjs.map +1 -0
  68. package/dist/{types.d.ts → types.d.cts} +6 -6
  69. package/dist/types.d.cts.map +1 -0
  70. package/dist/types.d.mts +132 -0
  71. package/dist/types.d.mts.map +1 -0
  72. package/dist/types.mjs +2 -0
  73. package/dist/types.mjs.map +1 -0
  74. package/dist/utils/crypto.cjs +66 -0
  75. package/dist/utils/crypto.cjs.map +1 -0
  76. package/dist/utils/{crypto.d.ts → crypto.d.cts} +1 -1
  77. package/dist/utils/crypto.d.cts.map +1 -0
  78. package/dist/utils/crypto.d.mts +37 -0
  79. package/dist/utils/crypto.d.mts.map +1 -0
  80. package/dist/utils/{crypto.js → crypto.mjs} +7 -7
  81. package/dist/utils/crypto.mjs.map +1 -0
  82. package/dist/utils/encoding.cjs +42 -0
  83. package/dist/utils/encoding.cjs.map +1 -0
  84. package/dist/utils/{encoding.d.ts → encoding.d.cts} +1 -1
  85. package/dist/utils/encoding.d.cts.map +1 -0
  86. package/dist/utils/encoding.d.mts +22 -0
  87. package/dist/utils/encoding.d.mts.map +1 -0
  88. package/dist/utils/{encoding.js → encoding.mjs} +2 -2
  89. package/dist/utils/encoding.mjs.map +1 -0
  90. package/dist/webauthn/constants.cjs +74 -0
  91. package/dist/webauthn/constants.cjs.map +1 -0
  92. package/dist/webauthn/{constants.d.ts → constants.d.cts} +1 -1
  93. package/dist/webauthn/constants.d.cts.map +1 -0
  94. package/dist/webauthn/constants.d.mts +68 -0
  95. package/dist/webauthn/constants.d.mts.map +1 -0
  96. package/dist/webauthn/{constants.js → constants.mjs} +1 -1
  97. package/dist/webauthn/constants.mjs.map +1 -0
  98. package/dist/webauthn/decode-attestation-object.cjs +18 -0
  99. package/dist/webauthn/decode-attestation-object.cjs.map +1 -0
  100. package/dist/webauthn/{decode-attestation-object.d.ts → decode-attestation-object.d.cts} +2 -2
  101. package/dist/webauthn/decode-attestation-object.d.cts.map +1 -0
  102. package/dist/webauthn/decode-attestation-object.d.mts +10 -0
  103. package/dist/webauthn/decode-attestation-object.d.mts.map +1 -0
  104. package/dist/webauthn/{decode-attestation-object.js → decode-attestation-object.mjs} +2 -2
  105. package/dist/webauthn/decode-attestation-object.mjs.map +1 -0
  106. package/dist/webauthn/decode-client-data-json.cjs +17 -0
  107. package/dist/webauthn/decode-client-data-json.cjs.map +1 -0
  108. package/dist/webauthn/{decode-client-data-json.d.ts → decode-client-data-json.d.cts} +2 -2
  109. package/dist/webauthn/decode-client-data-json.d.cts.map +1 -0
  110. package/dist/webauthn/decode-client-data-json.d.mts +9 -0
  111. package/dist/webauthn/decode-client-data-json.d.mts.map +1 -0
  112. package/dist/webauthn/{decode-client-data-json.js → decode-client-data-json.mjs} +2 -2
  113. package/dist/webauthn/decode-client-data-json.mjs.map +1 -0
  114. package/dist/webauthn/match-expected-rp-id.cjs +26 -0
  115. package/dist/webauthn/match-expected-rp-id.cjs.map +1 -0
  116. package/dist/webauthn/{match-expected-rp-id.d.ts → match-expected-rp-id.d.cts} +1 -1
  117. package/dist/webauthn/match-expected-rp-id.d.cts.map +1 -0
  118. package/dist/webauthn/match-expected-rp-id.d.mts +11 -0
  119. package/dist/webauthn/match-expected-rp-id.d.mts.map +1 -0
  120. package/dist/webauthn/{match-expected-rp-id.js → match-expected-rp-id.mjs} +4 -4
  121. package/dist/webauthn/match-expected-rp-id.mjs.map +1 -0
  122. package/dist/webauthn/parse-authenticator-data.cjs +69 -0
  123. package/dist/webauthn/parse-authenticator-data.cjs.map +1 -0
  124. package/dist/webauthn/{parse-authenticator-data.d.ts → parse-authenticator-data.d.cts} +2 -2
  125. package/dist/webauthn/parse-authenticator-data.d.cts.map +1 -0
  126. package/dist/webauthn/parse-authenticator-data.d.mts +10 -0
  127. package/dist/webauthn/parse-authenticator-data.d.mts.map +1 -0
  128. package/dist/webauthn/{parse-authenticator-data.js → parse-authenticator-data.mjs} +2 -2
  129. package/dist/webauthn/parse-authenticator-data.mjs.map +1 -0
  130. package/dist/webauthn/types.cjs +3 -0
  131. package/dist/webauthn/types.cjs.map +1 -0
  132. package/dist/webauthn/{types.d.ts → types.d.cts} +2 -2
  133. package/dist/webauthn/types.d.cts.map +1 -0
  134. package/dist/webauthn/types.d.mts +113 -0
  135. package/dist/webauthn/types.d.mts.map +1 -0
  136. package/dist/webauthn/types.mjs +2 -0
  137. package/dist/webauthn/types.mjs.map +1 -0
  138. package/dist/webauthn/verify-authentication-response.cjs +133 -0
  139. package/dist/webauthn/verify-authentication-response.cjs.map +1 -0
  140. package/dist/webauthn/{verify-authentication-response.d.ts → verify-authentication-response.d.cts} +3 -3
  141. package/dist/webauthn/verify-authentication-response.d.cts.map +1 -0
  142. package/dist/webauthn/verify-authentication-response.d.mts +64 -0
  143. package/dist/webauthn/verify-authentication-response.d.mts.map +1 -0
  144. package/dist/webauthn/{verify-authentication-response.js → verify-authentication-response.mjs} +9 -9
  145. package/dist/webauthn/verify-authentication-response.mjs.map +1 -0
  146. package/dist/webauthn/verify-registration-response.cjs +242 -0
  147. package/dist/webauthn/verify-registration-response.cjs.map +1 -0
  148. package/dist/webauthn/{verify-registration-response.d.ts → verify-registration-response.d.cts} +3 -3
  149. package/dist/webauthn/verify-registration-response.d.cts.map +1 -0
  150. package/dist/webauthn/verify-registration-response.d.mts +81 -0
  151. package/dist/webauthn/verify-registration-response.d.mts.map +1 -0
  152. package/dist/webauthn/{verify-registration-response.js → verify-registration-response.mjs} +11 -11
  153. package/dist/webauthn/verify-registration-response.mjs.map +1 -0
  154. package/dist/webauthn/verify-signature.cjs +176 -0
  155. package/dist/webauthn/verify-signature.cjs.map +1 -0
  156. package/dist/webauthn/{verify-signature.d.ts → verify-signature.d.cts} +1 -1
  157. package/dist/webauthn/verify-signature.d.cts.map +1 -0
  158. package/dist/webauthn/verify-signature.d.mts +21 -0
  159. package/dist/webauthn/verify-signature.d.mts.map +1 -0
  160. package/dist/webauthn/{verify-signature.js → verify-signature.mjs} +7 -7
  161. package/dist/webauthn/verify-signature.mjs.map +1 -0
  162. package/package.json +17 -12
  163. package/dist/PasskeyController-method-action-types.d.ts.map +0 -1
  164. package/dist/PasskeyController-method-action-types.js.map +0 -1
  165. package/dist/PasskeyController.d.ts.map +0 -1
  166. package/dist/PasskeyController.js +0 -680
  167. package/dist/PasskeyController.js.map +0 -1
  168. package/dist/ceremony-manager.d.ts.map +0 -1
  169. package/dist/ceremony-manager.js +0 -135
  170. package/dist/ceremony-manager.js.map +0 -1
  171. package/dist/constants.d.ts.map +0 -1
  172. package/dist/constants.js.map +0 -1
  173. package/dist/errors.d.ts.map +0 -1
  174. package/dist/errors.js.map +0 -1
  175. package/dist/index.d.ts.map +0 -1
  176. package/dist/index.js +0 -5
  177. package/dist/index.js.map +0 -1
  178. package/dist/key-derivation.d.ts.map +0 -1
  179. package/dist/key-derivation.js.map +0 -1
  180. package/dist/logger.d.ts +0 -4
  181. package/dist/logger.d.ts.map +0 -1
  182. package/dist/logger.js +0 -6
  183. package/dist/logger.js.map +0 -1
  184. package/dist/types.d.ts.map +0 -1
  185. package/dist/types.js +0 -2
  186. package/dist/types.js.map +0 -1
  187. package/dist/utils/crypto.d.ts.map +0 -1
  188. package/dist/utils/crypto.js.map +0 -1
  189. package/dist/utils/encoding.d.ts.map +0 -1
  190. package/dist/utils/encoding.js.map +0 -1
  191. package/dist/webauthn/constants.d.ts.map +0 -1
  192. package/dist/webauthn/constants.js.map +0 -1
  193. package/dist/webauthn/decode-attestation-object.d.ts.map +0 -1
  194. package/dist/webauthn/decode-attestation-object.js.map +0 -1
  195. package/dist/webauthn/decode-client-data-json.d.ts.map +0 -1
  196. package/dist/webauthn/decode-client-data-json.js.map +0 -1
  197. package/dist/webauthn/match-expected-rp-id.d.ts.map +0 -1
  198. package/dist/webauthn/match-expected-rp-id.js.map +0 -1
  199. package/dist/webauthn/parse-authenticator-data.d.ts.map +0 -1
  200. package/dist/webauthn/parse-authenticator-data.js.map +0 -1
  201. package/dist/webauthn/types.d.ts.map +0 -1
  202. package/dist/webauthn/types.js +0 -2
  203. package/dist/webauthn/types.js.map +0 -1
  204. package/dist/webauthn/verify-authentication-response.d.ts.map +0 -1
  205. package/dist/webauthn/verify-authentication-response.js.map +0 -1
  206. package/dist/webauthn/verify-registration-response.d.ts.map +0 -1
  207. package/dist/webauthn/verify-registration-response.js.map +0 -1
  208. package/dist/webauthn/verify-signature.d.ts.map +0 -1
  209. package/dist/webauthn/verify-signature.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -15,7 +15,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
 
16
16
  ### Changed
17
17
 
18
- - **BREAKING:** Bump minimum Node.js version to 22 ([#9168](https://github.com/MetaMask/core/pull/9168))
19
18
  - Bump `@metamask/keyring-controller` from `^27.1.0` to `^27.1.1` ([#9791](https://github.com/MetaMask/core/pull/9791))
20
19
 
21
20
  ## [3.0.0]
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * This file is auto generated.
4
+ * Do not edit manually.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ //# sourceMappingURL=PasskeyController-method-action-types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasskeyController-method-action-types.cjs","sourceRoot":"","sources":["../src/PasskeyController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { PasskeyController } from './PasskeyController.js';\n\n/**\n * Whether a passkey is enrolled and vault key material is stored.\n *\n * @returns `true` if enrolled, otherwise `false`.\n */\nexport type PasskeyControllerIsPasskeyEnrolledAction = {\n type: `PasskeyController:isPasskeyEnrolled`;\n handler: PasskeyController['isPasskeyEnrolled'];\n};\n\n/**\n * Builds WebAuthn credential creation options for passkey enrollment.\n *\n * @param creationOptionsConfig - Optional creation behavior.\n * @param creationOptionsConfig.prfAvailable - Request the PRF extension unless `false`. Defaults to `true`.\n * @returns Public key credential creation options for `navigator.credentials.create()`.\n */\nexport type PasskeyControllerGenerateRegistrationOptionsAction = {\n type: `PasskeyController:generateRegistrationOptions`;\n handler: PasskeyController['generateRegistrationOptions'];\n};\n\n/**\n * Builds WebAuthn credential request options for the post-registration\n * authentication step (between `create` and {@link protectVaultKeyWithPasskey}).\n *\n * @param params - Input for the pending registration ceremony.\n * @param params.registrationResponse - Result of `navigator.credentials.create()`.\n * @returns Public key credential request options for `navigator.credentials.get()`.\n */\nexport type PasskeyControllerGeneratePostRegistrationAuthenticationOptionsAction =\n {\n type: `PasskeyController:generatePostRegistrationAuthenticationOptions`;\n handler: PasskeyController['generatePostRegistrationAuthenticationOptions'];\n };\n\n/**\n * Builds WebAuthn credential request options for the enrolled passkey.\n *\n * @returns Public key credential request options for `navigator.credentials.get()`.\n */\nexport type PasskeyControllerGenerateAuthenticationOptionsAction = {\n type: `PasskeyController:generateAuthenticationOptions`;\n handler: PasskeyController['generateAuthenticationOptions'];\n};\n\n/**\n * Verifies registration and post-registration authentication, then stores the\n * vault key encrypted under the new passkey.\n *\n * Fetches the current vault encryption key from KeyringController before wrapping.\n * When onboarding is complete, requires `password` for step-up verification first.\n *\n * @param params - Enrollment completion inputs.\n * @param params.registrationResponse - Result of `navigator.credentials.create()`.\n * @param params.authenticationResponse - Result of `navigator.credentials.get()` after {@link generatePostRegistrationAuthenticationOptions}.\n * @param params.password - Wallet password when onboarding is complete (step-up).\n * @returns Resolves when enrollment completes.\n */\nexport type PasskeyControllerProtectVaultKeyWithPasskeyAction = {\n type: `PasskeyController:protectVaultKeyWithPasskey`;\n handler: PasskeyController['protectVaultKeyWithPasskey'];\n};\n\n/**\n * Verifies an authentication assertion and returns the decrypted vault key.\n *\n * Prefer orchestrated methods ({@link unlockWithPasskey},\n * {@link exportSeedPhraseWithPasskey}, {@link exportAccountsWithPasskey}) for product\n * flows instead of calling KeyringController with the returned key manually.\n *\n * @param authenticationResponse - Result of `navigator.credentials.get()`.\n * @returns The plaintext vault encryption key.\n */\nexport type PasskeyControllerRetrieveVaultKeyWithPasskeyAction = {\n type: `PasskeyController:retrieveVaultKeyWithPasskey`;\n handler: PasskeyController['retrieveVaultKeyWithPasskey'];\n};\n\n/**\n * Unlocks the keyring using a passkey authentication assertion.\n *\n * @param authenticationResponse - Result of `navigator.credentials.get()`.\n * @returns Resolves when the keyring is unlocked.\n */\nexport type PasskeyControllerUnlockWithPasskeyAction = {\n type: `PasskeyController:unlockWithPasskey`;\n handler: PasskeyController['unlockWithPasskey'];\n};\n\n/**\n * Exports the seed phrase after passkey step-up authentication.\n *\n * @param authenticationResponse - Result of `navigator.credentials.get()`.\n * @param keyringId - Optional keyring id; defaults to the primary HD keyring.\n * @returns Raw seed phrase bytes from KeyringController.\n */\nexport type PasskeyControllerExportSeedPhraseWithPasskeyAction = {\n type: `PasskeyController:exportSeedPhraseWithPasskey`;\n handler: PasskeyController['exportSeedPhraseWithPasskey'];\n};\n\n/**\n * Exports private keys for the given addresses after passkey step-up authentication.\n *\n * @param authenticationResponse - Result of `navigator.credentials.get()`.\n * @param addresses - Account addresses to export.\n * @returns Private keys in the same order as `addresses`.\n */\nexport type PasskeyControllerExportAccountsWithPasskeyAction = {\n type: `PasskeyController:exportAccountsWithPasskey`;\n handler: PasskeyController['exportAccountsWithPasskey'];\n};\n\n/**\n * Checks whether the given authentication assertion is valid for the enrolled passkey.\n *\n * On failure, returns `false` for {@link PasskeyControllerError} with a `code`;\n * other errors propagate.\n *\n * @param authenticationResponse - Result of `navigator.credentials.get()`.\n * @returns `true` if verification succeeds, otherwise `false`.\n */\nexport type PasskeyControllerVerifyPasskeyAuthenticationAction = {\n type: `PasskeyController:verifyPasskeyAuthentication`;\n handler: PasskeyController['verifyPasskeyAuthentication'];\n};\n\n/**\n * Re-wraps the vault key after rotation. Updates persisted `encryptedVaultKey` on success.\n *\n * Does not verify WebAuthn or ceremony state—call only after your layer has authenticated\n * the user (passkey `get()` + verified assertion, or verified password). On passkey paths,\n * pass the same `authenticationResponse` you just verified (e.g. from\n * {@link retrieveVaultKeyWithPasskey} / {@link verifyPasskeyAuthentication}).\n *\n * For password change with passkey step-up, prefer\n * {@link changePasswordWithPasskeyVerification}, which orchestrates keyring export,\n * `changePassword`, and re-wrap in one call.\n *\n * @param params - Re-wrap inputs.\n * @param params.authenticationResponse - Used to derive the wrapping key.\n * @param params.oldVaultKey - Expected current vault key.\n * @param params.newVaultKey - New vault key to encrypt under the passkey.\n * @returns Resolves when the passkey record is updated.\n */\nexport type PasskeyControllerRenewVaultKeyProtectionAction = {\n type: `PasskeyController:renewVaultKeyProtection`;\n handler: PasskeyController['renewVaultKeyProtection'];\n};\n\n/**\n * Changes the wallet password after passkey step-up authentication.\n *\n * When `renewVaultKeyProtection` is `true` (default), re-wraps the vault key under the\n * passkey after rotation. When `false`, removes the passkey instead.\n *\n * @param params - Change-password inputs.\n * @param params.newPassword - New wallet password.\n * @param params.authenticationResponse - Result of `navigator.credentials.get()`.\n * @param params.options - Optional flow controls.\n * @param params.options.renewVaultKeyProtection - Re-wrap vault key after password change.\n * @returns Resolves when the password change completes.\n */\nexport type PasskeyControllerChangePasswordWithPasskeyVerificationAction = {\n type: `PasskeyController:changePasswordWithPasskeyVerification`;\n handler: PasskeyController['changePasswordWithPasskeyVerification'];\n};\n\n/**\n * Removes the enrolled passkey after verifying a passkey authentication assertion.\n *\n * @param authenticationResponse - Result of `navigator.credentials.get()`.\n * @returns Resolves when the passkey is removed.\n */\nexport type PasskeyControllerRemovePasskeyWithPasskeyVerificationAction = {\n type: `PasskeyController:removePasskeyWithPasskeyVerification`;\n handler: PasskeyController['removePasskeyWithPasskeyVerification'];\n};\n\n/**\n * Removes the enrolled passkey after verifying the wallet password.\n *\n * @param password - Wallet password for step-up verification.\n * @returns Resolves when the passkey is removed.\n */\nexport type PasskeyControllerRemovePasskeyWithPasswordVerificationAction = {\n type: `PasskeyController:removePasskeyWithPasswordVerification`;\n handler: PasskeyController['removePasskeyWithPasswordVerification'];\n};\n\n/**\n * Resets state and clears in-flight registration/authentication ceremonies.\n *\n * For user-facing passkey removal with step-up, use\n * {@link removePasskeyWithPasskeyVerification} or\n * {@link removePasskeyWithPasswordVerification}.\n */\nexport type PasskeyControllerClearStateAction = {\n type: `PasskeyController:clearState`;\n handler: PasskeyController['clearState'];\n};\n\n/**\n * Releases all in-flight ceremony state and tears down the messenger.\n */\nexport type PasskeyControllerDestroyAction = {\n type: `PasskeyController:destroy`;\n handler: PasskeyController['destroy'];\n};\n\n/**\n * Union of all PasskeyController action types.\n */\nexport type PasskeyControllerMethodActions =\n | PasskeyControllerIsPasskeyEnrolledAction\n | PasskeyControllerGenerateRegistrationOptionsAction\n | PasskeyControllerGeneratePostRegistrationAuthenticationOptionsAction\n | PasskeyControllerGenerateAuthenticationOptionsAction\n | PasskeyControllerProtectVaultKeyWithPasskeyAction\n | PasskeyControllerRetrieveVaultKeyWithPasskeyAction\n | PasskeyControllerUnlockWithPasskeyAction\n | PasskeyControllerExportSeedPhraseWithPasskeyAction\n | PasskeyControllerExportAccountsWithPasskeyAction\n | PasskeyControllerVerifyPasskeyAuthenticationAction\n | PasskeyControllerRenewVaultKeyProtectionAction\n | PasskeyControllerChangePasswordWithPasskeyVerificationAction\n | PasskeyControllerRemovePasskeyWithPasskeyVerificationAction\n | PasskeyControllerRemovePasskeyWithPasswordVerificationAction\n | PasskeyControllerClearStateAction\n | PasskeyControllerDestroyAction;\n"]}
@@ -2,7 +2,7 @@
2
2
  * This file is auto generated.
3
3
  * Do not edit manually.
4
4
  */
5
- import type { PasskeyController } from './PasskeyController.js';
5
+ import type { PasskeyController } from "./PasskeyController.cjs";
6
6
  /**
7
7
  * Whether a passkey is enrolled and vault key material is stored.
8
8
  *
@@ -201,4 +201,4 @@ export type PasskeyControllerDestroyAction = {
201
201
  * Union of all PasskeyController action types.
202
202
  */
203
203
  export type PasskeyControllerMethodActions = PasskeyControllerIsPasskeyEnrolledAction | PasskeyControllerGenerateRegistrationOptionsAction | PasskeyControllerGeneratePostRegistrationAuthenticationOptionsAction | PasskeyControllerGenerateAuthenticationOptionsAction | PasskeyControllerProtectVaultKeyWithPasskeyAction | PasskeyControllerRetrieveVaultKeyWithPasskeyAction | PasskeyControllerUnlockWithPasskeyAction | PasskeyControllerExportSeedPhraseWithPasskeyAction | PasskeyControllerExportAccountsWithPasskeyAction | PasskeyControllerVerifyPasskeyAuthenticationAction | PasskeyControllerRenewVaultKeyProtectionAction | PasskeyControllerChangePasswordWithPasskeyVerificationAction | PasskeyControllerRemovePasskeyWithPasskeyVerificationAction | PasskeyControllerRemovePasskeyWithPasswordVerificationAction | PasskeyControllerClearStateAction | PasskeyControllerDestroyAction;
204
- //# sourceMappingURL=PasskeyController-method-action-types.d.ts.map
204
+ //# sourceMappingURL=PasskeyController-method-action-types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasskeyController-method-action-types.d.cts","sourceRoot":"","sources":["../src/PasskeyController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gCAA+B;AAEhE;;;;GAIG;AACH,MAAM,MAAM,wCAAwC,GAAG;IACrD,IAAI,EAAE,qCAAqC,CAAC;IAC5C,OAAO,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;CACjD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,kDAAkD,GAAG;IAC/D,IAAI,EAAE,+CAA+C,CAAC;IACtD,OAAO,EAAE,iBAAiB,CAAC,6BAA6B,CAAC,CAAC;CAC3D,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,oEAAoE,GAC9E;IACE,IAAI,EAAE,iEAAiE,CAAC;IACxE,OAAO,EAAE,iBAAiB,CAAC,+CAA+C,CAAC,CAAC;CAC7E,CAAC;AAEJ;;;;GAIG;AACH,MAAM,MAAM,oDAAoD,GAAG;IACjE,IAAI,EAAE,iDAAiD,CAAC;IACxD,OAAO,EAAE,iBAAiB,CAAC,+BAA+B,CAAC,CAAC;CAC7D,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,iDAAiD,GAAG;IAC9D,IAAI,EAAE,8CAA8C,CAAC;IACrD,OAAO,EAAE,iBAAiB,CAAC,4BAA4B,CAAC,CAAC;CAC1D,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,kDAAkD,GAAG;IAC/D,IAAI,EAAE,+CAA+C,CAAC;IACtD,OAAO,EAAE,iBAAiB,CAAC,6BAA6B,CAAC,CAAC;CAC3D,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,wCAAwC,GAAG;IACrD,IAAI,EAAE,qCAAqC,CAAC;IAC5C,OAAO,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;CACjD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,kDAAkD,GAAG;IAC/D,IAAI,EAAE,+CAA+C,CAAC;IACtD,OAAO,EAAE,iBAAiB,CAAC,6BAA6B,CAAC,CAAC;CAC3D,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,gDAAgD,GAAG;IAC7D,IAAI,EAAE,6CAA6C,CAAC;IACpD,OAAO,EAAE,iBAAiB,CAAC,2BAA2B,CAAC,CAAC;CACzD,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,kDAAkD,GAAG;IAC/D,IAAI,EAAE,+CAA+C,CAAC;IACtD,OAAO,EAAE,iBAAiB,CAAC,6BAA6B,CAAC,CAAC;CAC3D,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,8CAA8C,GAAG;IAC3D,IAAI,EAAE,2CAA2C,CAAC;IAClD,OAAO,EAAE,iBAAiB,CAAC,yBAAyB,CAAC,CAAC;CACvD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,4DAA4D,GAAG;IACzE,IAAI,EAAE,yDAAyD,CAAC;IAChE,OAAO,EAAE,iBAAiB,CAAC,uCAAuC,CAAC,CAAC;CACrE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,2DAA2D,GAAG;IACxE,IAAI,EAAE,wDAAwD,CAAC;IAC/D,OAAO,EAAE,iBAAiB,CAAC,sCAAsC,CAAC,CAAC;CACpE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,4DAA4D,GAAG;IACzE,IAAI,EAAE,yDAAyD,CAAC;IAChE,OAAO,EAAE,iBAAiB,CAAC,uCAAuC,CAAC,CAAC;CACrE,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,8BAA8B,CAAC;IACrC,OAAO,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;CAC1C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,2BAA2B,CAAC;IAClC,OAAO,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,8BAA8B,GACtC,wCAAwC,GACxC,kDAAkD,GAClD,oEAAoE,GACpE,oDAAoD,GACpD,iDAAiD,GACjD,kDAAkD,GAClD,wCAAwC,GACxC,kDAAkD,GAClD,gDAAgD,GAChD,kDAAkD,GAClD,8CAA8C,GAC9C,4DAA4D,GAC5D,2DAA2D,GAC3D,4DAA4D,GAC5D,iCAAiC,GACjC,8BAA8B,CAAC"}
@@ -0,0 +1,204 @@
1
+ /**
2
+ * This file is auto generated.
3
+ * Do not edit manually.
4
+ */
5
+ import type { PasskeyController } from "./PasskeyController.mjs";
6
+ /**
7
+ * Whether a passkey is enrolled and vault key material is stored.
8
+ *
9
+ * @returns `true` if enrolled, otherwise `false`.
10
+ */
11
+ export type PasskeyControllerIsPasskeyEnrolledAction = {
12
+ type: `PasskeyController:isPasskeyEnrolled`;
13
+ handler: PasskeyController['isPasskeyEnrolled'];
14
+ };
15
+ /**
16
+ * Builds WebAuthn credential creation options for passkey enrollment.
17
+ *
18
+ * @param creationOptionsConfig - Optional creation behavior.
19
+ * @param creationOptionsConfig.prfAvailable - Request the PRF extension unless `false`. Defaults to `true`.
20
+ * @returns Public key credential creation options for `navigator.credentials.create()`.
21
+ */
22
+ export type PasskeyControllerGenerateRegistrationOptionsAction = {
23
+ type: `PasskeyController:generateRegistrationOptions`;
24
+ handler: PasskeyController['generateRegistrationOptions'];
25
+ };
26
+ /**
27
+ * Builds WebAuthn credential request options for the post-registration
28
+ * authentication step (between `create` and {@link protectVaultKeyWithPasskey}).
29
+ *
30
+ * @param params - Input for the pending registration ceremony.
31
+ * @param params.registrationResponse - Result of `navigator.credentials.create()`.
32
+ * @returns Public key credential request options for `navigator.credentials.get()`.
33
+ */
34
+ export type PasskeyControllerGeneratePostRegistrationAuthenticationOptionsAction = {
35
+ type: `PasskeyController:generatePostRegistrationAuthenticationOptions`;
36
+ handler: PasskeyController['generatePostRegistrationAuthenticationOptions'];
37
+ };
38
+ /**
39
+ * Builds WebAuthn credential request options for the enrolled passkey.
40
+ *
41
+ * @returns Public key credential request options for `navigator.credentials.get()`.
42
+ */
43
+ export type PasskeyControllerGenerateAuthenticationOptionsAction = {
44
+ type: `PasskeyController:generateAuthenticationOptions`;
45
+ handler: PasskeyController['generateAuthenticationOptions'];
46
+ };
47
+ /**
48
+ * Verifies registration and post-registration authentication, then stores the
49
+ * vault key encrypted under the new passkey.
50
+ *
51
+ * Fetches the current vault encryption key from KeyringController before wrapping.
52
+ * When onboarding is complete, requires `password` for step-up verification first.
53
+ *
54
+ * @param params - Enrollment completion inputs.
55
+ * @param params.registrationResponse - Result of `navigator.credentials.create()`.
56
+ * @param params.authenticationResponse - Result of `navigator.credentials.get()` after {@link generatePostRegistrationAuthenticationOptions}.
57
+ * @param params.password - Wallet password when onboarding is complete (step-up).
58
+ * @returns Resolves when enrollment completes.
59
+ */
60
+ export type PasskeyControllerProtectVaultKeyWithPasskeyAction = {
61
+ type: `PasskeyController:protectVaultKeyWithPasskey`;
62
+ handler: PasskeyController['protectVaultKeyWithPasskey'];
63
+ };
64
+ /**
65
+ * Verifies an authentication assertion and returns the decrypted vault key.
66
+ *
67
+ * Prefer orchestrated methods ({@link unlockWithPasskey},
68
+ * {@link exportSeedPhraseWithPasskey}, {@link exportAccountsWithPasskey}) for product
69
+ * flows instead of calling KeyringController with the returned key manually.
70
+ *
71
+ * @param authenticationResponse - Result of `navigator.credentials.get()`.
72
+ * @returns The plaintext vault encryption key.
73
+ */
74
+ export type PasskeyControllerRetrieveVaultKeyWithPasskeyAction = {
75
+ type: `PasskeyController:retrieveVaultKeyWithPasskey`;
76
+ handler: PasskeyController['retrieveVaultKeyWithPasskey'];
77
+ };
78
+ /**
79
+ * Unlocks the keyring using a passkey authentication assertion.
80
+ *
81
+ * @param authenticationResponse - Result of `navigator.credentials.get()`.
82
+ * @returns Resolves when the keyring is unlocked.
83
+ */
84
+ export type PasskeyControllerUnlockWithPasskeyAction = {
85
+ type: `PasskeyController:unlockWithPasskey`;
86
+ handler: PasskeyController['unlockWithPasskey'];
87
+ };
88
+ /**
89
+ * Exports the seed phrase after passkey step-up authentication.
90
+ *
91
+ * @param authenticationResponse - Result of `navigator.credentials.get()`.
92
+ * @param keyringId - Optional keyring id; defaults to the primary HD keyring.
93
+ * @returns Raw seed phrase bytes from KeyringController.
94
+ */
95
+ export type PasskeyControllerExportSeedPhraseWithPasskeyAction = {
96
+ type: `PasskeyController:exportSeedPhraseWithPasskey`;
97
+ handler: PasskeyController['exportSeedPhraseWithPasskey'];
98
+ };
99
+ /**
100
+ * Exports private keys for the given addresses after passkey step-up authentication.
101
+ *
102
+ * @param authenticationResponse - Result of `navigator.credentials.get()`.
103
+ * @param addresses - Account addresses to export.
104
+ * @returns Private keys in the same order as `addresses`.
105
+ */
106
+ export type PasskeyControllerExportAccountsWithPasskeyAction = {
107
+ type: `PasskeyController:exportAccountsWithPasskey`;
108
+ handler: PasskeyController['exportAccountsWithPasskey'];
109
+ };
110
+ /**
111
+ * Checks whether the given authentication assertion is valid for the enrolled passkey.
112
+ *
113
+ * On failure, returns `false` for {@link PasskeyControllerError} with a `code`;
114
+ * other errors propagate.
115
+ *
116
+ * @param authenticationResponse - Result of `navigator.credentials.get()`.
117
+ * @returns `true` if verification succeeds, otherwise `false`.
118
+ */
119
+ export type PasskeyControllerVerifyPasskeyAuthenticationAction = {
120
+ type: `PasskeyController:verifyPasskeyAuthentication`;
121
+ handler: PasskeyController['verifyPasskeyAuthentication'];
122
+ };
123
+ /**
124
+ * Re-wraps the vault key after rotation. Updates persisted `encryptedVaultKey` on success.
125
+ *
126
+ * Does not verify WebAuthn or ceremony state—call only after your layer has authenticated
127
+ * the user (passkey `get()` + verified assertion, or verified password). On passkey paths,
128
+ * pass the same `authenticationResponse` you just verified (e.g. from
129
+ * {@link retrieveVaultKeyWithPasskey} / {@link verifyPasskeyAuthentication}).
130
+ *
131
+ * For password change with passkey step-up, prefer
132
+ * {@link changePasswordWithPasskeyVerification}, which orchestrates keyring export,
133
+ * `changePassword`, and re-wrap in one call.
134
+ *
135
+ * @param params - Re-wrap inputs.
136
+ * @param params.authenticationResponse - Used to derive the wrapping key.
137
+ * @param params.oldVaultKey - Expected current vault key.
138
+ * @param params.newVaultKey - New vault key to encrypt under the passkey.
139
+ * @returns Resolves when the passkey record is updated.
140
+ */
141
+ export type PasskeyControllerRenewVaultKeyProtectionAction = {
142
+ type: `PasskeyController:renewVaultKeyProtection`;
143
+ handler: PasskeyController['renewVaultKeyProtection'];
144
+ };
145
+ /**
146
+ * Changes the wallet password after passkey step-up authentication.
147
+ *
148
+ * When `renewVaultKeyProtection` is `true` (default), re-wraps the vault key under the
149
+ * passkey after rotation. When `false`, removes the passkey instead.
150
+ *
151
+ * @param params - Change-password inputs.
152
+ * @param params.newPassword - New wallet password.
153
+ * @param params.authenticationResponse - Result of `navigator.credentials.get()`.
154
+ * @param params.options - Optional flow controls.
155
+ * @param params.options.renewVaultKeyProtection - Re-wrap vault key after password change.
156
+ * @returns Resolves when the password change completes.
157
+ */
158
+ export type PasskeyControllerChangePasswordWithPasskeyVerificationAction = {
159
+ type: `PasskeyController:changePasswordWithPasskeyVerification`;
160
+ handler: PasskeyController['changePasswordWithPasskeyVerification'];
161
+ };
162
+ /**
163
+ * Removes the enrolled passkey after verifying a passkey authentication assertion.
164
+ *
165
+ * @param authenticationResponse - Result of `navigator.credentials.get()`.
166
+ * @returns Resolves when the passkey is removed.
167
+ */
168
+ export type PasskeyControllerRemovePasskeyWithPasskeyVerificationAction = {
169
+ type: `PasskeyController:removePasskeyWithPasskeyVerification`;
170
+ handler: PasskeyController['removePasskeyWithPasskeyVerification'];
171
+ };
172
+ /**
173
+ * Removes the enrolled passkey after verifying the wallet password.
174
+ *
175
+ * @param password - Wallet password for step-up verification.
176
+ * @returns Resolves when the passkey is removed.
177
+ */
178
+ export type PasskeyControllerRemovePasskeyWithPasswordVerificationAction = {
179
+ type: `PasskeyController:removePasskeyWithPasswordVerification`;
180
+ handler: PasskeyController['removePasskeyWithPasswordVerification'];
181
+ };
182
+ /**
183
+ * Resets state and clears in-flight registration/authentication ceremonies.
184
+ *
185
+ * For user-facing passkey removal with step-up, use
186
+ * {@link removePasskeyWithPasskeyVerification} or
187
+ * {@link removePasskeyWithPasswordVerification}.
188
+ */
189
+ export type PasskeyControllerClearStateAction = {
190
+ type: `PasskeyController:clearState`;
191
+ handler: PasskeyController['clearState'];
192
+ };
193
+ /**
194
+ * Releases all in-flight ceremony state and tears down the messenger.
195
+ */
196
+ export type PasskeyControllerDestroyAction = {
197
+ type: `PasskeyController:destroy`;
198
+ handler: PasskeyController['destroy'];
199
+ };
200
+ /**
201
+ * Union of all PasskeyController action types.
202
+ */
203
+ export type PasskeyControllerMethodActions = PasskeyControllerIsPasskeyEnrolledAction | PasskeyControllerGenerateRegistrationOptionsAction | PasskeyControllerGeneratePostRegistrationAuthenticationOptionsAction | PasskeyControllerGenerateAuthenticationOptionsAction | PasskeyControllerProtectVaultKeyWithPasskeyAction | PasskeyControllerRetrieveVaultKeyWithPasskeyAction | PasskeyControllerUnlockWithPasskeyAction | PasskeyControllerExportSeedPhraseWithPasskeyAction | PasskeyControllerExportAccountsWithPasskeyAction | PasskeyControllerVerifyPasskeyAuthenticationAction | PasskeyControllerRenewVaultKeyProtectionAction | PasskeyControllerChangePasswordWithPasskeyVerificationAction | PasskeyControllerRemovePasskeyWithPasskeyVerificationAction | PasskeyControllerRemovePasskeyWithPasswordVerificationAction | PasskeyControllerClearStateAction | PasskeyControllerDestroyAction;
204
+ //# sourceMappingURL=PasskeyController-method-action-types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasskeyController-method-action-types.d.mts","sourceRoot":"","sources":["../src/PasskeyController-method-action-types.ts"],"names":[],"mappings":"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"}
@@ -3,4 +3,4 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
  export {};
6
- //# sourceMappingURL=PasskeyController-method-action-types.js.map
6
+ //# sourceMappingURL=PasskeyController-method-action-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasskeyController-method-action-types.mjs","sourceRoot":"","sources":["../src/PasskeyController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { PasskeyController } from './PasskeyController.js';\n\n/**\n * Whether a passkey is enrolled and vault key material is stored.\n *\n * @returns `true` if enrolled, otherwise `false`.\n */\nexport type PasskeyControllerIsPasskeyEnrolledAction = {\n type: `PasskeyController:isPasskeyEnrolled`;\n handler: PasskeyController['isPasskeyEnrolled'];\n};\n\n/**\n * Builds WebAuthn credential creation options for passkey enrollment.\n *\n * @param creationOptionsConfig - Optional creation behavior.\n * @param creationOptionsConfig.prfAvailable - Request the PRF extension unless `false`. Defaults to `true`.\n * @returns Public key credential creation options for `navigator.credentials.create()`.\n */\nexport type PasskeyControllerGenerateRegistrationOptionsAction = {\n type: `PasskeyController:generateRegistrationOptions`;\n handler: PasskeyController['generateRegistrationOptions'];\n};\n\n/**\n * Builds WebAuthn credential request options for the post-registration\n * authentication step (between `create` and {@link protectVaultKeyWithPasskey}).\n *\n * @param params - Input for the pending registration ceremony.\n * @param params.registrationResponse - Result of `navigator.credentials.create()`.\n * @returns Public key credential request options for `navigator.credentials.get()`.\n */\nexport type PasskeyControllerGeneratePostRegistrationAuthenticationOptionsAction =\n {\n type: `PasskeyController:generatePostRegistrationAuthenticationOptions`;\n handler: PasskeyController['generatePostRegistrationAuthenticationOptions'];\n };\n\n/**\n * Builds WebAuthn credential request options for the enrolled passkey.\n *\n * @returns Public key credential request options for `navigator.credentials.get()`.\n */\nexport type PasskeyControllerGenerateAuthenticationOptionsAction = {\n type: `PasskeyController:generateAuthenticationOptions`;\n handler: PasskeyController['generateAuthenticationOptions'];\n};\n\n/**\n * Verifies registration and post-registration authentication, then stores the\n * vault key encrypted under the new passkey.\n *\n * Fetches the current vault encryption key from KeyringController before wrapping.\n * When onboarding is complete, requires `password` for step-up verification first.\n *\n * @param params - Enrollment completion inputs.\n * @param params.registrationResponse - Result of `navigator.credentials.create()`.\n * @param params.authenticationResponse - Result of `navigator.credentials.get()` after {@link generatePostRegistrationAuthenticationOptions}.\n * @param params.password - Wallet password when onboarding is complete (step-up).\n * @returns Resolves when enrollment completes.\n */\nexport type PasskeyControllerProtectVaultKeyWithPasskeyAction = {\n type: `PasskeyController:protectVaultKeyWithPasskey`;\n handler: PasskeyController['protectVaultKeyWithPasskey'];\n};\n\n/**\n * Verifies an authentication assertion and returns the decrypted vault key.\n *\n * Prefer orchestrated methods ({@link unlockWithPasskey},\n * {@link exportSeedPhraseWithPasskey}, {@link exportAccountsWithPasskey}) for product\n * flows instead of calling KeyringController with the returned key manually.\n *\n * @param authenticationResponse - Result of `navigator.credentials.get()`.\n * @returns The plaintext vault encryption key.\n */\nexport type PasskeyControllerRetrieveVaultKeyWithPasskeyAction = {\n type: `PasskeyController:retrieveVaultKeyWithPasskey`;\n handler: PasskeyController['retrieveVaultKeyWithPasskey'];\n};\n\n/**\n * Unlocks the keyring using a passkey authentication assertion.\n *\n * @param authenticationResponse - Result of `navigator.credentials.get()`.\n * @returns Resolves when the keyring is unlocked.\n */\nexport type PasskeyControllerUnlockWithPasskeyAction = {\n type: `PasskeyController:unlockWithPasskey`;\n handler: PasskeyController['unlockWithPasskey'];\n};\n\n/**\n * Exports the seed phrase after passkey step-up authentication.\n *\n * @param authenticationResponse - Result of `navigator.credentials.get()`.\n * @param keyringId - Optional keyring id; defaults to the primary HD keyring.\n * @returns Raw seed phrase bytes from KeyringController.\n */\nexport type PasskeyControllerExportSeedPhraseWithPasskeyAction = {\n type: `PasskeyController:exportSeedPhraseWithPasskey`;\n handler: PasskeyController['exportSeedPhraseWithPasskey'];\n};\n\n/**\n * Exports private keys for the given addresses after passkey step-up authentication.\n *\n * @param authenticationResponse - Result of `navigator.credentials.get()`.\n * @param addresses - Account addresses to export.\n * @returns Private keys in the same order as `addresses`.\n */\nexport type PasskeyControllerExportAccountsWithPasskeyAction = {\n type: `PasskeyController:exportAccountsWithPasskey`;\n handler: PasskeyController['exportAccountsWithPasskey'];\n};\n\n/**\n * Checks whether the given authentication assertion is valid for the enrolled passkey.\n *\n * On failure, returns `false` for {@link PasskeyControllerError} with a `code`;\n * other errors propagate.\n *\n * @param authenticationResponse - Result of `navigator.credentials.get()`.\n * @returns `true` if verification succeeds, otherwise `false`.\n */\nexport type PasskeyControllerVerifyPasskeyAuthenticationAction = {\n type: `PasskeyController:verifyPasskeyAuthentication`;\n handler: PasskeyController['verifyPasskeyAuthentication'];\n};\n\n/**\n * Re-wraps the vault key after rotation. Updates persisted `encryptedVaultKey` on success.\n *\n * Does not verify WebAuthn or ceremony state—call only after your layer has authenticated\n * the user (passkey `get()` + verified assertion, or verified password). On passkey paths,\n * pass the same `authenticationResponse` you just verified (e.g. from\n * {@link retrieveVaultKeyWithPasskey} / {@link verifyPasskeyAuthentication}).\n *\n * For password change with passkey step-up, prefer\n * {@link changePasswordWithPasskeyVerification}, which orchestrates keyring export,\n * `changePassword`, and re-wrap in one call.\n *\n * @param params - Re-wrap inputs.\n * @param params.authenticationResponse - Used to derive the wrapping key.\n * @param params.oldVaultKey - Expected current vault key.\n * @param params.newVaultKey - New vault key to encrypt under the passkey.\n * @returns Resolves when the passkey record is updated.\n */\nexport type PasskeyControllerRenewVaultKeyProtectionAction = {\n type: `PasskeyController:renewVaultKeyProtection`;\n handler: PasskeyController['renewVaultKeyProtection'];\n};\n\n/**\n * Changes the wallet password after passkey step-up authentication.\n *\n * When `renewVaultKeyProtection` is `true` (default), re-wraps the vault key under the\n * passkey after rotation. When `false`, removes the passkey instead.\n *\n * @param params - Change-password inputs.\n * @param params.newPassword - New wallet password.\n * @param params.authenticationResponse - Result of `navigator.credentials.get()`.\n * @param params.options - Optional flow controls.\n * @param params.options.renewVaultKeyProtection - Re-wrap vault key after password change.\n * @returns Resolves when the password change completes.\n */\nexport type PasskeyControllerChangePasswordWithPasskeyVerificationAction = {\n type: `PasskeyController:changePasswordWithPasskeyVerification`;\n handler: PasskeyController['changePasswordWithPasskeyVerification'];\n};\n\n/**\n * Removes the enrolled passkey after verifying a passkey authentication assertion.\n *\n * @param authenticationResponse - Result of `navigator.credentials.get()`.\n * @returns Resolves when the passkey is removed.\n */\nexport type PasskeyControllerRemovePasskeyWithPasskeyVerificationAction = {\n type: `PasskeyController:removePasskeyWithPasskeyVerification`;\n handler: PasskeyController['removePasskeyWithPasskeyVerification'];\n};\n\n/**\n * Removes the enrolled passkey after verifying the wallet password.\n *\n * @param password - Wallet password for step-up verification.\n * @returns Resolves when the passkey is removed.\n */\nexport type PasskeyControllerRemovePasskeyWithPasswordVerificationAction = {\n type: `PasskeyController:removePasskeyWithPasswordVerification`;\n handler: PasskeyController['removePasskeyWithPasswordVerification'];\n};\n\n/**\n * Resets state and clears in-flight registration/authentication ceremonies.\n *\n * For user-facing passkey removal with step-up, use\n * {@link removePasskeyWithPasskeyVerification} or\n * {@link removePasskeyWithPasswordVerification}.\n */\nexport type PasskeyControllerClearStateAction = {\n type: `PasskeyController:clearState`;\n handler: PasskeyController['clearState'];\n};\n\n/**\n * Releases all in-flight ceremony state and tears down the messenger.\n */\nexport type PasskeyControllerDestroyAction = {\n type: `PasskeyController:destroy`;\n handler: PasskeyController['destroy'];\n};\n\n/**\n * Union of all PasskeyController action types.\n */\nexport type PasskeyControllerMethodActions =\n | PasskeyControllerIsPasskeyEnrolledAction\n | PasskeyControllerGenerateRegistrationOptionsAction\n | PasskeyControllerGeneratePostRegistrationAuthenticationOptionsAction\n | PasskeyControllerGenerateAuthenticationOptionsAction\n | PasskeyControllerProtectVaultKeyWithPasskeyAction\n | PasskeyControllerRetrieveVaultKeyWithPasskeyAction\n | PasskeyControllerUnlockWithPasskeyAction\n | PasskeyControllerExportSeedPhraseWithPasskeyAction\n | PasskeyControllerExportAccountsWithPasskeyAction\n | PasskeyControllerVerifyPasskeyAuthenticationAction\n | PasskeyControllerRenewVaultKeyProtectionAction\n | PasskeyControllerChangePasswordWithPasskeyVerificationAction\n | PasskeyControllerRemovePasskeyWithPasskeyVerificationAction\n | PasskeyControllerRemovePasskeyWithPasswordVerificationAction\n | PasskeyControllerClearStateAction\n | PasskeyControllerDestroyAction;\n"]}