diff --git a/spec/rpc/README.md b/spec/rpc/README.md index d1dc50579..fb66f2bda 100644 --- a/spec/rpc/README.md +++ b/spec/rpc/README.md @@ -30,6 +30,7 @@ This file defines the JSON-RPC spec of Tendermint. This is meant to be implement | [Commit](#commit) | ✅ | ✅ | | [Validators](#validators) | ✅ | ✅ | | [Genesis](#genesis) | ✅ | ✅ | + | [GenesisChunked](#genesischunked) | ✅ | ❌ | | [ConsensusParams](#consensusparams) | ✅ | ❌ | | [UnconfirmedTxs](#unconfirmedtxs) | ✅ | ❌ | | [NumUnconfirmedTxs](#numunconfirmedtxs) | ✅ | ❌ | @@ -796,7 +797,8 @@ curl -X POST https://localhost:26657 -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\ ### Genesis -Get Genesis of the chain. +Get Genesis of the chain. If the response is large, this operation +will return an error: use `genesis_chunked` instead. #### Request @@ -856,6 +858,43 @@ curl -X POST https://localhost:26657 -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\ } ``` +### GenesisChunked + +Get the genesis document in a chunks to support easily transfering larger documents. + +#### Parameters + +- `chunk` (integer): the index number of the chunk that you wish to + fetch. These IDs are 0 indexed. + +#### Request + +##### HTTP + +```sh +curl http://127.0.0.1:26657/genesis_chunked?chunk=0 +``` + +##### JSONRPC + +```sh +curl -X POST https://localhost:26657 -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"genesis_chunked\",\"params\":{\"chunk\":0}}" +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 0, + "result": { + "chunk": 0, + "total": 10, + "data": "dGVuZGVybWludAo=" + } +} +``` + ### ConsensusParams Get the consensus parameters.