githubEdit

sSolana / SVM

Programming API reference for the Stork Solana contract.

SDK

Solana contracts can program against Stork's contractarrow-up-right using the stork-solana-sdk rust crate available on crates.ioarrow-up-right. This SDK provides useful methods and structs for reading from stork price feed account. The Stork contract and SDK are built on top of Anchorarrow-up-right.

Installation

After setting up your Anchor project, add the stork-solana-sdk to your project dependencies by adding the following line to the [dependencies] section of the programs Cargo.toml :

// Cargo.toml
[dependencies]
stork-solana-sdk = ">0.0.7"

or the following command:

cargo add stork-solana-sdk

You can now import the sdk's interfaces with:

// your_module.rs
use stork_solana_sdk::{<...>};

Documentation

Documentation for the methods, structs, and constants provided by the stork-solana-sdk can be found on doc.rsarrow-up-right.

Examples

Example usage of the stork-solana-sdk for consuming Stork prices can be found in the stork-external github repoarrow-up-right.

Contract

Stork's contract depends on the stork-solana-sdk cratearrow-up-right and Anchorarrow-up-right, and contains useful methods for writing to the Stork Config account, as well as Temporal Numeric Value Feed PDA accounts that represent Stork data feeds. The full source-code can be found in the stork-external github repoarrow-up-right. For the official deployments, please see the Solana Contract Addresses.

Last updated