Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

rainlanguage/rain-sdk

Repository files navigation

Rain Protocol SDK

An in-progress SDK for interacting with Rain Protocol's factories and their child contracts.

This SDK uses an ethers.js interface.

Development setup (for contributors)

Nix shell

Install the nix shell if you haven't already.

curl -L https://nixos.org/nix/install | sh

Drop into a nix-shell.

nix-shell

The shell hook will:

  1. yarn install
  2. Compile the @beehive-innovation/rain-protocol and @beehive-innovation/statusfi dependencies
  3. Copy the compiled typechain files into src/typechain.

Commands

This library uses TSDX to compile and bundle. To run TSDX, use:

yarn start

This builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.

To do a one-off build, use yarn build.

To run tests, use yarn test.

Bundle Analysis

size-limit is set up to calculate the library size with yarn size and visualize the bundle with yarn analyze.

Generate documentation

To generate the documentation you should drop into nix-shell and run:

generate-docs

This will generate the docs files in the docs/markdown directory. You can change the output directory editing the package.json file, where the command generate-docs is set. For example, change the output folder from docs/markdown to myDocs/ in the -o flag:

Change this:

"generate-docs": "api-extractor run --local && api-documenter markdown -i docs/input -o docs/markdown"

To have this:

"generate-docs": "api-extractor run --local && api-documenter markdown -i docs/input -o myDocs"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published