Node RPC Service

How to issue the API Key for accessing the Node RPC endpoint

  1. Navigate to the RPC endpoints page: https://portal.scs.startale.com/node-rpc

  2. Click the Create New Endpoint button.

  3. Configure the settings for the endpoint you want to create:

    1. First, select a Chain from the Select a Chain dropdown.
    2. Next, choose the desired Network.
    3. Add a name for the endpoint and an optional description to describe its purpose.


  4. Click the Create endpoint button. Your new RPC endpoint has now been successfully created!

  5. The new created endpoint will be visible in the table like this:

How to test the API Endpoints

  • Check your API Key.
    The API Key can be accessed from both the RPC endpoints page and the Detail page.

Checking from the RPC endpoints page

  • On the RPC endpoints page, click on the Copy API Key button to save the key on your clipboard.

Checking from the Detail Page

  1. From the RPC endpoints page, click on your endpoint to navigate to the detail page.

  2. On the Detail page, click the Copy API Key button to save the key on your clipboard.

  3. Click on the Configure button to view the HTTPS & WSS endpoints.

Executing the Node RPC Endpoint with TypeScript

  1. As an example, execute the Soneium Minato Node RPC endpoint:
    1. index.ts
const API_URL = "https://soneium-minato.rpc.scs.startale.com"; // If Astar or AstarZK is used, this should also be changed.
const API_KEY = "YOUR_API_KEY"; // // Replace with your Node RPC API Key.

// RPC request payload
const payload = {
  id: 1,
  jsonrpc: "2.0",
  method: "eth_blockNumber",
};

async function getBlockNumber() {
  const response = await fetch(`${API_URL}?apikey=${API_KEY}`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(payload),
  });

  if (!response.ok) {
    throw new Error(`HTTP error! status: ${response.status}`);
  }

  const data = await response.json();

  console.log(`Latest block number: ${parseInt(data.result, 16)}`);
}

// Execute the function
getBlockNumber();
  1. Run it using Node.js.
npx tsc index.ts

node index.ts
  1. The console should display the latest block number.
Latest block number: 4745445
  1. Congratulations!
    You have successfully sent your first request to the SCS Node RPC API endpoint.

How to check the status

  1. On the RPC endpoints page, click the Detail button for the desired endpoint to navigate to Detail page.
  2. You can view the endpoint's statistics on the endpoint page under usage tab.

Find out more about the API

https://docs.startale.com/reference/eth-accounts-soneium