fix: add type defs for getEpochInfo
This commit is contained in:
parent
a112d9cedf
commit
742c83f15b
|
@ -158,6 +158,13 @@ declare module '@solana/web3.js' {
|
||||||
terminal: number;
|
terminal: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type EpochInfo = {
|
||||||
|
epoch: number;
|
||||||
|
slotIndex: number;
|
||||||
|
slotsInEpoch: number;
|
||||||
|
absoluteSlot: number;
|
||||||
|
};
|
||||||
|
|
||||||
export type EpochSchedule = {
|
export type EpochSchedule = {
|
||||||
slotsPerEpoch: number;
|
slotsPerEpoch: number;
|
||||||
leaderScheduleSlotOffset: number;
|
leaderScheduleSlotOffset: number;
|
||||||
|
@ -225,6 +232,7 @@ declare module '@solana/web3.js' {
|
||||||
getVersion(): Promise<Version>;
|
getVersion(): Promise<Version>;
|
||||||
getInflation(commitment?: Commitment): Promise<Inflation>;
|
getInflation(commitment?: Commitment): Promise<Inflation>;
|
||||||
getEpochSchedule(): Promise<EpochSchedule>;
|
getEpochSchedule(): Promise<EpochSchedule>;
|
||||||
|
getEpochInfo(): Promise<EpochInfo>;
|
||||||
getRecentBlockhashAndContext(
|
getRecentBlockhashAndContext(
|
||||||
commitment?: Commitment,
|
commitment?: Commitment,
|
||||||
): Promise<RpcResponseAndContext<BlockhashAndFeeCalculator>>;
|
): Promise<RpcResponseAndContext<BlockhashAndFeeCalculator>>;
|
||||||
|
|
|
@ -179,6 +179,13 @@ declare module '@solana/web3.js' {
|
||||||
firstNormalSlot: number,
|
firstNormalSlot: number,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
declare export type EpochInfo = {
|
||||||
|
epoch: number,
|
||||||
|
slotIndex: number,
|
||||||
|
slotsInEpoch: number,
|
||||||
|
absoluteSlot: number,
|
||||||
|
};
|
||||||
|
|
||||||
declare export type VoteAccountStatus = {
|
declare export type VoteAccountStatus = {
|
||||||
current: Array<VoteAccountInfo>,
|
current: Array<VoteAccountInfo>,
|
||||||
delinquent: Array<VoteAccountInfo>,
|
delinquent: Array<VoteAccountInfo>,
|
||||||
|
@ -238,6 +245,7 @@ declare module '@solana/web3.js' {
|
||||||
getVersion(): Promise<Version>;
|
getVersion(): Promise<Version>;
|
||||||
getInflation(commitment: ?Commitment): Promise<Inflation>;
|
getInflation(commitment: ?Commitment): Promise<Inflation>;
|
||||||
getEpochSchedule(): Promise<EpochSchedule>;
|
getEpochSchedule(): Promise<EpochSchedule>;
|
||||||
|
getEpochInfo(): Promise<EpochInfo>;
|
||||||
getRecentBlockhashAndContext(
|
getRecentBlockhashAndContext(
|
||||||
commitment: ?Commitment,
|
commitment: ?Commitment,
|
||||||
): Promise<RpcResponseAndContext<BlockhashAndFeeCalculator>>;
|
): Promise<RpcResponseAndContext<BlockhashAndFeeCalculator>>;
|
||||||
|
|
Loading…
Reference in New Issue