2018-03-30 05:31:08 +00:00
|
|
|
pragma solidity ^0.4.21;
|
2018-01-09 01:00:07 +00:00
|
|
|
|
|
|
|
contract ERC735 {
|
|
|
|
|
2018-02-21 21:17:38 +00:00
|
|
|
event ClaimRequested(bytes32 indexed claimRequestId, uint256 indexed claimType, uint256 scheme, address indexed issuer, bytes signature, bytes data, string uri);
|
|
|
|
event ClaimAdded(bytes32 indexed claimId, uint256 indexed claimType, uint256 scheme, address indexed issuer, bytes signature, bytes data, string uri);
|
|
|
|
event ClaimRemoved(bytes32 indexed claimId, uint256 indexed claimType, uint256 scheme, address indexed issuer, bytes signature, bytes data, string uri);
|
|
|
|
event ClaimChanged(bytes32 indexed claimId, uint256 indexed claimType, uint256 scheme, address indexed issuer, bytes signature, bytes data, string uri);
|
2018-01-09 01:00:07 +00:00
|
|
|
|
|
|
|
struct Claim {
|
|
|
|
uint256 claimType;
|
2018-02-21 21:17:38 +00:00
|
|
|
uint256 scheme;
|
2018-01-09 01:00:07 +00:00
|
|
|
address issuer; // msg.sender
|
2018-02-21 21:17:38 +00:00
|
|
|
bytes signature; // this.address + claimType + data
|
|
|
|
bytes data;
|
2018-01-09 01:00:07 +00:00
|
|
|
string uri;
|
|
|
|
}
|
|
|
|
|
2018-03-30 05:31:08 +00:00
|
|
|
function getClaim(bytes32 _claimId) public view returns(uint256 claimType, uint256 scheme, address issuer, bytes signature, bytes data, string uri);
|
|
|
|
function getClaimIdsByType(uint256 _claimType) public view returns(bytes32[] claimIds);
|
2018-02-21 21:17:38 +00:00
|
|
|
function addClaim(uint256 _claimType, uint256 _scheme, address _issuer, bytes _signature, bytes _data, string _uri) public returns (bytes32 claimRequestId);
|
2018-01-09 01:00:07 +00:00
|
|
|
function removeClaim(bytes32 _claimId) public returns (bool success);
|
|
|
|
}
|