opoll / opollminer

Official mining application for OpenPoll Platform
1 stars 0 forks source link

Shard & Main Chain Block Webhook Functionality #60

Open zack-w opened 6 years ago

zack-w commented 6 years ago

The miner must be able to support authorized webhook calls for when shard and mainchain blocks are completed. There should be two configuration settings:

Webhook URL - The HTTP url that webhook calls will be placed to Webhook Auth - An authorization token the miner will provide in the format Authorization: Bearer {Auth} within the header of all webhook calls made.

The following we hook calls should occur:

1) When a new shard block is authored, the web hook will call POST {URL}/shards/:pollHash/blocks with the body containing the validated shard block. It should conform to: https://github.com/opoll/openpoll-schemas/blob/master/schemas/0.1/shard/block.json

2) When a new mainchain block is authored, the web hook will call POST {URL}/mainchain/blocks with the body containing the validated main chain block. It should conform to: https://github.com/opoll/openpoll-schemas/blob/master/schemas/0.1/mainchain/block.json

zack-w commented 6 years ago

Updated webhook URLs

gitsomedev commented 6 years ago

done