Skip to content

Commit 31655df

Browse files
authoredJan 10, 2025
Merge pull request #82 from pyth-network/disclaimer
chore: redirect people to hermes
2 parents 1b9d17c + f8b7ac9 commit 31655df

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# @pythnetwork/client
22

3-
## A library for reading on-chain Pyth oracle data
3+
## A library for reading Pyth accounts on Pythnet
44

55
[Pyth](https://pyth.network/) is building a way to deliver a decentralized, cross-chain market of verifiable data from high-quality nodes to any smart contract, anywhere.
66

7-
This library reads on-chain Pyth data from [@solana/web3.js](https://www.npmjs.com/package/@solana/web3.js) and returns JavaScript-friendly objects.
7+
This library reads Pythnet (Pyth's app-specific SVM blockchain) data using [@solana/web3.js](https://www.npmjs.com/package/@solana/web3.js) and returns JavaScript-friendly objects.
8+
9+
> ⚠️ **Important Warning**: For most use cases, it is recommended and more user-friendly to use Pyth's off-chain API ([Hermes](https://hermes.pyth.network/docs/)) via the [@pythnetwork/hermes-client](https://www.npmjs.com/package/@pythnetwork/hermes-client) package to get the most up-to-date Pyth prices. Using `@pythnetwork/client` requires a Pythnet RPC connection and exposes many low-level details.
810
911
## Installation
1012

@@ -29,7 +31,7 @@ This library lets you consume prices in two different ways: you can either get c
2931
The websocket connection provides a subscription model for consuming price updates:
3032

3133
```typescript
32-
const pythConnection = new PythConnection(solanaWeb3Connection, getPythProgramKeyForCluster(solanaClusterName))
34+
const pythConnection = new PythConnection(pythnetWeb3Connection, getPythProgramKeyForCluster(pythnetClusterName))
3335
pythConnection.onPriceChange((product, price) => {
3436
// sample output:
3537
// Crypto.SRM/USD: $8.68725 ±$0.0131 Status: Trading

0 commit comments

Comments
 (0)