@dydxprotocol/v4-client-js 1.1.30 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,7 +15,8 @@ The v4-Client Typescript client is used for placing transactions and querying th
15
15
 
16
16
  ## Development
17
17
 
18
- `v4-client-js` uses node `v18` for development. You can use `nvm` to manage different versions of node.
18
+ `v4-client-js` uses node `v18` for development, see the .nvmrc file [here](https://github.com/dydxprotocol/v4-clients/blob/main/v4-client-js/.nvmrc).
19
+ You can use `nvm` to manage different versions of node.
19
20
 
20
21
  ```
21
22
  nvm install
@@ -30,6 +31,40 @@ node -v # expected: v18.x.x (should match .nvmrc)
30
31
  npm -v # expected: 8.x.x
31
32
  ```
32
33
 
34
+ ### 1. Clone or fork the V4 clients repo
35
+
36
+ ```bash
37
+ git clone git@github.com:dydxprotocol/v4-clients.git
38
+ ```
39
+
40
+ ### 2. Go to one of the examples
41
+
42
+ - Go to `v4-client-js/examples`
43
+
44
+ ```bash
45
+ cd v4-client-js/examples
46
+ ```
47
+
48
+ These examples by default use a test account with `DYDX_TEST_MNEMONIC` from the TS client library under `v4-client-js/examples/constants`.
49
+
50
+ ### 3. Run the scripts with node
51
+
52
+ ```bash
53
+ npm install
54
+ npm run build
55
+ ```
56
+
57
+ You should now see a `/build/examples` dir generated with JS files. We will use node to run these scripts
58
+
59
+ - Open a terminal to run an example, e.g. account_endpoints.
60
+
61
+ ```bash
62
+ node ../build/examples/composite_example.js
63
+
64
+ ```
65
+
66
+ Everytime you change the TS code, you need to run `npm run build` again, before you execute using node.
67
+
33
68
  ## Single-JS for mobile apps
34
69
 
35
70
  Mobile apps needs to load JS as a single JS file. To build, run