Skip to content

Commit

Permalink
Add the missing types to the ”accounts“ (#7011)
Browse files Browse the repository at this point in the history
* updated types

* changelog update
  • Loading branch information
jdevcs committed Apr 30, 2024
1 parent de3e8f8 commit ebbbf1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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;
}

1 comment on commit ebbbf1e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: ebbbf1e Previous: 6c075db Ratio
processingTx 9143 ops/sec (±3.69%) 9301 ops/sec (±4.81%) 1.02
processingContractDeploy 39489 ops/sec (±6.69%) 39129 ops/sec (±7.62%) 0.99
processingContractMethodSend 19441 ops/sec (±6.81%) 19443 ops/sec (±5.19%) 1.00
processingContractMethodCall 38213 ops/sec (±5.75%) 38971 ops/sec (±6.34%) 1.02
abiEncode 43776 ops/sec (±6.41%) 44252 ops/sec (±6.92%) 1.01
abiDecode 29494 ops/sec (±8.25%) 30419 ops/sec (±8.89%) 1.03
sign 1565 ops/sec (±1.59%) 1656 ops/sec (±4.08%) 1.06
verify 364 ops/sec (±2.41%) 373 ops/sec (±0.78%) 1.02

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.