Developer Center
Integration guide.
Start with a public network lookup, then design how your application handles events, retries, and historical updates.
Quick start
- Choose the network and the type of record you need.
- Get the latest block, or pass a block number as a hexadecimal quantity.
- For a transaction, fetch its receipt before marking the action as successful.
curl 'https://ethereum-rpc.publicnode.com' \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["latest",false]}'
RPC methods
These are standard Ethereum-compatible JSON-RPC methods. A JSON-RPC response can contain an error even when its HTTP status is successful. Check for the error field before reading the result.
| Method | Input | When to use it |
|---|---|---|
eth_getBlockByNumber | Block tag or hex number, plus a boolean | Read the block timestamp and transaction list. |
eth_getTransactionByHash | 32-byte transaction hash | Read the sender, recipient, and block reference. |
eth_getTransactionReceipt | 32-byte transaction hash | Check execution status and emitted logs. |
Event payloads
One possible webhook contract is shown below. Agree on the field names, payload encoding, and signature format before connecting a sender and receiver.
| Field | Purpose |
|---|---|
event_id | A stable ID shared by retries of this event. |
type | The event the consumer dispatches, for example transaction.confirmed. |
network and block_number | Where the event was observed. |
transaction_hash | A reference the consumer can look up on the same network. |
delivery_attempt | The attempt number for this delivery. |
For HMAC-SHA256 signing, sign the exact UTF-8 bytes of the request body. Whitespace changes and JSON reformatting change the signature.
Generate and sign an exampleRetries and duplicates
Store the event ID so repeated deliveries are safe. For a temporary error, retry with increasing delay and cap the number of attempts. Keep the original event and the last response so a failed delivery can be investigated or replayed.
Plan for reorganizations separately. If your application needs additional confirmation depth, hold the business action until the chain-specific policy is met.
Historical backfill
- Choose an inclusive block range and store its network ID with the job.
- Process smaller batches and save the last completed block.
- Write idempotently, reconcile counts, and sample known transactions before promoting the index.
Handling errors
- Record unavailable
- Check the network or try again once the record is available. A pending transaction may not have a receipt yet.
- Rate limited
- Reduce request rate and retry with backoff. Avoid retrying all concurrent requests at the same time.
- Invalid parameters
- Check the block tag or the length of the transaction hash and retry with corrected input.