@pythnetwork/hermes-client
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -43,3 +43,8 @@ "use strict"; | ||
// Streaming price updates | ||
const eventSource = await connection.getPriceUpdatesStream(priceIds); | ||
const eventSource = await connection.getPriceUpdatesStream(priceIds, { | ||
encoding: "hex", | ||
parsed: true, | ||
allowUnordered: true, | ||
benchmarksOnly: true, | ||
}); | ||
eventSource.onmessage = (event) => { | ||
@@ -46,0 +51,0 @@ console.log("Received price update:", event.data); |
@@ -102,4 +102,4 @@ import EventSource from "eventsource"; | ||
parsed?: boolean; | ||
allow_unordered?: boolean; | ||
benchmarks_only?: boolean; | ||
allowUnordered?: boolean; | ||
benchmarksOnly?: boolean; | ||
}): Promise<EventSource>; | ||
@@ -106,0 +106,0 @@ private appendUrlSearchParams; |
@@ -9,2 +9,3 @@ "use strict"; | ||
const zodSchemas_1 = require("./zodSchemas"); | ||
const utils_1 = require("./utils"); | ||
const DEFAULT_TIMEOUT = 5000; | ||
@@ -138,3 +139,4 @@ const DEFAULT_HTTP_RETRIES = 3; | ||
if (options) { | ||
this.appendUrlSearchParams(url, options); | ||
const transformedOptions = (0, utils_1.camelToSnakeCaseObject)(options); | ||
this.appendUrlSearchParams(url, transformedOptions); | ||
} | ||
@@ -141,0 +143,0 @@ return new eventsource_1.default(url.toString()); |
{ | ||
"name": "@pythnetwork/hermes-client", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Pyth Hermes Client", | ||
@@ -58,3 +58,3 @@ "author": { | ||
}, | ||
"gitHead": "113f8797625be44370b31c73b22bd115a3e167aa" | ||
"gitHead": "2d3e4c68936fb8ecd6ed4c7cabc9e1d900dcd017" | ||
} |
Sorry, the diff of this file is not supported yet
207923
15
4176