@pythnetwork/price-service-client 1.8.1 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -13
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Price Service Client
2
2
 
3
3
  [Pyth Network](https://pyth.network/) provides real-time pricing data in a variety of asset classes, including cryptocurrency, equities, FX and commodities.
4
- These prices are available either via HTTP or WebSocket from Pyth's [price service](https://github.com/pyth-network/pyth-crosschain/tree/main/price_service/server).
5
- This library is a client for interacting with the price service, allowing your application to consume Pyth real-time prices in on- and off-chain Javascript/Typescript applications.
4
+ These prices are available either via HTTP or WebSocket from [Hermes](https://github.com/pyth-network/pyth-crosschain/tree/main/hermes).
5
+ This library is a client for interacting with Hermes, allowing your application to consume Pyth real-time prices in on- and off-chain Javascript/Typescript applications.
6
6
 
7
7
  ## Installation
8
8
 
@@ -24,7 +24,7 @@ Typical usage of the connection is along the following lines:
24
24
 
25
25
  ```typescript
26
26
  const connection = new PriceServiceConnection(
27
- "https://xc-testnet.pyth.network",
27
+ "https://hermes-beta.pyth.network",
28
28
  {
29
29
  priceFeedRequestConfig: {
30
30
  // Provide this option to retrieve signed price updates for on-chain contracts.
@@ -32,7 +32,7 @@ const connection = new PriceServiceConnection(
32
32
  binary: true,
33
33
  },
34
34
  }
35
- ); // See Price Service endpoints section below for other endpoints
35
+ ); // See Hermes endpoints section below for other endpoints
36
36
 
37
37
  const priceIds = [
38
38
  // You can find the ids of prices at https://pyth.network/developers/price-feed-ids#pyth-evm-testnet
@@ -67,7 +67,7 @@ setTimeout(() => {
67
67
 
68
68
  ### On-chain Applications
69
69
 
70
- On-chain applications will need to submit the price updates returned by the price service to the Pyth contract on their blockchain.
70
+ On-chain applications will need to submit the price updates returned by Hermes to the Pyth contract on their blockchain.
71
71
  These applications should pass the `binary: true` option to the constructor as shown above, to ensure that all methods on `PriceServiceConnection` return the required information.
72
72
  This option will add a `vaa` field to `PriceFeed` that represents a signed price update.
73
73
  The `vaa` is a binary blob serialized as a base64 string.
@@ -80,14 +80,9 @@ You can run it with `npm run example`.
80
80
  A full command that prints BTC and ETH price feeds, in the testnet network, looks like so:
81
81
 
82
82
  ```bash
83
- npm run example -- --endpoint https://xc-testnet.pyth.network --price-ids 0xf9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b 0xca80ba6dc32e08d06f1aa886011eed1d77c77be9eb761cc10d72b7d0a2fd57a6
83
+ npm run example -- --endpoint https://hermes-beta.pyth.network --price-ids 0xf9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b 0xca80ba6dc32e08d06f1aa886011eed1d77c77be9eb761cc10d72b7d0a2fd57a6
84
84
  ```
85
85
 
86
- ## Price Service endpoints
86
+ ## Hermes endpoints
87
87
 
88
- Public endpoints for the Price Service are provided for both mainnet and testnet. These can be used regardless of which network you deploy your own contracts to as long as it is a Pyth supported network. For example, you can use the testnet Price Service whether you are deploying your contract to the BNB or Polygon testnet.
89
-
90
- | network | url |
91
- | ------- | ------------------------------- |
92
- | mainnet | https://xc-mainnet.pyth.network |
93
- | testnet | https://xc-testnet.pyth.network |
88
+ You can find the list of Hermes public endpoints [here](https://docs.pyth.network/documentation/pythnet-price-feeds/hermes#public-endpoints).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pythnetwork/price-service-client",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "Pyth price service client",
5
5
  "author": {
6
6
  "name": "Pyth Data Association"
@@ -56,5 +56,5 @@
56
56
  "ts-log": "^2.2.4",
57
57
  "ws": "^8.6.0"
58
58
  },
59
- "gitHead": "2b51cffdc7e782995e7c267d2fc3b0a8a24e1c60"
59
+ "gitHead": "f36e868ef6dceff3647256f063a72d3d83eef612"
60
60
  }