For the complete documentation index, see llms.txt. This page is also available as Markdown.

txReceipts

txReceipts is a stream of all transaction receipts in each newly mined block.

Service available via Gateway only.

Stream Endpoint

  • Method: txReceipts

  • Endpoint: ws://127.0.0.1:28333/ws

  • Request type: gRPC,WSS

Parameters

Key
Description
Values

include

Fields to include in the receipts stream

block_hash, block_number, contract_address, cumulative_gas_used, from, gas_used, logs, logs_bloom, status, to, transaction_hash, transaction_index, blob_gas_used, effective_gas_price,

type,

txs_count,

blob_gas_price[Default: all]

Examples - Websocket

Gateway-API

wscat -c ws://127.0.0.1:28333/ws --header "Authorization: <YOUR-AUTHORIZATION-HEADER>"
> {"id": 1, "method": "subscribe", "params": ["txReceipts", {"include": []}]}
< ......
var fs = require('fs');
const WebSocket = require('ws');

 const ws = new WebSocket(
   "ws://127.0.0.1:28333/ws", 
   {
     headers: { 
       "Authorization" : <YOUR-AUTHORIZATION-HEADER>
     },
     rejectUnauthorized: false,
   }
 );

function proceed() {
    ws.send(`{"jsonrpc": "2.0", "id": 1, "method": "subscribe", "params": ["txReceipts", {"include": []}]}`);
}


function handle(nextNotification) {
    console.log(nextNotification.toString()); // or process it generally
}

ws.on('open', proceed);
ws.on('message', handle);

Go Gateway

Response Example

Last updated