@metamask-previews/keyring-controller 25.2.0-preview-45a82ea8e → 25.3.0-preview-d8ff44d
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 +17 -13
- package/dist/KeyringController-method-action-types.cjs.map +1 -1
- package/dist/KeyringController-method-action-types.d.cts +12 -1
- package/dist/KeyringController-method-action-types.d.cts.map +1 -1
- package/dist/KeyringController-method-action-types.d.mts +12 -1
- package/dist/KeyringController-method-action-types.d.mts.map +1 -1
- package/dist/KeyringController-method-action-types.mjs.map +1 -1
- package/dist/KeyringController.cjs +1 -0
- package/dist/KeyringController.cjs.map +1 -1
- package/dist/KeyringController.d.cts.map +1 -1
- package/dist/KeyringController.d.mts.map +1 -1
- package/dist/KeyringController.mjs +1 -0
- package/dist/KeyringController.mjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,8 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [25.3.0]
|
|
11
|
+
|
|
10
12
|
### Added
|
|
11
13
|
|
|
14
|
+
- Expose `KeyringController:exportSeedPhrase` method through `KeyringController` messenger ([#8587](https://github.com/MetaMask/core/pull/8587))
|
|
12
15
|
- Expose `KeyringController:isUnlocked` method through `KeyringController` messenger ([#8573](https://github.com/MetaMask/core/pull/8573))
|
|
13
16
|
- Returns `true` when the vault is unlocked, `false` otherwise. Mirrors `state.isUnlocked` and the `isUnlocked()` instance method, allowing consumers to check lock status via the messenger without holding a controller reference.
|
|
14
17
|
- Add `withController` action to run atomic operations on multiple keyrings (within a single transaction) ([#8416](https://github.com/MetaMask/core/pull/8416))
|
|
@@ -29,12 +32,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
29
32
|
|
|
30
33
|
### Changed
|
|
31
34
|
|
|
32
|
-
- Bump `@metamask/messenger` from `^1.0.0` to `^1.
|
|
35
|
+
- Bump `@metamask/messenger` from `^1.0.0` to `^1.2.0` ([#8364](https://github.com/MetaMask/core/pull/8364), [#8373](https://github.com/MetaMask/core/pull/8373), [#8632](https://github.com/MetaMask/core/pull/8632))
|
|
33
36
|
- Bump `@metamask/base-controller` from `^9.0.1` to `^9.1.0` ([#8457](https://github.com/MetaMask/core/pull/8457))
|
|
34
37
|
- Bump `@metamask/eth-hd-keyring` from `^13.1.1` to `^14.0.1` ([#8464](https://github.com/MetaMask/core/pull/8464))
|
|
35
38
|
- Bump `@metamask/eth-simple-keyring` from `^11.1.2` to `^12.0.1` ([#8464](https://github.com/MetaMask/core/pull/8464))
|
|
36
39
|
- Bump `@metamask/keyring-api` from `^21.6.0` to `^23.0.1` ([#8464](https://github.com/MetaMask/core/pull/8464))
|
|
37
|
-
- Bump `@metamask/keyring-internal-api` from `^10.0.0` to `^
|
|
40
|
+
- Bump `@metamask/keyring-internal-api` from `^10.0.0` to `^11.0.0` ([#8464](https://github.com/MetaMask/core/pull/8464), [#8584](https://github.com/MetaMask/core/pull/8584))
|
|
38
41
|
|
|
39
42
|
## [25.2.0]
|
|
40
43
|
|
|
@@ -178,8 +181,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
178
181
|
|
|
179
182
|
### Changed
|
|
180
183
|
|
|
181
|
-
- Bump `@metamask/keyring-api` from `^18.0.0` to `^20.0.0` ([#6146](https://github.com/MetaMask/core/pull/6146)
|
|
182
|
-
- Bump `@metamask/keyring-internal-api` from `^6.2.0` to `^8.0.0` ([#6146](https://github.com/MetaMask/core/pull/6146)
|
|
184
|
+
- Bump `@metamask/keyring-api` from `^18.0.0` to `^20.0.0` ([#6146](https://github.com/MetaMask/core/pull/6146), [#6248](https://github.com/MetaMask/core/pull/6248))
|
|
185
|
+
- Bump `@metamask/keyring-internal-api` from `^6.2.0` to `^8.0.0` ([#6146](https://github.com/MetaMask/core/pull/6146), [#6248](https://github.com/MetaMask/core/pull/6248))
|
|
183
186
|
- Bump `@metamask/utils` from `^11.2.0` to `^11.4.2` ([#6054](https://github.com/MetaMask/core/pull/6054))
|
|
184
187
|
|
|
185
188
|
## [22.1.0]
|
|
@@ -303,7 +306,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
303
306
|
### Changed
|
|
304
307
|
|
|
305
308
|
- Bump `@metamask/keyring-api"` from `^17.0.0` to `^17.2.0` ([#5366](https://github.com/MetaMask/core/pull/5366))
|
|
306
|
-
- Bump `@metamask/keyring-internal-api` from `^4.0.1` to `^4.0.3` ([#5356](https://github.com/MetaMask/core/pull/5356)
|
|
309
|
+
- Bump `@metamask/keyring-internal-api` from `^4.0.1` to `^4.0.3` ([#5356](https://github.com/MetaMask/core/pull/5356), [#5366](https://github.com/MetaMask/core/pull/5366))
|
|
307
310
|
|
|
308
311
|
### Fixed
|
|
309
312
|
|
|
@@ -346,7 +349,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
346
349
|
|
|
347
350
|
### Changed
|
|
348
351
|
|
|
349
|
-
- Bump `@metamask/keyring-api` from `^14.0.0` to `^16.1.0` ([#5190](https://github.com/MetaMask/core/pull/5190)
|
|
352
|
+
- Bump `@metamask/keyring-api` from `^14.0.0` to `^16.1.0` ([#5190](https://github.com/MetaMask/core/pull/5190), [#5208](https://github.com/MetaMask/core/pull/5208))
|
|
350
353
|
|
|
351
354
|
## [19.0.4]
|
|
352
355
|
|
|
@@ -360,9 +363,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
360
363
|
|
|
361
364
|
### Changed
|
|
362
365
|
|
|
363
|
-
- Bump `@metamask/base-controller` from `^7.0.0` to `^7.1.1
|
|
366
|
+
- Bump `@metamask/base-controller` from `^7.0.0` to `^7.1.1`, ([#5079](https://github.com/MetaMask/core/pull/5079), [#5135](https://github.com/MetaMask/core/pull/5135))
|
|
364
367
|
- Bump `@metamask/keyring-api` from `^12.0.0` to `^13.0.0` ([#5066](https://github.com/MetaMask/core/pull/5066))
|
|
365
|
-
- Bump `@metamask/keyring-internal-api` from `^1.0.0` to `^2.0.0` ([#5066](https://github.com/MetaMask/core/pull/5066)
|
|
368
|
+
- Bump `@metamask/keyring-internal-api` from `^1.0.0` to `^2.0.0` ([#5066](https://github.com/MetaMask/core/pull/5066), [#5136](https://github.com/MetaMask/core/pull/5136))
|
|
366
369
|
- Bump `@metamask/utils` to `^11.0.1` ([#5080](https://github.com/MetaMask/core/pull/5080))
|
|
367
370
|
- Bump `@metamask/rpc-errors` to `^7.0.2` ([#5080](https://github.com/MetaMask/core/pull/5080))
|
|
368
371
|
|
|
@@ -431,7 +434,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
431
434
|
|
|
432
435
|
### Changed
|
|
433
436
|
|
|
434
|
-
- Bump accounts related packages ([#4713](https://github.com/MetaMask/core/pull/4713)
|
|
437
|
+
- Bump accounts related packages ([#4713](https://github.com/MetaMask/core/pull/4713), [#4728](https://github.com/MetaMask/core/pull/4728))
|
|
435
438
|
- Those packages are now built slightly differently and are part of the [accounts monorepo](https://github.com/MetaMask/accounts).
|
|
436
439
|
- Bump `@metamask/keyring-api` from `^8.1.0` to `^8.1.4`
|
|
437
440
|
- Bump `@metamask/eth-hd-keyring` from `^7.0.1` to `^7.0.4`
|
|
@@ -449,7 +452,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
449
452
|
["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as
|
|
450
453
|
["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md).
|
|
451
454
|
All of the ATTW checks now pass.
|
|
452
|
-
- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648))
|
|
455
|
+
- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648))
|
|
453
456
|
- Previously, the build tool we used to generate JavaScript files extracted
|
|
454
457
|
common code to "chunk" files. While this was intended to make this package
|
|
455
458
|
more tree-shakeable, it also made debugging more difficult for our
|
|
@@ -895,7 +898,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
895
898
|
|
|
896
899
|
### Added
|
|
897
900
|
|
|
898
|
-
- Add `cancelQRSynchronization` method ([#1387](https://github.com/MetaMask/core
|
|
901
|
+
- Add `cancelQRSynchronization` method ([#1387](https://github.com/MetaMask/core/pull/1387))
|
|
899
902
|
|
|
900
903
|
## [5.0.0]
|
|
901
904
|
|
|
@@ -949,7 +952,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
949
952
|
|
|
950
953
|
### Changed
|
|
951
954
|
|
|
952
|
-
- **BREAKING:**: Bump eth-keyring-controller version to @metamask/eth-keyring-controller v10 ([#1072](https://github.com/MetaMask/core
|
|
955
|
+
- **BREAKING:**: Bump eth-keyring-controller version to @metamask/eth-keyring-controller v10 ([#1072](https://github.com/MetaMask/core/pull/1072))
|
|
953
956
|
- `exportSeedPhrase` now returns a `Uint8Array` typed SRP (can be converted to a string using [this approach](https://github.com/MetaMask/eth-hd-keyring/blob/53b0570559595ba5b3fd8c80e900d847cd6dee3d/index.js#L40)). It was previously a Buffer.
|
|
954
957
|
- The HD keyring included with the keyring controller has been updated from v4 to v6. See [the `eth-hd-keyring` changelog entries for v5 and v6](https://github.com/MetaMask/eth-hd-keyring/blob/main/CHANGELOG.md#600) for further details on breaking changes.
|
|
955
958
|
|
|
@@ -979,7 +982,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
979
982
|
|
|
980
983
|
All changes listed after this point were applied to this package following the monorepo conversion.
|
|
981
984
|
|
|
982
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@25.
|
|
985
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@25.3.0...HEAD
|
|
986
|
+
[25.3.0]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@25.2.0...@metamask/keyring-controller@25.3.0
|
|
983
987
|
[25.2.0]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@25.1.1...@metamask/keyring-controller@25.2.0
|
|
984
988
|
[25.1.1]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@25.1.0...@metamask/keyring-controller@25.1.1
|
|
985
989
|
[25.1.0]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@25.0.0...@metamask/keyring-controller@25.1.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyringController-method-action-types.cjs","sourceRoot":"","sources":["../src/KeyringController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { KeyringController } from './KeyringController';\n\n/**\n * Adds a new account to the default (first) HD seed phrase keyring.\n *\n * @param accountCount - Number of accounts before adding a new one, used to\n * make the method idempotent.\n * @returns Promise resolving to the added account address.\n */\nexport type KeyringControllerAddNewAccountAction = {\n type: `KeyringController:addNewAccount`;\n handler: KeyringController['addNewAccount'];\n};\n\n/**\n * Effectively the same as creating a new keychain then populating it\n * using the given seed phrase.\n *\n * @param password - Password to unlock keychain.\n * @param seed - A BIP39-compliant seed phrase as Uint8Array,\n * either as a string or an array of UTF-8 bytes that represent the string.\n * @returns Promise resolving when the operation ends successfully.\n */\nexport type KeyringControllerCreateNewVaultAndRestoreAction = {\n type: `KeyringController:createNewVaultAndRestore`;\n handler: KeyringController['createNewVaultAndRestore'];\n};\n\n/**\n * Create a new vault and primary keyring.\n *\n * This only works if keyrings are empty. If there is a pre-existing unlocked vault, calling this will have no effect.\n * If there is a pre-existing locked vault, it will be replaced.\n *\n * @param password - Password to unlock the new vault.\n * @returns Promise resolving when the operation ends successfully.\n */\nexport type KeyringControllerCreateNewVaultAndKeychainAction = {\n type: `KeyringController:createNewVaultAndKeychain`;\n handler: KeyringController['createNewVaultAndKeychain'];\n};\n\n/**\n * Adds a new keyring of the given `type`.\n *\n * @param type - Keyring type name.\n * @param opts - Keyring options.\n * @throws If a builder for the given `type` does not exist.\n * @returns Promise resolving to the new keyring metadata.\n */\nexport type KeyringControllerAddNewKeyringAction = {\n type: `KeyringController:addNewKeyring`;\n handler: KeyringController['addNewKeyring'];\n};\n\n/**\n * Returns the status of the vault.\n *\n * @returns Boolean returning true if the vault is unlocked.\n */\nexport type KeyringControllerIsUnlockedAction = {\n type: `KeyringController:isUnlocked`;\n handler: KeyringController['isUnlocked'];\n};\n\n/**\n * Returns the public addresses of all accounts from every keyring.\n *\n * @returns A promise resolving to an array of addresses.\n */\nexport type KeyringControllerGetAccountsAction = {\n type: `KeyringController:getAccounts`;\n handler: KeyringController['getAccounts'];\n};\n\n/**\n * Get encryption public key.\n *\n * @param account - An account address.\n * @param opts - Additional encryption options.\n * @throws If the `account` does not exist or does not support the `getEncryptionPublicKey` method\n * @returns Promise resolving to encyption public key of the `account` if one exists.\n */\nexport type KeyringControllerGetEncryptionPublicKeyAction = {\n type: `KeyringController:getEncryptionPublicKey`;\n handler: KeyringController['getEncryptionPublicKey'];\n};\n\n/**\n * Attempts to decrypt the provided message parameters.\n *\n * @param messageParams - The decryption message parameters.\n * @param messageParams.from - The address of the account you want to use to decrypt the message.\n * @param messageParams.data - The encrypted data that you want to decrypt.\n * @returns The raw decryption result.\n */\nexport type KeyringControllerDecryptMessageAction = {\n type: `KeyringController:decryptMessage`;\n handler: KeyringController['decryptMessage'];\n};\n\n/**\n * Returns the currently initialized keyring that manages\n * the specified `address` if one exists.\n *\n * @deprecated Use of this method is discouraged as actions executed directly on\n * keyrings are not being reflected in the KeyringController state and not\n * persisted in the vault. Use `withKeyring` instead.\n * @param account - An account address.\n * @returns Promise resolving to keyring of the `account` if one exists.\n */\nexport type KeyringControllerGetKeyringForAccountAction = {\n type: `KeyringController:getKeyringForAccount`;\n handler: KeyringController['getKeyringForAccount'];\n};\n\n/**\n * Returns all keyrings of the given type.\n *\n * @deprecated Use of this method is discouraged as actions executed directly on\n * keyrings are not being reflected in the KeyringController state and not\n * persisted in the vault. Use `withKeyring` instead.\n * @param type - Keyring type name.\n * @returns An array of keyrings of the given type.\n */\nexport type KeyringControllerGetKeyringsByTypeAction = {\n type: `KeyringController:getKeyringsByType`;\n handler: KeyringController['getKeyringsByType'];\n};\n\n/**\n * Persist all serialized keyrings in the vault.\n *\n * @deprecated This method is being phased out in favor of `withKeyring`.\n * @returns Promise resolving with `true` value when the\n * operation completes.\n */\nexport type KeyringControllerPersistAllKeyringsAction = {\n type: `KeyringController:persistAllKeyrings`;\n handler: KeyringController['persistAllKeyrings'];\n};\n\n/**\n * Removes an account from keyring state.\n *\n * @param address - Address of the account to remove.\n * @fires KeyringController:accountRemoved\n * @returns Promise resolving when the account is removed.\n */\nexport type KeyringControllerRemoveAccountAction = {\n type: `KeyringController:removeAccount`;\n handler: KeyringController['removeAccount'];\n};\n\n/**\n * Signs message by calling down into a specific keyring.\n *\n * @param messageParams - PersonalMessageParams object to sign.\n * @returns Promise resolving to a signed message string.\n */\nexport type KeyringControllerSignMessageAction = {\n type: `KeyringController:signMessage`;\n handler: KeyringController['signMessage'];\n};\n\n/**\n * Signs EIP-7702 Authorization message by calling down into a specific keyring.\n *\n * @param params - EIP7702AuthorizationParams object to sign.\n * @returns Promise resolving to an EIP-7702 Authorization signature.\n * @throws Will throw UnsupportedSignEIP7702Authorization if the keyring does not support signing EIP-7702 Authorization messages.\n */\nexport type KeyringControllerSignEip7702AuthorizationAction = {\n type: `KeyringController:signEip7702Authorization`;\n handler: KeyringController['signEip7702Authorization'];\n};\n\n/**\n * Signs personal message by calling down into a specific keyring.\n *\n * @param messageParams - PersonalMessageParams object to sign.\n * @returns Promise resolving to a signed message string.\n */\nexport type KeyringControllerSignPersonalMessageAction = {\n type: `KeyringController:signPersonalMessage`;\n handler: KeyringController['signPersonalMessage'];\n};\n\n/**\n * Signs typed message by calling down into a specific keyring.\n *\n * @param messageParams - TypedMessageParams object to sign.\n * @param version - Compatibility version EIP712.\n * @throws Will throw when passed an unrecognized version.\n * @returns Promise resolving to a signed message string or an error if any.\n */\nexport type KeyringControllerSignTypedMessageAction = {\n type: `KeyringController:signTypedMessage`;\n handler: KeyringController['signTypedMessage'];\n};\n\n/**\n * Signs a transaction by calling down into a specific keyring.\n *\n * @param transaction - Transaction object to sign. Must be a `ethereumjs-tx` transaction instance.\n * @param from - Address to sign from, should be in keychain.\n * @param opts - An optional options object.\n * @returns Promise resolving to a signed transaction string.\n */\nexport type KeyringControllerSignTransactionAction = {\n type: `KeyringController:signTransaction`;\n handler: KeyringController['signTransaction'];\n};\n\n/**\n * Convert a base transaction to a base UserOperation.\n *\n * @param from - Address of the sender.\n * @param transactions - Base transactions to include in the UserOperation.\n * @param executionContext - The execution context to use for the UserOperation.\n * @returns A pseudo-UserOperation that can be used to construct a real.\n */\nexport type KeyringControllerPrepareUserOperationAction = {\n type: `KeyringController:prepareUserOperation`;\n handler: KeyringController['prepareUserOperation'];\n};\n\n/**\n * Patches properties of a UserOperation. Currently, only the\n * `paymasterAndData` can be patched.\n *\n * @param from - Address of the sender.\n * @param userOp - UserOperation to patch.\n * @param executionContext - The execution context to use for the UserOperation.\n * @returns A patch to apply to the UserOperation.\n */\nexport type KeyringControllerPatchUserOperationAction = {\n type: `KeyringController:patchUserOperation`;\n handler: KeyringController['patchUserOperation'];\n};\n\n/**\n * Signs an UserOperation.\n *\n * @param from - Address of the sender.\n * @param userOp - UserOperation to sign.\n * @param executionContext - The execution context to use for the UserOperation.\n * @returns The signature of the UserOperation.\n */\nexport type KeyringControllerSignUserOperationAction = {\n type: `KeyringController:signUserOperation`;\n handler: KeyringController['signUserOperation'];\n};\n\n/**\n * Select a keyring and execute the given operation with\n * the selected keyring, as a mutually exclusive atomic\n * operation.\n *\n * The method automatically persists changes at the end of the\n * function execution, or rolls back the changes if an error\n * is thrown.\n *\n * @param selector - Keyring selector object.\n * @param operation - Function to execute with the selected keyring.\n * @param options - Additional options.\n * @param options.createIfMissing - Whether to create a new keyring if the selected one is missing.\n * @param options.createWithData - Optional data to use when creating a new keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template SelectedKeyring - The type of the selected keyring.\n * @template CallbackResult - The type of the value resolved by the callback function.\n * @deprecated This method overload is deprecated. Use `withKeyring` without options instead.\n */\nexport type KeyringControllerWithKeyringAction = {\n type: `KeyringController:withKeyring`;\n handler: KeyringController['withKeyring'];\n};\n\n/**\n * Select a keyring and execute the given operation with the selected\n * keyring, **without** acquiring the controller's mutual exclusion lock.\n *\n * ## When to use this method\n *\n * This method is an escape hatch for read-only access to keyring data that\n * is immutable once the keyring is initialized. A typical safe use case is\n * reading the `mnemonic` from an `HdKeyring`: the mnemonic is set during\n * `deserialize()` and never mutated afterwards, so it can safely be read\n * without holding the lock.\n *\n * ## Why it is \"unsafe\"\n *\n * The \"unsafe\" designation mirrors the semantics of `unsafe { }` blocks in\n * Rust: the method itself does not enforce thread-safety guarantees. By\n * calling this method the **caller** explicitly takes responsibility for\n * ensuring that:\n *\n * - The operation is **read-only** — no state is mutated.\n * - The data being read is **immutable** after the keyring is initialized,\n * so concurrent locked operations cannot alter it while this callback\n * runs.\n *\n * Do **not** use this method to:\n * - Mutate keyring state (add accounts, sign, etc.) — use `withKeyring`.\n * - Read mutable fields that could change during concurrent operations.\n *\n * @param selector - Keyring selector object.\n * @param operation - Read-only function to execute with the selected keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template SelectedKeyring - The type of the selected keyring.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithKeyringUnsafeAction = {\n type: `KeyringController:withKeyringUnsafe`;\n handler: KeyringController['withKeyringUnsafe'];\n};\n\n/**\n * Select a keyring using its `KeyringV2` adapter, and execute\n * the given operation with the wrapped keyring as a mutually\n * exclusive atomic operation.\n *\n * The cached `KeyringV2` adapter is retrieved from the keyring\n * entry.\n *\n * A `KeyringV2Builder` for the selected keyring's type must exist\n * (either as a default or registered via the `keyringV2Builders`\n * constructor option); otherwise an error is thrown.\n *\n * The method automatically persists changes at the end of the\n * function execution, or rolls back the changes if an error\n * is thrown.\n *\n * @param selector - Keyring selector object.\n * @param operation - Function to execute with the wrapped V2 keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithKeyringV2Action = {\n type: `KeyringController:withKeyringV2`;\n handler: KeyringController['withKeyringV2'];\n};\n\n/**\n * Select a keyring, wrap it in a `KeyringV2` adapter, and execute\n * the given read-only operation **without** acquiring the controller's\n * mutual exclusion lock.\n *\n * ## When to use this method\n *\n * This method is an escape hatch for read-only access to keyring data that\n * is immutable once the keyring is initialized. A typical safe use case is\n * reading immutable fields from a `KeyringV2` adapter: data that is set\n * during initialization and never mutated afterwards.\n *\n * ## Why it is \"unsafe\"\n *\n * The \"unsafe\" designation mirrors the semantics of `unsafe { }` blocks in\n * Rust: the method itself does not enforce thread-safety guarantees. By\n * calling this method the **caller** explicitly takes responsibility for\n * ensuring that:\n *\n * - The operation is **read-only** — no state is mutated.\n * - The data being read is **immutable** after the keyring is initialized,\n * so concurrent locked operations cannot alter it while this callback\n * runs.\n *\n * Do **not** use this method to:\n * - Mutate keyring state (add accounts, sign, etc.) — use `withKeyringV2`.\n * - Read mutable fields that could change during concurrent operations.\n *\n * @param selector - Keyring selector object.\n * @param operation - Read-only function to execute with the wrapped V2 keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template SelectedKeyring - The type of the selected V2 keyring.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithKeyringV2UnsafeAction = {\n type: `KeyringController:withKeyringV2Unsafe`;\n handler: KeyringController['withKeyringV2Unsafe'];\n};\n\n/**\n * Execute an operation against all keyrings as a mutually exclusive atomic\n * operation. The operation receives a {@link RestrictedController} instance\n * that exposes a read-only live view of all keyrings as well as\n * `addNewKeyring` and `removeKeyring` methods to stage mutations.\n *\n * The method automatically persists changes at the end of the function\n * execution, or rolls back the changes if an error is thrown.\n *\n * @param operation - Function to execute with the restricted controller.\n * @returns Promise resolving to the result of the function execution.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithControllerAction = {\n type: `KeyringController:withController`;\n handler: KeyringController['withController'];\n};\n\n/**\n * Union of all KeyringController action types.\n */\nexport type KeyringControllerMethodActions =\n | KeyringControllerAddNewAccountAction\n | KeyringControllerCreateNewVaultAndRestoreAction\n | KeyringControllerCreateNewVaultAndKeychainAction\n | KeyringControllerAddNewKeyringAction\n | KeyringControllerIsUnlockedAction\n | KeyringControllerGetAccountsAction\n | KeyringControllerGetEncryptionPublicKeyAction\n | KeyringControllerDecryptMessageAction\n | KeyringControllerGetKeyringForAccountAction\n | KeyringControllerGetKeyringsByTypeAction\n | KeyringControllerPersistAllKeyringsAction\n | KeyringControllerRemoveAccountAction\n | KeyringControllerSignMessageAction\n | KeyringControllerSignEip7702AuthorizationAction\n | KeyringControllerSignPersonalMessageAction\n | KeyringControllerSignTypedMessageAction\n | KeyringControllerSignTransactionAction\n | KeyringControllerPrepareUserOperationAction\n | KeyringControllerPatchUserOperationAction\n | KeyringControllerSignUserOperationAction\n | KeyringControllerWithKeyringAction\n | KeyringControllerWithKeyringUnsafeAction\n | KeyringControllerWithKeyringV2Action\n | KeyringControllerWithKeyringV2UnsafeAction\n | KeyringControllerWithControllerAction;\n"]}
|
|
1
|
+
{"version":3,"file":"KeyringController-method-action-types.cjs","sourceRoot":"","sources":["../src/KeyringController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { KeyringController } from './KeyringController';\n\n/**\n * Adds a new account to the default (first) HD seed phrase keyring.\n *\n * @param accountCount - Number of accounts before adding a new one, used to\n * make the method idempotent.\n * @returns Promise resolving to the added account address.\n */\nexport type KeyringControllerAddNewAccountAction = {\n type: `KeyringController:addNewAccount`;\n handler: KeyringController['addNewAccount'];\n};\n\n/**\n * Effectively the same as creating a new keychain then populating it\n * using the given seed phrase.\n *\n * @param password - Password to unlock keychain.\n * @param seed - A BIP39-compliant seed phrase as Uint8Array,\n * either as a string or an array of UTF-8 bytes that represent the string.\n * @returns Promise resolving when the operation ends successfully.\n */\nexport type KeyringControllerCreateNewVaultAndRestoreAction = {\n type: `KeyringController:createNewVaultAndRestore`;\n handler: KeyringController['createNewVaultAndRestore'];\n};\n\n/**\n * Create a new vault and primary keyring.\n *\n * This only works if keyrings are empty. If there is a pre-existing unlocked vault, calling this will have no effect.\n * If there is a pre-existing locked vault, it will be replaced.\n *\n * @param password - Password to unlock the new vault.\n * @returns Promise resolving when the operation ends successfully.\n */\nexport type KeyringControllerCreateNewVaultAndKeychainAction = {\n type: `KeyringController:createNewVaultAndKeychain`;\n handler: KeyringController['createNewVaultAndKeychain'];\n};\n\n/**\n * Adds a new keyring of the given `type`.\n *\n * @param type - Keyring type name.\n * @param opts - Keyring options.\n * @throws If a builder for the given `type` does not exist.\n * @returns Promise resolving to the new keyring metadata.\n */\nexport type KeyringControllerAddNewKeyringAction = {\n type: `KeyringController:addNewKeyring`;\n handler: KeyringController['addNewKeyring'];\n};\n\n/**\n * Returns the status of the vault.\n *\n * @returns Boolean returning true if the vault is unlocked.\n */\nexport type KeyringControllerIsUnlockedAction = {\n type: `KeyringController:isUnlocked`;\n handler: KeyringController['isUnlocked'];\n};\n\n/**\n * Gets the seed phrase of the HD keyring.\n *\n * @param password - Password of the keyring.\n * @param keyringId - The id of the keyring.\n * @returns Promise resolving to the seed phrase.\n */\nexport type KeyringControllerExportSeedPhraseAction = {\n type: `KeyringController:exportSeedPhrase`;\n handler: KeyringController['exportSeedPhrase'];\n};\n\n/**\n * Returns the public addresses of all accounts from every keyring.\n *\n * @returns A promise resolving to an array of addresses.\n */\nexport type KeyringControllerGetAccountsAction = {\n type: `KeyringController:getAccounts`;\n handler: KeyringController['getAccounts'];\n};\n\n/**\n * Get encryption public key.\n *\n * @param account - An account address.\n * @param opts - Additional encryption options.\n * @throws If the `account` does not exist or does not support the `getEncryptionPublicKey` method\n * @returns Promise resolving to encyption public key of the `account` if one exists.\n */\nexport type KeyringControllerGetEncryptionPublicKeyAction = {\n type: `KeyringController:getEncryptionPublicKey`;\n handler: KeyringController['getEncryptionPublicKey'];\n};\n\n/**\n * Attempts to decrypt the provided message parameters.\n *\n * @param messageParams - The decryption message parameters.\n * @param messageParams.from - The address of the account you want to use to decrypt the message.\n * @param messageParams.data - The encrypted data that you want to decrypt.\n * @returns The raw decryption result.\n */\nexport type KeyringControllerDecryptMessageAction = {\n type: `KeyringController:decryptMessage`;\n handler: KeyringController['decryptMessage'];\n};\n\n/**\n * Returns the currently initialized keyring that manages\n * the specified `address` if one exists.\n *\n * @deprecated Use of this method is discouraged as actions executed directly on\n * keyrings are not being reflected in the KeyringController state and not\n * persisted in the vault. Use `withKeyring` instead.\n * @param account - An account address.\n * @returns Promise resolving to keyring of the `account` if one exists.\n */\nexport type KeyringControllerGetKeyringForAccountAction = {\n type: `KeyringController:getKeyringForAccount`;\n handler: KeyringController['getKeyringForAccount'];\n};\n\n/**\n * Returns all keyrings of the given type.\n *\n * @deprecated Use of this method is discouraged as actions executed directly on\n * keyrings are not being reflected in the KeyringController state and not\n * persisted in the vault. Use `withKeyring` instead.\n * @param type - Keyring type name.\n * @returns An array of keyrings of the given type.\n */\nexport type KeyringControllerGetKeyringsByTypeAction = {\n type: `KeyringController:getKeyringsByType`;\n handler: KeyringController['getKeyringsByType'];\n};\n\n/**\n * Persist all serialized keyrings in the vault.\n *\n * @deprecated This method is being phased out in favor of `withKeyring`.\n * @returns Promise resolving with `true` value when the\n * operation completes.\n */\nexport type KeyringControllerPersistAllKeyringsAction = {\n type: `KeyringController:persistAllKeyrings`;\n handler: KeyringController['persistAllKeyrings'];\n};\n\n/**\n * Removes an account from keyring state.\n *\n * @param address - Address of the account to remove.\n * @fires KeyringController:accountRemoved\n * @returns Promise resolving when the account is removed.\n */\nexport type KeyringControllerRemoveAccountAction = {\n type: `KeyringController:removeAccount`;\n handler: KeyringController['removeAccount'];\n};\n\n/**\n * Signs message by calling down into a specific keyring.\n *\n * @param messageParams - PersonalMessageParams object to sign.\n * @returns Promise resolving to a signed message string.\n */\nexport type KeyringControllerSignMessageAction = {\n type: `KeyringController:signMessage`;\n handler: KeyringController['signMessage'];\n};\n\n/**\n * Signs EIP-7702 Authorization message by calling down into a specific keyring.\n *\n * @param params - EIP7702AuthorizationParams object to sign.\n * @returns Promise resolving to an EIP-7702 Authorization signature.\n * @throws Will throw UnsupportedSignEIP7702Authorization if the keyring does not support signing EIP-7702 Authorization messages.\n */\nexport type KeyringControllerSignEip7702AuthorizationAction = {\n type: `KeyringController:signEip7702Authorization`;\n handler: KeyringController['signEip7702Authorization'];\n};\n\n/**\n * Signs personal message by calling down into a specific keyring.\n *\n * @param messageParams - PersonalMessageParams object to sign.\n * @returns Promise resolving to a signed message string.\n */\nexport type KeyringControllerSignPersonalMessageAction = {\n type: `KeyringController:signPersonalMessage`;\n handler: KeyringController['signPersonalMessage'];\n};\n\n/**\n * Signs typed message by calling down into a specific keyring.\n *\n * @param messageParams - TypedMessageParams object to sign.\n * @param version - Compatibility version EIP712.\n * @throws Will throw when passed an unrecognized version.\n * @returns Promise resolving to a signed message string or an error if any.\n */\nexport type KeyringControllerSignTypedMessageAction = {\n type: `KeyringController:signTypedMessage`;\n handler: KeyringController['signTypedMessage'];\n};\n\n/**\n * Signs a transaction by calling down into a specific keyring.\n *\n * @param transaction - Transaction object to sign. Must be a `ethereumjs-tx` transaction instance.\n * @param from - Address to sign from, should be in keychain.\n * @param opts - An optional options object.\n * @returns Promise resolving to a signed transaction string.\n */\nexport type KeyringControllerSignTransactionAction = {\n type: `KeyringController:signTransaction`;\n handler: KeyringController['signTransaction'];\n};\n\n/**\n * Convert a base transaction to a base UserOperation.\n *\n * @param from - Address of the sender.\n * @param transactions - Base transactions to include in the UserOperation.\n * @param executionContext - The execution context to use for the UserOperation.\n * @returns A pseudo-UserOperation that can be used to construct a real.\n */\nexport type KeyringControllerPrepareUserOperationAction = {\n type: `KeyringController:prepareUserOperation`;\n handler: KeyringController['prepareUserOperation'];\n};\n\n/**\n * Patches properties of a UserOperation. Currently, only the\n * `paymasterAndData` can be patched.\n *\n * @param from - Address of the sender.\n * @param userOp - UserOperation to patch.\n * @param executionContext - The execution context to use for the UserOperation.\n * @returns A patch to apply to the UserOperation.\n */\nexport type KeyringControllerPatchUserOperationAction = {\n type: `KeyringController:patchUserOperation`;\n handler: KeyringController['patchUserOperation'];\n};\n\n/**\n * Signs an UserOperation.\n *\n * @param from - Address of the sender.\n * @param userOp - UserOperation to sign.\n * @param executionContext - The execution context to use for the UserOperation.\n * @returns The signature of the UserOperation.\n */\nexport type KeyringControllerSignUserOperationAction = {\n type: `KeyringController:signUserOperation`;\n handler: KeyringController['signUserOperation'];\n};\n\n/**\n * Select a keyring and execute the given operation with\n * the selected keyring, as a mutually exclusive atomic\n * operation.\n *\n * The method automatically persists changes at the end of the\n * function execution, or rolls back the changes if an error\n * is thrown.\n *\n * @param selector - Keyring selector object.\n * @param operation - Function to execute with the selected keyring.\n * @param options - Additional options.\n * @param options.createIfMissing - Whether to create a new keyring if the selected one is missing.\n * @param options.createWithData - Optional data to use when creating a new keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template SelectedKeyring - The type of the selected keyring.\n * @template CallbackResult - The type of the value resolved by the callback function.\n * @deprecated This method overload is deprecated. Use `withKeyring` without options instead.\n */\nexport type KeyringControllerWithKeyringAction = {\n type: `KeyringController:withKeyring`;\n handler: KeyringController['withKeyring'];\n};\n\n/**\n * Select a keyring and execute the given operation with the selected\n * keyring, **without** acquiring the controller's mutual exclusion lock.\n *\n * ## When to use this method\n *\n * This method is an escape hatch for read-only access to keyring data that\n * is immutable once the keyring is initialized. A typical safe use case is\n * reading the `mnemonic` from an `HdKeyring`: the mnemonic is set during\n * `deserialize()` and never mutated afterwards, so it can safely be read\n * without holding the lock.\n *\n * ## Why it is \"unsafe\"\n *\n * The \"unsafe\" designation mirrors the semantics of `unsafe { }` blocks in\n * Rust: the method itself does not enforce thread-safety guarantees. By\n * calling this method the **caller** explicitly takes responsibility for\n * ensuring that:\n *\n * - The operation is **read-only** — no state is mutated.\n * - The data being read is **immutable** after the keyring is initialized,\n * so concurrent locked operations cannot alter it while this callback\n * runs.\n *\n * Do **not** use this method to:\n * - Mutate keyring state (add accounts, sign, etc.) — use `withKeyring`.\n * - Read mutable fields that could change during concurrent operations.\n *\n * @param selector - Keyring selector object.\n * @param operation - Read-only function to execute with the selected keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template SelectedKeyring - The type of the selected keyring.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithKeyringUnsafeAction = {\n type: `KeyringController:withKeyringUnsafe`;\n handler: KeyringController['withKeyringUnsafe'];\n};\n\n/**\n * Select a keyring using its `KeyringV2` adapter, and execute\n * the given operation with the wrapped keyring as a mutually\n * exclusive atomic operation.\n *\n * The cached `KeyringV2` adapter is retrieved from the keyring\n * entry.\n *\n * A `KeyringV2Builder` for the selected keyring's type must exist\n * (either as a default or registered via the `keyringV2Builders`\n * constructor option); otherwise an error is thrown.\n *\n * The method automatically persists changes at the end of the\n * function execution, or rolls back the changes if an error\n * is thrown.\n *\n * @param selector - Keyring selector object.\n * @param operation - Function to execute with the wrapped V2 keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithKeyringV2Action = {\n type: `KeyringController:withKeyringV2`;\n handler: KeyringController['withKeyringV2'];\n};\n\n/**\n * Select a keyring, wrap it in a `KeyringV2` adapter, and execute\n * the given read-only operation **without** acquiring the controller's\n * mutual exclusion lock.\n *\n * ## When to use this method\n *\n * This method is an escape hatch for read-only access to keyring data that\n * is immutable once the keyring is initialized. A typical safe use case is\n * reading immutable fields from a `KeyringV2` adapter: data that is set\n * during initialization and never mutated afterwards.\n *\n * ## Why it is \"unsafe\"\n *\n * The \"unsafe\" designation mirrors the semantics of `unsafe { }` blocks in\n * Rust: the method itself does not enforce thread-safety guarantees. By\n * calling this method the **caller** explicitly takes responsibility for\n * ensuring that:\n *\n * - The operation is **read-only** — no state is mutated.\n * - The data being read is **immutable** after the keyring is initialized,\n * so concurrent locked operations cannot alter it while this callback\n * runs.\n *\n * Do **not** use this method to:\n * - Mutate keyring state (add accounts, sign, etc.) — use `withKeyringV2`.\n * - Read mutable fields that could change during concurrent operations.\n *\n * @param selector - Keyring selector object.\n * @param operation - Read-only function to execute with the wrapped V2 keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template SelectedKeyring - The type of the selected V2 keyring.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithKeyringV2UnsafeAction = {\n type: `KeyringController:withKeyringV2Unsafe`;\n handler: KeyringController['withKeyringV2Unsafe'];\n};\n\n/**\n * Execute an operation against all keyrings as a mutually exclusive atomic\n * operation. The operation receives a {@link RestrictedController} instance\n * that exposes a read-only live view of all keyrings as well as\n * `addNewKeyring` and `removeKeyring` methods to stage mutations.\n *\n * The method automatically persists changes at the end of the function\n * execution, or rolls back the changes if an error is thrown.\n *\n * @param operation - Function to execute with the restricted controller.\n * @returns Promise resolving to the result of the function execution.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithControllerAction = {\n type: `KeyringController:withController`;\n handler: KeyringController['withController'];\n};\n\n/**\n * Union of all KeyringController action types.\n */\nexport type KeyringControllerMethodActions =\n | KeyringControllerAddNewAccountAction\n | KeyringControllerCreateNewVaultAndRestoreAction\n | KeyringControllerCreateNewVaultAndKeychainAction\n | KeyringControllerAddNewKeyringAction\n | KeyringControllerIsUnlockedAction\n | KeyringControllerExportSeedPhraseAction\n | KeyringControllerGetAccountsAction\n | KeyringControllerGetEncryptionPublicKeyAction\n | KeyringControllerDecryptMessageAction\n | KeyringControllerGetKeyringForAccountAction\n | KeyringControllerGetKeyringsByTypeAction\n | KeyringControllerPersistAllKeyringsAction\n | KeyringControllerRemoveAccountAction\n | KeyringControllerSignMessageAction\n | KeyringControllerSignEip7702AuthorizationAction\n | KeyringControllerSignPersonalMessageAction\n | KeyringControllerSignTypedMessageAction\n | KeyringControllerSignTransactionAction\n | KeyringControllerPrepareUserOperationAction\n | KeyringControllerPatchUserOperationAction\n | KeyringControllerSignUserOperationAction\n | KeyringControllerWithKeyringAction\n | KeyringControllerWithKeyringUnsafeAction\n | KeyringControllerWithKeyringV2Action\n | KeyringControllerWithKeyringV2UnsafeAction\n | KeyringControllerWithControllerAction;\n"]}
|
|
@@ -61,6 +61,17 @@ export type KeyringControllerIsUnlockedAction = {
|
|
|
61
61
|
type: `KeyringController:isUnlocked`;
|
|
62
62
|
handler: KeyringController['isUnlocked'];
|
|
63
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* Gets the seed phrase of the HD keyring.
|
|
66
|
+
*
|
|
67
|
+
* @param password - Password of the keyring.
|
|
68
|
+
* @param keyringId - The id of the keyring.
|
|
69
|
+
* @returns Promise resolving to the seed phrase.
|
|
70
|
+
*/
|
|
71
|
+
export type KeyringControllerExportSeedPhraseAction = {
|
|
72
|
+
type: `KeyringController:exportSeedPhrase`;
|
|
73
|
+
handler: KeyringController['exportSeedPhrase'];
|
|
74
|
+
};
|
|
64
75
|
/**
|
|
65
76
|
* Returns the public addresses of all accounts from every keyring.
|
|
66
77
|
*
|
|
@@ -379,5 +390,5 @@ export type KeyringControllerWithControllerAction = {
|
|
|
379
390
|
/**
|
|
380
391
|
* Union of all KeyringController action types.
|
|
381
392
|
*/
|
|
382
|
-
export type KeyringControllerMethodActions = KeyringControllerAddNewAccountAction | KeyringControllerCreateNewVaultAndRestoreAction | KeyringControllerCreateNewVaultAndKeychainAction | KeyringControllerAddNewKeyringAction | KeyringControllerIsUnlockedAction | KeyringControllerGetAccountsAction | KeyringControllerGetEncryptionPublicKeyAction | KeyringControllerDecryptMessageAction | KeyringControllerGetKeyringForAccountAction | KeyringControllerGetKeyringsByTypeAction | KeyringControllerPersistAllKeyringsAction | KeyringControllerRemoveAccountAction | KeyringControllerSignMessageAction | KeyringControllerSignEip7702AuthorizationAction | KeyringControllerSignPersonalMessageAction | KeyringControllerSignTypedMessageAction | KeyringControllerSignTransactionAction | KeyringControllerPrepareUserOperationAction | KeyringControllerPatchUserOperationAction | KeyringControllerSignUserOperationAction | KeyringControllerWithKeyringAction | KeyringControllerWithKeyringUnsafeAction | KeyringControllerWithKeyringV2Action | KeyringControllerWithKeyringV2UnsafeAction | KeyringControllerWithControllerAction;
|
|
393
|
+
export type KeyringControllerMethodActions = KeyringControllerAddNewAccountAction | KeyringControllerCreateNewVaultAndRestoreAction | KeyringControllerCreateNewVaultAndKeychainAction | KeyringControllerAddNewKeyringAction | KeyringControllerIsUnlockedAction | KeyringControllerExportSeedPhraseAction | KeyringControllerGetAccountsAction | KeyringControllerGetEncryptionPublicKeyAction | KeyringControllerDecryptMessageAction | KeyringControllerGetKeyringForAccountAction | KeyringControllerGetKeyringsByTypeAction | KeyringControllerPersistAllKeyringsAction | KeyringControllerRemoveAccountAction | KeyringControllerSignMessageAction | KeyringControllerSignEip7702AuthorizationAction | KeyringControllerSignPersonalMessageAction | KeyringControllerSignTypedMessageAction | KeyringControllerSignTransactionAction | KeyringControllerPrepareUserOperationAction | KeyringControllerPatchUserOperationAction | KeyringControllerSignUserOperationAction | KeyringControllerWithKeyringAction | KeyringControllerWithKeyringUnsafeAction | KeyringControllerWithKeyringV2Action | KeyringControllerWithKeyringV2UnsafeAction | KeyringControllerWithControllerAction;
|
|
383
394
|
//# sourceMappingURL=KeyringController-method-action-types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyringController-method-action-types.d.cts","sourceRoot":"","s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OAAO,EAAE,iBAAiB,CAAC,qBAAqB,CAAC,CAAC;CACnD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;CAC9C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,8BAA8B,GACtC,oCAAoC,GACpC,+CAA+C,GAC/C,gDAAgD,GAChD,oCAAoC,GACpC,iCAAiC,GACjC,kCAAkC,GAClC,6CAA6C,GAC7C,qCAAqC,GACrC,2CAA2C,GAC3C,wCAAwC,GACxC,yCAAyC,GACzC,oCAAoC,GACpC,kCAAkC,GAClC,+CAA+C,GAC/C,0CAA0C,GAC1C,uCAAuC,GACvC,sCAAsC,GACtC,2CAA2C,GAC3C,yCAAyC,GACzC,wCAAwC,GACxC,kCAAkC,GAClC,wCAAwC,GACxC,oCAAoC,GACpC,0CAA0C,GAC1C,qCAAqC,CAAC"}
|
|
1
|
+
{"version":3,"file":"KeyringController-method-action-types.d.cts","sourceRoot":"","sources":["../src/KeyringController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gCAA4B;AAE7D;;;;;;GAMG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,iBAAiB,CAAC,eAAe,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,+CAA+C,GAAG;IAC5D,IAAI,EAAE,4CAA4C,CAAC;IACnD,OAAO,EAAE,iBAAiB,CAAC,0BAA0B,CAAC,CAAC;CACxD,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,gDAAgD,GAAG;IAC7D,IAAI,EAAE,6CAA6C,CAAC;IACpD,OAAO,EAAE,iBAAiB,CAAC,2BAA2B,CAAC,CAAC;CACzD,CA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C,GAC3C,wCAAwC,GACxC,yCAAyC,GACzC,oCAAoC,GACpC,kCAAkC,GAClC,+CAA+C,GAC/C,0CAA0C,GAC1C,uCAAuC,GACvC,sCAAsC,GACtC,2CAA2C,GAC3C,yCAAyC,GACzC,wCAAwC,GACxC,kCAAkC,GAClC,wCAAwC,GACxC,oCAAoC,GACpC,0CAA0C,GAC1C,qCAAqC,CAAC"}
|
|
@@ -61,6 +61,17 @@ export type KeyringControllerIsUnlockedAction = {
|
|
|
61
61
|
type: `KeyringController:isUnlocked`;
|
|
62
62
|
handler: KeyringController['isUnlocked'];
|
|
63
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* Gets the seed phrase of the HD keyring.
|
|
66
|
+
*
|
|
67
|
+
* @param password - Password of the keyring.
|
|
68
|
+
* @param keyringId - The id of the keyring.
|
|
69
|
+
* @returns Promise resolving to the seed phrase.
|
|
70
|
+
*/
|
|
71
|
+
export type KeyringControllerExportSeedPhraseAction = {
|
|
72
|
+
type: `KeyringController:exportSeedPhrase`;
|
|
73
|
+
handler: KeyringController['exportSeedPhrase'];
|
|
74
|
+
};
|
|
64
75
|
/**
|
|
65
76
|
* Returns the public addresses of all accounts from every keyring.
|
|
66
77
|
*
|
|
@@ -379,5 +390,5 @@ export type KeyringControllerWithControllerAction = {
|
|
|
379
390
|
/**
|
|
380
391
|
* Union of all KeyringController action types.
|
|
381
392
|
*/
|
|
382
|
-
export type KeyringControllerMethodActions = KeyringControllerAddNewAccountAction | KeyringControllerCreateNewVaultAndRestoreAction | KeyringControllerCreateNewVaultAndKeychainAction | KeyringControllerAddNewKeyringAction | KeyringControllerIsUnlockedAction | KeyringControllerGetAccountsAction | KeyringControllerGetEncryptionPublicKeyAction | KeyringControllerDecryptMessageAction | KeyringControllerGetKeyringForAccountAction | KeyringControllerGetKeyringsByTypeAction | KeyringControllerPersistAllKeyringsAction | KeyringControllerRemoveAccountAction | KeyringControllerSignMessageAction | KeyringControllerSignEip7702AuthorizationAction | KeyringControllerSignPersonalMessageAction | KeyringControllerSignTypedMessageAction | KeyringControllerSignTransactionAction | KeyringControllerPrepareUserOperationAction | KeyringControllerPatchUserOperationAction | KeyringControllerSignUserOperationAction | KeyringControllerWithKeyringAction | KeyringControllerWithKeyringUnsafeAction | KeyringControllerWithKeyringV2Action | KeyringControllerWithKeyringV2UnsafeAction | KeyringControllerWithControllerAction;
|
|
393
|
+
export type KeyringControllerMethodActions = KeyringControllerAddNewAccountAction | KeyringControllerCreateNewVaultAndRestoreAction | KeyringControllerCreateNewVaultAndKeychainAction | KeyringControllerAddNewKeyringAction | KeyringControllerIsUnlockedAction | KeyringControllerExportSeedPhraseAction | KeyringControllerGetAccountsAction | KeyringControllerGetEncryptionPublicKeyAction | KeyringControllerDecryptMessageAction | KeyringControllerGetKeyringForAccountAction | KeyringControllerGetKeyringsByTypeAction | KeyringControllerPersistAllKeyringsAction | KeyringControllerRemoveAccountAction | KeyringControllerSignMessageAction | KeyringControllerSignEip7702AuthorizationAction | KeyringControllerSignPersonalMessageAction | KeyringControllerSignTypedMessageAction | KeyringControllerSignTransactionAction | KeyringControllerPrepareUserOperationAction | KeyringControllerPatchUserOperationAction | KeyringControllerSignUserOperationAction | KeyringControllerWithKeyringAction | KeyringControllerWithKeyringUnsafeAction | KeyringControllerWithKeyringV2Action | KeyringControllerWithKeyringV2UnsafeAction | KeyringControllerWithControllerAction;
|
|
383
394
|
//# sourceMappingURL=KeyringController-method-action-types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyringController-method-action-types.d.mts","sourceRoot":"","sources":["../src/KeyringController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gCAA4B;AAE7D;;;;;;GAMG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,iBAAiB,CAAC,eAAe,CAAC,CAAC;CAC7C,CAAC;AAEF;;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tC,oCAAoC,GACpC,+CAA+C,GAC/C,gDAAgD,GAChD,oCAAoC,GACpC,iCAAiC,GACjC,kCAAkC,GAClC,6CAA6C,GAC7C,qCAAqC,GACrC,2CAA2C,GAC3C,wCAAwC,GACxC,yCAAyC,GACzC,oCAAoC,GACpC,kCAAkC,GAClC,+CAA+C,GAC/C,0CAA0C,GAC1C,uCAAuC,GACvC,sCAAsC,GACtC,2CAA2C,GAC3C,yCAAyC,GACzC,wCAAwC,GACxC,kCAAkC,GAClC,wCAAwC,GACxC,oCAAoC,GACpC,0CAA0C,GAC1C,qCAAqC,CAAC"}
|
|
1
|
+
{"version":3,"file":"KeyringController-method-action-types.d.mts","sourceRoot":"","sources":["../src/KeyringController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gCAA4B;AAE7D;;;;;;GAMG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,iBAAiB,CAAC,eAAe,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,+CAA+C,GAAG;IAC5D,IAAI,EAAE,4CAA4C,CAAC;IACnD,OAAO,EAAE,iBAAiB,CAAC,0BAA0B,CAAC,CAAC;CACxD,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,gDAAgD,GAAG;IAC7D,IAAI,EAAE,6CAA6C,CAAC;IACpD,OAAO,EAAE,iBAAiB,CAAC,2BAA2B,CAAC,CAAC;CACzD,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,iBAAiB,CAAC,eAAe,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,8BAA8B,CAAC;IACrC,OAAO,EAAE,iBAAi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 -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyringController-method-action-types.mjs","sourceRoot":"","sources":["../src/KeyringController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { KeyringController } from './KeyringController';\n\n/**\n * Adds a new account to the default (first) HD seed phrase keyring.\n *\n * @param accountCount - Number of accounts before adding a new one, used to\n * make the method idempotent.\n * @returns Promise resolving to the added account address.\n */\nexport type KeyringControllerAddNewAccountAction = {\n type: `KeyringController:addNewAccount`;\n handler: KeyringController['addNewAccount'];\n};\n\n/**\n * Effectively the same as creating a new keychain then populating it\n * using the given seed phrase.\n *\n * @param password - Password to unlock keychain.\n * @param seed - A BIP39-compliant seed phrase as Uint8Array,\n * either as a string or an array of UTF-8 bytes that represent the string.\n * @returns Promise resolving when the operation ends successfully.\n */\nexport type KeyringControllerCreateNewVaultAndRestoreAction = {\n type: `KeyringController:createNewVaultAndRestore`;\n handler: KeyringController['createNewVaultAndRestore'];\n};\n\n/**\n * Create a new vault and primary keyring.\n *\n * This only works if keyrings are empty. If there is a pre-existing unlocked vault, calling this will have no effect.\n * If there is a pre-existing locked vault, it will be replaced.\n *\n * @param password - Password to unlock the new vault.\n * @returns Promise resolving when the operation ends successfully.\n */\nexport type KeyringControllerCreateNewVaultAndKeychainAction = {\n type: `KeyringController:createNewVaultAndKeychain`;\n handler: KeyringController['createNewVaultAndKeychain'];\n};\n\n/**\n * Adds a new keyring of the given `type`.\n *\n * @param type - Keyring type name.\n * @param opts - Keyring options.\n * @throws If a builder for the given `type` does not exist.\n * @returns Promise resolving to the new keyring metadata.\n */\nexport type KeyringControllerAddNewKeyringAction = {\n type: `KeyringController:addNewKeyring`;\n handler: KeyringController['addNewKeyring'];\n};\n\n/**\n * Returns the status of the vault.\n *\n * @returns Boolean returning true if the vault is unlocked.\n */\nexport type KeyringControllerIsUnlockedAction = {\n type: `KeyringController:isUnlocked`;\n handler: KeyringController['isUnlocked'];\n};\n\n/**\n * Returns the public addresses of all accounts from every keyring.\n *\n * @returns A promise resolving to an array of addresses.\n */\nexport type KeyringControllerGetAccountsAction = {\n type: `KeyringController:getAccounts`;\n handler: KeyringController['getAccounts'];\n};\n\n/**\n * Get encryption public key.\n *\n * @param account - An account address.\n * @param opts - Additional encryption options.\n * @throws If the `account` does not exist or does not support the `getEncryptionPublicKey` method\n * @returns Promise resolving to encyption public key of the `account` if one exists.\n */\nexport type KeyringControllerGetEncryptionPublicKeyAction = {\n type: `KeyringController:getEncryptionPublicKey`;\n handler: KeyringController['getEncryptionPublicKey'];\n};\n\n/**\n * Attempts to decrypt the provided message parameters.\n *\n * @param messageParams - The decryption message parameters.\n * @param messageParams.from - The address of the account you want to use to decrypt the message.\n * @param messageParams.data - The encrypted data that you want to decrypt.\n * @returns The raw decryption result.\n */\nexport type KeyringControllerDecryptMessageAction = {\n type: `KeyringController:decryptMessage`;\n handler: KeyringController['decryptMessage'];\n};\n\n/**\n * Returns the currently initialized keyring that manages\n * the specified `address` if one exists.\n *\n * @deprecated Use of this method is discouraged as actions executed directly on\n * keyrings are not being reflected in the KeyringController state and not\n * persisted in the vault. Use `withKeyring` instead.\n * @param account - An account address.\n * @returns Promise resolving to keyring of the `account` if one exists.\n */\nexport type KeyringControllerGetKeyringForAccountAction = {\n type: `KeyringController:getKeyringForAccount`;\n handler: KeyringController['getKeyringForAccount'];\n};\n\n/**\n * Returns all keyrings of the given type.\n *\n * @deprecated Use of this method is discouraged as actions executed directly on\n * keyrings are not being reflected in the KeyringController state and not\n * persisted in the vault. Use `withKeyring` instead.\n * @param type - Keyring type name.\n * @returns An array of keyrings of the given type.\n */\nexport type KeyringControllerGetKeyringsByTypeAction = {\n type: `KeyringController:getKeyringsByType`;\n handler: KeyringController['getKeyringsByType'];\n};\n\n/**\n * Persist all serialized keyrings in the vault.\n *\n * @deprecated This method is being phased out in favor of `withKeyring`.\n * @returns Promise resolving with `true` value when the\n * operation completes.\n */\nexport type KeyringControllerPersistAllKeyringsAction = {\n type: `KeyringController:persistAllKeyrings`;\n handler: KeyringController['persistAllKeyrings'];\n};\n\n/**\n * Removes an account from keyring state.\n *\n * @param address - Address of the account to remove.\n * @fires KeyringController:accountRemoved\n * @returns Promise resolving when the account is removed.\n */\nexport type KeyringControllerRemoveAccountAction = {\n type: `KeyringController:removeAccount`;\n handler: KeyringController['removeAccount'];\n};\n\n/**\n * Signs message by calling down into a specific keyring.\n *\n * @param messageParams - PersonalMessageParams object to sign.\n * @returns Promise resolving to a signed message string.\n */\nexport type KeyringControllerSignMessageAction = {\n type: `KeyringController:signMessage`;\n handler: KeyringController['signMessage'];\n};\n\n/**\n * Signs EIP-7702 Authorization message by calling down into a specific keyring.\n *\n * @param params - EIP7702AuthorizationParams object to sign.\n * @returns Promise resolving to an EIP-7702 Authorization signature.\n * @throws Will throw UnsupportedSignEIP7702Authorization if the keyring does not support signing EIP-7702 Authorization messages.\n */\nexport type KeyringControllerSignEip7702AuthorizationAction = {\n type: `KeyringController:signEip7702Authorization`;\n handler: KeyringController['signEip7702Authorization'];\n};\n\n/**\n * Signs personal message by calling down into a specific keyring.\n *\n * @param messageParams - PersonalMessageParams object to sign.\n * @returns Promise resolving to a signed message string.\n */\nexport type KeyringControllerSignPersonalMessageAction = {\n type: `KeyringController:signPersonalMessage`;\n handler: KeyringController['signPersonalMessage'];\n};\n\n/**\n * Signs typed message by calling down into a specific keyring.\n *\n * @param messageParams - TypedMessageParams object to sign.\n * @param version - Compatibility version EIP712.\n * @throws Will throw when passed an unrecognized version.\n * @returns Promise resolving to a signed message string or an error if any.\n */\nexport type KeyringControllerSignTypedMessageAction = {\n type: `KeyringController:signTypedMessage`;\n handler: KeyringController['signTypedMessage'];\n};\n\n/**\n * Signs a transaction by calling down into a specific keyring.\n *\n * @param transaction - Transaction object to sign. Must be a `ethereumjs-tx` transaction instance.\n * @param from - Address to sign from, should be in keychain.\n * @param opts - An optional options object.\n * @returns Promise resolving to a signed transaction string.\n */\nexport type KeyringControllerSignTransactionAction = {\n type: `KeyringController:signTransaction`;\n handler: KeyringController['signTransaction'];\n};\n\n/**\n * Convert a base transaction to a base UserOperation.\n *\n * @param from - Address of the sender.\n * @param transactions - Base transactions to include in the UserOperation.\n * @param executionContext - The execution context to use for the UserOperation.\n * @returns A pseudo-UserOperation that can be used to construct a real.\n */\nexport type KeyringControllerPrepareUserOperationAction = {\n type: `KeyringController:prepareUserOperation`;\n handler: KeyringController['prepareUserOperation'];\n};\n\n/**\n * Patches properties of a UserOperation. Currently, only the\n * `paymasterAndData` can be patched.\n *\n * @param from - Address of the sender.\n * @param userOp - UserOperation to patch.\n * @param executionContext - The execution context to use for the UserOperation.\n * @returns A patch to apply to the UserOperation.\n */\nexport type KeyringControllerPatchUserOperationAction = {\n type: `KeyringController:patchUserOperation`;\n handler: KeyringController['patchUserOperation'];\n};\n\n/**\n * Signs an UserOperation.\n *\n * @param from - Address of the sender.\n * @param userOp - UserOperation to sign.\n * @param executionContext - The execution context to use for the UserOperation.\n * @returns The signature of the UserOperation.\n */\nexport type KeyringControllerSignUserOperationAction = {\n type: `KeyringController:signUserOperation`;\n handler: KeyringController['signUserOperation'];\n};\n\n/**\n * Select a keyring and execute the given operation with\n * the selected keyring, as a mutually exclusive atomic\n * operation.\n *\n * The method automatically persists changes at the end of the\n * function execution, or rolls back the changes if an error\n * is thrown.\n *\n * @param selector - Keyring selector object.\n * @param operation - Function to execute with the selected keyring.\n * @param options - Additional options.\n * @param options.createIfMissing - Whether to create a new keyring if the selected one is missing.\n * @param options.createWithData - Optional data to use when creating a new keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template SelectedKeyring - The type of the selected keyring.\n * @template CallbackResult - The type of the value resolved by the callback function.\n * @deprecated This method overload is deprecated. Use `withKeyring` without options instead.\n */\nexport type KeyringControllerWithKeyringAction = {\n type: `KeyringController:withKeyring`;\n handler: KeyringController['withKeyring'];\n};\n\n/**\n * Select a keyring and execute the given operation with the selected\n * keyring, **without** acquiring the controller's mutual exclusion lock.\n *\n * ## When to use this method\n *\n * This method is an escape hatch for read-only access to keyring data that\n * is immutable once the keyring is initialized. A typical safe use case is\n * reading the `mnemonic` from an `HdKeyring`: the mnemonic is set during\n * `deserialize()` and never mutated afterwards, so it can safely be read\n * without holding the lock.\n *\n * ## Why it is \"unsafe\"\n *\n * The \"unsafe\" designation mirrors the semantics of `unsafe { }` blocks in\n * Rust: the method itself does not enforce thread-safety guarantees. By\n * calling this method the **caller** explicitly takes responsibility for\n * ensuring that:\n *\n * - The operation is **read-only** — no state is mutated.\n * - The data being read is **immutable** after the keyring is initialized,\n * so concurrent locked operations cannot alter it while this callback\n * runs.\n *\n * Do **not** use this method to:\n * - Mutate keyring state (add accounts, sign, etc.) — use `withKeyring`.\n * - Read mutable fields that could change during concurrent operations.\n *\n * @param selector - Keyring selector object.\n * @param operation - Read-only function to execute with the selected keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template SelectedKeyring - The type of the selected keyring.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithKeyringUnsafeAction = {\n type: `KeyringController:withKeyringUnsafe`;\n handler: KeyringController['withKeyringUnsafe'];\n};\n\n/**\n * Select a keyring using its `KeyringV2` adapter, and execute\n * the given operation with the wrapped keyring as a mutually\n * exclusive atomic operation.\n *\n * The cached `KeyringV2` adapter is retrieved from the keyring\n * entry.\n *\n * A `KeyringV2Builder` for the selected keyring's type must exist\n * (either as a default or registered via the `keyringV2Builders`\n * constructor option); otherwise an error is thrown.\n *\n * The method automatically persists changes at the end of the\n * function execution, or rolls back the changes if an error\n * is thrown.\n *\n * @param selector - Keyring selector object.\n * @param operation - Function to execute with the wrapped V2 keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithKeyringV2Action = {\n type: `KeyringController:withKeyringV2`;\n handler: KeyringController['withKeyringV2'];\n};\n\n/**\n * Select a keyring, wrap it in a `KeyringV2` adapter, and execute\n * the given read-only operation **without** acquiring the controller's\n * mutual exclusion lock.\n *\n * ## When to use this method\n *\n * This method is an escape hatch for read-only access to keyring data that\n * is immutable once the keyring is initialized. A typical safe use case is\n * reading immutable fields from a `KeyringV2` adapter: data that is set\n * during initialization and never mutated afterwards.\n *\n * ## Why it is \"unsafe\"\n *\n * The \"unsafe\" designation mirrors the semantics of `unsafe { }` blocks in\n * Rust: the method itself does not enforce thread-safety guarantees. By\n * calling this method the **caller** explicitly takes responsibility for\n * ensuring that:\n *\n * - The operation is **read-only** — no state is mutated.\n * - The data being read is **immutable** after the keyring is initialized,\n * so concurrent locked operations cannot alter it while this callback\n * runs.\n *\n * Do **not** use this method to:\n * - Mutate keyring state (add accounts, sign, etc.) — use `withKeyringV2`.\n * - Read mutable fields that could change during concurrent operations.\n *\n * @param selector - Keyring selector object.\n * @param operation - Read-only function to execute with the wrapped V2 keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template SelectedKeyring - The type of the selected V2 keyring.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithKeyringV2UnsafeAction = {\n type: `KeyringController:withKeyringV2Unsafe`;\n handler: KeyringController['withKeyringV2Unsafe'];\n};\n\n/**\n * Execute an operation against all keyrings as a mutually exclusive atomic\n * operation. The operation receives a {@link RestrictedController} instance\n * that exposes a read-only live view of all keyrings as well as\n * `addNewKeyring` and `removeKeyring` methods to stage mutations.\n *\n * The method automatically persists changes at the end of the function\n * execution, or rolls back the changes if an error is thrown.\n *\n * @param operation - Function to execute with the restricted controller.\n * @returns Promise resolving to the result of the function execution.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithControllerAction = {\n type: `KeyringController:withController`;\n handler: KeyringController['withController'];\n};\n\n/**\n * Union of all KeyringController action types.\n */\nexport type KeyringControllerMethodActions =\n | KeyringControllerAddNewAccountAction\n | KeyringControllerCreateNewVaultAndRestoreAction\n | KeyringControllerCreateNewVaultAndKeychainAction\n | KeyringControllerAddNewKeyringAction\n | KeyringControllerIsUnlockedAction\n | KeyringControllerGetAccountsAction\n | KeyringControllerGetEncryptionPublicKeyAction\n | KeyringControllerDecryptMessageAction\n | KeyringControllerGetKeyringForAccountAction\n | KeyringControllerGetKeyringsByTypeAction\n | KeyringControllerPersistAllKeyringsAction\n | KeyringControllerRemoveAccountAction\n | KeyringControllerSignMessageAction\n | KeyringControllerSignEip7702AuthorizationAction\n | KeyringControllerSignPersonalMessageAction\n | KeyringControllerSignTypedMessageAction\n | KeyringControllerSignTransactionAction\n | KeyringControllerPrepareUserOperationAction\n | KeyringControllerPatchUserOperationAction\n | KeyringControllerSignUserOperationAction\n | KeyringControllerWithKeyringAction\n | KeyringControllerWithKeyringUnsafeAction\n | KeyringControllerWithKeyringV2Action\n | KeyringControllerWithKeyringV2UnsafeAction\n | KeyringControllerWithControllerAction;\n"]}
|
|
1
|
+
{"version":3,"file":"KeyringController-method-action-types.mjs","sourceRoot":"","sources":["../src/KeyringController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { KeyringController } from './KeyringController';\n\n/**\n * Adds a new account to the default (first) HD seed phrase keyring.\n *\n * @param accountCount - Number of accounts before adding a new one, used to\n * make the method idempotent.\n * @returns Promise resolving to the added account address.\n */\nexport type KeyringControllerAddNewAccountAction = {\n type: `KeyringController:addNewAccount`;\n handler: KeyringController['addNewAccount'];\n};\n\n/**\n * Effectively the same as creating a new keychain then populating it\n * using the given seed phrase.\n *\n * @param password - Password to unlock keychain.\n * @param seed - A BIP39-compliant seed phrase as Uint8Array,\n * either as a string or an array of UTF-8 bytes that represent the string.\n * @returns Promise resolving when the operation ends successfully.\n */\nexport type KeyringControllerCreateNewVaultAndRestoreAction = {\n type: `KeyringController:createNewVaultAndRestore`;\n handler: KeyringController['createNewVaultAndRestore'];\n};\n\n/**\n * Create a new vault and primary keyring.\n *\n * This only works if keyrings are empty. If there is a pre-existing unlocked vault, calling this will have no effect.\n * If there is a pre-existing locked vault, it will be replaced.\n *\n * @param password - Password to unlock the new vault.\n * @returns Promise resolving when the operation ends successfully.\n */\nexport type KeyringControllerCreateNewVaultAndKeychainAction = {\n type: `KeyringController:createNewVaultAndKeychain`;\n handler: KeyringController['createNewVaultAndKeychain'];\n};\n\n/**\n * Adds a new keyring of the given `type`.\n *\n * @param type - Keyring type name.\n * @param opts - Keyring options.\n * @throws If a builder for the given `type` does not exist.\n * @returns Promise resolving to the new keyring metadata.\n */\nexport type KeyringControllerAddNewKeyringAction = {\n type: `KeyringController:addNewKeyring`;\n handler: KeyringController['addNewKeyring'];\n};\n\n/**\n * Returns the status of the vault.\n *\n * @returns Boolean returning true if the vault is unlocked.\n */\nexport type KeyringControllerIsUnlockedAction = {\n type: `KeyringController:isUnlocked`;\n handler: KeyringController['isUnlocked'];\n};\n\n/**\n * Gets the seed phrase of the HD keyring.\n *\n * @param password - Password of the keyring.\n * @param keyringId - The id of the keyring.\n * @returns Promise resolving to the seed phrase.\n */\nexport type KeyringControllerExportSeedPhraseAction = {\n type: `KeyringController:exportSeedPhrase`;\n handler: KeyringController['exportSeedPhrase'];\n};\n\n/**\n * Returns the public addresses of all accounts from every keyring.\n *\n * @returns A promise resolving to an array of addresses.\n */\nexport type KeyringControllerGetAccountsAction = {\n type: `KeyringController:getAccounts`;\n handler: KeyringController['getAccounts'];\n};\n\n/**\n * Get encryption public key.\n *\n * @param account - An account address.\n * @param opts - Additional encryption options.\n * @throws If the `account` does not exist or does not support the `getEncryptionPublicKey` method\n * @returns Promise resolving to encyption public key of the `account` if one exists.\n */\nexport type KeyringControllerGetEncryptionPublicKeyAction = {\n type: `KeyringController:getEncryptionPublicKey`;\n handler: KeyringController['getEncryptionPublicKey'];\n};\n\n/**\n * Attempts to decrypt the provided message parameters.\n *\n * @param messageParams - The decryption message parameters.\n * @param messageParams.from - The address of the account you want to use to decrypt the message.\n * @param messageParams.data - The encrypted data that you want to decrypt.\n * @returns The raw decryption result.\n */\nexport type KeyringControllerDecryptMessageAction = {\n type: `KeyringController:decryptMessage`;\n handler: KeyringController['decryptMessage'];\n};\n\n/**\n * Returns the currently initialized keyring that manages\n * the specified `address` if one exists.\n *\n * @deprecated Use of this method is discouraged as actions executed directly on\n * keyrings are not being reflected in the KeyringController state and not\n * persisted in the vault. Use `withKeyring` instead.\n * @param account - An account address.\n * @returns Promise resolving to keyring of the `account` if one exists.\n */\nexport type KeyringControllerGetKeyringForAccountAction = {\n type: `KeyringController:getKeyringForAccount`;\n handler: KeyringController['getKeyringForAccount'];\n};\n\n/**\n * Returns all keyrings of the given type.\n *\n * @deprecated Use of this method is discouraged as actions executed directly on\n * keyrings are not being reflected in the KeyringController state and not\n * persisted in the vault. Use `withKeyring` instead.\n * @param type - Keyring type name.\n * @returns An array of keyrings of the given type.\n */\nexport type KeyringControllerGetKeyringsByTypeAction = {\n type: `KeyringController:getKeyringsByType`;\n handler: KeyringController['getKeyringsByType'];\n};\n\n/**\n * Persist all serialized keyrings in the vault.\n *\n * @deprecated This method is being phased out in favor of `withKeyring`.\n * @returns Promise resolving with `true` value when the\n * operation completes.\n */\nexport type KeyringControllerPersistAllKeyringsAction = {\n type: `KeyringController:persistAllKeyrings`;\n handler: KeyringController['persistAllKeyrings'];\n};\n\n/**\n * Removes an account from keyring state.\n *\n * @param address - Address of the account to remove.\n * @fires KeyringController:accountRemoved\n * @returns Promise resolving when the account is removed.\n */\nexport type KeyringControllerRemoveAccountAction = {\n type: `KeyringController:removeAccount`;\n handler: KeyringController['removeAccount'];\n};\n\n/**\n * Signs message by calling down into a specific keyring.\n *\n * @param messageParams - PersonalMessageParams object to sign.\n * @returns Promise resolving to a signed message string.\n */\nexport type KeyringControllerSignMessageAction = {\n type: `KeyringController:signMessage`;\n handler: KeyringController['signMessage'];\n};\n\n/**\n * Signs EIP-7702 Authorization message by calling down into a specific keyring.\n *\n * @param params - EIP7702AuthorizationParams object to sign.\n * @returns Promise resolving to an EIP-7702 Authorization signature.\n * @throws Will throw UnsupportedSignEIP7702Authorization if the keyring does not support signing EIP-7702 Authorization messages.\n */\nexport type KeyringControllerSignEip7702AuthorizationAction = {\n type: `KeyringController:signEip7702Authorization`;\n handler: KeyringController['signEip7702Authorization'];\n};\n\n/**\n * Signs personal message by calling down into a specific keyring.\n *\n * @param messageParams - PersonalMessageParams object to sign.\n * @returns Promise resolving to a signed message string.\n */\nexport type KeyringControllerSignPersonalMessageAction = {\n type: `KeyringController:signPersonalMessage`;\n handler: KeyringController['signPersonalMessage'];\n};\n\n/**\n * Signs typed message by calling down into a specific keyring.\n *\n * @param messageParams - TypedMessageParams object to sign.\n * @param version - Compatibility version EIP712.\n * @throws Will throw when passed an unrecognized version.\n * @returns Promise resolving to a signed message string or an error if any.\n */\nexport type KeyringControllerSignTypedMessageAction = {\n type: `KeyringController:signTypedMessage`;\n handler: KeyringController['signTypedMessage'];\n};\n\n/**\n * Signs a transaction by calling down into a specific keyring.\n *\n * @param transaction - Transaction object to sign. Must be a `ethereumjs-tx` transaction instance.\n * @param from - Address to sign from, should be in keychain.\n * @param opts - An optional options object.\n * @returns Promise resolving to a signed transaction string.\n */\nexport type KeyringControllerSignTransactionAction = {\n type: `KeyringController:signTransaction`;\n handler: KeyringController['signTransaction'];\n};\n\n/**\n * Convert a base transaction to a base UserOperation.\n *\n * @param from - Address of the sender.\n * @param transactions - Base transactions to include in the UserOperation.\n * @param executionContext - The execution context to use for the UserOperation.\n * @returns A pseudo-UserOperation that can be used to construct a real.\n */\nexport type KeyringControllerPrepareUserOperationAction = {\n type: `KeyringController:prepareUserOperation`;\n handler: KeyringController['prepareUserOperation'];\n};\n\n/**\n * Patches properties of a UserOperation. Currently, only the\n * `paymasterAndData` can be patched.\n *\n * @param from - Address of the sender.\n * @param userOp - UserOperation to patch.\n * @param executionContext - The execution context to use for the UserOperation.\n * @returns A patch to apply to the UserOperation.\n */\nexport type KeyringControllerPatchUserOperationAction = {\n type: `KeyringController:patchUserOperation`;\n handler: KeyringController['patchUserOperation'];\n};\n\n/**\n * Signs an UserOperation.\n *\n * @param from - Address of the sender.\n * @param userOp - UserOperation to sign.\n * @param executionContext - The execution context to use for the UserOperation.\n * @returns The signature of the UserOperation.\n */\nexport type KeyringControllerSignUserOperationAction = {\n type: `KeyringController:signUserOperation`;\n handler: KeyringController['signUserOperation'];\n};\n\n/**\n * Select a keyring and execute the given operation with\n * the selected keyring, as a mutually exclusive atomic\n * operation.\n *\n * The method automatically persists changes at the end of the\n * function execution, or rolls back the changes if an error\n * is thrown.\n *\n * @param selector - Keyring selector object.\n * @param operation - Function to execute with the selected keyring.\n * @param options - Additional options.\n * @param options.createIfMissing - Whether to create a new keyring if the selected one is missing.\n * @param options.createWithData - Optional data to use when creating a new keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template SelectedKeyring - The type of the selected keyring.\n * @template CallbackResult - The type of the value resolved by the callback function.\n * @deprecated This method overload is deprecated. Use `withKeyring` without options instead.\n */\nexport type KeyringControllerWithKeyringAction = {\n type: `KeyringController:withKeyring`;\n handler: KeyringController['withKeyring'];\n};\n\n/**\n * Select a keyring and execute the given operation with the selected\n * keyring, **without** acquiring the controller's mutual exclusion lock.\n *\n * ## When to use this method\n *\n * This method is an escape hatch for read-only access to keyring data that\n * is immutable once the keyring is initialized. A typical safe use case is\n * reading the `mnemonic` from an `HdKeyring`: the mnemonic is set during\n * `deserialize()` and never mutated afterwards, so it can safely be read\n * without holding the lock.\n *\n * ## Why it is \"unsafe\"\n *\n * The \"unsafe\" designation mirrors the semantics of `unsafe { }` blocks in\n * Rust: the method itself does not enforce thread-safety guarantees. By\n * calling this method the **caller** explicitly takes responsibility for\n * ensuring that:\n *\n * - The operation is **read-only** — no state is mutated.\n * - The data being read is **immutable** after the keyring is initialized,\n * so concurrent locked operations cannot alter it while this callback\n * runs.\n *\n * Do **not** use this method to:\n * - Mutate keyring state (add accounts, sign, etc.) — use `withKeyring`.\n * - Read mutable fields that could change during concurrent operations.\n *\n * @param selector - Keyring selector object.\n * @param operation - Read-only function to execute with the selected keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template SelectedKeyring - The type of the selected keyring.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithKeyringUnsafeAction = {\n type: `KeyringController:withKeyringUnsafe`;\n handler: KeyringController['withKeyringUnsafe'];\n};\n\n/**\n * Select a keyring using its `KeyringV2` adapter, and execute\n * the given operation with the wrapped keyring as a mutually\n * exclusive atomic operation.\n *\n * The cached `KeyringV2` adapter is retrieved from the keyring\n * entry.\n *\n * A `KeyringV2Builder` for the selected keyring's type must exist\n * (either as a default or registered via the `keyringV2Builders`\n * constructor option); otherwise an error is thrown.\n *\n * The method automatically persists changes at the end of the\n * function execution, or rolls back the changes if an error\n * is thrown.\n *\n * @param selector - Keyring selector object.\n * @param operation - Function to execute with the wrapped V2 keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithKeyringV2Action = {\n type: `KeyringController:withKeyringV2`;\n handler: KeyringController['withKeyringV2'];\n};\n\n/**\n * Select a keyring, wrap it in a `KeyringV2` adapter, and execute\n * the given read-only operation **without** acquiring the controller's\n * mutual exclusion lock.\n *\n * ## When to use this method\n *\n * This method is an escape hatch for read-only access to keyring data that\n * is immutable once the keyring is initialized. A typical safe use case is\n * reading immutable fields from a `KeyringV2` adapter: data that is set\n * during initialization and never mutated afterwards.\n *\n * ## Why it is \"unsafe\"\n *\n * The \"unsafe\" designation mirrors the semantics of `unsafe { }` blocks in\n * Rust: the method itself does not enforce thread-safety guarantees. By\n * calling this method the **caller** explicitly takes responsibility for\n * ensuring that:\n *\n * - The operation is **read-only** — no state is mutated.\n * - The data being read is **immutable** after the keyring is initialized,\n * so concurrent locked operations cannot alter it while this callback\n * runs.\n *\n * Do **not** use this method to:\n * - Mutate keyring state (add accounts, sign, etc.) — use `withKeyringV2`.\n * - Read mutable fields that could change during concurrent operations.\n *\n * @param selector - Keyring selector object.\n * @param operation - Read-only function to execute with the wrapped V2 keyring.\n * @returns Promise resolving to the result of the function execution.\n * @template SelectedKeyring - The type of the selected V2 keyring.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithKeyringV2UnsafeAction = {\n type: `KeyringController:withKeyringV2Unsafe`;\n handler: KeyringController['withKeyringV2Unsafe'];\n};\n\n/**\n * Execute an operation against all keyrings as a mutually exclusive atomic\n * operation. The operation receives a {@link RestrictedController} instance\n * that exposes a read-only live view of all keyrings as well as\n * `addNewKeyring` and `removeKeyring` methods to stage mutations.\n *\n * The method automatically persists changes at the end of the function\n * execution, or rolls back the changes if an error is thrown.\n *\n * @param operation - Function to execute with the restricted controller.\n * @returns Promise resolving to the result of the function execution.\n * @template CallbackResult - The type of the value resolved by the callback function.\n */\nexport type KeyringControllerWithControllerAction = {\n type: `KeyringController:withController`;\n handler: KeyringController['withController'];\n};\n\n/**\n * Union of all KeyringController action types.\n */\nexport type KeyringControllerMethodActions =\n | KeyringControllerAddNewAccountAction\n | KeyringControllerCreateNewVaultAndRestoreAction\n | KeyringControllerCreateNewVaultAndKeychainAction\n | KeyringControllerAddNewKeyringAction\n | KeyringControllerIsUnlockedAction\n | KeyringControllerExportSeedPhraseAction\n | KeyringControllerGetAccountsAction\n | KeyringControllerGetEncryptionPublicKeyAction\n | KeyringControllerDecryptMessageAction\n | KeyringControllerGetKeyringForAccountAction\n | KeyringControllerGetKeyringsByTypeAction\n | KeyringControllerPersistAllKeyringsAction\n | KeyringControllerRemoveAccountAction\n | KeyringControllerSignMessageAction\n | KeyringControllerSignEip7702AuthorizationAction\n | KeyringControllerSignPersonalMessageAction\n | KeyringControllerSignTypedMessageAction\n | KeyringControllerSignTransactionAction\n | KeyringControllerPrepareUserOperationAction\n | KeyringControllerPatchUserOperationAction\n | KeyringControllerSignUserOperationAction\n | KeyringControllerWithKeyringAction\n | KeyringControllerWithKeyringUnsafeAction\n | KeyringControllerWithKeyringV2Action\n | KeyringControllerWithKeyringV2UnsafeAction\n | KeyringControllerWithControllerAction;\n"]}
|