feat: add getLargestAccounts rpc api
This commit is contained in:
committed by
Michael Vines
parent
9c677c7d3d
commit
1b8fe71230
15
web3.js/module.d.ts
vendored
15
web3.js/module.d.ts
vendored
@ -48,6 +48,13 @@ declare module '@solana/web3.js' {
|
||||
|
||||
export type Commitment = 'max' | 'recent' | 'root' | 'single';
|
||||
|
||||
export type LargestAccountsFilter = 'circulating' | 'nonCirculating';
|
||||
|
||||
export type GetLargestAccountsConfig = {
|
||||
commitment?: Commitment;
|
||||
filter?: LargestAccountsFilter;
|
||||
};
|
||||
|
||||
export type SignatureStatusConfig = {
|
||||
searchTransactionHistory: boolean;
|
||||
};
|
||||
@ -180,6 +187,11 @@ declare module '@solana/web3.js' {
|
||||
nonCirculatingAccounts: Array<PublicKey>;
|
||||
};
|
||||
|
||||
export type AccountBalancePair = {
|
||||
address: PublicKey;
|
||||
lamports: number;
|
||||
};
|
||||
|
||||
export type VoteAccountStatus = {
|
||||
current: Array<VoteAccountInfo>;
|
||||
delinquent: Array<VoteAccountInfo>;
|
||||
@ -208,6 +220,9 @@ declare module '@solana/web3.js' {
|
||||
getBlockTime(slot: number): Promise<number | null>;
|
||||
getMinimumLedgerSlot(): Promise<number>;
|
||||
getSupply(commitment?: Commitment): Promise<RpcResponseAndContext<Supply>>;
|
||||
getLargestAccounts(
|
||||
config?: GetLargestAccountsConfig,
|
||||
): Promise<RpcResponseAndContext<Array<AccountBalancePair>>>;
|
||||
getClusterNodes(): Promise<Array<ContactInfo>>;
|
||||
getConfirmedBlock(slot: number): Promise<ConfirmedBlock>;
|
||||
getConfirmedTransaction(
|
||||
|
Reference in New Issue
Block a user