1 | ## @0x/web3-wrapper
|
2 |
|
3 | Web3-wrapper is a JSON-RPC client for Ethereum nodes. It is a type-safe alternative to [Web3.js](https://github.com/ethereum/web3.js/) written in TypeScript.
|
4 |
|
5 | ### Read the [Documentation](https://github.com/0xProject/0x-monorepo/blob/development/packages/web3-wrapper/docs/reference.mdx).
|
6 |
|
7 | ## Installation
|
8 |
|
9 | ```bash
|
10 | yarn add @0x/web3-wrapper
|
11 | ```
|
12 |
|
13 | If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
|
14 |
|
15 | ```json
|
16 | "compilerOptions": {
|
17 | "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
|
18 | }
|
19 | ```
|
20 |
|
21 | ## Contributing
|
22 |
|
23 | We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.
|
24 |
|
25 | Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
|
26 |
|
27 | ### Install dependencies
|
28 |
|
29 | If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
|
30 |
|
31 | ```bash
|
32 | yarn config set workspaces-experimental true
|
33 | ```
|
34 |
|
35 | Then install dependencies
|
36 |
|
37 | ```bash
|
38 | yarn install
|
39 | ```
|
40 |
|
41 | ### Build
|
42 |
|
43 | To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
|
44 |
|
45 | ```bash
|
46 | PKG=@0x/web3-wrapper yarn build
|
47 | ```
|
48 |
|
49 | Or continuously rebuild on change:
|
50 |
|
51 | ```bash
|
52 | PKG=@0x/web3-wrapper yarn watch
|
53 | ```
|
54 |
|
55 | ### Clean
|
56 |
|
57 | ```bash
|
58 | yarn clean
|
59 | ```
|
60 |
|
61 | ### Lint
|
62 |
|
63 | ```bash
|
64 | yarn lint
|
65 | ```
|
66 |
|
67 | ### Run Tests
|
68 |
|
69 | ```bash
|
70 | yarn test
|
71 | ```
|
72 |
|
\ | No newline at end of file |