UNPKG

@onekeyfe/blockchain-libs

Version:
26 lines (25 loc) 1.22 kB
import BigNumber from 'bignumber.js'; import { JsonRPCRequest } from '../../../basic/request/json-rpc'; import { CoinInfo } from '../../../types/chain'; import { AddressInfo, ClientInfo, FeePricePerUnit, TransactionStatus } from '../../../types/provider'; import { BaseClient } from '../../abc'; declare type estimateResult = { feeLimit: BigNumber; tokensChangedTo: Record<string, string>; }; declare class StcClient extends BaseClient { 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>>; getFeePricePerUnit(): Promise<FeePricePerUnit>; broadcastTransaction(rawTx: string): Promise<string>; estimateGasLimitAndTokensChangedTo(rawUserTransactionHex: string, senderPublicKeyHex: string): Promise<estimateResult>; getTokensChangedTo(dryRunRawResult: any, addressHex: string): Record<string, string>; } export { StcClient };