-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for maxLatency #76
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,7 +103,8 @@ export interface PriceData extends Base { | |
emaConfidence: Ema | ||
timestamp: bigint | ||
minPublishers: number | ||
drv2: number | ||
messageSent: number | ||
maxLatency: number | ||
drv3: number | ||
drv4: number | ||
productAccountKey: PublicKey | ||
|
@@ -285,10 +286,12 @@ export const parsePriceData = (data: Buffer, currentSlot?: number): PriceData => | |
const timestamp = readBigInt64LE(data, 96) | ||
// minimum number of publishers for status to be TRADING | ||
const minPublishers = data.readUInt8(104) | ||
// message sent flag | ||
const messageSent = data.readUInt8(105) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. drive-by: previously added to the oracle program but js client wasn't updated |
||
// configurable max latency in slots between send and receive | ||
const maxLatency = data.readUInt8(106) | ||
// space for future derived values | ||
const drv2 = data.readInt8(105) | ||
// space for future derived values | ||
const drv3 = data.readInt16LE(106) | ||
const drv3 = data.readInt8(107) | ||
// space for future derived values | ||
const drv4 = data.readInt32LE(108) | ||
// product id / reference account | ||
|
@@ -350,7 +353,8 @@ export const parsePriceData = (data: Buffer, currentSlot?: number): PriceData => | |
emaConfidence, | ||
timestamp, | ||
minPublishers, | ||
drv2, | ||
messageSent, | ||
maxLatency, | ||
drv3, | ||
drv4, | ||
productAccountKey, | ||
|
@@ -394,5 +398,5 @@ export const parsePermissionData = (data: Buffer): PermissionData => { | |
|
||
export { PythConnection } from './PythConnection' | ||
export { PythHttpClient } from './PythHttpClient' | ||
export { getPythProgramKeyForCluster, PythCluster, getPythClusterApiUrl } from './cluster' | ||
export { pythOracleProgram, pythOracleCoder, pythIdl } from './anchor' | ||
export { pythIdl, pythOracleCoder, pythOracleProgram } from './anchor' | ||
export { PythCluster, getPythClusterApiUrl, getPythProgramKeyForCluster } from './cluster' | ||
Comment on lines
+401
to
+402
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. drive-by: format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update the lockfile as well.