Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit ebbbf1e

Browse files
authored
Add the missing types to the ”accounts“ (#7011)
* updated types * changelog update
1 parent de3e8f8 commit ebbbf1e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

packages/web3/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,4 +262,8 @@ Documentation:
262262
- Added `signature` to type `AbiFunctionFragment` (#6922)
263263
- update type `Withdrawals`, `block` and `BlockHeaderOutput` to include properties of eip 4844, 4895, 4788 (#6933)
264264

265-
## [Unreleased]
265+
## [Unreleased]
266+
267+
### added
268+
269+
- Updated type `Web3EthInterface.accounts` to includes `privateKeyToAccount`,`privateKeyToAddress`,and `privateKeyToPublicKey` (#6762)

packages/web3/src/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ export interface Web3EthInterface extends Eth {
9090
options?: Record<string, unknown>,
9191
) => Promise<Web3Account>;
9292
wallet: Wallet;
93+
privateKeyToAddress: (privateKey: Bytes) => string;
94+
privateKeyToPublicKey: (privateKey: Bytes, isCompressed: boolean) => string;
95+
parseAndValidatePrivateKey: (data: Bytes, ignoreLength?: boolean) => Uint8Array;
9396
};
9497
personal: Personal;
9598
}

0 commit comments

Comments
 (0)