Skip to content

Commit

Permalink
Updated api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Prakash Pandey committed Sep 4, 2018
1 parent ee9f216 commit de0b385
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ To solve this problem, `testing.sh` script will help you run multiple blockchain
- Headers: `Content-Type=application/json`
- API response `Successfully updated miner address` or `Can not update miner_address as valid miner address is not found`

#### 3. Add peers

- `Method = Post`
- `Url = 127.0.0.1:5000/add_peers`
- Body
Expand All @@ -102,7 +104,7 @@ To solve this problem, `testing.sh` script will help you run multiple blockchain
- Headers: `Content-Type=application/json`
- API response `Peer list updated` or `Failed while adding peer/peers. Error[empty peer list received]`

#### 3. Create a transaction
#### 4. Create a transaction

- `Method = Post`
- `Url = 127.0.0.1:5000/transaction`
Expand All @@ -117,39 +119,39 @@ To solve this problem, `testing.sh` script will help you run multiple blockchain
- Headers: `Content-Type=application/json`
- API response `Transaction submission successful` or `Transaction unsuccessful`

##### 4. Start mining
##### 5. Start mining

- `Method = Get`

- `Url = localhost:5000/mine`

- API response `Mined block in JSON format`

#### 5. Get blocks
#### 6. Get blocks

- `Method = Get`

- `Url = localhost:5000/blocks`

- API response `Blockchain in JSON format`

#### 6. Consensus
#### 7. Consensus

- `Method = Get`

- `Url = localhost:5000/consensus`

- API response `Consensus successfully done`

##### 7. Get peers of a node
##### 8. Get peers of a node

- `Method = Get`

- `Url = localhost:5000/peers`

- API response `["http://127.0.0.1:5001", "http://127.0.0.1:5002"]`

#### 8. Connect to all peers of peers
#### 9. Connect to all peers of peers

- `Method = Get`

Expand Down

0 comments on commit de0b385

Please sign in to comment.