UNPKG

@cityofzion/neon-nep5

Version:
39 lines 1.77 kB
import { rpc, u } from "@cityofzion/neon-core"; export interface TokenInfo { name: string; symbol: string; decimals: number; totalSupply: number; balance?: u.Fixed8; } /** * Get the balance of a single token for a single address. * @param url Url of the NEO node to query. * @param scriptHash ScriptHash of the NEP5 contract. * @param address the Address to query for the balance. */ export declare function getTokenBalance(url: string | rpc.RPCClient, scriptHash: string, address: string): Promise<u.Fixed8>; /** * Get token balances for an address. * @param url URL of the NEO node to query. * @param scriptHashArray Array of contract scriptHashes. * @param address Address to query for balance of tokens. */ export declare function getTokenBalances(url: string | rpc.RPCClient, scriptHashArray: string[], address: string): Promise<{ [symbol: string]: u.Fixed8; }>; /** * Retrieves the complete information about a token. * @param url RPC Node url to query. * @param scriptHash ScriptHash of the NEP5 contract. * @param address Optional address to query the balance for. If provided, the returned object will include the balance property. */ export declare function getToken(url: string | rpc.RPCClient, scriptHash: string, address?: string): Promise<TokenInfo>; /** * Retrieves the complete information about a list of tokens. * @param url RPC Node url to query. * @param scriptHashArray Array of NEP5 contract scriptHashes. * @param address Optional address to query the balance for. If provided, the returned object will include the balance property. */ export declare function getTokens(url: string | rpc.RPCClient, scriptHashArray: string[], address?: string): Promise<TokenInfo[]>; //# sourceMappingURL=main.d.ts.map