From 1c3006a4df5c8bffd5e344b4017ede745eb5ced9 Mon Sep 17 00:00:00 2001 From: Ali Behjati Date: Wed, 18 Oct 2023 18:36:04 +0200 Subject: [PATCH] Remove price service mentions and its page (#85) --- pages/cosmwasm/index.mdx | 2 +- .../pythnet-price-feeds/_meta.json | 1 - .../pythnet-price-feeds/hermes.mdx | 7 ++--- .../pythnet-price-feeds/price-service.mdx | 31 ------------------- 4 files changed, 4 insertions(+), 37 deletions(-) delete mode 100644 pages/documentation/pythnet-price-feeds/price-service.mdx diff --git a/pages/cosmwasm/index.mdx b/pages/cosmwasm/index.mdx index 424fb85d..0eb58d87 100644 --- a/pages/cosmwasm/index.mdx +++ b/pages/cosmwasm/index.mdx @@ -5,7 +5,7 @@ this section will explain the differences between Pyth Network and other oracles Users of the Pyth contract will typically need to perform two operations: - Update the on-chain price -- In off-chain code, retrieve a verified price update from the - [price service](documentation/pythnet-price-feeds/price-service) and execute [UpdatePriceFeeds](cosmwasm/execute-update-price-feeds). + [Hermes](documentation/pythnet-price-feeds/hermes) and execute [UpdatePriceFeeds](cosmwasm/execute-update-price-feeds). This operation makes the price available for on-chain use. You will typically put this message at the beginning of a transaction, and subsequent messages in the transaction can consume the new price. diff --git a/pages/documentation/pythnet-price-feeds/_meta.json b/pages/documentation/pythnet-price-feeds/_meta.json index 43add913..a428bbc0 100644 --- a/pages/documentation/pythnet-price-feeds/_meta.json +++ b/pages/documentation/pythnet-price-feeds/_meta.json @@ -7,7 +7,6 @@ "sui": "Pyth on Sui", "cosmwasm": "Pyth on CosmWasm", "off-chain": "Pyth for Off-chain Apps", - "price-service": "Price Service", "scheduler": "Scheduler", "cross-chain-batches": "Price Feed Batches" } diff --git a/pages/documentation/pythnet-price-feeds/hermes.mdx b/pages/documentation/pythnet-price-feeds/hermes.mdx index ab9f6417..e7ea3378 100644 --- a/pages/documentation/pythnet-price-feeds/hermes.mdx +++ b/pages/documentation/pythnet-price-feeds/hermes.mdx @@ -1,12 +1,11 @@ # Hermes [Hermes][hermes-repo] is a web service that listens to the Pythnet and the Wormhole Network for Pyth price updates, and -serves them via a convenient web API. It's a backward-compatible rewrite of the [Price Service](./price-service.mdx), -which, in addition to being more reliable, provides Pyth's latest price update data format that are more cost-effective +serves them via a convenient web API. It provides Pyth's latest price update data format that are more cost-effective to verify and use on-chain. Hermes allows users to easily query for recent price updates via a REST API, or subscribe to a websocket for streaming -updates. The Pyth Network's Javascript SDKs connect to an instance of the price service to fetch price updates. +updates. The Pyth Network's Javascript SDKs connect to an instance of the Hermes to fetch price updates. [hermes-repo]: https://github.com/pyth-network/pyth-crosschain/tree/main/hermes @@ -33,7 +32,7 @@ The following node providers offer Hermes: ## Usage The [Hermes API Documentation](https://hermes.pyth.network/docs) provides a comprehensive explanation of Hermes API for -user interaction. As Hermes utilizes the price service API, you can use [the price service client library in +user interaction. You can use [the price service client library in JS](https://github.com/pyth-network/pyth-crosschain/tree/main/price_service/client/js) to interact with Hermes. Here's an example of retrieving the latest update of the ETH/USD price feed using `curl`. diff --git a/pages/documentation/pythnet-price-feeds/price-service.mdx b/pages/documentation/pythnet-price-feeds/price-service.mdx deleted file mode 100644 index a02f0266..00000000 --- a/pages/documentation/pythnet-price-feeds/price-service.mdx +++ /dev/null @@ -1,31 +0,0 @@ -# Price Service - -The [price service][price-service-repo] is a webservice that listens to the Wormhole Network for Pyth price updates and serves them via a convenient web API. -The service allows users to easily query for recent price updates via a REST API, or subscribe to a websocket for streaming updates. -The Pyth Network Javascript SDKs connect to an instance of the price service in order to fetch price updates. - -## Public Endpoints - -The Pyth Data Association operates two public endpoints for the price service, for mainnet and testnet respectively. -These endpoints can be used to test integrations with Pyth Network: - -| network | url | -| ------- | ------------------------------- | -| mainnet | https://xc-mainnet.pyth.network | -| testnet | https://xc-testnet.pyth.network | - -```sh copy -# Example API call -$ curl https://xc-testnet.pyth.network/api/latest_vaas?ids[]=0xf9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b - -# Example Response -["AQAAA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ABW4gDnpvBQLvYOWlKwK4AAAAAAGyBWAAAAAAAABOK////+AAAAAAAbHdcAAAAAAAAD4ABAAAAAQAAAAIAAAAAZG4AGAAAAABkbgAYAAAAAGRuABUAAAAAAGyBWAAAAAAAABOKAAAAAGRuABU="] - -``` - -For production deployments, developers integrating with Pyth Network are **strongly encouraged** to host their own instance of the price service for maximum resilience and decentralization. -By running an independent instance of this service, developers tap directly into Wormhole's peer-to-peer network to stream Pyth price updates. -This peer-to-peer network has built-in redundancy and is therefore inherently more reliable than a centralized service operated by the Pyth Data Association. -Please find more information about building and running the price service [here][price-service-repo]. - -[price-service-repo]: https://github.com/pyth-network/pyth-crosschain/tree/main/price_service/server