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

Commit 3bda14d

Browse files
author
Santiago Trujillo Zuluaga
authored
added methods (privateKeyToAddress, parseAndValidatePrivateKey,and privateKeyToPublicKey) to web3.eth.accounts (#6621)
* added privateKeyToAddress, parseAndValidatePrivateKey,and privateKeyToPublicKey * added methods to web3.eth.accounts * Update CHANGELOG.md
1 parent 20cc5da commit 3bda14d

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

packages/web3/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,8 @@ Documentation:
173173

174174
- Dependencies updated ( details are in root changelog )
175175

176-
## [Unreleased]
176+
## [Unreleased]
177+
178+
### Added
179+
180+
- Added methods (privateKeyToAddress, parseAndValidatePrivateKey, and privateKeyToPublicKey) to web3.eth.accounts (#6620)

packages/web3/src/accounts.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ import {
3030
signTransaction,
3131
sign,
3232
Wallet,
33+
privateKeyToAddress,
34+
parseAndValidatePrivateKey,
35+
privateKeyToPublicKey,
3336
} from 'web3-eth-accounts';
3437

3538
/**
@@ -99,5 +102,8 @@ export const initAccountsForContext = (context: Web3Context<EthExecutionAPI>) =>
99102
recover,
100103
encrypt,
101104
wallet,
102-
};
105+
privateKeyToAddress,
106+
parseAndValidatePrivateKey,
107+
privateKeyToPublicKey,
108+
}
103109
};

0 commit comments

Comments
 (0)