Skip to content

Commit

Permalink
chore: reexport signature types, add changelogs
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysu committed Nov 8, 2024
1 parent 54b0430 commit 2f28971
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2803,3 +2803,9 @@ If there are any bugs, improvements, optimizations or any new feature proposal f
- Fix Contract methods input param type any[] (#7340)

## [Unreleased]

### Fixed

#### web3

- Export Web3Account, Wallet and signature related types. (#7374)
4 changes: 4 additions & 0 deletions packages/web3-eth-accounts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,7 @@ Documentation:
- `hashMessage` now has a new optional param `skipPrefix` with a default value of `false`. A new function `signRaw` was added to sign a message without prefix. (#7346)

## [Unreleased]

### Removed

- Move signature related types to web3-types. Re-export them for backwards compatibility. (#7374)
10 changes: 9 additions & 1 deletion packages/web3-eth-accounts/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@ You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see <http://www.gnu.org/licenses/>.
*/

import { Web3BaseWalletAccount, HexString } from 'web3-types';
import {
HexString,
SignatureObject,
SignResult,
SignTransactionResult,
Web3BaseWalletAccount,
} from 'web3-types';
import { AccessListEIP2930Transaction, FeeMarketEIP1559Transaction, Transaction } from './tx';

export { SignatureObject, SignResult, SignTransactionResult };

export interface Web3Account extends Web3BaseWalletAccount {
address: HexString;
privateKey: HexString;
Expand Down
4 changes: 4 additions & 0 deletions packages/web3-types/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,7 @@ Documentation:
- `FilterParams` type added (#7353)

## [Unreleased]

#### Added

- Add signature related types. (#7374)
6 changes: 6 additions & 0 deletions packages/web3/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -561,3 +561,9 @@ Documentation:
- Fix Contract methods input param type any[] (#7340)

## [Unreleased]

### Fixed

#### web3

- Export Web3Account, Wallet and signature related types. (#7374)
1 change: 0 additions & 1 deletion packages/web3/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,4 +364,3 @@ export * as validator from 'web3-validator';
*/
export * from 'web3-errors';
export * from 'web3-types';
export type { Web3Account, Wallet } from 'web3-eth-accounts';
2 changes: 2 additions & 0 deletions packages/web3/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ import { Net } from 'web3-net';
import { Iban } from 'web3-eth-iban';
import { Personal } from 'web3-eth-personal';

export type { Web3Account, Wallet } from 'web3-eth-accounts';

/**
* The Ethereum interface for main web3 object. It provides extra methods in addition to `web3-eth` interface.
*
Expand Down

0 comments on commit 2f28971

Please sign in to comment.