Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using API #544

Open
zachariahevans174 opened this issue Jul 25, 2024 · 3 comments
Open

Using API #544

zachariahevans174 opened this issue Jul 25, 2024 · 3 comments

Comments

@zachariahevans174
Copy link

I was looking at the initial way to set up the Tron Node and server. How do I obtain my private key using the API or is it possible to transfer using api without the private key.

@start940315
Copy link
Contributor

You must create an account first. An account includes a private key and an address. The method is as below:

const account = TronWeb.createAccount();

@zachariahevans174
Copy link
Author

It already shows my main and side public keys.

@Satan-web3
Copy link

Did you mean to obtain the genesis account? It is exists in the No.0 block. You can obtain it by using api below:

tronWeb.trx.getBlockByNumber(0);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants