Sui

Active Deployments

The Switchboard On-Demand service is currently deployed on the following networks:

Typescript-SDK Installation

To use Switchboard On-Demand, add the following dependencies to your project:

NPM

npm install @switchboard-xyz/sui-sdk @mysten/sui --save

Bun

bun add @switchboard-xyz/sui-sdk @mysten/sui

PNPM

pnpm add @switchboard-xyz/sui-sdk @mysten/sui

Creating an Aggregator and Sending Transactions

Building a feed in Switchboard can be done using the Typescript SDK, or it can be done with the Switchboard Web App. Visit our docs for more on designing and creating feeds.

Building Feeds

Updating Feeds

With Switchboard On-Demand, passing the PTB into the feed update method handles the update automatically.

Note: Ensure the Switchboard Aggregator update is the first action in your PTB or occurs before referencing the feed update.

Adding Switchboard to Move Code

To integrate Switchboard with Move, add the following dependencies to Move.toml:

Once dependencies are configured, updated aggregators can be referenced easily.

Example Move Code for Using Switchboard Values

In the example.move module, use the Aggregator and CurrentResult types to access the latest feed data.

This implementation allows you to read and utilize Switchboard data feeds within Move. If you have any questions or need further assistance, please contact the Switchboard team.\

Quotes (New - October 2025 Switchboard Upgrade)

Switchboard Oracle Quotes provide a more flexible way to consume oracle data by allowing you to create a quote verifier in your program and then fetch quotes on-demand. This approach gives you more control over when and how oracle data is consumed. Alternatively, you can just keep track of timestamps manually in a state object.

Overview

The Quote flow works in two main steps:

  1. Create a Quote Verifier: Set up a verifier in your Move program that can validate oracle quotes

  2. Fetch Quotes: Use the SDK to fetch oracle consensus data and create quotes that can be used in subsequent transactions

Step 1: Creating a Quote Verifier

First, create a quote verifier in your Move program:

Step 2: Fetching Quotes

Once you have a verifier, you can fetch quotes using the SDK:

Move Integration for Quotes

In your Move code, you can work with quotes using the quote verifier.

Last updated