fix: add type defs for getEpochInfo

This commit is contained in:
Justin Starry
2020-05-15 00:26:42 +08:00
committed by Michael Vines
parent a112d9cedf
commit 742c83f15b
2 changed files with 16 additions and 0 deletions

View File

@ -179,6 +179,13 @@ declare module '@solana/web3.js' {
firstNormalSlot: number,
};
declare export type EpochInfo = {
epoch: number,
slotIndex: number,
slotsInEpoch: number,
absoluteSlot: number,
};
declare export type VoteAccountStatus = {
current: Array<VoteAccountInfo>,
delinquent: Array<VoteAccountInfo>,
@ -238,6 +245,7 @@ declare module '@solana/web3.js' {
getVersion(): Promise<Version>;
getInflation(commitment: ?Commitment): Promise<Inflation>;
getEpochSchedule(): Promise<EpochSchedule>;
getEpochInfo(): Promise<EpochInfo>;
getRecentBlockhashAndContext(
commitment: ?Commitment,
): Promise<RpcResponseAndContext<BlockhashAndFeeCalculator>>;