Skip to content

Commit

Permalink
add api features array
Browse files Browse the repository at this point in the history
  • Loading branch information
igorls committed Sep 16, 2020
1 parent cd8bbab commit 057b18e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ The current revision is compliant with the JSON schema Draft v7 - http://json-sc
- p2p_endpoint: EOSIO P2P endpoint `host:port`
- api_endpoint: EOSIO HTTP endpoint `http://host:port`
- ssl_endpoint: EOSIO HTTPS endpoint `https://host:port`
- features: array of features supported by the api endpoint (required on query type nodes), refer to the list of features below


#### API Features (Query node only)
For query type nodes one or more features from the list below must be added:
- `chain_api`: basic eosio::chain_api_plugin (/v1/chain/*)
- `account_query`: (/v1/chain/get_accounts_by_authorizers)
- `history-v1`: (/v1/history/*)
- `hyperion-v2`: (/v2/*)
- `dfuse`
- `fio-api`
- `snapshot-api`

### How to use it if you are Block Producer Candidate
Create a file named `bp.json` in the root of your domain. For instance `http://yourwebsite.com/bp.json` When you register your producer using the `system.regproducer` action, the url field should be filled with `http://yourwebsite.com`. **Do not put the bp.json file in the url.**
Expand Down
15 changes: 15 additions & 0 deletions bp.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@
"p2p_endpoint": "",
"api_endpoint": "",
"ssl_endpoint": ""
},
{
"location": {
"name": "",
"country": "",
"latitude": 0,
"longitude": 0
},
"node_type":"query",
"p2p_endpoint": "",
"api_endpoint": "",
"ssl_endpoint": "",
"features": [
"chain_api"
]
}
]
}
10 changes: 10 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@
"uniqueItems": true,
"items": {
"type": "object",
"required": [
"node_type"
],
"properties": {
"location": {
"$ref": "#/definitions/location",
Expand Down Expand Up @@ -223,6 +226,13 @@
"format": "uri",
"pattern": "^https://"
}
},
"features": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
}
}
}
}
Expand Down

0 comments on commit 057b18e

Please sign in to comment.