Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

web3-eth-ens

Package Overview
Dependencies
Maintainers
4
Versions
460
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-eth-ens - npm Package Compare versions

Comparing version 4.4.1-dev.6b80cf0.0 to 4.4.1-dev.6f9a485.0

2

lib/commonjs/ens.js

@@ -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.6b80cf0.0+6b80cf0",
"version": "4.4.1-dev.6f9a485.0+6f9a485",
"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.6b80cf0.0+6b80cf0",
"web3-errors": "1.2.1-dev.6b80cf0.0+6b80cf0",
"web3-eth": "4.8.2-dev.6b80cf0.0+6b80cf0",
"web3-eth-contract": "4.6.1-dev.6b80cf0.0+6b80cf0",
"web3-net": "4.1.1-dev.6b80cf0.0+6b80cf0",
"web3-types": "1.7.1-dev.6b80cf0.0+6b80cf0",
"web3-utils": "4.3.2-dev.6b80cf0.0+6b80cf0",
"web3-validator": "2.0.7-dev.6b80cf0.0+6b80cf0"
"web3-core": "4.6.1-dev.6f9a485.0+6f9a485",
"web3-errors": "1.3.1-dev.6f9a485.0+6f9a485",
"web3-eth": "4.9.1-dev.6f9a485.0+6f9a485",
"web3-eth-contract": "4.7.1-dev.6f9a485.0+6f9a485",
"web3-net": "4.1.1-dev.6f9a485.0+6f9a485",
"web3-types": "1.8.1-dev.6f9a485.0+6f9a485",
"web3-utils": "4.3.2-dev.6f9a485.0+6f9a485",
"web3-validator": "2.0.7-dev.6f9a485.0+6f9a485"
},
"gitHead": "6b80cf0f00fba190eda18ab5c96ee0b110680da7"
"gitHead": "6f9a485e0715a70170bf170ca1e1d1b26b43f6c3"
}

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc