erigon-pulse/cmd/restapi
Giulio rebuffo d33302c2be
Mutual TLS authentication (for now without verifying the Common Name) (#1113)
* added tls auth

* added client side

* put --tls

* fixed flag

* Add key/cert generation instructions, turn off Common Name verification

* Add CLI arguments and Warning

* Lint

* Update the doc about Internal IP

Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
2020-09-19 15:16:04 +01:00
..
apis Mutual TLS authentication (for now without verifying the Common Name) (#1113) 2020-09-19 15:16:04 +01:00
commands restapi_to_follog_geth_cli_variables (#993) 2020-08-28 11:27:56 +01:00
rest Mutual TLS authentication (for now without verifying the Common Name) (#1113) 2020-09-19 15:16:04 +01:00
main.go Rpcdaemon as lib (#940) 2020-08-19 12:46:20 +01:00
README.md Docker compose (#841) 2020-08-01 09:39:04 +02:00

Turbo-Geth Rest API

Build

make restapi

Running

  • TurboGeth with --private.api.addr: ./build/bin/geth --private.api.addr="localhost:9999"
  • Restapi: ./build/bin/restapi (Default Port: 8080)

API

  • /api/v1/remote-db/: gives remote-db url
  • /api/v1/accounts/:accountID: gives account data
    • accountID is account address
    • Reponse:
{

    "balance":"BALANCE",
    "code_hash":"HASH",
    "implementation":
        {
            "incarnation":NUMBER
        },
        "nonce":NUMBER,
        "root_hash":"HASH"      
}
  • /api/v1/storage/
    • gives the storage
    • Response:
[
    {"prefix": "Storage Prefix","value": "Value"},
    ...
]
  • /api/v1/retrace/:chain/:number
    • chain is the name of the chain(mainnet, testnet, goerli and rinkeby)
    • number is block number (e.g 98345)
    • extract changeSets and readSets for each block
    • Response:
[
    {
        "storage": {
            "reads": [READ, ...],
            "writes": [WRITE, ...]
        },
        "accounts": {
            "reads": [READ, ...],
            "writes": [WRITE, ...]
        }
    }
]
  • /api/v1/intermediate-hash/
    • extract intermediate hashes
    • Response:
[
    {"prefix": "Prefix","value": "Value"},
    ...
]