Skip to content

Commit 76ab541

Browse files
authored
Update README.md
1 parent ccff4a3 commit 76ab541

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

pyth-sdk-solana/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Pyth SDK Solana
22

33
This crate provides utilities for reading price feeds from the [pyth.network](https://pyth.network/) oracle on the Solana network.
4-
The crate includes a library for on-chain programs and an off-chain example program.
4+
The crate includes a library for reading and using Pyth data feeds in Solana both on-chain (Solana programs) and off-chain (clients interacting with Solana blockchain). It also includes multiple off-chain example programs.
55

66
Key features of this library include:
77

@@ -37,6 +37,10 @@ Pyth Network stores its price feeds in a collection of Solana accounts of variou
3737
* Product accounts store metadata about a product, such as its symbol (e.g., "BTC/USD").
3838
* Mapping accounts store a listing of all Pyth accounts
3939

40+
| :zap: This structure is designed for Pyth Oracle internal program. In most of the use cases only Price account is needed. |
41+
|------------------------------------------------------------------------------------------------------------------------------------|
42+
43+
4044
For more information on the different types of Pyth accounts, see the [account structure documentation](https://docs.pyth.network/how-pyth-works/account-structure).
4145
The pyth.network website also lists the public keys of the accounts (e.g., [Crypto.BTC/USD accounts](https://pyth.network/markets/#Crypto.BTC/USD)).
4246

@@ -113,7 +117,9 @@ This function additionally propagates any uncertainty in the price into uncertai
113117

114118
### Solana Account Structure
115119

116-
> Warning: the Solana account structure is an internal API that is subject to change. Prefer to use `load_price` when possible.
120+
| :zap: the Solana account structure is an internal API that is subject to change. Prefer to use `load_price` when possible. |
121+
|-------------------------------------------------------------------------------------------------------------------------------------|
122+
117123

118124
This library also provides several `load_*` methods that allow users to translate the binary data in each account into an appropriate struct:
119125

@@ -134,7 +140,7 @@ let mapping_account: &MappingAccount = load_mapping_account( &mapping_account_da
134140

135141
### Off-chain example program
136142

137-
The example program prints the product reference data and current price information for Pyth on Solana devnet.
143+
The example [eth_price](examples/eth_price.rs) program prints the product reference data and current price information for Pyth on Solana devnet.
138144
Run the following commands to try this example program:
139145

140146
```
@@ -154,7 +160,7 @@ ema_price ....... 291343470000 x 10^-8
154160
ema_conf ........ 98874533 x 10^-8
155161
```
156162

157-
For an example of using Solana Account structure please run:
163+
For [an example](examples/get_accounts.rs) of using Solana Account structure please run:
158164
```
159165
cargo run --example get_accounts
160166
```

0 commit comments

Comments
 (0)