address:uncles [OND]

Subscribes/Unsubscribes to uncles mined by the specified address.

Make sure you're connected.

Request

{"jsonrpc":"2.0","id":1,"method":"subscribe","params":["address:uncles",{"address":"0xce742257c4e5ce5422dabdf83a58d994202736ac"}]}

Param

Type

Description

address*

string

The address of the account.

*required

Response

"result": {
  "blockchainId": "1c9c969065fcd1cf",
  "number": 7446981,
  "hash": "0xbb4dfba5da0cb892200ebb48a6b4ad6568d7580c8e31733ffe23688dc18c1d19",
  "parentHash": "0x37d365d3f60eb4eec903135e1bef9c29da535ddbd8b4a9578bc6af596c9061fc",
  "nonce": 8052402667755194000,
  "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
  "logsBloom": "0x080004...",
  "transactionsRoot": "0x5821e23007c101e67b19fb378deb3e70a31938a94e02a5ae12c72595c8cef2c5",
  "stateRoot": "0x1871a4536e11fe9ec872a70514d71d918a90569148d98c22ed90db8074a8dd68",
  "receiptsRoot": "0x2207ea31d74623c13a7fe8421880aa9f4d7d7c0ed7229aeb407d79b43f1383b6",
  "author": null,
  "miner": "0xce742257c4e5ce5422dabdf83a58d994202736ac",
  "mixHash": "0x9930c9f666a3ba7650f6f314a566a2fd491e2915faf657a8966136baa3a9a4bd",
  "difficulty": 1738323649883445,
  "totalDifficulty": 9.609386586218902e+21,
  "extraData": "0x63616c66706f6f6c3a636f696e3031",
  "size": 536,
  "gasLimit": 8000029,
  "gasUsed": 7985797,
  "timestamp": 1553640981000,
  "timestampNanoseconds": 0,
  "blockNumber": 7446983,
  "blockHash": "0x9fedab347af2f6a6abcf5da9b5603aafacb12fe12fd981cfbb33cf2123e9d09e",
  "position": 0,
  "blockTimestamp": 1553641005000,
  "blockTimestampNanoseconds": 0,
  "optionalProperties": null
}

Example

const WebSocket = require('ws');
const ws = new WebSocket('wss://ws.web3api.io', {headers: {x-api-key:'<api_key>'}});

ws.on('open', () => {
  ws.send(JSON.stringify({
      jsonrpc: '2.0',
      method: 'subscribe',
      params: ['address:uncles', {address: '0xce742257c4e5ce5422dabdf83a58d994202736ac'}],
      id: 1,
    }));
});

ws.on('message', data => {
  console.log(JSON.stringify(JSON.parse(data), null, 2));
});