public ENSService(IEthApiContractService ethApiContractService, string ensRegistryAddress = "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e") { if (ethApiContractService == null) { throw new ArgumentNullException(nameof(ethApiContractService)); } _ethApiContractService = ethApiContractService; EnsRegistryAddress = ensRegistryAddress ?? throw new ArgumentNullException(nameof(ensRegistryAddress)); _ensUtil = new EnsUtil(); ENSRegistryService = new ENSRegistryService(ethApiContractService, EnsRegistryAddress); }
public EthTLSService(IEthApiContractService ethApiContractService, string ensRegistryAddress = "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e") { if (string.IsNullOrEmpty(ensRegistryAddress)) { throw new ArgumentException("ensRegistryAddress cannot be null", nameof(ensRegistryAddress)); } _ethApiContractService = ethApiContractService; EnsRegistryAddress = ensRegistryAddress; _ensUtil = new EnsUtil(); TLS = "eth"; TLSNameHash = _ensUtil.GetNameHash(TLS).HexToByteArray(); }
public Task <PublicResolverService> GetResolverAsync(string fullNameNode) { var fullNameNodeAsBytes = new EnsUtil().GetNameHash(fullNameNode).HexToByteArray(); return(GetResolverAsync(fullNameNodeAsBytes)); }