/** * Minimal TRON utilities to replace TronWeb dependency * Covers: message signing support (mock-tx workaround), address conversion, * and full-node HTTP wrappers for building and broadcasting real transactions. */ /** Convert a base58 Tron address to its 42-char lowercase hex form (`41…`). */ export declare function tronAddressToHex(address: string): string; /** * Minimal shape of an unsigned Tron transaction. * Only txID + raw_data* are load-bearing; the rest passes through opaquely * to whatever the wallet returns after signing. */ export interface UnsignedTronTx { txID?: string; raw_data?: unknown; raw_data_hex?: string; visible?: boolean; [key: string]: unknown; } /** Build an unsigned native TRX transfer. Amount in SUN. */ export declare function buildNativeTronTx(networkId: string, params: { from: string; to: string; amount: number | bigint; }): Promise; /** Build an unsigned TRC20 `transfer(address,uint256)` transaction. */ export declare function buildTrc20TronTx(networkId: string, params: { from: string; to: string; amount: number | bigint; contractAddress: string; }): Promise; /** * Build an unsigned `TriggerSmartContract` from pre-encoded calldata. * Used for bridging deposits where the calldata must be forwarded verbatim * (e.g. Relay request-id tag appended after ABI args — see TronContractCallRequest). */ export declare function buildContractCallTronTx(networkId: string, params: { from: string; contractAddress: string; data: string; /** SUN to attach for a payable call (a router's `depositNative` takes no * amount argument). Omitted/0 keeps the non-payable behaviour. */ callValue?: number | bigint; }): Promise; /** * Does the node actually hold this transaction? `gettransactionbyid` answers * `{}` for one it has never seen, so a returned `txID` is proof of acceptance * rather than an inference from an error code. * * Also the recovery probe after a failed sign: a wallet that broadcasts before * it answers leaves the transfer on-chain with nothing to tell us about it. */ export declare function nodeHasTransaction(networkId: string, txid: string): Promise; /** Broadcast a signed Tron transaction. Returns the on-chain txid. */ export declare function broadcastTronTx(networkId: string, signedTx: Record): Promise; /** * Convert UTF-8 string to hex */ export declare function stringToHex(str: string): string; /** * Trigger smart contract via TronGrid API * This creates a transaction structure without requiring the full TronWeb library */ export declare function triggerSmartContract(params: { contractAddress: string; functionSelector: string; feeLimit: number; parameters: Array<{ type: string; value: string | number; }>; ownerAddress: string; }): Promise<{ transaction?: { raw_data: { contract: Array<{ parameter: { value: { data: string; owner_address: string; contract_address: string; }; type_url: string; }; type: string; }>; ref_block_bytes: string; ref_block_hash: string; expiration: number; fee_limit: number; timestamp: number; data?: string; }; txID: string; }; result?: { result: boolean; }; transaction_id?: string; }>; //# sourceMappingURL=tron-utils.d.ts.map