erigon-pulse/cmd/restapi
Alex Sharov 19583b9084
Docker compose (#841)
* add docker-compose

* test.http

* make different dockerfile for each component

* make different dockerfile for each component

* fix versions

* remove dedicated docker files

* cleanup

* cleanup

* cleanup
2020-08-01 09:39:04 +02:00
..
apis fix - change private api from ui (#828) 2020-07-30 14:23:37 +07:00
commands rename_rest_api_param (#825) 2020-07-30 13:59:42 +07:00
rest Docker compose (#841) 2020-08-01 09:39:04 +02:00
main.go Debug Web UI prototype (#362) 2020-02-09 13:31:52 +03: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"},
    ...
]