pragmasolidity^0.8.0;interfaceIElasticSignature{/**
* Event emitted after user set/reset their password
* @param user - an user's address, for whom the password hash is set. It could be a smart contract wallet address
* or an EOA wallet address.
* @param pwdhash - a password hash
*/eventSetPassword(addressindexeduser,uintindexedpwdhash);/**
* Event emitted after a successful verification performed for an user
* @param user - an user's address, for whom the submitted `proof` is verified. It could be a smart contract wallet
* address or an EOA wallet address.
* @param nonce - a new nonce, which is newly generated to replace the last used nonce.
*/eventVerified(addressindexeduser,uintindexednonce);/**
* Get `pwdhash` for a user
* @param user - a user's address
* @return - the `pwdhash` for the given address
*/functionpwdhashOf(addressuser)externalviewreturns(uint);/**
* Update an user's `pwdhash`
* @param proof1 - proof generated by the old password
* @param expiration1 - old password signing expiry seconds
* @param allhash1 - allhash generated with the old password
* @param proof2 - proof generated by the new password
* @param pwdhash2 - hash of the new password
* @param expiration2 - new password signing expiry seconds
* @param allhash2 - allhash generated with the new password
*/functionresetPassword(uint[8]memoryproof1,uintexpiration1,uintallhash1,uint[8]memoryproof2,uintpwdhash2,uintexpiration2,uintallhash2)external;/**
* Verify a proof for a given user
* It should be invoked by other contracts. The other contracts provide the `datahash`. The `proof` is generated by
* the user.
* @param user - a user's address, for whom the verification will be carried out.
* @param proof - a proof generated by the password
* @param datahash - the data what user signing, this is the hash of the data
* @param expiration - number of seconds from now, after which the proof is expired
* @param allhash - public statement, generated along with the `proof`
*/functionverify(addressuser,uint[8]memoryproof,uintdatahash,uintexpiration,uintallhash)external;}