Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions packages/keyring-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ 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 Ethereum-based keyrings.
- Add `KeyringWrapper` base class to adapt legacy keyrings to `KeyringV2` ([#398](https://github.com/MetaMask/accounts/pull/398))

### Changed
Expand Down
2 changes: 2 additions & 0 deletions packages/keyring-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@ethereumjs/tx": "^5.4.0",
"@metamask/eth-sig-util": "^8.2.0",
"@metamask/keyring-utils": "workspace:^",
"@metamask/superstruct": "^3.1.0",
"@metamask/utils": "^11.1.0",
Expand Down
1 change: 1 addition & 0 deletions packages/keyring-api/src/eth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * from './erc4337';
export * from './rpc';
export * from './types';
export * from './utils';
export * from './v2';
16 changes: 16 additions & 0 deletions packages/keyring-api/src/eth/rpc/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ export type EthEip7702Authorization = Infer<
typeof EthEip7702AuthorizationStruct
>;

/**
* A struct for getEncryptionPublicKey options.
*/
export const EthGetEncryptionPublicKeyOptionsStruct = record(
string(),
unknown(),
);

// ============================================================================
// RPC Method Parameter Structs
// ============================================================================
Expand Down Expand Up @@ -214,3 +222,11 @@ export const EthSignEip7702AuthorizationParamsStruct = tuple([
export type EthSignEip7702AuthorizationParams = Infer<
typeof EthSignEip7702AuthorizationParamsStruct
>;

/**
* Parameters for `eth_getEncryptionPublicKey`.
*/
export const EthGetEncryptionPublicKeyParamsStruct = tuple([
EthAddressStruct, // address
optional(EthGetEncryptionPublicKeyOptionsStruct), // options
]);
Loading
Loading