@pythnetwork/price-service-client 1.9.0 → 1.9.1
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.
- package/LICENSE +1 -1
- package/README.md +6 -2
- package/lib/ResillientWebSocket.d.ts +1 -0
- package/lib/ResillientWebSocket.d.ts.map +1 -1
- package/package.json +18 -18
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
> **⚠️ DEPRECATION NOTICE**
|
|
2
|
+
>
|
|
3
|
+
> This package is deprecated and is no longer maintained. Please use [@pythnetwork/hermes-client](https://www.npmjs.com/package/@pythnetwork/hermes-client) instead.
|
|
4
|
+
|
|
1
5
|
# Price Service Client
|
|
2
6
|
|
|
3
7
|
[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 [Hermes](
|
|
8
|
+
These prices are available either via HTTP or WebSocket from [Hermes](/apps/hermes).
|
|
5
9
|
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
10
|
|
|
7
11
|
## Installation
|
|
@@ -42,7 +46,7 @@ const priceIds = [
|
|
|
42
46
|
const currentPrices = await connection.getLatestPriceFeeds(priceIds);
|
|
43
47
|
|
|
44
48
|
// You can also call this function to get price updates for the on-chain contract directly.
|
|
45
|
-
const priceUpdateData = await connection.
|
|
49
|
+
const priceUpdateData = await connection.getLatestVaas(priceIds);
|
|
46
50
|
```
|
|
47
51
|
|
|
48
52
|
`PriceServiceConnection` also allows subscribing to real-time price updates over a websocket connection:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResillientWebSocket.d.ts","sourceRoot":"","sources":["../src/ResillientWebSocket.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,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AM,CAAC,EAAE,MAAM;IAavC,IAAI,CAAC,IAAI,EAAE,GAAG;IAcd,cAAc;IAqDpB;;;;;;;OAOG;IACH,OAAO,CAAC,SAAS;YAcH,0BAA0B;YAgB1B,gCAAgC;IAkB9C,cAAc;CAQf"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pythnetwork/price-service-client",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "Pyth price service client",
|
|
5
|
+
"deprecated": "This package is deprecated and is no longer maintained. Please use @pythnetwork/hermes-client instead.",
|
|
5
6
|
"author": {
|
|
6
7
|
"name": "Pyth Data Association"
|
|
7
8
|
},
|
|
@@ -19,17 +20,6 @@
|
|
|
19
20
|
"publishConfig": {
|
|
20
21
|
"access": "public"
|
|
21
22
|
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"test": "jest --testPathIgnorePatterns=.*.e2e.test.ts --passWithNoTests",
|
|
24
|
-
"test:e2e": "jest --testPathPattern=.*.e2e.test.ts",
|
|
25
|
-
"build": "tsc",
|
|
26
|
-
"example": "npm run build && node lib/examples/PriceServiceClient.js",
|
|
27
|
-
"format": "prettier --write \"src/**/*.ts\"",
|
|
28
|
-
"lint": "eslint src/",
|
|
29
|
-
"prepublishOnly": "npm run build && npm test && npm run lint",
|
|
30
|
-
"preversion": "npm run lint",
|
|
31
|
-
"version": "npm run format && git add -A src"
|
|
32
|
-
},
|
|
33
23
|
"keywords": [
|
|
34
24
|
"pyth",
|
|
35
25
|
"oracle"
|
|
@@ -42,19 +32,29 @@
|
|
|
42
32
|
"@typescript-eslint/parser": "^5.21.0",
|
|
43
33
|
"eslint": "^8.14.0",
|
|
44
34
|
"jest": "^29.4.0",
|
|
45
|
-
"prettier": "^
|
|
35
|
+
"prettier": "^3.5.3",
|
|
46
36
|
"ts-jest": "^29.0.5",
|
|
47
37
|
"typescript": "^4.6.3",
|
|
48
38
|
"yargs": "^17.4.1"
|
|
49
39
|
},
|
|
50
40
|
"dependencies": {
|
|
51
|
-
"@pythnetwork/price-service-sdk": "*",
|
|
52
41
|
"@types/ws": "^8.5.3",
|
|
53
42
|
"axios": "^1.5.1",
|
|
54
|
-
"axios-retry": "^
|
|
43
|
+
"axios-retry": "^4.0.0",
|
|
55
44
|
"isomorphic-ws": "^4.0.1",
|
|
56
45
|
"ts-log": "^2.2.4",
|
|
57
|
-
"ws": "^8.6.0"
|
|
46
|
+
"ws": "^8.6.0",
|
|
47
|
+
"@pythnetwork/price-service-sdk": "1.8.0"
|
|
58
48
|
},
|
|
59
|
-
"
|
|
60
|
-
|
|
49
|
+
"scripts": {
|
|
50
|
+
"test:e2e": "jest --testPathPattern=.*.e2e.test.ts",
|
|
51
|
+
"build": "tsc",
|
|
52
|
+
"example": "pnpm run build && node lib/examples/PriceServiceClient.js",
|
|
53
|
+
"fix:format": "prettier --write \"src/**/*.ts\"",
|
|
54
|
+
"fix:lint": "eslint src/ --fix --max-warnings 0",
|
|
55
|
+
"test:format": "prettier --check \"src/**/*.ts\"",
|
|
56
|
+
"test:lint": "eslint src/ --max-warnings 0",
|
|
57
|
+
"preversion": "pnpm run test:lint",
|
|
58
|
+
"version": "pnpm run format && git add -A src"
|
|
59
|
+
}
|
|
60
|
+
}
|