mirror of
https://github.com/arnaucube/darkID-prototype.git
synced 2026-02-07 03:16:46 +01:00
started ethereum smart contract for darkID
This commit is contained in:
27
eth/darkID_contract.sol
Normal file
27
eth/darkID_contract.sol
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user