Option 2: Designing a Feed in Typescript
It can be helpful to use language-server TypeScript features to configure feed inputs with a text editor. This example uses bun.sh
.
Initialising the Project
Create the example directory and navigate to it to initialize the bun project:
Press enter through each of the options to setup the
package.json
.Install the Switchboard On-Demand package
@switchboard-xyz/on-demand
:Make sure things are installed:
Boilerplate Script
To get started, replace the contents of index.ts
with the following:
index.ts
Note: The simulation server is heavily rate-limited, use it solely for test development purposes.
Running the Feed
Run the example feed:
The output should be similar to:
Note: The @switchboard-xyz/on-demand
package is actively maintained. Ensure the version in your package.json
is up to date.
Last updated