⛏️Quick Start

The Quick Start Guide can help developers get started and run Web3 App in a few steps.

1. Sign up to SolarPath

To register an account on the SolarPath website, please enter your email address and password, then click "Sign Up".

TIPS: After registration, you will need to activate your account. Please check your email and click on the provided link to verify your account. Follow the instructions to create your first app.

After activating your account, you will be directed to the Dashboard page. Here, you can create new apps, configure app security measures, set up EventHook event notifications, track app data, and utilize monitoring data to enhance the customer experience.

SolarPath supports the following main chains and networks:

ChainsNetworks

Ethereum

Mainnet, Goerli, Sepolia

Polygon

Mainnet, Mumbai

BNB Chain

Mainnet, Testnet

Arbitrum

Mainnet, Goerli

Optimism

Mainnet, Goerli

Tron Network

Mainnet, Nile, Shasta

  • You must first create an app and get an API-KEY to validate your request.

  • Click on the App card listed on the Dashboard, you will be taken to the App details page, and view your API-KEY:

3. Enhance API-KEY security

Enhance your access security by configuring access restrictions for your API-KEY. To do this, navigate to your App, click on "Edit App", and utilize the whitelist feature to strengthen your access security.:

  • Allowlist Contract Addresses: Only approved contract addresses are allowed for interaction. If not set, all contract addresses are allowed.

  • Allowlist Domains: Only approved request domains are allowed. If not set, requests from all domains are allowed.

  • Allowlist IPs: Only approved source IPs are allowed to request, if not set, all source IP requests are allowed.

TIPS:

Allowlist domains matching rules such as: www.solarpath.io, *.solarpath.io

Allowlist IPs matching rules IPv4 such as: 192.168.1.0, 225.225.225.100.

4. Send requests

Interact with the blockchain by sending Web3 requests through the HTTPS endpoint provided by SolarPath. The following example demonstrates sending requests over HTTP to interact with the Ethereum network.

All requests are POST requests.

4.1 Get the current block number:

curl https://eth-mainnet.solarpath.io/v1/YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []}'

Response:

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "0x7b887a"
}

The data returned in hexadecimal with a 0x prefix, and converting 7b887a to decimal, the resulting number 8095866.

4.2 View the Ethereum balance of the specified contract:

curl https://eth-mainnet.solarpath.io/v1/YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0", "id": 1, "method": "eth_getBalance", "params": ["0xf31D0046D26AF057Ba51EF4B2E0372cF9aD990fb", "latest"]}'

Response:

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "0x62e7750f619827b"
}

The returned data is hexadecimal in Wei (the smallest denomination unit of Ethereum). Convert decimal to 445424602766213760 Wei, equal to 0.44542460276621376 Ether.

5. View SolarPath Dashboard

The SolarPath Dashboard provides you with insights into your App's performance and API usage, such as the methods called, success rate, usage statistics, and active ranges.

By regularly monitoring the data on the Dashboard, you can optimize your app and gain a better understanding of your users.

6. Manage your account

You can modify your login email, password, and enable 2FA verification in the account management section. Additionally, you can dynamically add request packages or upgrade your subscription plan based on your business needs.

Last updated