--- title: txPbToTxID() --- # txPbToTxID() Calculate the transaction ID from the transaction protobuf format ## Usage ```js utils.transaction.txPbToTxID(transaction) ``` ## Parameters transaction : Object - The transaction object in protobuf format. ## Return String - Transaction ID ## Example ```js import { TronWeb, utils } from 'tronweb'; const tronWeb = new TronWeb({ fullHost: 'https://api.nileex.io', privateKey: 'your private key', }); const txJson = await tronWeb.transactionBuilder.sendTrx("TVDGpn4hCSzJ5nkHPLetk8KQBtwaTppnkr", 100, "TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL"); // Convert the transaction object in json format to protobuf format const txPb = utils.transaction.txJsonToPb(txJson); // Calculate the transaction ID from the transaction protobuf format const txID = utils.transaction.txPbToTxID(txPb); ```