started ethereum smart contract for darkID

This commit is contained in:
arnaucode
2018-01-10 01:07:29 +01:00
parent e54d94c748
commit 9770437d3f
4 changed files with 39 additions and 12 deletions

27
eth/darkID_contract.sol Normal file
View File

@@ -0,0 +1,27 @@
pragma solidity 0.4;
contract DarkID {
struct IdStruct {
string pubK;
string date;
string hashed;
string unblindedSig;
string serverVerifier;
string signerID;
}
IdStruct ID;
function DarkID(string _pubK, string _hashed, string _unblindedSig, string _serverVerifier, string _signerID) public {
ID = IdStruct(_pubK, "this will be the date", _hashed, _unblindedSig, _serverVerifier, _signerID);
}
function getDarkID() public constant returns(string, string, string, string, string, string) {
return (ID.pubK, ID.date, ID.hashed, ID.unblindedSig, ID.serverVerifier, ID.signerID);
}
}