From 2aa6acd69a30e7435ac05cf471645db9d58f9414 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Wed, 8 Jan 2025 20:46:01 +0000 Subject: [PATCH 1/4] disclaimer --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0ca82e7..6f96ad1 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ This library reads on-chain Pyth data from [@solana/web3.js](https://www.npmjs.com/package/@solana/web3.js) and returns JavaScript-friendly objects. +> ⚠️ **Important Warning**: For most use cases, it is recommended and easier to use Pyth's off-chain API (Hermes) via the [@pythnetwork/hermes-client](https://www.npmjs.com/package/@pythnetwork/hermes-client) package to get the most up-to-date Pyth prices. The Hermes client does not require a connection to Pythnet and provides a simpler interface for price updates. + ## Installation ### npm From 94e39b435461ec72e4606f2eb0665d10c717145c Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Wed, 8 Jan 2025 20:54:35 +0000 Subject: [PATCH 2/4] go --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6f96ad1..9b31573 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ [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. -This library reads on-chain Pyth data from [@solana/web3.js](https://www.npmjs.com/package/@solana/web3.js) and returns JavaScript-friendly objects. +This library reads on-chain 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. -> ⚠️ **Important Warning**: For most use cases, it is recommended and easier to use Pyth's off-chain API (Hermes) via the [@pythnetwork/hermes-client](https://www.npmjs.com/package/@pythnetwork/hermes-client) package to get the most up-to-date Pyth prices. The Hermes client does not require a connection to Pythnet and provides a simpler interface for price updates. +> ⚠️ **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. ## Installation @@ -31,7 +31,7 @@ This library lets you consume prices in two different ways: you can either get c The websocket connection provides a subscription model for consuming price updates: ```typescript -const pythConnection = new PythConnection(solanaWeb3Connection, getPythProgramKeyForCluster(solanaClusterName)) +const pythConnection = new PythConnection(pythnetWeb3Connection, getPythProgramKeyForCluster(pythnetClusterName)) pythConnection.onPriceChange((product, price) => { // sample output: // Crypto.SRM/USD: $8.68725 ±$0.0131 Status: Trading From 68eb986124abb4d9bdc70a442a5b1cf02e2e923a Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Wed, 8 Jan 2025 20:55:16 +0000 Subject: [PATCH 3/4] change header --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b31573..25d80c6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # @pythnetwork/client -## A library for reading on-chain Pyth oracle data +## A library for reading Pyth accounts on Pythnet [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. From f8b7ac926876684b2f57a4d053145dfd90e3432e Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Wed, 8 Jan 2025 20:55:53 +0000 Subject: [PATCH 4/4] go --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 25d80c6..36c691d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [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. -This library reads on-chain 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. +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. > ⚠️ **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.