# Solana / SVM

## SDK

Solana contracts can program against [Stork's contract](https://github.com/Stork-Oracle/stork-external/tree/main/chains/solana/contracts) using the stork-solana-sdk rust crate available on [crates.io](https://crates.io/crates/stork-solana-sdk). This SDK provides useful methods and structs for **reading** from stork price feed account. The Stork contract and SDK are built on top of [Anchor](https://github.com/coral-xyz/anchor).

### Installation

{% tabs %}
{% tab title="Rust" %}
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` :

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

or the following command:

```bash
cargo add stork-solana-sdk
```

You can now import the sdk's interfaces with:

<pre class="language-rust"><code class="lang-rust"><strong>// your_module.rs
</strong><strong>use stork_solana_sdk::{&#x3C;...>};
</strong></code></pre>

{% endtab %}
{% endtabs %}

### Documentation

Documentation for the methods, structs, and constants provided by the stork-solana-sdk can be found on [doc.rs](https://docs.rs/stork-solana-sdk).

### Examples

Example usage of the stork-solana-sdk for consuming Stork prices can be found in the [stork-external github repo](https://github.com/Stork-Oracle/stork-external/tree/main/chains/solana/examples).

## Contract

Stork's contract depends on the [stork-solana-sdk crate](https://crates.io/crates/stork-solana-sdk) and [Anchor](https://github.com/coral-xyz/anchor), 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 repo](https://github.com/Stork-Oracle/stork-external/tree/main/chains/solana/contracts). For the official deployments, please see the [Solana Contract Addresses](/resources/contract-addresses/solana.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stork.network/api-reference/contract-apis/solana.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
