This document provides information on setting up a development environment for the AVA SDK JavaScript repository.
This document provides information on setting up a development environment for the AVA SDK JavaScript repository. It covers prerequisites, repository setup, build processes, and environment configurations necessary for developing, testing, and contributing to the SDK.
For information about building and running tests, see Building and Testing.
Before starting development with the AVA SDK JS repository, ensure you have the following prerequisites installed:
Sources:
To set up the development environment:
The AVA SDK JS repository is organized as a monorepo using Yarn workspaces.
Sources:
To build the SDK, run:
This will build all packages in the monorepo. To clean the build artifacts, run:
Sources:
The SDK uses gRPC for communication with the AVS service. The repository includes scripts for downloading the latest protobuf definitions and generating gRPC code.
To download the latest protobuf definitions and generate gRPC code:
Sources:
The test configuration is defined in jest.config.cjs, which specifies the test directory, transformation settings, and module mappings.
To run all tests:
To run specific tests:
Sources:
The examples directory contains sample code demonstrating how to use the SDK. These examples can be run against different environments.
The examples configuration (config.ts) defines settings for different environments:
Each environment configuration includes:
Sources:
For local development, you can set up a development environment that runs on your local machine.
To set up a local development environment:
Follow the instructions in the EigenLayer-AVS repository to set up a local AVS service.
Generate an API key for testing:
Use the development environment configuration in examples:
Sources:
The TypeScript configuration is defined in tsconfig.json and specifies compilation settings:
Target: ES2020
Module: ESNext
Module Resolution: Node
Root Directory: ./
Base URL: .
Path Mappings:
For examples, a separate TypeScript configuration is used:
Sources:
The repository uses ESLint for code quality enforcement, with configuration in eslint.config.mjs. The configuration includes:
Sources:
The development environment is part of the larger Ava Protocol ecosystem, which includes:
Sources:
Setting up a development environment for the AVA SDK JS repository involves:
This setup allows developers to contribute to the SDK, test changes, and experiment with the Ava Protocol's functionality in various environments.