@pythnetwork/client
Advanced tools
Comparing version
{ | ||
"version": "2.20.0", | ||
"version": "2.33.0", | ||
"name": "pyth_oracle", | ||
@@ -174,3 +174,3 @@ "instructions": [ | ||
"name": "permissionsAccount", | ||
"isMut": false, | ||
"isMut": true, | ||
"isSigner": false, | ||
@@ -644,2 +644,33 @@ "pda": { | ||
] | ||
}, | ||
{ | ||
"name": "initPriceFeedIndex", | ||
"discriminant": { "value": [2, 0, 0, 0, 19, 0, 0, 0] }, | ||
"accounts": [ | ||
{ | ||
"name": "fundingAccount", | ||
"isMut": true, | ||
"isSigner": true | ||
}, | ||
{ | ||
"name": "priceAccount", | ||
"isMut": true, | ||
"isSigner": false | ||
}, | ||
{ | ||
"name": "permissionsAccount", | ||
"isMut": true, | ||
"isSigner": false, | ||
"pda": { | ||
"seeds": [ | ||
{ | ||
"kind": "const", | ||
"type": "string", | ||
"value": "permissions" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"args": [] | ||
} | ||
@@ -646,0 +677,0 @@ ], |
@@ -13,3 +13,3 @@ import { AnchorProvider, Program } from '@coral-xyz/anchor'; | ||
export declare type PythOracle = { | ||
version: '2.20.0'; | ||
version: '2.33.0'; | ||
name: 'pyth_oracle'; | ||
@@ -196,3 +196,3 @@ instructions: [ | ||
name: 'permissionsAccount'; | ||
isMut: false; | ||
isMut: true; | ||
isSigner: false; | ||
@@ -688,2 +688,35 @@ pda: { | ||
]; | ||
}, | ||
{ | ||
name: 'initPriceFeedIndex'; | ||
discriminant: { | ||
value: [2, 0, 0, 0, 19, 0, 0, 0]; | ||
}; | ||
accounts: [ | ||
{ | ||
name: 'fundingAccount'; | ||
isMut: true; | ||
isSigner: true; | ||
}, | ||
{ | ||
name: 'priceAccount'; | ||
isMut: true; | ||
isSigner: false; | ||
}, | ||
{ | ||
name: 'permissionsAccount'; | ||
isMut: true; | ||
isSigner: false; | ||
pda: { | ||
seeds: [ | ||
{ | ||
kind: 'const'; | ||
type: 'string'; | ||
value: 'permissions'; | ||
} | ||
]; | ||
}; | ||
} | ||
]; | ||
args: []; | ||
} | ||
@@ -690,0 +723,0 @@ ]; |
@@ -32,3 +32,3 @@ "use strict"; | ||
else if (cluster === 'pythnet') { | ||
return 'https://pythnet.rpcpool.com'; | ||
return 'https://api2.pythnet.pyth.network'; | ||
} | ||
@@ -35,0 +35,0 @@ else if (cluster === 'localnet') { |
@@ -36,2 +36,6 @@ /// <reference types="node" /> | ||
} | ||
export declare type Flags = { | ||
accumulatorV2: boolean; | ||
messageBufferCleared: boolean; | ||
}; | ||
export interface Base { | ||
@@ -91,4 +95,4 @@ magic: number; | ||
maxLatency: number; | ||
drv3: number; | ||
drv4: number; | ||
flags: Flags; | ||
feedIndex: number; | ||
productAccountKey: PublicKey; | ||
@@ -95,0 +99,0 @@ nextPriceAccountKey: PublicKey | null; |
@@ -201,6 +201,12 @@ "use strict"; | ||
var maxLatency = data.readUInt8(106); | ||
// space for future derived values | ||
var drv3 = data.readInt8(107); | ||
// space for future derived values | ||
var drv4 = data.readInt32LE(108); | ||
// Various flags (used for operations) | ||
var flagBits = data.readInt8(107); | ||
/* tslint:disable:no-bitwise */ | ||
var flags = { | ||
accumulatorV2: (flagBits & (1 << 0)) !== 0, | ||
messageBufferCleared: (flagBits & (1 << 1)) !== 0, | ||
}; | ||
/* tslint:enable:no-bitwise */ | ||
// Globally immutable unique price feed index used for publishing. | ||
var feedIndex = data.readInt32LE(108); | ||
// product id / reference account | ||
@@ -262,4 +268,4 @@ var productAccountKey = new web3_js_1.PublicKey(data.slice(112, 144)); | ||
maxLatency: maxLatency, | ||
drv3: drv3, | ||
drv4: drv4, | ||
flags: flags, | ||
feedIndex: feedIndex, | ||
productAccountKey: productAccountKey, | ||
@@ -266,0 +272,0 @@ nextPriceAccountKey: nextPriceAccountKey, |
{ | ||
"name": "@pythnetwork/client", | ||
"version": "2.21.1", | ||
"version": "2.22.0", | ||
"description": "Client for consuming Pyth price data", | ||
@@ -5,0 +5,0 @@ "homepage": "https://pyth.network", |
141039
1.69%3147
2.41%