The following process ties an account to an email address:
confirm(token)
+-------------------> +--------+
| |contract| puzzle(address, sha(token), sha(email))
| +-----------> +--------+ <-----------+
| | |
| | request(sha(email)) |
| | |
| | |
| +------+ POST /?email=…&address=… +------+
+-+ |client| +-------------------------> |server| code=rand()
+------+ +------+ token=sha(code)
token=sha(code) ^ e-mail with code |
+------------------------------------+
request(sha(email))
)POST /?email=…&address=…
)code
and computes token
puzzle(address, sha(token), sha(email))
)code
)token
confirm(token)
)Now, anyone can easily check if an account is verified by calling certified(address)
on the contract.
latest deployed EmailVerification.sol
git clone https://github.com/ethcore/email-verification.git
cd email-verification
npm install --production
The account calling puzzle
has to be the owner
of the contract.
--jsonrpc-apis net,eth,personal,parity
.config/<env>.json
, which partially overrides config/default.json
.env NODE_ENV=<env> node index.js
Deploy to production using process managers like forever.
To run on both testnet and mainnet, just create two config files. Make sure to use
parity.host
)db
fileshttp.port
)