@avaprotocol/sdk-js 0.7.3 → 0.8.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 +30 -11
- package/dist/index.d.mts +683 -864
- package/dist/index.d.ts +683 -864
- package/dist/index.js +2862 -1829
- package/dist/index.mjs +2869 -1831
- package/package.json +4 -1
- package/dist/index.cjs +0 -4506
- package/dist/index.d.cts +0 -1499
package/README.md
CHANGED
|
@@ -33,9 +33,7 @@ import { AvaSDK } from "ava-sdk-js";
|
|
|
33
33
|
|
|
34
34
|
## Development
|
|
35
35
|
|
|
36
|
-
###
|
|
37
|
-
|
|
38
|
-
In the case of `.proto` files at https://github.com/AvaProtocol/EigenLayer-AVS/blob/main/protobuf/avs.proto changes, the gRPC types needs to be regenerated.Before regenerating the types from the protocol buffers, ensure that `grpc_tools_node_protoc` is installed globally on your system. You can install it using npm:
|
|
36
|
+
### Install Dependencies and Download Proto Files
|
|
39
37
|
|
|
40
38
|
```bash
|
|
41
39
|
npm install # install grpc-tools, etc. as dev dependencies
|
|
@@ -49,9 +47,10 @@ npm run proto-download
|
|
|
49
47
|
|
|
50
48
|
# Generate the TypeScript types and gRPC code based on the downloaded .proto file
|
|
51
49
|
npm run gen-protoc
|
|
52
|
-
```
|
|
53
50
|
|
|
54
|
-
|
|
51
|
+
# Build the source files in to ./dist folder
|
|
52
|
+
npm run build
|
|
53
|
+
```
|
|
55
54
|
|
|
56
55
|
### Running Tests
|
|
57
56
|
|
|
@@ -64,7 +63,26 @@ To ensure the SDK is functioning correctly, we have a comprehensive test suite.
|
|
|
64
63
|
```
|
|
65
64
|
2. Before running the e2e tests, make sure to configure the required environment variables in your `.env.test` file, based on the `.env.example` file.
|
|
66
65
|
|
|
67
|
-
3.
|
|
66
|
+
3. Bring up a locally environment for aggregator
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
docker compose up -d --pull always
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
> By default the above command will pull the docker image of the latest commit on the `main` branch of https://github.com/AvaProtocol/EigenLayer-AVS. Alternatively, we could also run tests against a specific commit with the below command.
|
|
73
|
+
>
|
|
74
|
+
> ```
|
|
75
|
+
> export AVS_BUILD_VERSION=git-commit-hash-123
|
|
76
|
+
> docker compose up -d --pull always
|
|
77
|
+
> ```
|
|
78
|
+
|
|
79
|
+
4. Generate a test API key for the local tests with the following command. It will automatically save the output to the `TEST_API_KEY` variable in `.env.test`.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npm run gen-apikey
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
5. Run the test command with env variables set in `.env.test`.
|
|
68
86
|
|
|
69
87
|
```bash
|
|
70
88
|
# Run all tests
|
|
@@ -74,12 +92,13 @@ To ensure the SDK is functioning correctly, we have a comprehensive test suite.
|
|
|
74
92
|
npm run test:select -- <authWithSignature>
|
|
75
93
|
```
|
|
76
94
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
95
|
+
> Note: In order to individually test `cancelTask` or `deleteTask`, `createTask` test needs to run first.
|
|
96
|
+
|
|
97
|
+
> ```bash
|
|
98
|
+
> npm run test:select -- "createTask|cancelTask"
|
|
99
|
+
> ```
|
|
81
100
|
|
|
82
|
-
This will execute all unit and integration tests. Make sure all tests pass before submitting a pull request or deploying changes.
|
|
101
|
+
This will execute all unit and integration tests. Make sure all tests pass in local dev environment before submitting a pull request or deploying changes.
|
|
83
102
|
|
|
84
103
|
## Release Process
|
|
85
104
|
|