Helpers
getBlockTime​
- Get Block Time by given block height.
Using this function, user can get block time by given block height
Parameters:​
- Â
<number>
- block height
Results:​
- Â
Promise<undefined | string>
- Block time
Example:​
const blockHeight = 2341;
// Get block time at Block #2341
const blockTime = await helpers.getBlockTime(blockHeight);
getTxListFromResponse​
- Get Transaction List by given transaction data response.
Using this function, user can Get Transaction List by given transaction data response
Parameters:​
- Â
<TxListDataResult>
- transaction data response
Results:​
- Â
Promise<null | TxInfo[]>
- transaction list
Example:​
const address = "fra12dsfew";
const type = "to";
const dataResult = await Network.getTxList(address, type);
// Get tx list
const txList = await helpers.getTxListFromResponse();
getTxOperationsList​
- Get Operation List by given parsed transaction
Using this function, user can Get Transaction List by given parsed transaction
Parameters:​
- Â
<ParsedTx>
- parsed tx info
Results:​
- Â
TxOperation[]>
- transaction operation list
Example:​
const address = "fra12dsfew";
const type = "to";
const dataResult = await Network.getTxList(address, type);
// Get tx list
const txList = await helpers.getTxListFromResponse();
// Get one parsed tx
parsedTx = JSON.parse(Base64.decode(txList[0].tx));
// Get operation Lsit
opList = helpers.getTxOperationsList(parsedTx);