We recommend integrating the following 3 RPC methods:
eth_sendRawTransaction: Send transactions to the mempool.
eth_getTransactionByHash: Fetch the transaction details.
eth_getTransactionCount: Get the pending nonce for an account.
Contact or use your dedicated Telegram support channel to get help.
eth_sendRawTransaction
This is the recommended way to send transactions.
Example of a request:
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": [
"0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833",
// "customer-123" -> optional source tag for cashback
],
}
Example of a response:
{
"id": 1,
"jsonrpc": "2.0",
// the hash of the transaction
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
eth_sendPrivateTransaction
Not recommended. Only available for backward compatibility.
This RPC is similar to eth_sendRawTransaction. The only extra feature is the support for maxBlockNumber.
Example of a request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_sendPrivateTransaction",
"params": [
{
"tx": "0x1111ddddd...",
"maxBlockNumber": "0x00000", // if the transaction is not mined
// by this block, it will be considered
// "expired" and dropped
"source": "customer-123", // optional source tag
"preferences": {
"fast": true, // not used, backward compatibility
}
}
]
}
Not recommended. Only available for backward compatibility.
This RPC is the same as eth_sendPrivateTransaction. The only extra feature is the support for maxBlockNumber.
Example of a request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_sendRawPrivateTransaction",
"params": [
{
"tx": "0x1111ddddd...",
"maxBlockNumber": "0x00000", // if the transaction is not mined
// by this block, it will be considered
// "expired" and dropped
"source": "customer-123", // optional source tag
"preferences": {
"fast": true, // not used, backward compatibility
}
}
]
}
Our transaction response closely follows the format of the standard eth_getTransactionByHash method used in Ethereum. However, in our response, the fields gasPrice, v, r, and s are set to "0x0". These fields are not applicable in our context, and this notation ensures clarity and consistency with the standard format without introducing ambiguity.
This method implements the standard eth_getTransactionCount. If using the pending parameter instead of a block number, the private mempool will automatically compute the next nonce using both private transactions and public transactions.