Stork
GitHubXStork
  • INTRODUCTION
    • Welcome to Stork
    • Core Concepts
    • How It Works
    • Products
  • Getting Started
    • Becoming a Publisher
    • Becoming a Subscriber
    • Putting Data On-Chain
    • Accessing Data On-Chain
  • API Reference
    • Websocket API
      • Publisher
      • Subscriber
    • REST API
    • Contract APIs
      • EVM
      • Solana / SVM
      • Sui
      • Aptos
      • CosmWasm
    • Chain Pusher Configs
      • Asset Config YAML
    • Publisher Agent Configs
      • Config JSON
      • Keys JSON
  • Resources
    • Asset ID Registry
    • Stork Pushed Assets
    • Contract Addresses
      • EVM
      • Solana / SVM
      • Sui
      • Aptos
      • CosmWasm
    • Adapters
    • Public Keys
    • FAQ
Powered by GitBook
On this page
  • SDK
  • Installation
  • Documentation
  • Examples
  • Contract
Edit on GitHub
  1. API Reference
  2. Contract APIs

Solana / SVM

Programming API reference for the Stork Solana contract.

Last updated 3 months ago

SDK

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

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.5"

or the following command:

cargo add stork-solana-sdk

You can now import the stork-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 .

Examples

Contract

Example usage of the stork-solana-sdk for consuming Stork prices can be found in the .

Stork's contract depends on the and , 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 . For the official deployments, please see the .

Stork's contract
crates.io
Anchor
doc.rs
stork-external github repo
stork-solana-sdk crate
Anchor
stork-external github repo
Solana Contract Addresses