feat: add getTokenLargestAccounts method

This commit is contained in:
Justin Starry
2020-08-11 17:28:07 +08:00
committed by Justin Starry
parent 177c9c3aec
commit e1dc05fae0
4 changed files with 104 additions and 2 deletions

View File

@ -237,6 +237,13 @@ declare module '@solana/web3.js' {
amount: string,
};
declare export type TokenAccountBalancePair = {
address: PublicKey,
amount: string,
decimals: number,
uiAmount: number,
};
declare type AccountChangeCallback = (
accountInfo: AccountInfo<Buffer>,
context: Context,
@ -356,6 +363,10 @@ declare module '@solana/web3.js' {
getLargestAccounts(
config: ?GetLargestAccountsConfig,
): Promise<RpcResponseAndContext<Array<AccountBalancePair>>>;
getTokenLargestAccounts(
mintAddress: PublicKey,
commitment: ?Commitment,
): Promise<RpcResponseAndContext<Array<TokenAccountBalancePair>>>;
getClusterNodes(): Promise<Array<ContactInfo>>;
getConfirmedBlock(slot: number): Promise<ConfirmedBlock>;
getConfirmedTransaction(