mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 21:17:16 +00:00
56700620b2
* added extension * added api * lint * more lint * better response * added README.md * README Fixed * README updated * fixed lint
72 lines
1.3 KiB
Markdown
72 lines
1.3 KiB
Markdown
# Turbo-Geth Rest API
|
|
|
|
## Build
|
|
|
|
```
|
|
make restapi
|
|
```
|
|
|
|
## Running
|
|
|
|
* Running node with `--remote-db-listen-addr` (e.g `./build/bin/geth --remote-db-listen-addr localhost:9999`).
|
|
* Running 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:
|
|
|
|
```json
|
|
{
|
|
|
|
"balance":"BALANCE",
|
|
"code_hash":"HASH",
|
|
"implementation":
|
|
{
|
|
"incarnation":NUMBER
|
|
},
|
|
"nonce":NUMBER,
|
|
"root_hash":"HASH"
|
|
}
|
|
```
|
|
* `/api/v1/storage/`
|
|
* gives the storage
|
|
* Response:
|
|
```json
|
|
[
|
|
{"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:
|
|
```json
|
|
[
|
|
{
|
|
"storage": {
|
|
"reads": [READ, ...],
|
|
"writes": [WRITE, ...]
|
|
},
|
|
"accounts": {
|
|
"reads": [READ, ...],
|
|
"writes": [WRITE, ...]
|
|
}
|
|
}
|
|
]
|
|
```
|
|
* `/api/v1/intermediate-hash/`
|
|
* extract intermediate hashes
|
|
* Response:
|
|
```json
|
|
[
|
|
{"prefix": "Prefix","value": "Value"},
|
|
...
|
|
]
|
|
```
|
|
|