This document provides an overview of the `ava-sdk-js` repository structure, describing its monorepo organization, package composition, and supporting infra.
This document provides an overview of the ava-sdk-js repository structure, describing its monorepo organization, package composition, and supporting infrastructure. For information about the high-level SDK architecture, see SDK Architecture.
The ava-sdk-js repository is organized as a monorepo using Yarn workspaces, allowing multiple packages to be managed within a single repository. The monorepo approach enables code sharing between packages while maintaining separate versioning and publication processes.
Sources:
The repository contains two primary packages under the packages/ directory:
The @avaprotocol/sdk-js package is the core component, providing the primary SDK functionality. This package implements the client interface and workflow management systems, enabling developers to interact with the Ava Protocol's AVS service.
Key features:
Sources:
The @avaprotocol/types package contains shared type definitions used by the SDK and potentially other Ava Protocol applications. It defines enums, interfaces, and type definitions for the various components of the SDK.
Package contents:
Sources:
The packages in the repository are connected through workspace dependencies, with the sdk-js package depending on the types package. This setup allows for type definitions to be shared and maintained separately from the implementation code.
Sources:
The repository includes a comprehensive testing setup using Jest for test runner and Babel for transpilation. Tests are organized by functionality, covering different aspects of the SDK.
Sources:
The SDK communicates with the AVS service using gRPC. The repository includes scripts for downloading protocol buffer definitions and generating the necessary gRPC client code.
Sources:
The repository uses:
Each package has its own build configuration, extending the root TypeScript configuration. The SDK exports CommonJS and ESM modules along with TypeScript declaration files.
Sources:
The repository includes several configuration files:
Sources:
The repository uses Changesets for managing releases and versioning:
changeset, version, and individual package build commandsSources:
The repository specifies the following engine requirements:
These requirements ensure consistent development and build environments across all contributors.
Sources: