From ebbbf1e8bb2562708f89de431fc630ea7d665624 Mon Sep 17 00:00:00 2001 From: Junaid <86780488+jdevcs@users.noreply.github.com> Date: Tue, 30 Apr 2024 10:47:48 +0200 Subject: [PATCH] =?UTF-8?q?Add=20the=20missing=20types=20to=20the=20?= =?UTF-8?q?=E2=80=9Daccounts=E2=80=9C=20(#7011)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * updated types * changelog update --- packages/web3/CHANGELOG.md | 6 +++++- packages/web3/src/types.ts | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/web3/CHANGELOG.md b/packages/web3/CHANGELOG.md index 5b7242c7ebb..69473aeb916 100644 --- a/packages/web3/CHANGELOG.md +++ b/packages/web3/CHANGELOG.md @@ -262,4 +262,8 @@ Documentation: - Added `signature` to type `AbiFunctionFragment` (#6922) - update type `Withdrawals`, `block` and `BlockHeaderOutput` to include properties of eip 4844, 4895, 4788 (#6933) -## [Unreleased] \ No newline at end of file +## [Unreleased] + +### added + +- Updated type `Web3EthInterface.accounts` to includes `privateKeyToAccount`,`privateKeyToAddress`,and `privateKeyToPublicKey` (#6762) \ No newline at end of file diff --git a/packages/web3/src/types.ts b/packages/web3/src/types.ts index fb14e6b2e1a..ef9bcc379cf 100644 --- a/packages/web3/src/types.ts +++ b/packages/web3/src/types.ts @@ -90,6 +90,9 @@ export interface Web3EthInterface extends Eth { options?: Record, ) => Promise; wallet: Wallet; + privateKeyToAddress: (privateKey: Bytes) => string; + privateKeyToPublicKey: (privateKey: Bytes, isCompressed: boolean) => string; + parseAndValidatePrivateKey: (data: Bytes, ignoreLength?: boolean) => Uint8Array; }; personal: Personal; }