Switchboard x Solana
A collection of libraries and examples for interacting with Switchboard V2 on Solana.
Getting Started
To get started, clone the sbv2-solana repository.
git clone https://github.com/switchboard-xyz/sbv2-solana
Then install the dependencies
cd sbv2-solana
pnpm install
pnpm build
Addresses
- Mainnet-Beta
- Devnet
Program Deployment
Below are the mainnet Solana addresses associated with the Switchboard deployment.
Account | Address |
---|---|
Program ID | |
Program Authority | |
AttestationService | |
IdlAddress | |
AttestationIdlAddress |
Queues
Queue | Address |
---|---|
Permissioned Queue | The permissioned queue requires aggregators to have |
Permissionless Queue | The permissionless queue does not require aggregators to have |
Program Deployment
Below are the devnet Solana addresses associated with the Switchboard deployment.
Account | Address |
---|---|
Program ID | |
Program Authority | |
AttestationService | |
IdlAddress | |
AttestationIdlAddress |
Queues
Queue | Address |
---|---|
Permissioned Queue | The permissioned queue requires aggregators to have |
Permissionless Queue | The permissionless queue does not require aggregators to have |
Clients
Lang | Name | Description |
---|---|---|
Rust | switchboard-v2 | A Rust library to interact with Switchboard V2 accounts on Solana. |
Javascript | @switchboard-xyz/solana.js | A Typescript client to interact with Switchboard on Solana. |
Examples
Lang | Name | Description |
---|---|---|
Rust | native-feed-parser | Read a Switchboard feed using Solana's native program library |
Anchor | anchor-feed-parser | Read a Switchboard feed using Anchor |
Anchor | anchor-history-parser | Read a data feeds history buffer and get the closest historical sample to a given timestamp |
Anchor | anchor-vrf-parser | Read a Switchboard VRF account and make a Cross Program Invocation (CPI) to request a new randomness value |
Anchor | anchor-vrf-lite-parser | Read a Switchboard VRF Lite account and make a Cross Program Invocation (CPI) to request a new randomness value |
Anchor | anchor-buffer-parser | Read a Switchboard buffer relayer using Anchor |
Javascript | javascript-feed-walkthrough | Create a private Switchboard queue and oracle and fulfill your own oracle updates |
Troubleshooting
- File a GitHub Issue
- Ask a question in Discord #dev-support