eth_sendRawTransaction
eth_sendRawTransaction RPC Method
Parameters:
data - The signed transaction (typically signed with a library, using your private key)
Returns:
result - The transaction hash, or the zero hash if the transaction is not yet available
Code Examples:
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": [
"signed transaction"
],
"id": 1
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.ebs.ezat.io/core/api/v1.0/rpc/bsc/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