web3-eth-ens
Advanced tools
Comparing version 4.4.1-dev.f87ffbe.0 to 4.4.1-dev.fab66e9.0
@@ -166,3 +166,3 @@ "use strict"; | ||
if ((0, web3_validator_1.isAddress)(ENSNameOrAddr)) | ||
return this._resolver.getText(yield (this._resolver.getName(ENSNameOrAddr, false)), key); | ||
return this._resolver.getText(yield this._resolver.getName(ENSNameOrAddr, false), key); | ||
return this._resolver.getText(ENSNameOrAddr, key); | ||
@@ -169,0 +169,0 @@ }); |
@@ -100,5 +100,3 @@ "use strict"; | ||
yield this.checkInterfaceSupport(resolverContract, config_js_1.methodsInInterface.setAddr); | ||
return resolverContract.methods | ||
.setAddr((0, utils_js_1.namehash)(ENSName), address) | ||
.send(txConfig); | ||
return resolverContract.methods.setAddr((0, utils_js_1.namehash)(ENSName), address).send(txConfig); | ||
}); | ||
@@ -110,4 +108,3 @@ } | ||
yield this.checkInterfaceSupport(resolverContract, config_js_1.methodsInInterface.text); | ||
return resolverContract.methods | ||
.text((0, utils_js_1.namehash)(ENSName), key).call(); | ||
return resolverContract.methods.text((0, utils_js_1.namehash)(ENSName), key).call(); | ||
}); | ||
@@ -121,4 +118,3 @@ } | ||
yield this.checkInterfaceSupport(resolverContract, config_js_1.methodsInInterface.name); | ||
return resolverContract.methods | ||
.name((0, utils_js_1.namehash)(reverseName)).call(); | ||
return resolverContract.methods.name((0, utils_js_1.namehash)(reverseName)).call(); | ||
}); | ||
@@ -125,0 +121,0 @@ } |
@@ -163,3 +163,3 @@ /* | ||
if (isAddress(ENSNameOrAddr)) | ||
return this._resolver.getText(yield (this._resolver.getName(ENSNameOrAddr, false)), key); | ||
return this._resolver.getText(yield this._resolver.getName(ENSNameOrAddr, false), key); | ||
return this._resolver.getText(ENSNameOrAddr, key); | ||
@@ -166,0 +166,0 @@ }); |
@@ -97,5 +97,3 @@ /* | ||
yield this.checkInterfaceSupport(resolverContract, methodsInInterface.setAddr); | ||
return resolverContract.methods | ||
.setAddr(namehash(ENSName), address) | ||
.send(txConfig); | ||
return resolverContract.methods.setAddr(namehash(ENSName), address).send(txConfig); | ||
}); | ||
@@ -107,4 +105,3 @@ } | ||
yield this.checkInterfaceSupport(resolverContract, methodsInInterface.text); | ||
return resolverContract.methods | ||
.text(namehash(ENSName), key).call(); | ||
return resolverContract.methods.text(namehash(ENSName), key).call(); | ||
}); | ||
@@ -118,4 +115,3 @@ } | ||
yield this.checkInterfaceSupport(resolverContract, methodsInInterface.name); | ||
return resolverContract.methods | ||
.name(namehash(reverseName)).call(); | ||
return resolverContract.methods.name(namehash(reverseName)).call(); | ||
}); | ||
@@ -122,0 +118,0 @@ } |
{ | ||
"name": "web3-eth-ens", | ||
"version": "4.4.1-dev.f87ffbe.0+f87ffbe", | ||
"version": "4.4.1-dev.fab66e9.0+fab66e9", | ||
"description": "This package has ENS functions for interacting with Ethereum Name Service.", | ||
@@ -62,12 +62,12 @@ "main": "./lib/commonjs/index.js", | ||
"@adraffy/ens-normalize": "^1.8.8", | ||
"web3-core": "4.5.1-dev.f87ffbe.0+f87ffbe", | ||
"web3-errors": "1.2.2-dev.f87ffbe.0+f87ffbe", | ||
"web3-eth": "4.8.3-dev.f87ffbe.0+f87ffbe", | ||
"web3-eth-contract": "4.6.1-dev.f87ffbe.0+f87ffbe", | ||
"web3-net": "4.1.1-dev.f87ffbe.0+f87ffbe", | ||
"web3-types": "1.7.1-dev.f87ffbe.0+f87ffbe", | ||
"web3-utils": "4.3.2-dev.f87ffbe.0+f87ffbe", | ||
"web3-validator": "2.0.7-dev.f87ffbe.0+f87ffbe" | ||
"web3-core": "4.7.1-dev.fab66e9.0+fab66e9", | ||
"web3-errors": "1.3.1-dev.fab66e9.0+fab66e9", | ||
"web3-eth": "4.10.1-dev.fab66e9.0+fab66e9", | ||
"web3-eth-contract": "4.7.1-dev.fab66e9.0+fab66e9", | ||
"web3-net": "4.1.1-dev.fab66e9.0+fab66e9", | ||
"web3-types": "1.8.2-dev.fab66e9.0+fab66e9", | ||
"web3-utils": "4.3.3-dev.fab66e9.0+fab66e9", | ||
"web3-validator": "2.0.7-dev.fab66e9.0+fab66e9" | ||
}, | ||
"gitHead": "f87ffbe1efc38a33df241adf97d2b82e9cede7c8" | ||
"gitHead": "fab66e99d5108cfc41999ab7260fb050beb76936" | ||
} |
@@ -179,4 +179,4 @@ /* | ||
public async getText(ENSNameOrAddr: string | Address, key: string): Promise<string> { | ||
if(isAddress(ENSNameOrAddr)) | ||
return this._resolver.getText(await(this._resolver.getName(ENSNameOrAddr,false)), key); | ||
if (isAddress(ENSNameOrAddr)) | ||
return this._resolver.getText(await this._resolver.getName(ENSNameOrAddr, false), key); | ||
return this._resolver.getText(ENSNameOrAddr, key); | ||
@@ -183,0 +183,0 @@ } |
@@ -28,3 +28,2 @@ /* | ||
// Default public resolver | ||
@@ -109,40 +108,26 @@ // https://github.com/ensdomains/resolvers/blob/master/contracts/PublicResolver.sol | ||
public async setAddress( | ||
ENSName: string, | ||
address: Address, | ||
txConfig: PayableCallOptions, | ||
) { | ||
public async setAddress(ENSName: string, address: Address, txConfig: PayableCallOptions) { | ||
const resolverContract = await this.getResolverContractAdapter(ENSName); | ||
await this.checkInterfaceSupport(resolverContract, methodsInInterface.setAddr); | ||
return resolverContract.methods | ||
.setAddr(namehash(ENSName), address) | ||
.send(txConfig); | ||
return resolverContract.methods.setAddr(namehash(ENSName), address).send(txConfig); | ||
} | ||
public async getText( | ||
ENSName: string, | ||
key: string, | ||
) { | ||
public async getText(ENSName: string, key: string) { | ||
const resolverContract = await this.getResolverContractAdapter(ENSName); | ||
await this.checkInterfaceSupport(resolverContract, methodsInInterface.text); | ||
return resolverContract.methods | ||
.text(namehash(ENSName), key).call() | ||
return resolverContract.methods.text(namehash(ENSName), key).call(); | ||
} | ||
public async getName( | ||
address: string, | ||
checkInterfaceSupport = true | ||
) { | ||
public async getName(address: string, checkInterfaceSupport = true) { | ||
const reverseName = `${address.toLowerCase().substring(2)}.addr.reverse`; | ||
const resolverContract = await this.getResolverContractAdapter(reverseName); | ||
if(checkInterfaceSupport) | ||
if (checkInterfaceSupport) | ||
await this.checkInterfaceSupport(resolverContract, methodsInInterface.name); | ||
return resolverContract.methods | ||
.name(namehash(reverseName)).call() | ||
return resolverContract.methods.name(namehash(reverseName)).call(); | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
312017
7926