## Get Current Block
`tronWeb.trx.getCurrentBlock();
`
_Returns the current block on the **FullNode**._
## Get Block
`tronWeb.trx.getBlock(12345);
`
_Gets a block by height/ID. If none is provided, it returns the default block._
Value | Description |
block | ID or height for the block. |
## Get Block By Hash
`tronWeb.trx.getBlockByHash("0000000000038809c59ee8409a3b6c051e369ef1096603c7ee723c16e2376c73");
`
_Gets a block by block hash._
Value | Description |
block Hash | Hash of block. |
## Get Block By Number
`tronWeb.trx.getBlockByNumber(12345);
`
_Gets a block by height or ID._
Value | Description |
block | ID or height for the block. |
## Get Block Transaction Account
`tronWeb.trx.getBlockTransactionCount(12345);
`
_Gets the count of transactions within a block._
Value | Description |
block | ID or height for the block. |
## Get Transaction From Block
`tronWeb.trx.getTransactionFromBlock(12345);
`
_Gets the array of transactions from a block, if there are any._
Value | Description |
block | ID or height for the block. |
## Get Transaction
`tronWeb.trx.getTransaction("67af8c693f88146999ffa2748331aa0dae980a14bb553f4798ef37d7bed799ee");
`
_Gets a transaction by transaction ID._
Value | Description |
transaction hash | Hash of the transaction. |
## Get Transaction Info
`tronWeb.trx.getTransactionInfo("0ab16c340e85d52c1179aceca5133e711a5850f4ea42d5bac2e8929a3330551d");
`
_Gets the details for a transaction, including the fees and virtual machine events for a transaction._
Value | Description |
transaction hash | Hash of transaction. |
## Get Transactions to Address
`tronWeb.trx.getTransactionsToAddress("TNDFkUNA2TukukC1Moeqj61pAS53NFchGF", 30, 0);
`
_Gets all the confirmed transactions sent to an address. This will not return any unconfirmed transactions._
Value | Description |
address | Address to query. |
limit | Limit amount of returned tx. |
offset | Offset to return from. |
## Get Transactions from Address
`tronWeb.trx.getTransactionsFromAddress("TNDFkUNA2TukukC1Moeqj61pAS53NFchGF", 30, 0);
`
_Gets the transactions sent from an address._
Value | Description |
address | Address to query. |
limit | Limit the number of returned tx. |
offset | Offset to return from. |
## Get Transactions Related
`tronWeb.trx.getTransactionsRelated("TNDFkUNA2TukukC1Moeqj61pAS53NFchGF", "all", 30, 0);
`
_Gets all transactions involving a specified address._
Value | Description |
address | Address to query from. |
direction | The specified direction of transactions. |
limit | Limit the number of returned tx. |
offset | Offset to start from. |
## Get Account
`tronWeb.trx.getAccount("TNDFkUNA2TukukC1Moeqj61pAS53NFchGF");
`
_Get account from address._
Value | Description |
Address | Address of account. |
## Get Balance
`tronWeb.trx.getBalance("TNDFkUNA2TukukC1Moeqj61pAS53NFchGF");
`
_Get balance from address._
Value | Description |
Address | Address of account. |
## Get Bandwidth
`tronWeb.trx.getBandwidth("TNDFkUNA2TukukC1Moeqj61pAS53NFchGF");
`
_Get bandwidth from address._
Value | Description |
Address | Address of account. |
## Get Tokens Issued By Address
`tronWeb.trx.getTokensIssuedByAddress("TNDFkUNA2TukukC1Moeqj61pAS53NFchGF");
`
_Get tokens issued by address._
Value | Description |
Address | Address of account. |
## Get Token From ID
`tronWeb.trx.getTokenFromID("WIN");
`
_Get Token From ID_
Value | Description |
Token ID | ID of token. |
## List Nodes
`tronWeb.trx.listNodes();
`
_List all nodes on the network._
## Get Block Range
`tronWeb.trx.getBlockRange(10,20);
`
_Get block range._
Value | Description |
Minimum Block | Minimum block height or ID in the range. |
## List Super Representatives
`tronWeb.trx.listSuperRepresentatives();
`
_List all super representatives on the network._
## Time Until Next Vote Cycle
`tronWeb.trx.timeUntilNextVoteCycle();
`
_Get time until next vote cycle._
## Get Contract
`tronWeb.trx.getContract("TNDFkUNA2TukukC1Moeqj61pAS53NFchGF");
`
_Returns the details of the contract at the specified address._
Value | Description |
Contract Address | Address of contract. |
## Sign
**Important:** Do not use this in any web / user-facing applications. This will expose the private key.
`tronWeb.trx.sign(transaction = [...], "abc...gdfsgdf");
`
_Signs a provided transaction object._
## Send Raw Transaction
`tronWeb.trx.sendRawTransaction(signedTransaction = [...]);
`
_Broadcasts a signed raw transaction to the network._
## Send Transaction
**Important:** Do not use this in any web / user-facing applications. This will expose the private key.
`tronWeb.trx.sendTransaction("TXPHCzmAmjyERtWES6EXTYqUPfJfQSzp2m", 100, "abc...gdfsgdf");
`
_Sends TRX from one address to another. Will create and broadcast the transaction if a private key is provided._
Column Title | Column Title |
Address | To account. |
Amount | Amount you want to send. |
Private Key | Private key of account to sign transaction. |
## Send Token
**Important:** Do not use this in any web / user-facing applications. This will expose the private key.
`tronWeb.trx.sendTransaction("TXPHCzmAmjyERtWES6EXTYqUPfJfQSzp2m", 100, "WIN", "abc...gdfsgdf");
`
_Sends TRX from one address to another. Will create and broadcast the transaction if a private key is provided._
Value | Description |
Address | To account. |
Amount | Amount you want to send. |
Token | ID of token. |
Private Key | Private key of account to sign transaction. |
## Get Account Resources
`tronWeb.trx.getAccountResources("TXPHCzmAmjyERtWES6EXTYqUPfJfQSzp2m");
`
_Get resources from account._
Value | Description |
Address | Address of account. |