Libraries

DnsRegistrar

DnsRegistrar lookups a domainname for a given DNS type and returns a claim which you use to submit proof into or delete proof from DNSSEC Oracle as well as register the domain to ENS through the DNSRegistrar contract

DNSRegistrar.claim(name)

returns a claim object which allows you to claim the ownership of a given name on ENS by submitting the proof into DNSSEC oracle as well as claiming the name via the registrar

Arguments:
  • name (string) – name of the domain you want to claim
Claim.getOwner()

returns owner ETH address from the DNS record.

Claim.getOracle()

returns Oracle object

Claim.getResult()

returns DnsResult object

Claim.submit(params)

Either submit or delete proof depending on the state of DNSRecord and DNSSEC Oracle

  • it deletes an entry if DNS record returns NSEC/NSEC3(Next Secure)
  • it submits proof to DNSSEC Oracle contract if not all proofs are in the contract
  • it submits proof to DNSSEC Oracle contract and claims via DNSRegistrar contract if not all proofs are in the DNSSEC Oracle contract
Arguments:
  • params (Object) – optional parameter to send to smart contract, such as from, gas, etc