You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pyth-sdk-solana/README.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Pyth SDK Solana
2
2
3
3
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.
5
5
6
6
Key features of this library include:
7
7
@@ -30,6 +30,8 @@ Pyth Network stores its price feeds in a collection of Solana accounts of variou
30
30
* Product accounts store metadata about a product, such as its symbol (e.g., "BTC/USD").
31
31
* Mapping accounts store a listing of all Pyth accounts
32
32
33
+
> :warning: This structure is designed for Pyth Oracle internal program. In most of the use cases only Price account is needed.
34
+
33
35
For more information on the different types of Pyth accounts, see the [account structure documentation](https://docs.pyth.network/how-pyth-works/account-structure).
34
36
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)).
35
37
@@ -106,7 +108,7 @@ This function additionally propagates any uncertainty in the price into uncertai
106
108
107
109
### Solana Account Structure
108
110
109
-
> Warning: the Solana account structure is an internal API that is subject to change. Prefer to use `load_price` when possible.
111
+
> :warning: The Solana account structure is an internal API that is subject to change. Prefer to use `load_price` when possible.
110
112
111
113
This library also provides several `load_*` methods that allow users to translate the binary data in each account into an appropriate struct:
112
114
@@ -127,7 +129,7 @@ let mapping_account: &MappingAccount = load_mapping_account( &mapping_account_da
127
129
128
130
### Off-chain example program
129
131
130
-
The example program prints the product reference data and current price information for Pyth on Solana devnet.
132
+
The example [eth_price](examples/eth_price.rs)program prints the product reference data and current price information for Pyth on Solana devnet.
131
133
Run the following commands to try this example program:
132
134
133
135
```
@@ -147,7 +149,7 @@ ema_price ....... 291343470000 x 10^-8
147
149
ema_conf ........ 98874533 x 10^-8
148
150
```
149
151
150
-
For an example of using Solana Account structure please run:
152
+
For [an example](examples/get_accounts.rs) of using Solana Account structure please run:
0 commit comments