node.jsapiblockchaincryptocurrencytron

How to create a tron wallet with nodejs?


I want to create a TRON web wallet but I am a complete noob. My first question is how do I generate addresses offline and with a private master key or with a mnemonic seed. The second question is how can I query the balance of all addresses generated by me with a single request to TronGrid?


Solution

  • Assuming you have TronWeb installed.

    You can do TronWeb.createAccount() to generate an address and save the output, example from docs.

    You may need to check balance of address one by one by posting to TronGrid, https://api.trongrid.io/wallet/getaccount, example from docs