Skip to content

Commit 6f5be4c

Browse files
committed
Add the WSS support.
Signed-off-by: bgravenorst <[email protected]>
1 parent c90045a commit 6f5be4c

File tree

43 files changed

+395
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+395
-26
lines changed
Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,45 @@
11
An array of bad block objects. Each bad block object contains:
22

3-
- `author`: The address of the block author/miner
4-
- `difficulty`: The difficulty value for this block
5-
- `extraData`: Arbitrary data included by the miner
6-
- `gasLimit`: The maximum gas allowed in this block
7-
- `gasUsed`: The total used gas by all transactions in this block
8-
- `hash`: The hash of the block
9-
- `logsBloom`: The bloom filter for the logs of the block
10-
- `miner`: The address of the beneficiary to whom the mining rewards were given
11-
- `number`: The block number
12-
- `parentHash`: The hash of the parent block
13-
- `reason`: The reason why this block was considered "bad"
14-
- `receiptsRoot`: The root of the receipts trie of the block
15-
- `rlp`: The RLP encoding of the block
16-
- `sealFields`: Array of seal fields
17-
- `sha3Uncles`: The SHA3 of the uncles data in the block
18-
- `size`: The size of this block in bytes
19-
- `stateRoot`: The root of the final state trie of the block
20-
- `timestamp`: The unix timestamp for when the block was collated
21-
- `totalDifficulty`: The total difficulty of the chain until this block
22-
- `transactions`: Array of transaction objects
23-
- `transactionsRoot`: The root of the transaction trie of the block
24-
- `uncles`: Array of uncle hashes
3+
- `baseFeePerGas`: The integer representation of the base fee per gas for this block encoded as hexadecimal.
4+
- `difficulty`: The integer representation of the difficulty for this block encoded as hexadecimal.
5+
- `extraData`: The extra data field of this block.
6+
- `gasLimit`: The maximum gas allowed in this block encoded as hexadecimal.
7+
- `gasUsed`: The total used gas by all transactions in this block encoded as hexadecimal.
8+
- `hash`: The hash of the block.
9+
- `logsBloom`: The bloom filter for the logs of the block. Null if pending.
10+
- `miner`: The address of the beneficiary to whom the mining rewards were given.
11+
- `mixHash`: A 256-bit hash encoded as hexadecimal.
12+
- `nonce`: The hash of the generated proof-of-work. `Null if pending.
13+
- `number`: The block number of the requested block encoded as hexadecimal. Null if pending.
14+
- `parentHash`: The hash of the parent block.
15+
- `reason`: The reason why this block was considered "bad".
16+
- `receiptsRoot`: The root of the receipts trie of the block.
17+
- `rlp`: The RLP encoded header.
18+
- `sealFields`: Array of seal fields.
19+
- `sha3Uncles`: The SHA3 of the uncles' data in the block.
20+
- `size`: The size of this block in bytes as an Integer value encoded as hexadecimal.
21+
- `stateRoot`: The root of the final state trie of the block.
22+
- `timestamp`: The Unix timestamp for when the block was collated.
23+
- `totalDifficulty`: The total difficulty of the chain until this block.
24+
- `transactions`: An array of transaction objects with the following fields:
25+
- `blockHash`: The hash of the block where this log was in. Null when it's a pending log.
26+
- `blockNumber`: The block number where this log was in. Null when it's a pending log.
27+
- `from`: The address of the sender.
28+
- `gas`: The gas provided by the sender, encoded as hexadecimal.
29+
- `gasPrice`: The gas price provided by the sender in wei, encoded as hexadecimal.
30+
- `maxFeePerGas`: The maximum fee per gas set in the transaction.
31+
- `maxPriorityFeePerGas`: The maximum priority gas fee set in the transaction.
32+
- `hash`: The hash of the transaction.
33+
- `input`: The data sent along with the transaction.
34+
- `nonce`: The number of transactions made by the sender before this one encoded as hexadecimal.
35+
- `to`: The address of the receiver. Null when it's a contract creation transaction.
36+
- `transactionIndex`: The integer of the transaction's index position that the log was created from. Null when it's a pending log.
37+
- `value`: The value transferred in wei encoded as hexadecimal.
38+
- `type`: The transaction type.
39+
- `accessList`: A list of addresses and storage keys that the transaction plans to access.
40+
- `chainId`: The chain id of the transaction, if any.
41+
- `v`: The standardized V field of the signature.
42+
- `r`: The R field of the signature.
43+
- `s`: The S field of the signature.
44+
- `transactionsRoot`: The root of the transaction trie of the block.
45+
- `uncles`: An array of uncle hashes.

services/reference/hemi/json-rpc-methods/_eth_accounts-request.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://hemi-mainnet.infura.io/v3/YOUR-API-KEY \
1111
-d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS" label="WSS">
16+
17+
```bash
18+
wscat -c wss://hemi-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/hemi/json-rpc-methods/_eth_blocknumber-request.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://hemi-mainnet.infura.io/v3/YOUR-API-KEY \
1111
-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS" label="WSS">
16+
17+
```bash
18+
wscat -c wss://hemi-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/hemi/json-rpc-methods/_eth_call-request.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://hemi-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS" label="WSS">
16+
17+
```bash
18+
wscat -c wss://hemi-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/hemi/json-rpc-methods/_eth_chainid-request.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://hemi-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS" label="WSS">
16+
17+
```bash
18+
wscat -c wss://hemi-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/hemi/json-rpc-methods/_eth_estimategas-request.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://hemi-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS" label="WSS">
16+
17+
```bash
18+
wscat -c wss://hemi-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/hemi/json-rpc-methods/_eth_feehistory-request.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://hemi-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS" label="WSS">
16+
17+
```bash
18+
wscat -c wss://hemi-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]]}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/hemi/json-rpc-methods/_eth_gasprice-request.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://hemi-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS" label="WSS">
16+
17+
```bash
18+
wscat -c wss://hemi-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/hemi/json-rpc-methods/_eth_getbalance-request.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://hemi-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0","method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS" label="WSS">
16+
17+
```bash
18+
wscat -c wss://hemi-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0","method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

services/reference/hemi/json-rpc-methods/_eth_getblockbyhash-request.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@ curl https://hemi-mainnet.infura.io/v3/<YOUR-API-KEY> \
1111
-d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}'
1212
```
1313

14+
</TabItem>
15+
<TabItem value="WSS" label="WSS">
16+
17+
```bash
18+
wscat -c wss://hemi-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}'
19+
```
20+
1421
</TabItem>
1522
</Tabs>

0 commit comments

Comments
 (0)