private-keypublic-keycryptocurrencywallettron

How to find public address through private key on TRON


How can I find user public address from his private key ? Already I found a way to convert public to hex Address also private to hex and reverse but get stuck in this one !


Solution

  • Using TronWeb, you can call this function:

    const address = tronWeb.address.fromPrivateKey(newAccount.privateKey);
    

    That code comes from one of TronWeb's tests