Elhnnga

Web3 API Documentation

Build and integrate blockchain solutions with our secure, compliant, and high-performance decentralized infrastructure APIs.

Key Endpoints

Accounts

Create and manage blockchain accounts and credentials

Transactions

Submit and manage blockchain transactions

Blocks

Access blockchain data and network statistics

Authentication & Security

All API endpoints require an API key via Authorization: Bearer {token} header

Web3 Public Endpoints

GET /web3/accounts/{address}

200 OK

Retrieve detailed information about a specific blockchain address including balance, transaction history, and metadata

Parameters
address (path): string
Responses
200 (Success), 400 (Invalid Address), 404 (Address Not Found)

Example Response

{
  "address": "0x0000000000000000000000000000000000000000",
  "balance": "127890.123456",
  "tx_count": 456
}
                    
Copy JSON

POST /web3/transactions

201 Created

Send a new blockchain transaction

Request Body
from, to, value, gas, data
Authentication
API key in Authorization header

Example Request

{
  "from": "0x0000000000000000000000000000000000000000",
  "to": "0x0000000000000000000000000000000000000001",
  "data": "0xf86380843b9aca0082520894672f7a9900000000000000000000000000000000000000000000000000000000000000000000004529c5"
}
                    
Copy JSON

GET /web3/blocks/{number}

200 OK

Retrieves information about a specific block including miner, timestamp, and transaction details

Parameters
block_number (path): integer
Responses
200 (Success), 400 (Invalid Block), 404 (Block Not Found)

Example Response

{
  "number": "0xabcd",
  "timestamp": "2023-08-15T14:48:00Z",
  "miner": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "transactions": ["0x123...", "0x456..."]
}
                    
Copy JSON

Getting Started

1. Authentication

All API requests must be authenticated using a bearer token. Generate an API key from your developer account dashboard.

curl -X GET "https://api.elhnnga.com/web3/accounts/0x0000000000000000000000000000000000000000" 
     -H "Authorization: Bearer YOUR_API_KEY"
            

2. SDK Integration

Use our SDK to build blockchain applications using your preferred language.

// JavaScript client
const client = new Web3Client('YOUR_API_KEY');
const balance = await client.getBalance('0x0000000000000000000000000000000000000000');
console.log(balance);
                    

3. API Rate Limiting

Each API key receives 5000 requests per hour. Upgrade your plan for higher limits.

Free Tier

  • 5000 requests/hour
  • Basic features

Enterprise

  • 100,000 requests/hour
  • Custom SLA

Integration Guides

Web3.js

Integrate our REST API with web3.js libraries

View Example

Ethereum SDK

Use our native Ethereum integration module

View Example

Solidity Tools

Generate smart contracts from API templates

View Example

Web3 Integration

The following example demonstrates a secure blockchain query using our REST API and web3.js library.

const Web3 = require('web3');
const client = new Web3('https://blockchain-node.elhnnga.com');

const getBalance = async () => {
    const balance = await client.get('/web3/accounts/0x1234');
    console.log(`${balance} ETH`);
};

Support & Help

Need Help?

We're here to help with your API integration needs. Reach out with any questions or feature requests.

Still need help? Call support line +1 (555) 123-4567