fix: update token API handling
This commit is contained in:
committed by
Justin Starry
parent
7430896c79
commit
2261c066f3
@ -174,21 +174,10 @@ declare module '@solana/web3.js' {
|
||||
root: number,
|
||||
};
|
||||
|
||||
declare export type TokenAccountInfo = {
|
||||
mint: PublicKey,
|
||||
owner: PublicKey,
|
||||
amount: number,
|
||||
delegate: null | PublicKey,
|
||||
delegatedAmount: number,
|
||||
isInitialized: boolean,
|
||||
isNative: boolean,
|
||||
};
|
||||
|
||||
declare export type TokenAccount = {
|
||||
executable: boolean,
|
||||
owner: PublicKey,
|
||||
lamports: number,
|
||||
data: TokenAccountInfo,
|
||||
declare export type TokenAmount = {
|
||||
uiAmount: number,
|
||||
decimals: number,
|
||||
amount: string,
|
||||
};
|
||||
|
||||
declare type AccountChangeCallback = (
|
||||
@ -283,17 +272,17 @@ declare module '@solana/web3.js' {
|
||||
getTokenSupply(
|
||||
tokenMintAddress: PublicKey,
|
||||
commitment: ?Commitment,
|
||||
): Promise<RpcResponseAndContext<number>>;
|
||||
): Promise<RpcResponseAndContext<TokenAmount>>;
|
||||
getTokenAccountBalance(
|
||||
tokenAddress: PublicKey,
|
||||
commitment: ?Commitment,
|
||||
): Promise<RpcResponseAndContext<number>>;
|
||||
): Promise<RpcResponseAndContext<TokenAmount>>;
|
||||
getTokenAccountsByOwner(
|
||||
ownerAddress: PublicKey,
|
||||
filter: TokenAccountsFilter,
|
||||
commitment: ?Commitment,
|
||||
): Promise<
|
||||
RpcResponseAndContext<Array<{pubkey: PublicKey, account: TokenAccount}>>,
|
||||
RpcResponseAndContext<Array<{pubkey: PublicKey, account: AccountInfo}>>,
|
||||
>;
|
||||
getLargestAccounts(
|
||||
config: ?GetLargestAccountsConfig,
|
||||
|
Reference in New Issue
Block a user