@drift-labs/sdk
Version:
SDK for Drift Protocol
18 lines (17 loc) • 589 B
TypeScript
import { Commitment } from '@solana/web3.js';
export type ChainClockProgress = {
blockHeight?: number;
slot?: number;
ts?: number;
};
export type ChainClockUpdateProps = {
commitment: Commitment;
} & ChainClockProgress;
export type ChainClockState = Map<Commitment, ChainClockProgress>;
export type ChainClickInitialisationProps = ChainClockUpdateProps[];
export declare class ChainClock {
private _state;
constructor(props: ChainClickInitialisationProps);
update(props: ChainClockUpdateProps): void;
getState(commitment: Commitment): ChainClockProgress;
}