UNPKG

@ledgerhq/coin-tron

Version:
44 lines 1.52 kB
import TronWeb from "tronweb"; import { TronResources } from "../types"; export declare function createTronWeb(trongridUrl?: string): TronWeb; /** * Convert `raw_data_hex` value from {@link https://developers.tron.network/reference/createtransaction|createTransaction API} to `raw_data` value. * The function try to find the correct Protobuf deserialization to use for inner (Contract)[] object. * @param rawTx * @returns */ export declare function decodeTransaction(rawTx: string): Promise<{ txID: string; raw_data: Record<string, any>; raw_data_hex: string; }>; export type AccountInfo = { account_resource?: { delegated_frozenV2_balance_for_energy?: number; frozen_balance_for_energy?: { frozen_balance: number; expire_time: number; }; }; delegated_frozenV2_balance_for_bandwidth?: number; frozen?: { frozen_balance: number; expire_time: number; }[]; frozenV2?: { type?: "ENERGY" | "TRON_POWER" | string; amount?: number; }[]; latest_withdraw_time?: number; unfrozenV2?: { type?: "ENERGY" | string; unfreeze_amount: number; unfreeze_expire_time: number; }[]; votes?: { vote_address: string; vote_count: number; }[]; }; export declare function getTronResources(acc: AccountInfo): Omit<TronResources, "energy" | "bandwidth" | "unwithdrawnReward" | "lastVotedDate" | "cacheTransactionInfoById">; //# sourceMappingURL=utils.d.ts.map