vertex-sdk-monorepo

Vertex Typescript SDK

Monorepo for the Vertex TS SDK. The Vertex SDK is a collection of utilities for interacting with the Vertex API and contracts.

SDK Docs

Packages

@vertex-protocol/client

Exposes VertexClient, which composes utils for API & contract interaction.

@vertex-protocol/contracts

Exports ABIs, types, and utility functions for interacting with contracts

@vertex-protocol/utils

Common utilities, including our BigNumber library of choice at Vertex, bignumber.js

Development

Workspace Scripts

This is a Lerna monorepo. See package.json for common tasks, some of which are:

clean/build/dev/lint: Fairly common & self-explanatory tasks, operate on the entire repo

gen-typedoc: Generates documentation using TypeDoc

link/unlink-local: Used for local package development. Uses yarn link/unlink (docs) to enable other local repos to consume Vertex packages without having to publish a new version.

When making a change to the SDK, you will need to build the SDK, then run yarn install --force on the consuming repo for the changes to be picked up.

link/unlink-react-package-dependencies: Used for local development of web-related packages. These scripts are required because certain web libraries require that only one instance be present, so we need to link these dependencies to a singular source of truth. The sequence should be:

  • Run yarn link in the relevant node_modules/ folder (ex. node_modules/react) of the frontend repository
    • vertex-web-monorepo has a util script in package.json that runs through all of these steps
  • Run link-react-package-dependencies in this repo

To unlink, run unlink-react-package-dependencies and then yarn unlink in the relevant node_modules/ folder.

Generated using TypeDoc