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

8
web3.js/module.d.ts vendored
View File

@ -158,6 +158,13 @@ declare module '@solana/web3.js' {
terminal: number;
};
export type EpochInfo = {
epoch: number;
slotIndex: number;
slotsInEpoch: number;
absoluteSlot: number;
};
export type EpochSchedule = {
slotsPerEpoch: number;
leaderScheduleSlotOffset: number;
@ -225,6 +232,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>>;

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>>;