/beamsplitter

BeamSplitter Monorepo

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

BeamSplitter Logo

npm version License: AGPL v3 Discord Support

BeamSplitter is Coherence's cryptocurrency ETF program on Solana. This monorepo contains the on-chain program as well as the client sdk for interacting with Beamsplitter. It uses, Anchor, a framework that simplifies development on Solana. You can use the program to construct and deconstruct on-chain ETF-like tokens.

Installing the SDK (Off-Chain)

If you are building a client that interacts with Beamsplitter, install the sdk through:

yarn add @coherence-finance/sdk

Looking for examples? Check out the EXAMPLES.md file

Calling the Program (On-Chain)

If you are writing a Solana program that makes CPI of Beamsplitter:

// Better docs coming soon 😛

Building and Deploying the Program

If you are building from source or deploying your own instance of Beamsplitter, use the steps below.

First install Anchor and it's dependencies.

Next, install the necessary test client dependencies with:

yarn

Next, compile the program and generate the IDL for the tests with Anchor's build command:

anchor build

Deploy the program with Anchor's deploy command:

anchor deploy

Beamsplitter is live 🎉.

Testing

Anchor, and therefore Beamsplitter, uses ts-Mocha a Typescript wrapper around Mocha.

Integration tests can be added under the tests directory. Execute the tests with:

yarn test