feat: add support for getSupply RPC method

This commit is contained in:
Justin Starry
2020-05-22 19:30:22 +08:00
committed by Michael Vines
parent 6d24110bcd
commit 9c677c7d3d
4 changed files with 95 additions and 0 deletions

View File

@ -186,6 +186,13 @@ declare module '@solana/web3.js' {
absoluteSlot: number,
};
declare export type Supply = {
total: number,
circulating: number,
nonCirculating: number,
nonCirculatingAccounts: Array<PublicKey>,
};
declare export type VoteAccountStatus = {
current: Array<VoteAccountInfo>,
delinquent: Array<VoteAccountInfo>,
@ -213,6 +220,7 @@ declare module '@solana/web3.js' {
getBalance(publicKey: PublicKey, commitment: ?Commitment): Promise<number>;
getBlockTime(slot: number): Promise<number | null>;
getMinimumLedgerSlot(): Promise<number>;
getSupply(commitment: ?Commitment): Promise<RpcResponseAndContext<Supply>>;
getClusterNodes(): Promise<Array<ContactInfo>>;
getConfirmedBlock(slot: number): Promise<ConfirmedBlock>;
getConfirmedTransaction(