import { Ecanna } from "ecanna/dist" import { TKNVMAPI } from "ecanna/dist/apis/tknvm" const ip: string = "localhost" const port: number = 9650 const protocol: string = "http" const networkID: number = 1337 const ecanna: Ecanna = new Ecanna(ip, port, protocol, networkID) const tknchain: TKNVMAPI = ecanna.TKNChain() const main = async (): Promise => { const txID: string = "Ycg5QzddNwe3ebfFXhoGUDnWgC6GE88QRakRnn9dp3nGwqCwD" const encoding: string = "json" const tx: string | object = await tknchain.getTx(txID, encoding) console.log(tx) } main()