Flowee the Hub — API documentation

Service/Mining

Mining Service

The process of building new blocks for the Bitcoin Cash chain is called mining and that requires external software and hardware to both build a block-template as well as solve the hashing puzzle.

After that has been completed the block can be submitted using this service, though.

The service ID for this service is 5.

Messages

SubmitBlock

This message is simply a light wrapper around the actual block data.

The reply is either SubmitBlockReply when the block has successfully been added, or an error message is sent by the API-service otherwise.

Only blocks that correct extend the Hubs tip will give a positive response. Blocks that are successfully mined will be broadcast to peers.

Hub / Mining. sId=5 mId=0
BlockData: 1bytearrayThe full block data.

SubmitBlockReply

We return the hash of the block that successfully got submitted.

Hub / Mining. sId=5 mId=1
BlockHash: 5bytearray32-byte blockhash of the new block.