API-Dokumentation

Unterstützte JSON-RPC-Methoden der BLUE-Chain. Aufrufe erfolgen als POST auf den RPC-Endpoint.

Endpoint

Die RPC-Adresse wird pro Umgebung als Variable gesetzt und ist nicht öffentlich dokumentiert. Zugang für Node-Betreiber und Entwickler auf Anfrage über den Kontaktweg.

RPC_URL=https://…

Authentifizierung

Der RPC-Endpoint ist nicht offen erreichbar. Zugriff erfolgt über einen ausgestellten Token im Header. Tokens gehören in Umgebungsvariablen, nicht in Client-Code.

Rate-Limits

Pro Token gilt ein Limit je Minute. Der konkrete Wert wird mit dem Zugang mitgeteilt. Bei Überschreitung antwortet der Endpoint mit HTTP 429.

  • eth_blockNumber

    Gibt die aktuelle Blockhöhe der Chain zurück.

    Request
    curl -X POST $RPC_URL \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
    Response
    { "jsonrpc": "2.0", "id": 1, "result": "0x1f4a3c" }
  • eth_getBlockByNumber

    Liefert Blockdetails: Hash, Zeitstempel, Proposer und Transaktionsliste.

    Parameter

    • blockNumberquantity | tag— Blockhöhe als Hex-Wert oder 'latest'.
    • fullTransactionsboolean— true liefert vollständige Transaktionsobjekte, false nur Hashes.
    Request
    curl -X POST $RPC_URL \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["latest", false]}'
    Response
    {
      "result": {
        "number": "0x1f4a3c",
        "hash": "0x9c1f…",
        "parentHash": "0x4b02…",
        "timestamp": "0x67a1f0c4",
        "miner": "0x7b2fd1c4a9e0648b53d1f7c0aa9b6e2d4c81f309",
        "transactions": ["0xa71c…"],
        "gasUsed": "0x10da8",
        "gasLimit": "0x7a1200"
      }
    }
  • eth_getTransactionByHash

    Liefert Details einer Transaktion anhand ihres Hashes.

    Parameter

    • txHashdata(32)— Transaktions-Hash.
    Request
    curl -X POST $RPC_URL \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionByHash","params":["0xa71c…"]}'
    Response
    {
      "result": {
        "hash": "0xa71c…",
        "blockNumber": "0x1f4a3c",
        "from": "0x9f41…",
        "to": "0x2ad8…",
        "value": "0x4563918244f40000",
        "gas": "0x5208",
        "gasPrice": "0x3b9aca00",
        "nonce": "0x2a"
      }
    }
  • eth_getBalance

    Gibt das BLUE-Guthaben einer Adresse in wei zurück.

    Parameter

    • addressdata(20)— BLUE-Adresse.
    • blockquantity | tag— Blockbezug, meist 'latest'.
    Request
    curl -X POST $RPC_URL \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBalance","params":["0x9f41…", "latest"]}'
    Response
    { "result": "0x21e19e0c9bab2400000" }
  • net_peerCount

    Anzahl der mit dem Node verbundenen Peers.

    Request
    curl -X POST $RPC_URL \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","id":1,"method":"net_peerCount","params":[]}'
    Response
    { "result": "0x3" }
  • qbft_getValidatorsByBlockNumber

    Liste der Validator-Adressen für einen Block.

    Parameter

    • blockNumberquantity | tag— Blockhöhe oder 'latest'.
    Request
    curl -X POST $RPC_URL \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","id":1,"method":"qbft_getValidatorsByBlockNumber","params":["latest"]}'
    Response
    {
      "result": [
        "0x7b2fd1c4a9e0648b53d1f7c0aa9b6e2d4c81f309",
        "0x1c9de4a7f0b356ad82e5c14b7f6d09a3b8e42517",
        "0xd4a37f1b62c9085e4fa71b3d6c05e98247bf13ac",
        "0x3e5b81d0c74af926b1de5a08f3c74210d9ba6e8f"
      ]
    }
  • qbft_getSignerMetrics

    Blockproduktions-Statistik pro Validator.

    Parameter

    • fromBlockquantity— Optionaler Startblock.
    • toBlockquantity— Optionaler Endblock.
    Request
    curl -X POST $RPC_URL \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","id":1,"method":"qbft_getSignerMetrics","params":[]}'
    Response
    {
      "result": [
        {
          "address": "0x7b2fd1c4a9e0648b53d1f7c0aa9b6e2d4c81f309",
          "proposedBlockCount": "0x7d3f",
          "lastProposedBlockNumber": "0x1f4a3c"
        }
      ]
    }