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

Add the missing types to the ”accounts“ #7011

Merged
merged 2 commits into from
Apr 30, 2024
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
6 changes: 5 additions & 1 deletion packages/web3/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
## [Unreleased]

### added

- Updated type `Web3EthInterface.accounts` to includes `privateKeyToAccount`,`privateKeyToAddress`,and `privateKeyToPublicKey` (#6762)
3 changes: 3 additions & 0 deletions packages/web3/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ export interface Web3EthInterface extends Eth {
options?: Record<string, unknown>,
) => Promise<Web3Account>;
wallet: Wallet;
privateKeyToAddress: (privateKey: Bytes) => string;
privateKeyToPublicKey: (privateKey: Bytes, isCompressed: boolean) => string;
parseAndValidatePrivateKey: (data: Bytes, ignoreLength?: boolean) => Uint8Array;
};
personal: Personal;
}