HydroCoin REST API — Quick Guide
Base URL: https://h2ocoin.org/api
Auth
curl -sX POST 'https://h2ocoin.org/api/login' \ -H 'Content-Type: application/json' \ -d '{ "email":"you@example.com", "password":"secret" }' # Use the token as header: # Authorization: Bearer <token>
Wallet & Balance
curl -s 'https://h2ocoin.org/api/balance?address=HCW_xxx'
Send H₂O
curl -sX POST 'https://h2ocoin.org/api/send_transaction' \ -H "Authorization: Bearer $TOKEN" \ -H 'Content-Type: application/json' \ -d '{ "to":"HCW___", "amount":25 }'
More Endpoints (v1.1)
Pending transactions
curl -s 'https://h2ocoin.org/api/get_pending_transactions'
Mine block
curl -sX POST 'https://h2ocoin.org/api/mine_block' \ -H "Authorization: Bearer $TOKEN" \ -H 'Content-Type: application/json' \ -d '{}'
Deploy contract
curl -sX POST 'https://h2ocoin.org/api/deploy_contract' \ -H "Authorization: Bearer $TOKEN" \ -H 'Content-Type: application/json' \ -d '{ "name":"MyContract", "source":"" }'
Sync nodes
curl -sX POST 'https://h2ocoin.org/api/sync_nodes' \ -H "Authorization: Bearer $TOKEN" \ -H 'Content-Type: application/json' \ -d '{ "from_height": 0 }'
Chain length
curl -s 'https://h2ocoin.org/api/get_chain_length'