<aside> 💡 For queries contact: tech@hmt.ai https://t.me/excerebrose
</aside>
Human Escrow Solidity Contracts
Human Swagger Ethereum Server Implementation Human API
Exchanges are where action on jobs takes place: ie. annotation of dataset.
Every exchange needs to do the following things to get on the human protocol:
Step 1
Register on the Human MetaAPI Dashboard to receive an API Key
& Shared Secret Key
Step 2
Implement a webhook listener of the following shape to consume new jobs:
{
"network_id": <int>,
"exchange_id": <int>,
"job_address": <string>,
"job_manifest": <string:url>
}
Note: To verify the webhook, each consumption request will have the header X-human-signature
whose value is HMAC sha256 hexDigest
of the JSON payload (stringified) and the Human Key
Example:
def generate_hmac_signature(key, msg):
"""
Params:
key: hex string type
msg: bytestring type
"""
hmac_obj = hmac.new(
key=bytes.fromhex(key),
msg=msg,
digestmod=hashlib.sha256,
)
return hmac_obj.hexdigest()
generate_hmac_signature(model.api_key.hex, request.get_json()) == request.headers.get('X-human-exchange-signature'):
continue()
else:
error()