ZELF
Zelf Documentation
Zelf Documentation
  • Welcome
  • Getting Started
    • How it works
    • WhitePaper
    • Zelf Proofs vs Others
    • Privacy Preserving
    • Use cases
    • Downloads
  • Functions
    • Authentication
    • Create a ZelfProof
    • Decrypt a ZelfProof
    • Preview ZelfProof
  • Zelf Name Service
    • Offline Version
      • Decryption
    • Online Version
      • Retrieve public key
      • Create a session
      • PGP Encryption
      • Lease a Zelf Name
      • Preview a ZelfName
      • Decrypt a ZelfName
    • Arweave ZNS Storage
    • Zelf Wallet Design
  • BlockChains
    • MINA
      • Get Balance
      • Get Token
      • Get Transactions
    • ETH
      • Adress Lookup
      • Transactions list
      • Transaction details
      • Gas Tracker
  • Integrations
  • Zelf Legal
    • Team Members
    • Terms of Use
    • Privacy Policy
  • Airdrop
    • Airdrop Rules
    • Reglas de Airdrop
    • Pricing per Domain
  • Verify our Partners
    • Acquisition Team
  • Roadmap
    • Q1 2025
    • Q2 2025
    • Q3 2025
    • Q4 2025
Powered by GitBook
On this page

Was this helpful?

  1. BlockChains
  2. ETH

Adress Lookup

Endpoint designed to request the details of an Ethereum public address; this is a helper function for us to view details for our Zelf Wallet Address.

API Endpoint: GET https://api.zelf.world/api/ethereum/address

Description:

This endpoint retrieves the Ethereum account information, including balance, token holdings, and recent transactions for a specific Ethereum address.

Request

  • Method: GET

  • URL: /api/ethereum/address

Query Parameters:

Parameter
Type
Required
Description

address

String

Yes

The Ethereum address for which you want to retrieve details.

Example Request:

GET https://api.zelf.world/api/ethereum/address?address=0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97

Headers:

Header
Type
Required
Description

Authorization

String

Yes

Bearer token for authentication.

Example Header:

{
    "Authorization": "Bearer your_access_token_here"
}

const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://api.zelf.world/api/ethereum/address?address=0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97',
  headers: { 
    'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uIjoiNjZiYTNlZDg2YjQzNmJhZGNlMzdiNjZiIiwiaWRlbnRpZmllciI6IjI5MzgyOTgzOTI4MyIsImlhdCI6MTcyMzQ4MTgxNn0.23U5a9hrqm_3m532R-y1yUfhfqE1gG-SBoofX1LpmdE'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
curl --location 'https://api.zelf.world/api/ethereum/address?address=0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97' \
--header 'Authorization: Bearer eyJhbGciOiJI...hfqE1gG-SBoofX1LpmdE'
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::builder()
        .build()?;

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uIjoiNjZiYTNlZDg2YjQzNmJhZGNlMzdiNjZiIiwiaWRlbnRpZmllciI6IjI5MzgyOTgzOTI4MyIsImlhdCI6MTcyMzQ4MTgxNn0.23U5a9hrqm_3m532R-y1yUfhfqE1gG-SBoofX1LpmdE".parse()?);

    let request = client.request(reqwest::Method::GET, "https://api.zelf.world/api/ethereum/address?address=0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97")
        .headers(headers);

    let response = request.send().await?;
    let body = response.text().await?;

    println!("{}", body);

    Ok(())
}

Response

The response will contain detailed information about the Ethereum address, including the address owner's full name, ETH balance, token holdings (ERC-20 and NFTs), and the last few transactions.

Fields in the Response:

  • data (Object): Contains the account details.

    • address (String): The Ethereum address.

    • fullName (String): The ENS or name associated with the address (if available).

    • balance (String): The ETH balance in the account.

    • account (Object): Details about the ETH account.

      • asset (String): The asset, typically "ETH".

      • fiatValue (String): The current fiat value of the total ETH balance.

      • price (String): The current price of ETH in USD.

    • tokenHoldings (Object): Information about the ERC-20 tokens held by the address.

      • tokensContras (Object): Summary of the token holdings.

        • balance (String): The total token balance.

        • tokenTotal (String): The total number of distinct tokens held.

      • tokens (Array of Objects): A list of ERC-20 tokens held by the address.

        • tokenType (String): The type of token (e.g., "ERC-20").

        • name (String): The name of the token.

        • symbol (String): The symbol of the token (e.g., "USDC").

        • amount (String): The amount of the token held.

        • price (String, Optional): The current price of the token in USD (if available).

        • address (String): The contract address of the token.

        • image (String): URL to the token's image.

    • transactions (Array of Objects): List of recent transactions.

      • hash (String): Transaction hash.

      • method (String): The method used in the transaction (e.g., "Transfer").

      • block (String): The block number where the transaction was confirmed.

      • age (String): Time since the transaction occurred.

      • from (String): The address from which the transaction originated.

      • traffic (String): Traffic direction ("IN" or "OUT").

      • to (String): The address to which the transaction was sent.

      • fiatAmount (String): The value of the transaction in USD.

      • amount (String): The amount of ETH transferred.

      • asset (String): The asset involved in the transaction (typically "ETH").

      • txnFee (String): The transaction fee paid for the transfer.


Example Response:

{
    "data": {
        "address": "0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97",
        "fullName": "titanbuilder.eth",
        "balance": "13.704440494983939845",
        "account": {
            "asset": "ETH",
            "fiatValue": "35581.01",
            "price": "2596.31"
        },
        "tokenHoldings": {
            "tokensContras": {
                "balance": "13.34",
                "tokenTotal": "97"
            },
            "tokens": [
                {
                    "tokenType": "ERC-20",
                    "name": "Decentraland",
                    "symbol": "MANA",
                    "amount": "0.8434554",
                    "price": "0.3106",
                    "address": "0x0f5d2fb29fb7d3cfee444a200298f468908cc942?a=0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97",
                    "image": "https://etherscan.io/token/images/decentraland_32.png?v=1"
                },
                {
                    "tokenType": "ERC-20",
                    "name": "USDC",
                    "symbol": "USDC",
                    "amount": "3.603892",
                    "price": "1.00",
                    "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48?a=0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97",
                    "image": "https://etherscan.io/token/images/centre-usdc_28.png"
                }
            ]
        },
        "transactions": [
            {
                "hash": "0x9154a92c1ffcf0282b0ebecb5518edd9d5301579ac8f4cc393b7bdca4d4fe400",
                "method": "Transfer",
                "block": "20803559",
                "age": "33 secs ago",
                "from": "0x4838B106FCe9647Bdf1E7877BF73cE8B0BAD5f97",
                "traffic": "OUT",
                "to": "0x4297cc867B85B63297c34af4268ced9CaFC66F5a",
                "fiatAmount": "57.04",
                "amount": "0.02197032",
                "asset": "ETH",
                "txnFee": "0.00013084"
            }
        ]
    }
}
{
    "validationError": "missing address\n"
}

Notes:

  • The API returns both ERC-20 tokens and NFTs associated with the address.

  • Each transaction provides details such as the method used (e.g., "Transfer") and the direction of traffic (whether it is incoming or outgoing).

PreviousETHNextTransactions list

Last updated 7 months ago

Was this helpful?