@marinade.finance/kamino-sdk
Version:
51 lines (50 loc) • 1.76 kB
TypeScript
import BN from 'bn.js';
import * as types from '../types';
export interface ObservationFields {
/** The block timestamp of the observation */
blockTimestamp: number;
/** the price of the observation timestamp, Q64.64 */
sqrtPriceX64: BN;
/** the cumulative of price during the duration time, Q64.64 */
cumulativeTimePriceX64: BN;
/** padding for feature update */
padding: BN;
}
export interface ObservationJSON {
/** The block timestamp of the observation */
blockTimestamp: number;
/** the price of the observation timestamp, Q64.64 */
sqrtPriceX64: string;
/** the cumulative of price during the duration time, Q64.64 */
cumulativeTimePriceX64: string;
/** padding for feature update */
padding: string;
}
/** The element of observations in ObservationState */
export declare class Observation {
/** The block timestamp of the observation */
readonly blockTimestamp: number;
/** the price of the observation timestamp, Q64.64 */
readonly sqrtPriceX64: BN;
/** the cumulative of price during the duration time, Q64.64 */
readonly cumulativeTimePriceX64: BN;
/** padding for feature update */
readonly padding: BN;
constructor(fields: ObservationFields);
static layout(property?: string): any;
static fromDecoded(obj: any): types.Observation;
static toEncodable(fields: ObservationFields): {
blockTimestamp: number;
sqrtPriceX64: BN;
cumulativeTimePriceX64: BN;
padding: BN;
};
toJSON(): ObservationJSON;
static fromJSON(obj: ObservationJSON): Observation;
toEncodable(): {
blockTimestamp: number;
sqrtPriceX64: BN;
cumulativeTimePriceX64: BN;
padding: BN;
};
}