1+ pragma solidity ^ 0.4.25 ;
2+
3+
4+ /**
5+ * @title TPL Basic Validator interface. EIP-165 ID: 0xd13d3f23
6+ */
7+ interface TPLBasicValidatorInterface {
8+ /**
9+ * @notice Check if contract is assigned as a validator on the jurisdiction.
10+ * @return True if validator is assigned, false otherwise.
11+ */
12+ function isValidator () external view returns (bool );
13+
14+ /**
15+ * @notice Check if the validator is approved to issue attributes of the type
16+ * with ID `attributeTypeID` on the jurisdiction.
17+ * @param attributeTypeID uint256 The ID of the attribute type in question.
18+ * @return True if validator is approved to issue attributes of given type.
19+ */
20+ function canIssueAttributeType (
21+ uint256 attributeTypeID
22+ ) external view returns (bool );
23+
24+ /**
25+ * @notice Check if the validator is approved to issue an attribute of the
26+ * type with ID `attributeTypeID` to account `account` on the jurisdiction.
27+ * @param account address The account to check for issuing the attribute to.
28+ * @param attributeTypeID uint256 The ID of the attribute type in question.
29+ * @return Bool indicating if attribute is issuable & byte with status code.
30+ */
31+ function canIssueAttribute (
32+ address account ,
33+ uint256 attributeTypeID
34+ ) external view returns (bool , bytes1 );
35+
36+ /**
37+ * @notice Check if the validator is approved to revoke an attribute of the
38+ * type with ID `attributeTypeID` from account `account` on the jurisdiction.
39+ * @param account address The checked account for revoking the attribute from.
40+ * @param attributeTypeID uint256 The ID of the attribute type in question.
41+ * @return Bool indicating if attribute is revocable & byte with status code.
42+ */
43+ function canRevokeAttribute (
44+ address account ,
45+ uint256 attributeTypeID
46+ ) external view returns (bool , bytes1 );
47+
48+ /**
49+ * @notice Issue an attribute of the type with ID `attributeTypeID` to account
50+ * `account` on the jurisdiction.
51+ * @param account address The account to issue the attribute to.
52+ * @param attributeTypeID uint256 The ID of the attribute type in question.
53+ * @dev Note that the function is payable - this is so that the function in
54+ * question can support both basic and extended jurisdictions. Attaching a
55+ * value when utilizing a basic jurisdiction will revert the transaction.
56+ */
57+ function issueAttribute (
58+ address account ,
59+ uint256 attributeTypeID
60+ ) external payable ;
61+
62+ /**
63+ * @notice Revoke an attribute of the type with ID `attributeTypeID` from
64+ * account `account` on the jurisdiction.
65+ * @param account address The account to revoke the attribute from.
66+ * @param attributeTypeID uint256 The ID of the attribute type in question.
67+ */
68+ function revokeAttribute (address account , uint256 attributeTypeID ) external ;
69+
70+ /**
71+ * @notice Get account of utilized jurisdiction and associated attribute
72+ * registry managed by the jurisdiction.
73+ * @return The account of the jurisdiction.
74+ */
75+ function getJurisdiction () external view returns (address );
76+ }
0 commit comments