@onekeyfe/blockchain-libs
Version:
OneKey Blockchain Libs
26 lines (25 loc) • 1.39 kB
TypeScript
import BigNumber from 'bignumber.js';
import { JsonRPCRequest } from '../../../basic/request/json-rpc';
import { CoinInfo } from '../../../types/chain';
import { AddressInfo, ClientInfo, FeePricePerUnit, PartialTokenInfo, TransactionStatus } from '../../../types/provider';
import { BaseClient } from '../../abc';
declare class Conflux extends BaseClient {
static readonly __EPOCH_TAG__ = "latest_state";
readonly rpc: JsonRPCRequest;
constructor(url: string);
getInfo(): Promise<ClientInfo>;
getAddresses(addresses: Array<string>): Promise<Array<AddressInfo | undefined>>;
getBalances(requests: Array<{
address: string;
coin: Partial<CoinInfo>;
}>): Promise<Array<BigNumber | undefined>>;
getTransactionStatuses(txids: Array<string>): Promise<Array<TransactionStatus | undefined>>;
getTokenInfos(tokenAddresses: Array<string>): Promise<Array<PartialTokenInfo | undefined>>;
getFeePricePerUnit(): Promise<FeePricePerUnit>;
broadcastTransaction(rawTx: string): Promise<string>;
estimateGasLimit(fromAddress: string, toAddress: string, value: string, data?: string): Promise<string>;
getEpochNumber(): Promise<BigNumber>;
estimateGasAndCollateral(fromAddress: string, toAddress: string, value: string, data?: string): Promise<[string, string]>;
isContract(address: string): Promise<boolean>;
}
export { Conflux };