Iota
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/iota-sdk @iota/iota-sdk --saveBun
bun add @switchboard-xyz/iota-sdk @iota/iota-sdkPNPM
pnpm add @switchboard-xyz/iota-sdk @iota/iota-sdkCreating 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.
Last updated