cic-contracts/solidity/Declarator.sol

23 lines
1.2 KiB
Solidity
Raw Normal View History

2021-02-14 13:22:42 +01:00
pragma solidity >=0.6.12;
// Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
// SPDX-License-Identifier: GPL-3.0-or-later
2021-05-10 09:13:22 +02:00
// File-version: 2
2021-02-14 13:22:42 +01:00
2021-04-28 11:59:47 +02:00
interface Declarator {
2021-05-10 09:13:22 +02:00
event DeclarationAdded(address _declarator, address _subject, bytes32 _proof);
// Get all declarations for a subject signed by a declarator
2021-04-28 11:59:47 +02:00
function declaration(address _declarator, address _subject) external view returns ( bytes32[] memory );
// Get number of declarations the declarator has ever signed
2021-04-28 11:59:47 +02:00
function declarationCount(address _declarator) external view returns ( uint256 );
// Get the subject of a declarator's declarations at the specific index
2021-04-28 11:59:47 +02:00
function declarationAddressAt(address _declarator, uint256 _idx) external view returns ( address );
// Add a declaration for the subject
2021-04-28 11:59:47 +02:00
function addDeclaration(address _subject, bytes32 _proof) external returns ( bool );
// Get the declarator that signed a declaration at the specificed index for a subject
2021-04-28 11:59:47 +02:00
function declaratorAddressAt(address _subject, uint256 _idx) external view returns ( address );
// Get the number of declarators that have signed for a subject
2021-04-28 11:59:47 +02:00
function declaratorCount(address _subject) external view returns ( uint256 );
2021-02-14 13:22:42 +01:00
}