Skip to content

Commit

Permalink
added methods (privateKeyToAddress, parseAndValidatePrivateKey,and pr…
Browse files Browse the repository at this point in the history
…ivateKeyToPublicKey) to web3.eth.accounts (#6621)

* added privateKeyToAddress, parseAndValidatePrivateKey,and privateKeyToPublicKey

* added methods to web3.eth.accounts

* Update CHANGELOG.md
  • Loading branch information
Santiago Trujillo Zuluaga authored Nov 27, 2023
1 parent 20cc5da commit 3bda14d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/web3/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,8 @@ Documentation:

- Dependencies updated ( details are in root changelog )

## [Unreleased]
## [Unreleased]

### Added

- Added methods (privateKeyToAddress, parseAndValidatePrivateKey, and privateKeyToPublicKey) to web3.eth.accounts (#6620)
8 changes: 7 additions & 1 deletion packages/web3/src/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ import {
signTransaction,
sign,
Wallet,
privateKeyToAddress,
parseAndValidatePrivateKey,
privateKeyToPublicKey,
} from 'web3-eth-accounts';

/**
Expand Down Expand Up @@ -99,5 +102,8 @@ export const initAccountsForContext = (context: Web3Context<EthExecutionAPI>) =>
recover,
encrypt,
wallet,
};
privateKeyToAddress,
parseAndValidatePrivateKey,
privateKeyToPublicKey,
}
};

0 comments on commit 3bda14d

Please sign in to comment.