Go to file
Conner Gallagher f66566cba4 updated docusaurus 2022-05-20 13:10:05 -06:00
.github/workflows init 2022-05-17 10:42:04 -06:00
.vscode init 2022-05-17 10:42:04 -06:00
cli docs 2022-05-20 12:44:41 -06:00
directory init 2022-05-17 10:42:04 -06:00
libraries docs 2022-05-20 12:44:41 -06:00
oracles fixed programs test 2022-05-19 14:49:38 -06:00
packages fixed programs test 2022-05-19 14:49:38 -06:00
programs Publish 2022-05-20 12:16:19 -06:00
scripts fixed programs test 2022-05-19 14:49:38 -06:00
website updated docusaurus 2022-05-20 13:10:05 -06:00
.eslintrc.json refactored example programs 2022-05-18 15:00:17 -06:00
.gitignore refactored example programs 2022-05-18 15:00:17 -06:00
Anchor.toml localnet:env command fix 2022-05-19 15:59:30 -06:00
Cargo.toml fixed programs test 2022-05-19 14:49:38 -06:00
README.md docs 2022-05-20 12:44:41 -06:00
lerna.json init 2022-05-17 10:42:04 -06:00
package.json fixed programs test 2022-05-19 14:49:38 -06:00
tsconfig.json refactored example programs 2022-05-18 15:00:17 -06:00
yarn.lock updated docusaurus 2022-05-20 13:10:05 -06:00

README.md

switchboard-v2

A monorepo containing APIs, Utils, and examples for Switchboard V2.

Table of Contents

Libraries

Package Description
Typescript Typescript client to interact with Switchboard V2.
Typescript Lite Typescript "Lite" client to deserialize aggregator accounts
Sbv2 Utils Typescript library with helpful utility functions
Python Python client to interact with Switchboard V2.
Rust Rust client to interact with Switchboard V2.
CLI Command Line Interface (CLI) to interact with Switchboard V2.

Program Examples

Package Description
anchor-feed-parser Anchor example program demonstrating how to deserialize and read an onchain aggregator.
spl-feed-parser Solana Program Library example demonstrating how to deserialize and read an onchain aggregator.
anchor-vrf-parser Anchor example program demonstrating how to deserialize and read an onchain verifiable randomness function (VRF) account.

Client Examples

Package Description
feed-parser Typescript example demonstrating how to read an aggregator account.
feed-walkthrough Typescript example demonstrating how to create and manage your own oracle queue.
lease-observer Typescript example demonstrating how to send PagerDuty alerts when your aggregator lease is low on funds.

Dependencies

Setup

yarn install
yarn workspaces run build
yarn workspace @switchboard-xyz/switchboardv2-cli link
anchor build && node ./scripts/setup-example-programs.js

Localnet Testing Setup

You may wish to run your own oracle for integration test. The following command will create a devnet Switchboard environment and output a Switchboard.env file to assist copying

sbv2 localnet:env --keypair ../payer-keypair.json -o .switchboard

Set the [provider.cluster] in Anchor.toml to localnet.

Run each of the commands in a separate shell

  • ./.switchboard/start-local-validator.sh
  • ./.switchboard/start-oracle.sh
  • anchor test --skip-local-validator

Website

yarn workspace website start