Members
blockNumber
Safe block number latest - reorganisationBlocks, where
latest is newest block number from nodes.
Methods
(async) getBlockByNumber(blockNumber, includeTransactionopt) → {Promise.<Block>}
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
blockNumber |
UnsignedInteger | |||
includeTransaction |
boolean |
<optional> |
false
|
Returns:
- Type
- Promise.<Block>
(async) getLogs(filter) → {Promise.<Array.<Log>>}
Retrieve log records.
It is equivalent to RPC eth_getLogs.
Parameters:
| Name | Type | Description |
|---|---|---|
filter |
LogFilter | Matching conditions. |
Throws:
-
- Call to unsafe block.
- Type
- DiaryError
Returns:
- Type
- Promise.<Array.<Log>>
(async) getTransaction(txHash) → {Transaction|undefined}
Retrieve a transaction by it's hash.
It is equivalent to RPC eth_getTransactionByHash.
Parameters:
| Name | Type | Description |
|---|---|---|
txHash |
TransactionHashHeximal |
Throws:
ClientError
Returns:
- Type
- Transaction | undefined