eth_sendPrivateTransaction

eth_sendPrivateTransaction RPC Method

Parameters:

tx - string - The raw signed transaction

maxBlockNumber - string - (optional) The highest block number encoded in hexadecimal value in which the transaction should be included

preferences - object - (optional) The preferences object

fast - boolean - It sends the transaction with fast mode when true

Returns:

result - It is true if the transaction is successfully canceled, otherwise false

Code Examples:

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "jsonrpc": "2.0",
  "method": "eth_sendPrivateTransaction",
  "params": [
    "RAW_SIGNED_TX"
  ],
  "id": 1
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.ebs.ezat.io/core/api/v1.0/rpc/ethererum/mainnet?x-api-key-id=API-KEY-ID&x-api-key=API-KEY", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Last updated