Skip to content

Commit

Permalink
Merge pull request #31 from ensdomains/enhancement/dnssec-interface
Browse files Browse the repository at this point in the history
enhancement/dnssec-interface
  • Loading branch information
Dean Eigenmann authored Aug 24, 2018
2 parents dbfd97f + dfb5b03 commit 2e1ac21
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
8 changes: 2 additions & 6 deletions contracts/DNSSEC.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pragma solidity ^0.4.23;
import "./Owned.sol";
import "./BytesUtils.sol";
import "./RRUtils.sol";
import "./DNSSECInterface.sol";
import "./algorithms/Algorithm.sol";
import "./digests/Digest.sol";
import "./nsec3digests/NSEC3Digest.sol";
Expand All @@ -14,7 +15,7 @@ import "@ensdomains/buffer/contracts/Buffer.sol";
* TODO: Support for NSEC3 records
* TODO: Use 'serial number math' for inception/expiration
*/
contract DNSSEC is Owned {
contract DNSSEC is DNSSECInterface, Owned {
using Buffer for Buffer.buffer;
using BytesUtils for bytes;
using RRUtils for *;
Expand Down Expand Up @@ -73,11 +74,6 @@ contract DNSSEC is Owned {
mapping (uint8 => Digest) public digests;
mapping (uint8 => NSEC3Digest) public nsec3Digests;

event AlgorithmUpdated(uint8 id, address addr);
event DigestUpdated(uint8 id, address addr);
event NSEC3DigestUpdated(uint8 id, address addr);
event RRSetUpdated(bytes name, bytes rrset);

/**
* @dev Constructor.
* @param _anchors The binary format RR entries for the root DS records.
Expand Down
15 changes: 15 additions & 0 deletions contracts/DNSSECInterface.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
pragma solidity ^0.4.23;

interface DNSSECInterface {

event AlgorithmUpdated(uint8 id, address addr);
event DigestUpdated(uint8 id, address addr);
event NSEC3DigestUpdated(uint8 id, address addr);
event RRSetUpdated(bytes name, bytes rrset);

function submitRRSets(bytes memory data, bytes memory proof) public returns (bytes);
function submitRRSet(bytes memory input, bytes memory sig, bytes memory proof) public returns(bytes memory rrs);
function deleteRRSet(uint16 deleteType, bytes deleteName, bytes memory nsec, bytes memory sig, bytes memory proof) public;
function rrdata(uint16 dnstype, bytes memory name) public view returns (uint32, uint64, bytes20);

}

0 comments on commit 2e1ac21

Please sign in to comment.