Superseed API Quickstart

💡 Available only with Blast access

Introduction

The Superseed API allows developers to interact with the Superseed blockchain using standard JSON-RPC methods.

With this API, you can retrieve block and transaction data, send transactions, and build applications powered by Superseed’s high-throughput, EVM-compatible environment.


What is the Superseed Chain API?

The Superseed Chain API enables developers to communicate with the network through JSON-RPC — a widely adopted standard for blockchain interactions. If you’re familiar with Ethereum’s API structure, Superseed’s methods will feel intuitive.

Using the API, developers can:

  • Fetch the latest blocks and transactions
  • Send signed transactions to the network
  • Query contract data
  • Estimate gas fees and more

Getting Started Instructions

1. Choose a Package Manager (npm or yarn)

Your first step involves selecting a package manager, which will be crucial for managing your project’s dependencies. The choice between npm and yarn depends on your personal preference or project requirements.

npmyarn
Begin with npm by following the npm documentation.For yarn, refer to yarn’s installation guide.

2. Set Up Your Project

To kickstart your project, open your terminal and execute the following commands:

mkdir superseed-api-quickstart
cd superseed-api-quickstart
npm init --yes

This creates a new directory named superseed-api-quickstart and initializes a Node.js project within it.

3. Make Your First Request

Install Axios, a popular HTTP client, to make API requests:

bash
$npm install axios
># Or with yarn
># yarn add axios

Create an index.js file in your project directory and paste the following code:

javascript
1const axios = require('axios');
2
3const url = `https://superseed-mainnet.alchemy-blast.com/v2/${yourAPIKey}`;
4
5const payload = {
6jsonrpc: '2.0',
7id: 1,
8method: 'eth_blockNumber',
9params: []
10};
11axios.post(url, payload)
12.then(response => {
13 console.log('Block Number:', response.data.result);
14})
15.catch(error => {
16 console.error(error);
17});

Remember to replace yourAPIKey with your actual Alchemy API key that you can get from your Alchemy dashboard.

4. Run Your Script

To execute your script and make a request to the Superseed App, run:

bash
$node index.js

You should see the current block number on Superseed App (in hexadecimal format) outputted to your console:

Block Number: 0x6d68e

Next Steps

Well done! You’ve just made your first request to the Superseed App API. With this foundation, you can dive deeper into the array of JSON-RPC methods available on Superseed App and start building your dApps on it!