Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: address pr feedbacks
  • Loading branch information
mathieuartu committed Dec 4, 2025
commit c6d16790e9b2e7982cfd930f7415381cbcedbf24
2 changes: 1 addition & 1 deletion packages/keyring-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Add `EthKeyringWrapper` abstract class for Ethereum-based `KeyringV2` implementations ([#404](https://github.com/MetaMask/accounts/pull/404))
- Provides common Ethereum signing method routing (`submitRequest`) for all Eth keyrings.
- Provides common Ethereum signing method routing (`submitRequest`) for all Ethereum-based keyrings.
- Add `KeyringWrapper` base class to adapt legacy keyrings to `KeyringV2` ([#398](https://github.com/MetaMask/accounts/pull/398))

## [21.3.0]
Expand Down
6 changes: 3 additions & 3 deletions packages/keyring-api/src/eth/v2/eth-keyring-wrapper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TransactionFactory, type TypedTxData } from '@ethereumjs/tx';
import type { MessageTypes, TypedMessage } from '@metamask/eth-sig-util';
import { SignTypedDataVersion } from '@metamask/eth-sig-util';
import type { Keyring } from '@metamask/keyring-utils';
import type { EthKeyring } from '@metamask/keyring-utils';
import { assert } from '@metamask/superstruct';
import { add0x, type Hex, type Json } from '@metamask/utils';

Expand Down Expand Up @@ -37,7 +37,7 @@ export enum EthKeyringMethod {
/**
* Options for constructing an EthKeyringWrapper.
*/
export type EthKeyringWrapperOptions<InnerKeyring extends Keyring> =
export type EthKeyringWrapperOptions<InnerKeyring extends EthKeyring> =
KeyringWrapperOptions<InnerKeyring>;

/**
Expand All @@ -54,7 +54,7 @@ export type EthKeyringWrapperOptions<InnerKeyring extends Keyring> =
* - `exportAccount()` (optional): Export private key in specified format
*/
export abstract class EthKeyringWrapper<
InnerKeyring extends Keyring,
InnerKeyring extends EthKeyring,
KeyringAccountType extends KeyringAccount = KeyringAccount,
> extends KeyringWrapper<InnerKeyring, KeyringAccountType> {
/**
Expand Down
7 changes: 2 additions & 5 deletions packages/keyring-eth-hd/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add `HdKeyringV2` class implementing `KeyringV2` interface ([#398](https://github.com/MetaMask/accounts/pull/398))
- Add `HdKeyringV2` class implementing `KeyringV2` interface ([#398](https://github.com/MetaMask/accounts/pull/398)), ([#404](https://github.com/MetaMask/accounts/pull/404))
- Wraps legacy `HdKeyring` to expose accounts via the unified `KeyringV2` API and the `KeyringAccount` type.

### Changed

- `HdKeyringV2` now extends `EthKeyringWrapper` for common Ethereum logic ([#404](https://github.com/MetaMask/accounts/pull/404))
- Extends `EthKeyringWrapper` for common Ethereum logic.

## [13.0.0]

Expand Down
4 changes: 4 additions & 0 deletions packages/keyring-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add `EthKeyring` alias export for the legacy `Keyring` type ([#404](https://github.com/MetaMask/accounts/pull/404))

## [3.1.0]

### Added
Expand Down
6 changes: 6 additions & 0 deletions packages/keyring-utils/src/keyring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,3 +279,9 @@ export type Keyring = {
*/
destroy?(): Promise<void>;
};

/**
* The legacy `Keyring` is Ethereum only, so we can alias it here for better
* clarity.
*/
export type EthKeyring = Keyring;
Loading