RPC API
This documentation provides detailed information about the JSON-RPC methods supported by pod.
Overview
Pod implements a JSON-RPC API that allows interaction with the network. While many methods align with the Ethereum JSON-RPC specification (methods prefixed with eth_), pod includes additional metadata (pod_metadata attribute) and pod-specific functionality (methods prefixed with pod_).
Base URL
The API endpoint is accessible at https://rpc.v1.dev.pod.network.
Common Response Fields
All successful responses include:
| Field | Description |
|---|---|
jsonrpc | Always “2.0” |
id | The request ID |
result | The method-specific response data |
pod_metadata | Additional POD-specific information (location varies by method) |
Parameters must match the JSON-RPC 2.0 specification.
Error Handling
Error responses follow the JSON-RPC 2.0 specification.
Error Codes
| Code | |
|---|---|
32700 | Parse error |
32600 | Invalid Request |
32601 | Method not found |
32602 | Invalid params |
32603 | Internal error |
32000 | Server error (various) |
Error responses follow the JSON-RPC 2.0 specification:
Get Block Number
Returns the latest past perfection pod timestamp in microseconds.
Parameters
None
Response
| Key | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code |
response.jsonrpc | string | same value as request |
response.id | integer | unique value as request |
response.result | string | latest block number |
Example Response:
Get Chain Id
Returns the chain ID of the current network.
Parameters
None
Response
| Key | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code |
response.jsonrpc | string | same value as request |
response.id | integer | unique value as request |
response.result | string | Chain ID in hexadecimal format, always 0x50d |
Example Response:
Get Gas Estimation
Estimates gas needed for a transaction.
Parameters
| Parameter | Type | Description |
|---|---|---|
object | object | Transaction call object with the following fields: |
from | string | (optional) 20-byte address of sender |
to | string | 20-byte address of recipient |
gas | string | (optional) Gas provided for transaction execution |
gasPrice | string | (optional) Gas price in wei |
value | string | (optional) Value in wei |
data | string | (optional) Contract code or encoded function call data |
Note: Only Legacy transactions are supported
Response
| Key | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code |
response.jsonrpc | string | same value as request |
response.id | integer | unique value as request |
response.result | string | estimated gas in hexadecimal format |
Example Response:
Get Gas Price
Returns the current gas price.
Parameters
None
Response
| Key | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code |
response.jsonrpc | string | same value as request |
response.id | integer | unique value as request |
response.result | string | Current gas price in wei (hexadecimal format) |
Example Response:
Get Balance
Returns the balance of a given address.
Parameters
| Parameter | Type | Description |
|---|---|---|
string 1 | string | 20-byte address to check balance for |
string 2 | string | Past perfect timestamp to query, specified in seconds(hexadecimal format). Can also be the tags: earliest, finalized or latest. |
Note: Currently returns the current balance regardless of timestamp
Response
| Key | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code |
response.jsonrpc | string | same value as request |
response.id | integer | unique value as request |
response.result | string | balance in hexadecimal format |
Example Response:
Get Block by Hash
Returns information about a block by its hash. Returns an empty block structure for compatibility.
Parameters
| Parameter | Type | Description |
|---|---|---|
element 1 | string | Block hash |
element 2 | boolean | If true, returns full transaction objects; if false, returns transaction hashes |
Response
| Key | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code |
response.jsonrpc | string | same value as request |
response.id | integer | unique value as request |
response.result | object | block information |
| Key | Type | Description |
|---|---|---|
result | object | block information |
result.number | string | 0 |
result.mixHash | string | 0x0 followed by 64 zeros |
result.hash | string | Requested block hash |
result.parentHash | string | 0x0 followed by 64 zeros |
result.nonce | string | 0x0000000000000000 |
result.sha3Uncles | string | 0x0 followed by 64 zeros |
result.logsBloom | string | 0x0 followed by 256 zeros |
result.transactionsRoot | string | 0x0 followed by 64 zeros |
result.stateRoot | string | 0x0 followed by 64 zeros |
result.receiptsRoot | string | 0x0 followed by 64 zeros |
result.miner | string | 0x0 followed by 40 zeros |
result.difficulty | string | 0x0000000000000000 |
result.extraData | string | 0x0 followed by 40 zeros |
result.size | string | 0x0 |
result.gasLimit | string | 0x0 |
result.gasUsed | string | 0x0 |
result.timestamp | string | 0x0 |
result.transactions | array | Empty array |
result.uncles | array | Empty array |
Example Response:
Get Block by Number
Returns information about a block by its number. Returns an empty block structure for compatibility.
Parameters
| Parameter | Type | Description |
|---|---|---|
element 1 | string | Block number in hexadecimal format |
element 2 | boolean | If true, returns full transaction objects; if false, returns transaction hashes |
Response
| Key | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code |
response.jsonrpc | string | same value as request |
response.id | integer | unique value as request |
response.result | object | block information |
| Key | Type | Description |
|---|---|---|
result | object | block information |
result.number | string | Requested block number |
result.mixHash | string | 0x0 followed by 64 zeros |
result.hash | string | 0x0 followed by 64 zeros |
result.parentHash | string | 0x0 followed by 64 zeros |
result.nonce | string | 0x0000000000000000 |
result.sha3Uncles | string | 0x0 followed by 64 zeros |
result.logsBloom | string | 0x0 followed by 256 zeros |
result.transactionsRoot | string | 0x0 followed by 64 zeros |
result.stateRoot | string | 0x0 followed by 64 zeros |
result.receiptsRoot | string | 0x0 followed by 64 zeros |
result.miner | string | 0x0 followed by 40 zeros |
result.difficulty | string | 0x0000000000000000 |
result.extraData | string | 0x0 followed by 40 zeros |
result.size | string | 0x0 |
result.gasLimit | string | 0x0 |
result.gasUsed | string | 0x0 |
result.timestamp | string | 0x0 |
result.transactions | array | Empty array |
result.uncles | array | Empty array |
Example Response:
Get Logs
Returns an array of event logs matching the given filter criteria.
Parameters
| Parameter | Type | Description |
|---|---|---|
fromBlock | string | (optional) From block timestamp specified in seconds in hexadecimal format. Can also be the tags: earliest, finalized or latest. |
toBlock | string | (optional) To block timestamp specified in seconds in hexadecimal format. Can also be the tags: earliest, finalized or latest. |
address | string | (optional) Contract address |
topics | array | (optional) Array of topic filters (up to 4 topics): |
| - Each topic can be either a string or null | ||
| - Topics are ordered and must match in sequence | ||
| - Null values match any topic | ||
minimum_attestations | number | (optional) Minimum number of attestations required for the log to be returned |
Response
| Key | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code |
response.jsonrpc | string | same value as request |
response.id | integer | unique value as request |
response.result | array | Array of log objects |
| Key | Type | Description |
|---|---|---|
| object | block information | |
address | string | Address from which this log originated |
blockNumber | string | Block number in hexadecimal format, supported for completeness, the block number returned is 1 |
blockHash | string | Block hash. Supported for completeness, the block hash returned is the 0 hash |
transactionHash | string | Transaction hash |
transactionIndex | string | Transaction index |
logIndex | string | Log index |
topics | array | Array of indexed log parameters |
data | string | Contains non-indexed log parameters |
pod_metadata | object | Additional pod-specific information including attestations |
Example Response:
Get Transaction by Hash
Returns information about a transaction by its hash.
Parameters
| Parameter | Type | Description |
|---|---|---|
string 1 | string | 32-byte transaction hash |
Response
| Key | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code |
response.jsonrpc | string | same value as request |
response.id | integer | unique value as request |
response.result | object | Transaction object, or null if no transaction was found |
| Key | Type | Description |
|---|---|---|
| object | block information | |
hash | string | 32-byte transaction hash |
nonce | string | Number of transactions sent by the sender prior to this one |
blockHash | string | 32-byte block hash, or null if pending |
blockNumber | string | Block number, or null if pending |
transactionIndex | string | Integer index position in the block, or null if pending |
from | string | 20-byte address of the sender |
to | string | 20-byte address of the recipient, or null for contract creation |
value | string | Value transferred in wei |
gasPrice | string | Gas price in wei |
gas | string | Gas provided for transaction execution |
input | string | Contract code or encoded function call data |
v | string | ECDSA recovery ID |
r | string | ECDSA signature r |
s | string | ECDSA signature s |
pod_metadata | object | Additional pod-specific information |
Example Response:
Get Transaction Count
Returns the number of transactions sent from an address.
Parameters
| Parameter | Type | Description |
|---|---|---|
[1] | string | 20-byte address |
[2] | string | Past perfect timestamp in seconds (hexadecimal format). Can also be the tags: earliest, finalized or latest. |
Note: Currently returns the current transaction count regardless of timestamp
Response
| Key | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code |
response.jsonrpc | string | same value as request |
response.id | integer | unique value as request |
response.result | string | Number of transactions sent by the sender prior to this one |
Example Response:
Get Transaction Receipt
Returns the receipt of a transaction by transaction hash.
Parameters
| Parameter | Type | Description |
|---|---|---|
string 1 | string | 32-byte transaction hash |
Response
| Key | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code |
response.jsonrpc | string | same value as request |
response.id | integer | unique value as request |
response.result | object | A transaction receipt object with pod-specific metadata, or null if no receipt was found. |
| Key | Type | Description |
|---|---|---|
| object | Standard Ethereum receipt fields | |
pod_metadata | object | Contains pod-specific data including attestations |
Example Response:
Get Network Id
Returns the current network ID.
Parameters
None
Response
| Key | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code |
response.jsonrpc | string | same value as request |
response.id | integer | unique value as request |
response.result | string | The network ID in decimal format |
Example Response:
Send Raw Transaction
Submits a pre-signed transaction for broadcast to the POD network.
Parameters
| Parameter | Type | Description |
|---|---|---|
[1] | string | Signed transaction data in hex format |
[2] | u64 | (optional) Timeout in milliseconds. Default is 0 milliseconds. The timeout allows the client to wait for the confirmation of the transaction instead of returning the hash immediately. |
Response
| Key | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code |
response.jsonrpc | string | same value as request |
response.id | integer | unique value as request |
response.result | string | 32-byte transaction hash (or zero hash if transaction is not yet available) |
Example Response:
Subscribe
Creates a subscription for specific events. This endpoint streams the new events, for historical data use the other endpoints (pod_listReceipts, pod_pastPerfectTime, eth_getLogs). Each subscription type has different parameter requirements.
Parameters
| Parameter | Type | Description |
|---|---|---|
[0] | string | Subscription type (required): logs, pod_receipts, pod_pastPerfectTime |
[1] | object | Parameters object (varies by subscription type) |
Subscription Types and Parameters:
Response
| Type | Description |
|---|---|
| string | Subscription ID |
Subscription Messages
Each subscription type returns different data in its subscription messages.
Error Handling
| Error Code | Message | Description |
|---|---|---|
| -32602 | Invalid subscription type | The requested subscription type is not supported |
| -32602 | Invalid parameters for subscription | The parameters provided for the subscription are invalid |
| -32602 | Missing required parameters | Required parameters for the subscription are missing |
Get Committee
Lists the validator public keys that are part of the committee.
Parameters
None
Response
| Key | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code |
response.jsonrpc | string | same value as request |
response.id | integer | unique value as request |
response.result | object | Response object |
| Key | Type | Description |
|---|---|---|
| object | ||
quorum_size | integer | Number of required attestations |
replicas | array | Array of validator public keys |
List Confirmed Receipts
Retrieves confirmed transaction receipts after a specified timestamp. Allows filtering receipts by originating or destination address.
Parameters
| Key | Type | Description |
|---|---|---|
| object | ||
since | string | Timestamp specified in microseconds representing the start of the range to query |
address | string | (optional) Address to filter receipts by (matches from or to fields) |
pagination | object | (optional) Pagination object |
pagination.cursor | string | (optional) Cursor to start the query from |
pagination.limit | integer | (optional) Maximum number of receipts to return |
pagination.newest_first | boolean | (optional) Whether to start the query from the most recent receipts |
Note: If cursor is provided, newest_first must NOT be provided.
Response
| Key | Type | Description |
|---|---|---|
statusCode | integer | HTTP status code |
response.jsonrpc | string | same value as request |
response.id | integer | unique value as request |
response.result | object | Response object |
| Key | Type | Description |
|---|---|---|
| object | Pagination Response Object | |
items | array | List of transaction receipts with metadata |
next_cursor | string | Cursor to start the next query from. null if there are no more items to fetch |
Best practices
For optimal client usage:
- Always check for and handle the None case when querying transactions or receipts. the specific error types provided by the SDK for precise error handling.
- Implement appropriate retry logic and timeouts for handling transient failures.
- Maintain a single client instance when possible to improve resource utilization.
- Check attestations when required by your application’s security requirements.
Security Considerations
When developing applications using the pod Rust SDK:
- Never expose private keys or sensitive credentials in your application code.
- Verify transaction receipts and attestations before considering transactions final.
- Implement appropriate timeouts and circuit breakers for network operations.
- Monitor and log suspicious activity or unexpected errors.
Resources
For additional resources and troubleshooting search for issues on our GitHub repository or submit a new issue.