diff --git a/CHANGELOG.md b/CHANGELOG.md index 91d8d858ed7..6c97c573755 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/packages/web3-eth-accounts/CHANGELOG.md b/packages/web3-eth-accounts/CHANGELOG.md index 939bd836ce8..e707999a1c2 100644 --- a/packages/web3-eth-accounts/CHANGELOG.md +++ b/packages/web3-eth-accounts/CHANGELOG.md @@ -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) diff --git a/packages/web3-eth-accounts/src/types.ts b/packages/web3-eth-accounts/src/types.ts index ff8080cdf6a..54a7aba7b78 100644 --- a/packages/web3-eth-accounts/src/types.ts +++ b/packages/web3-eth-accounts/src/types.ts @@ -15,9 +15,17 @@ You should have received a copy of the GNU Lesser General Public License along with web3.js. If not, see . */ -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; diff --git a/packages/web3-types/CHANGELOG.md b/packages/web3-types/CHANGELOG.md index 4158022da52..c78df9f3265 100644 --- a/packages/web3-types/CHANGELOG.md +++ b/packages/web3-types/CHANGELOG.md @@ -221,3 +221,7 @@ Documentation: - `FilterParams` type added (#7353) ## [Unreleased] + +#### Added + +- Add signature related types. (#7374) diff --git a/packages/web3/CHANGELOG.md b/packages/web3/CHANGELOG.md index f3ec9b9679e..b1f440e0074 100644 --- a/packages/web3/CHANGELOG.md +++ b/packages/web3/CHANGELOG.md @@ -561,3 +561,9 @@ Documentation: - Fix Contract methods input param type any[] (#7340) ## [Unreleased] + +### Fixed + +#### web3 + +- Export Web3Account, Wallet and signature related types. (#7374) diff --git a/packages/web3/src/index.ts b/packages/web3/src/index.ts index ee43c31df85..24a7b1aa501 100644 --- a/packages/web3/src/index.ts +++ b/packages/web3/src/index.ts @@ -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'; diff --git a/packages/web3/src/types.ts b/packages/web3/src/types.ts index 3b87896789c..341e017015c 100644 --- a/packages/web3/src/types.ts +++ b/packages/web3/src/types.ts @@ -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. *