@drift-labs/sdk
Version:
SDK for Drift Protocol
20 lines • 1.06 kB
TypeScript
/// <reference types="node" />
/// <reference types="node" />
/// <reference types="bn.js" />
import { Connection, PublicKey } from '@solana/web3.js';
import { OracleClient, OraclePriceData } from './types';
import { BN, Program } from '@coral-xyz/anchor';
import { PythSolanaReceiverProgram } from '@pythnetwork/pyth-solana-receiver';
import { PriceUpdateAccount } from '@pythnetwork/pyth-solana-receiver/lib/PythSolanaReceiver';
export declare class PythPullClient implements OracleClient {
private connection;
private multiple;
private stableCoin;
readonly receiver: Program<PythSolanaReceiverProgram>;
readonly decodeFunc: (name: string, data: Buffer) => PriceUpdateAccount;
constructor(connection: Connection, multiple?: BN, stableCoin?: boolean);
getOraclePriceData(pricePublicKey: PublicKey): Promise<OraclePriceData>;
getOraclePriceDataFromBuffer(buffer: Buffer): OraclePriceData;
}
export declare function convertPythPrice(price: BN, exponent: number, multiple: BN): BN;
//# sourceMappingURL=pythPullClient.d.ts.map