> ## Documentation Index
> Fetch the complete documentation index at: https://sidiorresearchlabs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# RPC Methods

> Test HyperPaxeer RPC methods in real-time

## Overview

Test HyperPaxeer RPC methods in real-time. Select an example or write your own JSON-RPC request.

> [!NOTE]
>
> **RPC Endpoint:** `https://public-rpc.paxeer.app/rpc`

> [card] Chain ID
>
> **125**

> [card] Currency
>
> **HPX**

## Common RPC Methods

### eth\_blockNumber

Returns the number of the most recent block.

```json Request theme={null}
{
  "jsonrpc": "2.0",
  "method": "eth_blockNumber",
  "params": [],
  "id": 1
}
```

```json Response theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x5daf3b"
}
```

> [accordion] Parameters
>
> None

> [accordion] Returns
>
> `QUANTITY` - Integer of the current block number the client is on

***

### eth\_getBalance

Returns the balance of the account of given address.

```json Request theme={null}
{
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": [
    "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "latest"
  ],
  "id": 1
}
```

```json Response theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x0234c8a3397aab58"
}
```

> [accordion] Parameters
>
> 1. `DATA`, 20 Bytes - Address to check for balance
> 2. `QUANTITY|TAG` - Integer block number, or the string "latest", "earliest" or "pending"

> [accordion] Returns
>
> `QUANTITY` - Integer of the current balance in wei

***

### eth\_gasPrice

Returns the current price per gas in wei.

```json Request theme={null}
{
  "jsonrpc": "2.0",
  "method": "eth_gasPrice",
  "params": [],
  "id": 1
}
```

```json Response theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x09184e72a000"
}
```

> [accordion] Parameters
>
> None

> [accordion] Returns
>
> `QUANTITY` - Integer of the current gas price in wei

***

### eth\_chainId

Returns the chain ID of the current network.

```json Request theme={null}
{
  "jsonrpc": "2.0",
  "method": "eth_chainId",
  "params": [],
  "id": 1
}
```

```json Response theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xe5"
}
```

> [accordion] Parameters
>
> None

> [accordion] Returns
>
> `QUANTITY` - Integer of the current chain ID (125 for HyperPaxeer)

***

### eth\_call

Executes a new message call immediately without creating a transaction on the blockchain.

```json Request theme={null}
{
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
      "data": "0x..."
    },
    "latest"
  ],
  "id": 1
}
```

```json Response theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x..."
}
```

> [accordion] Parameters
>
> 1. `Object` - The transaction call object
>    * `from`: (optional) Address - The address the transaction is sent from
>    * `to`: Address - The address the transaction is directed to
>    * `gas`: (optional) Integer - Gas provided for the transaction execution
>    * `gasPrice`: (optional) Integer - Gas price provided for each paid gas
>    * `value`: (optional) Integer - Value sent with this transaction
>    * `data`: (optional) Data - Hash of the method signature and encoded parameters
> 2. `QUANTITY|TAG` - Integer block number, or the string "latest", "earliest" or "pending"

> [accordion] Returns
>
> `DATA` - The return value of the executed contract

***

### eth\_sendTransaction

Creates new message call transaction or a contract creation.

> [!WARNING]
>
> This method requires a wallet connection to sign the transaction.

```json Request theme={null}
{
  "jsonrpc": "2.0",
  "method": "eth_sendTransaction",
  "params": [
    {
      "from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
      "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
      "gas": "0x76c0",
      "gasPrice": "0x9184e72a000",
      "value": "0x9184e72a",
      "data": "0x..."
    }
  ],
  "id": 1
}
```

```json Response theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```

> [accordion] Parameters
>
> 1. `Object` - The transaction object
>    * `from`: Address - The address the transaction is sent from
>    * `to`: (optional) Address - The address the transaction is directed to (null for contract creation)
>    * `gas`: (optional) Integer - Gas provided for the transaction execution
>    * `gasPrice`: (optional) Integer - Gas price provided for each paid gas
>    * `value`: (optional) Integer - Value sent with this transaction
>    * `data`: Data - Compiled contract code or hash of the invoked method signature and encoded parameters

> [accordion] Returns
>
> `DATA`, 32 Bytes - The transaction hash, or the zero hash if the transaction is not yet available

***

### eth\_getTransactionByHash

Returns information about a transaction by transaction hash.

```json Request theme={null}
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": [
    "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"
  ],
  "id": 1
}
```

```json Response theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
    "blockNumber": "0x5daf3b",
    "from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
    "gas": "0xc350",
    "gasPrice": "0x4a817c800",
    "hash": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b",
    "input": "0x68656c6c6f21",
    "nonce": "0x15",
    "to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
    "transactionIndex": "0x41",
    "value": "0xf3dbb76162000",
    "v": "0x25",
    "r": "0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea",
    "s": "0x4ba69724e8f69de52f0125ad8b3c5c2cef33019bac3249e2c0a2192766d1721c"
  }
}
```

> [accordion] Parameters
>
> 1. `DATA`, 32 Bytes - Hash of a transaction

> [accordion] Returns
>
> `Object` - A transaction object, or null when no transaction was found

## Using with cURL

```bash theme={null}
curl -X POST \
  https://public-rpc.paxeer.app/rpc \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_blockNumber",
    "params": [],
    "id": 1
  }'
```

## Using with JavaScript

```javascript theme={null}
const response = await fetch('https://public-rpc.paxeer.app/rpc', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    jsonrpc: '2.0',
    method: 'eth_blockNumber',
    params: [],
    id: 1,
  }),
});

const data = await response.json();
console.log(data.result);
```

## Using with Python

```python theme={null}
import requests
import json

url = 'https://public-rpc.paxeer.app/rpc'
payload = {
    'jsonrpc': '2.0',
    'method': 'eth_blockNumber',
    'params': [],
    'id': 1
}

response = requests.post(url, json=payload)
print(response.json())
```

## Next Steps

> [card] [API Reference](https://sidiorresearchlabs.mintlify.site/api-reference)
>
> Complete API documentation for all methods

> [card] [Examples](https://sidiorresearchlabs.mintlify.site/examples.md)
>
> Integration examples and code samples


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.