Members
(constant) DEFAULT_ENDPOINT :Endpoint
Type:
(constant) NodeStatus :number
Properties:
Name | Type | Description |
---|---|---|
OK |
number | |
DISCONNECTED |
number | |
ERROR |
number |
Type:
- number
Methods
getUnkownAttribute(value, attributes) → {string|undefined}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
any | |
attributes |
Array.<string> |
Returns:
- Type
- string | undefined
heximalToNumber(heximal, defaultValue) → {number}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
heximal |
any | |
defaultValue |
number |
Returns:
- Type
- number
isAbi(value) → {boolean}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
Abi |
Returns:
- Type
- boolean
isEthAddressHeximal(value) → {boolean}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
EthAddressHeximal |
Returns:
- Type
- boolean
isPositiveInteger(value) → {boolean}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
any |
Returns:
- Type
- boolean
isTransactionHashHeximal(value) → {boolean}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
TransactionHashHeximal |
Returns:
- Type
- boolean
isUnsignedInteger(value) → {boolean}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
any |
Returns:
- Type
- boolean
isValidEndpoint(value) → {boolean}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
Endpoint |
Returns:
- Type
- boolean
isValidHttpUrl(value) → {boolean}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
value |
HttpUrl |
Returns:
- Type
- boolean
numberToHeximal(number, defaultValue) → {Heximal|undefined}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
number |
any | |
defaultValue |
Heximal |
Returns:
- Type
- Heximal | undefined
Type Definitions
Abi
ABI of a contract on ETH network.
Type:
- Array
Block
Properties:
Name | Type | Description |
---|---|---|
parentHash |
Heximal | |
receiptsRoot |
Heximal | |
totalDifficulty |
Heximal | |
transactionsRoot |
Heximal | |
gasLimit |
Heximal | |
nonce |
Heximal | |
number |
UnsignedInteger | |
gasUsed |
Heximal | |
mixHash |
Heximal | |
sha3Uncles |
Heximal | |
timestamp |
UnsignedInteger | |
uncles |
Array | |
difficulty |
Heximal | |
hash |
Heximal | |
logsBloom |
Heximal | |
stateRoot |
Heximal | |
transactions |
Array.<TransactionHashHeximal> | |
extraData |
Heximal | |
miner |
EthAddressHeximal | |
size |
Heximal |
Type:
- object
BlockHashHeximal
32 bytes block hash as heximal with prefix "0x".
Type:
- string
ClientConfig
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
endpoints |
Array.<Endpoint> |
<optional> |
[DEFAULT_ENDPOINT]
|
List of ETH RPC endpoints. |
reorganisationBlocks |
UnsignedInteger |
<optional> |
6
|
There is a block
|
healthCheckInterval |
PositiveInteger |
<optional> |
3000
|
For each time period, check health of nodes, in miliseconds. Default is 3000. |
Type:
- object
DiaryConfig
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
maxRetry |
UnsignedInteger |
<optional> |
10
|
Number of times for retring getting log before give up. |
reorganisationBlocks |
UnsignedInteger |
<optional> |
6
|
There is a block
|
Type:
- object
Endpoint
Properties:
Name | Type | Description |
---|---|---|
url |
HttpUrl | A HTTP URL such as |
weight |
UnsignedInteger | The greater value, the more requests will be send to this node. If it is zero then the node will not receive any requests. |
Type:
- object
EthAddressHeximal
ETH address, 20 bytes as heximal with prefix "0x".
Type:
- string
EthProviderConfig
Properties:
Name | Type | Description |
---|---|---|
endpoint |
string | URL refer to ETH RPC endpoint. |
Type:
- object
GateWayConfig
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
healthcheckInterval |
UnsignedInteger |
<optional> |
3000
|
For each time period, check health of nodes, in miliseconds. |
reorganisationBlocks |
UnsignedInteger |
<optional> |
6
|
Safe block number
|
Type:
- object
Heximal
Hex string with prefix "0x".
Type:
- string
HttpUrl
A URL that has protocol http
or https
.
Type:
- string
HttpUrl
Type:
- string
Log
Properties:
Name | Type | Description |
---|---|---|
address |
EthAddressHeximal | |
blockNumber |
UnsignedInteger | |
logIndex |
UnsignedInteger | |
transactionIndex |
UnsignedInteger | |
removed |
boolean | |
topics |
Array.<Topic> | |
data |
Heximal | |
blockHash |
BlockHashHeximal | |
transactionHash |
TransactionHashHeximal |
Type:
- object
LogFilter
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
fromBlock |
UnsignedInteger | Searching where block number is greater than or equal this one. |
||
toBlock |
UnsignedInteger | Searching where block number is less than or equal this one. |
||
addresses |
Array.<EthAddressHeximal> |
<optional> |
[]
|
List of addresses that emits log records. |
topics |
Array.<Topic> |
<optional> |
[]
|
Searching for matched topics. |
Type:
- object
NodeConfig
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
identity |
UnsignedInteger | |||
endpoint |
HttpUrl |
<optional> |
'http://localhost:8545'
|
|
weight |
UnsignedInteger |
<optional> |
1
|
It is use for evalution and distribution requests between nodes. The greater weight, the more requests is dispatch to this node. |
Type:
- object
NodeStat
Properties:
Name | Type | Description |
---|---|---|
status |
NodeStatus | |
blockNumber |
UnsignedInteger | undefined | |
message |
string | undefined |
Type:
- object
PositiveInteger
Positive integer number.
Type:
- number
RpcLogFilter
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
fromBlock |
Heximal | Searching where block number is greater than or equal this one. |
||
toBlock |
Heximal | Searching where block number is less than or equal this one. |
||
addresses |
Array.<EthAddressHeximal> |
<optional> |
[]
|
List of addresses that emits log records. |
topics |
Array.<Topic> |
<optional> |
[]
|
Searching for matched topics. |
Type:
- object
TrackedNode
- Source:
Properties:
Name | Type | Description |
---|---|---|
stat |
NodeStat | |
node |
Node |
Type:
- object
Transaction
Properties:
Name | Type | Description |
---|---|---|
hash |
TransactionHashHeximal | |
from |
EthAddressHeximal | |
to |
EthAddressHeximal | |
blockNumber |
number | |
transactionIndex |
number | |
type |
number | |
nonce |
number | |
gas |
BigInt | |
gasPrice |
BigInt | |
input |
Heximal | |
value |
Heximal | |
r |
Heximal | |
s |
Heximal | |
v |
Heximal |
Type:
- object
TransactionHashHeximal
32 bytes as heximal string.
Type:
- string
UnsignedInteger
Unsigned integer number.
Type:
- number