Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the user to use only web3 as dependency #5771

Merged
merged 20 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d22fc0e
export web3 sub-packages and their default exports from `web3` package
Muhammad-Altabba Jan 20, 2023
5bc4071
Merge branch '4.x' into feature/5508/use-web3-as-only-dependency
Muhammad-Altabba Jan 22, 2023
39cc0d5
Merge branch '4.x' into feature/5508/use-web3-as-only-dependency
Muhammad-Altabba Jan 26, 2023
f74372c
export eth and providers sub-packages inside `eth` and `providers` na…
Muhammad-Altabba Jan 27, 2023
8b1c107
at web3-eth-accounts, rename `sign` and `signTransaction` to `signWit…
Muhammad-Altabba Jan 30, 2023
c7f9ad5
rename `Web3Error` interface to `Web3ErrorInterface`
Muhammad-Altabba Jan 30, 2023
a1da3d0
move all types from `/packages/web3-eth-abi/src/types.ts` to `web3-ty…
Muhammad-Altabba Jan 30, 2023
f90478f
fix import `AbiEventFragment`
Muhammad-Altabba Jan 30, 2023
a72431b
moved `TypedArray` to `web3-types`
Muhammad-Altabba Jan 30, 2023
e842d63
rename `Web3DeferredPromise` interface to `Web3DeferredPromiseInterface`
Muhammad-Altabba Jan 31, 2023
e0d4244
do a flat export for `web3-errors` and `web3-types` at `web3` package
Muhammad-Altabba Jan 31, 2023
faa5cd7
rename `Web3Error` to `BaseWeb3Error`
Muhammad-Altabba Jan 31, 2023
56f9391
revert naming change for signWithPrivateKey and signTransactionWithPr…
Muhammad-Altabba Feb 1, 2023
6ab11b1
update CHANGELOG.md for #5771
Muhammad-Altabba Feb 1, 2023
fda8a73
Merge remote-tracking branch 'origin/4.x' into feature/5508/use-web3-…
Muhammad-Altabba Feb 1, 2023
17f2dbd
export types defined at the `web3` package
Muhammad-Altabba Feb 1, 2023
8a02301
updates for the breaking change of using `require('web3')`
Muhammad-Altabba Feb 1, 2023
b06dcc3
Merge branch '4.x' into feature/5508/use-web3-as-only-dependency
Muhammad-Altabba Feb 2, 2023
a2afd9f
fix a broken documentation link
Muhammad-Altabba Feb 2, 2023
001a9bc
Merge branch '4.x' into feature/5508/use-web3-as-only-dependency
jdevcs Feb 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/web3-providers-http/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,5 @@ export default class HttpProvider<
throw new MethodNotImplementedError();
}
}

export { HttpProvider };
2 changes: 2 additions & 0 deletions packages/web3-providers-ipc/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,5 @@ export default class IpcProvider<API extends Web3APISpec = EthExecutionAPI> exte
super._onDisconnect(code, data);
}
}

export { IpcProvider };
5 changes: 3 additions & 2 deletions packages/web3-providers-ws/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ import {
Web3APISpec,
Web3ProviderStatus,
} from 'web3-types';
import { isNullish } from 'web3-utils';
import { isNullish, SocketProvider } from 'web3-utils';
import { InvalidConnectionError, ConnectionNotOpenError } from 'web3-errors';
import { SocketProvider } from 'web3-utils';

export { ClientRequestArgs } from 'http';
// todo had to ignore, introduce error in doc generation,see why/better solution
Expand Down Expand Up @@ -159,3 +158,5 @@ export default class WebSocketProvider<
this._removeSocketListeners();
}
}

export { WebSocketProvider };
12 changes: 7 additions & 5 deletions packages/web3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@
"jest-extended": "^3.0.1",
"prettier": "^2.7.1",
"ts-jest": "^28.0.7",
"typescript": "^4.7.4",
"web3-providers-http": "^4.0.1-alpha.5",
"web3-providers-ipc": "^4.0.1-alpha.5",
"web3-providers-ws": "^4.0.1-alpha.5"
"typescript": "^4.7.4"
},
"dependencies": {
"web3-core": "^4.0.1-alpha.5",
Expand All @@ -73,7 +70,12 @@
"web3-eth-iban": "^4.0.1-alpha.5",
"web3-eth-personal": "^4.0.1-alpha.5",
"web3-net": "^4.0.1-alpha.5",
"web3-providers-http": "^4.0.1-alpha.5",
"web3-providers-ipc": "^4.0.1-alpha.5",
"web3-providers-ws": "^4.0.1-alpha.5",
"web3-rpc-methods": "^0.1.0-alpha.4",
"web3-types": "^0.1.1-alpha.4",
"web3-utils": "^4.0.1-alpha.5"
"web3-utils": "^4.0.1-alpha.5",
"web3-validator": "^0.1.1-alpha.5"
}
}
31 changes: 30 additions & 1 deletion packages/web3/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,35 @@ along with web3.js. If not, see <http://www.gnu.org/licenses/>.
/**
* This comment _supports3_ [Markdown](https://marked.js.org/)
*/

import Web3 from './web3';

export = Web3;
export default Web3;

export { Web3 };
export { Web3Eth } from 'web3-eth';
export { Contract } from 'web3-eth-contract';
export { Iban } from 'web3-eth-iban';
export { Personal } from 'web3-eth-personal';
export { Net } from 'web3-net';
export { HttpProvider } from 'web3-providers-http';
export { IpcProvider } from 'web3-providers-ipc';
export { WebSocketProvider } from 'web3-providers-ws';

export * as core from 'web3-core';
export * as errors from 'web3-errors';
export * as eth from 'web3-eth';
export * as ethAbi from 'web3-eth-abi';
export * as ethAccounts from 'web3-eth-accounts';
export * as ethContract from 'web3-eth-contract';
export * as ethEns from 'web3-eth-ens';
export * as ethPersonal from 'web3-eth-personal';
export * as ethIban from 'web3-eth-iban';
export * as net from 'web3-net';
export * as providersHttp from 'web3-providers-http';
export * as providersIpc from 'web3-providers-ipc';
export * as providersWs from 'web3-providers-ws';
export * as rpcMethods from 'web3-rpc-methods';
export * as types from 'web3-types';
export * as utils from 'web3-utils';
export * as validator from 'web3-validator';