@pythnetwork/price-service-client
Advanced tools
Comparing version 1.8.2 to 1.9.0
export { DurationInMs, PriceServiceConnection, PriceServiceConnectionConfig, } from "./PriceServiceConnection"; | ||
export { HexString, PriceFeedMetadata, PriceFeed, Price, UnixTimestamp, } from "@pythnetwork/price-service-sdk"; | ||
export { HexString, PriceFeedMetadata, PriceFeed, Price, UnixTimestamp, isAccumulatorUpdateData, parseAccumulatorUpdateData, AccumulatorUpdateData, } from "@pythnetwork/price-service-sdk"; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Price = exports.PriceFeed = exports.PriceFeedMetadata = exports.PriceServiceConnection = void 0; | ||
exports.parseAccumulatorUpdateData = exports.isAccumulatorUpdateData = exports.Price = exports.PriceFeed = exports.PriceFeedMetadata = exports.PriceServiceConnection = void 0; | ||
var PriceServiceConnection_1 = require("./PriceServiceConnection"); | ||
@@ -10,1 +10,3 @@ Object.defineProperty(exports, "PriceServiceConnection", { enumerable: true, get: function () { return PriceServiceConnection_1.PriceServiceConnection; } }); | ||
Object.defineProperty(exports, "Price", { enumerable: true, get: function () { return price_service_sdk_1.Price; } }); | ||
Object.defineProperty(exports, "isAccumulatorUpdateData", { enumerable: true, get: function () { return price_service_sdk_1.isAccumulatorUpdateData; } }); | ||
Object.defineProperty(exports, "parseAccumulatorUpdateData", { enumerable: true, get: function () { return price_service_sdk_1.parseAccumulatorUpdateData; } }); |
{ | ||
"name": "@pythnetwork/price-service-client", | ||
"version": "1.8.2", | ||
"version": "1.9.0", | ||
"description": "Pyth price service client", | ||
@@ -59,3 +59,3 @@ "author": { | ||
}, | ||
"gitHead": "f36e868ef6dceff3647256f063a72d3d83eef612" | ||
"gitHead": "0d49986eb1cd77c969059bcb72857e90ba8ae4f8" | ||
} |
@@ -26,17 +26,14 @@ # Price Service Client | ||
```typescript | ||
const connection = new PriceServiceConnection( | ||
"https://hermes-beta.pyth.network", | ||
{ | ||
priceFeedRequestConfig: { | ||
// Provide this option to retrieve signed price updates for on-chain contracts. | ||
// Ignore this option for off-chain use. | ||
binary: true, | ||
}, | ||
} | ||
); // See Hermes endpoints section below for other endpoints | ||
const connection = new PriceServiceConnection("https://hermes.pyth.network", { | ||
priceFeedRequestConfig: { | ||
// Provide this option to retrieve signed price updates for on-chain contracts. | ||
// Ignore this option for off-chain use. | ||
binary: true, | ||
}, | ||
}); // See Hermes endpoints section below for other endpoints | ||
const priceIds = [ | ||
// You can find the ids of prices at https://pyth.network/developers/price-feed-ids#pyth-evm-testnet | ||
"0xf9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b", // BTC/USD price id in testnet | ||
"0xca80ba6dc32e08d06f1aa886011eed1d77c77be9eb761cc10d72b7d0a2fd57a6", // ETH/USD price id in testnet | ||
// You can find the ids of prices at https://pyth.network/developers/price-feed-ids | ||
"0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43", // BTC/USD price id | ||
"0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", // ETH/USD price id | ||
]; | ||
@@ -84,3 +81,7 @@ | ||
```bash | ||
npm run example -- --endpoint https://hermes-beta.pyth.network --price-ids 0xf9c0172ba10dfa4d19088d94f5bf61d3b54d5bd7483a322a982e1373ee8ea31b 0xca80ba6dc32e08d06f1aa886011eed1d77c77be9eb761cc10d72b7d0a2fd57a6 | ||
npm run example -- \ | ||
--endpoint https://hermes.pyth.network \ | ||
--price-ids \ | ||
0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43 \ | ||
0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace | ||
``` | ||
@@ -90,2 +91,5 @@ | ||
You can find the list of Hermes public endpoints [here](https://docs.pyth.network/documentation/pythnet-price-feeds/hermes#public-endpoints). | ||
Pyth offers a free public endpoint at [https://hermes.pyth.network](https://hermes.pyth.network). However, it is | ||
recommended to obtain a private endpoint from one of the Hermes RPC providers for more reliability. You can find more | ||
information about Hermes RPC providers | ||
[here](https://docs.pyth.network/documentation/pythnet-price-feeds/hermes#public-endpoint). |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39662
734
93