January 2019
Beginner to intermediate
372 pages
11h 17m
English
As mentioned earlier, the application has an HTTP interface that it uses to manage the nodes and a WebSocket interface for P2P communication between the nodes. Here are some of the endpoints that are required to manage the nodes:
/blocks
/block/<hash>
/mineBlock
/transaction/<id>
/sendTransaction
The sendTransaction endpoint will basically create the transaction and add it to the pool, as explained in the Transaction Management section. Unconfirmed transactions are included in the blockchain by using the /mineBlock endpoint.
The following output shows the state of the blockchain before any other transactions are performed because it contains a genesis block:
[ { "data": { "id": "baeece2d8e57aef79ef4e693df0485ca8938ad1f27fa9a0426c8788a3802f02f", ...