import type { TronBlock, TronTx } from './types.js'; export interface TronApiConfig { rpcUrl: string; apiKey?: string; } export type TronContractEnergyShare = { callerPercent: number; originEnergyLimit: number; originEnergyAvailable: number; }; export declare const getCallerEnergy: (energyUsed: number, share: TronContractEnergyShare) => number; export declare class TronApi { private readonly rpcUrl; private readonly apiKey; private tronWeb; private readonly contracts; private readonly originEnergy; private requestQueue; private readonly minRequestInterval; constructor(config: TronApiConfig); getRpcUrl(): string; private get tronGridHeaders(); private throttle; private getTronWeb; getAccount(params: { pubkey: string; }): Promise<{ balance: string; unconfirmedBalance: string; tokens?: { contractAddress: string; balance: string; }[]; }>; getTrc20Decimals(params: { contractAddress: string; }): Promise; getTrc10Precision(params: { id: string; }): Promise; getTrc20Balance(params: { contractAddress: string; address: string; }): Promise; getTrc20Allowance(params: { contractAddress: string; owner: string; spender: string; }): Promise; isAccountActivated(address: string): Promise; getTxHistory(_params: { pubkey: string; pageSize?: number; cursor?: string; }): Promise<{ txs: TronTx[]; cursor?: string; }>; getTransaction(params: { txid: string; }): Promise; getBlock(params: { height: number; }): Promise; sendTx(params: { sendTxBody: { hex: string; }; }): Promise; getChainPrices(): Promise<{ bandwidthPrice: number; energyPrice: number; memoFee: number; }>; getContractEnergyShare(contractAddress: string): Promise; private getContract; private getPricingContext; private getOriginEnergyAvailable; private post; estimateTrc20TransferFee(params: { contractAddress: string; from: string; to: string; amount: string; requireEnergyShare?: boolean; }): Promise; estimateContractCallFee(params: { contractAddress: string; from: string; data: string; callValue?: string; requireEnergyShare?: boolean; }): Promise; private isReverted; private getSimulatedEnergy; }