web3-eth-ens
Advanced tools
Comparing version 4.2.1-dev.ce59737.0 to 4.2.1-dev.dd172c7.0
@@ -8,21 +8,21 @@ import { Web3Context, Web3ContextObject } from 'web3-core'; | ||
* This class is designed to interact with the ENS system on the Ethereum blockchain. | ||
* For using ENS package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that ENS features can be used as mentioned in following snippet. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* | ||
* const web3 = new Web3('https://127.0.0.1:4545'); | ||
* | ||
* console.log(await web3.eth.ens.getAddress('ethereum.eth')) | ||
* ``` | ||
* For using individual package install `web3-eth-ens` packages using: `npm i web3-eth-ens` or `yarn add web3-eth-ens`. This is more efficient approach for building lightweight applications. | ||
* | ||
* ```ts | ||
*import { ENS } from 'web3-eth-ens'; | ||
* | ||
* const ens = new ENS(undefined,'https://127.0.0.1:4545'); | ||
* | ||
* console.log(await ens.getAddress('vitalik.eth')); | ||
* ``` | ||
*/ | ||
* For using ENS package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that ENS features can be used as mentioned in following snippet. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* | ||
* const web3 = new Web3('https://127.0.0.1:4545'); | ||
* | ||
* console.log(await web3.eth.ens.getAddress('ethereum.eth')) | ||
* ``` | ||
* For using individual package install `web3-eth-ens` packages using: `npm i web3-eth-ens` or `yarn add web3-eth-ens`. This is more efficient approach for building lightweight applications. | ||
* | ||
* ```ts | ||
*import { ENS } from 'web3-eth-ens'; | ||
* | ||
* const ens = new ENS(undefined,'https://127.0.0.1:4545'); | ||
* | ||
* console.log(await ens.getAddress('vitalik.eth')); | ||
* ``` | ||
*/ | ||
export declare class ENS extends Web3Context<EthExecutionAPI & Web3NetAPI> { | ||
@@ -29,0 +29,0 @@ /** |
@@ -39,21 +39,21 @@ "use strict"; | ||
* This class is designed to interact with the ENS system on the Ethereum blockchain. | ||
* For using ENS package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that ENS features can be used as mentioned in following snippet. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* | ||
* const web3 = new Web3('https://127.0.0.1:4545'); | ||
* | ||
* console.log(await web3.eth.ens.getAddress('ethereum.eth')) | ||
* ``` | ||
* For using individual package install `web3-eth-ens` packages using: `npm i web3-eth-ens` or `yarn add web3-eth-ens`. This is more efficient approach for building lightweight applications. | ||
* | ||
* ```ts | ||
*import { ENS } from 'web3-eth-ens'; | ||
* | ||
* const ens = new ENS(undefined,'https://127.0.0.1:4545'); | ||
* | ||
* console.log(await ens.getAddress('vitalik.eth')); | ||
* ``` | ||
*/ | ||
* For using ENS package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that ENS features can be used as mentioned in following snippet. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* | ||
* const web3 = new Web3('https://127.0.0.1:4545'); | ||
* | ||
* console.log(await web3.eth.ens.getAddress('ethereum.eth')) | ||
* ``` | ||
* For using individual package install `web3-eth-ens` packages using: `npm i web3-eth-ens` or `yarn add web3-eth-ens`. This is more efficient approach for building lightweight applications. | ||
* | ||
* ```ts | ||
*import { ENS } from 'web3-eth-ens'; | ||
* | ||
* const ens = new ENS(undefined,'https://127.0.0.1:4545'); | ||
* | ||
* console.log(await ens.getAddress('vitalik.eth')); | ||
* ``` | ||
*/ | ||
class ENS extends web3_core_1.Web3Context { | ||
@@ -238,3 +238,3 @@ /** | ||
} | ||
const networkType = yield (0, web3_net_1.getId)(this, Object.assign(Object.assign({}, web3_types_1.DEFAULT_RETURN_FORMAT), { number: web3_types_1.FMT_NUMBER.HEX })); // get the network from provider | ||
const networkType = yield (0, web3_net_1.getId)(this, Object.assign(Object.assign({}, this.defaultReturnFormat), { number: web3_types_1.FMT_NUMBER.HEX })); // get the network from provider | ||
const addr = config_js_1.registryAddresses[config_js_1.networkIds[networkType]]; | ||
@@ -241,0 +241,0 @@ if (typeof addr === 'undefined') { |
@@ -27,6 +27,6 @@ /* | ||
import { Web3Context } from 'web3-core'; | ||
import { ENSNetworkNotSyncedError, ENSUnsupportedNetworkError } from 'web3-errors'; | ||
import { ENSNetworkNotSyncedError, ENSUnsupportedNetworkError, } from 'web3-errors'; | ||
import { isSyncing } from 'web3-eth'; | ||
import { getId } from 'web3-net'; | ||
import { DEFAULT_RETURN_FORMAT, FMT_NUMBER, } from 'web3-types'; | ||
import { FMT_NUMBER, } from 'web3-types'; | ||
import { networkIds, registryAddresses } from './config.js'; | ||
@@ -37,21 +37,21 @@ import { Registry } from './registry.js'; | ||
* This class is designed to interact with the ENS system on the Ethereum blockchain. | ||
* For using ENS package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that ENS features can be used as mentioned in following snippet. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* | ||
* const web3 = new Web3('https://127.0.0.1:4545'); | ||
* | ||
* console.log(await web3.eth.ens.getAddress('ethereum.eth')) | ||
* ``` | ||
* For using individual package install `web3-eth-ens` packages using: `npm i web3-eth-ens` or `yarn add web3-eth-ens`. This is more efficient approach for building lightweight applications. | ||
* | ||
* ```ts | ||
*import { ENS } from 'web3-eth-ens'; | ||
* | ||
* const ens = new ENS(undefined,'https://127.0.0.1:4545'); | ||
* | ||
* console.log(await ens.getAddress('vitalik.eth')); | ||
* ``` | ||
*/ | ||
* For using ENS package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that ENS features can be used as mentioned in following snippet. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* | ||
* const web3 = new Web3('https://127.0.0.1:4545'); | ||
* | ||
* console.log(await web3.eth.ens.getAddress('ethereum.eth')) | ||
* ``` | ||
* For using individual package install `web3-eth-ens` packages using: `npm i web3-eth-ens` or `yarn add web3-eth-ens`. This is more efficient approach for building lightweight applications. | ||
* | ||
* ```ts | ||
*import { ENS } from 'web3-eth-ens'; | ||
* | ||
* const ens = new ENS(undefined,'https://127.0.0.1:4545'); | ||
* | ||
* console.log(await ens.getAddress('vitalik.eth')); | ||
* ``` | ||
*/ | ||
export class ENS extends Web3Context { | ||
@@ -236,3 +236,3 @@ /** | ||
} | ||
const networkType = yield getId(this, Object.assign(Object.assign({}, DEFAULT_RETURN_FORMAT), { number: FMT_NUMBER.HEX })); // get the network from provider | ||
const networkType = yield getId(this, Object.assign(Object.assign({}, this.defaultReturnFormat), { number: FMT_NUMBER.HEX })); // get the network from provider | ||
const addr = registryAddresses[networkIds[networkType]]; | ||
@@ -239,0 +239,0 @@ if (typeof addr === 'undefined') { |
@@ -8,21 +8,21 @@ import { Web3Context, Web3ContextObject } from 'web3-core'; | ||
* This class is designed to interact with the ENS system on the Ethereum blockchain. | ||
* For using ENS package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that ENS features can be used as mentioned in following snippet. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* | ||
* const web3 = new Web3('https://127.0.0.1:4545'); | ||
* | ||
* console.log(await web3.eth.ens.getAddress('ethereum.eth')) | ||
* ``` | ||
* For using individual package install `web3-eth-ens` packages using: `npm i web3-eth-ens` or `yarn add web3-eth-ens`. This is more efficient approach for building lightweight applications. | ||
* | ||
* ```ts | ||
*import { ENS } from 'web3-eth-ens'; | ||
* | ||
* const ens = new ENS(undefined,'https://127.0.0.1:4545'); | ||
* | ||
* console.log(await ens.getAddress('vitalik.eth')); | ||
* ``` | ||
*/ | ||
* For using ENS package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that ENS features can be used as mentioned in following snippet. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* | ||
* const web3 = new Web3('https://127.0.0.1:4545'); | ||
* | ||
* console.log(await web3.eth.ens.getAddress('ethereum.eth')) | ||
* ``` | ||
* For using individual package install `web3-eth-ens` packages using: `npm i web3-eth-ens` or `yarn add web3-eth-ens`. This is more efficient approach for building lightweight applications. | ||
* | ||
* ```ts | ||
*import { ENS } from 'web3-eth-ens'; | ||
* | ||
* const ens = new ENS(undefined,'https://127.0.0.1:4545'); | ||
* | ||
* console.log(await ens.getAddress('vitalik.eth')); | ||
* ``` | ||
*/ | ||
export declare class ENS extends Web3Context<EthExecutionAPI & Web3NetAPI> { | ||
@@ -29,0 +29,0 @@ /** |
{ | ||
"name": "web3-eth-ens", | ||
"version": "4.2.1-dev.ce59737.0+ce59737", | ||
"version": "4.2.1-dev.dd172c7.0+dd172c7", | ||
"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.3.3-dev.ce59737.0+ce59737", | ||
"web3-errors": "1.1.5-dev.ce59737.0+ce59737", | ||
"web3-eth": "4.5.1-dev.ce59737.0+ce59737", | ||
"web3-eth-contract": "4.3.1-dev.ce59737.0+ce59737", | ||
"web3-net": "4.0.8-dev.ce59737.0+ce59737", | ||
"web3-types": "1.5.1-dev.ce59737.0+ce59737", | ||
"web3-utils": "4.2.3-dev.ce59737.0+ce59737", | ||
"web3-validator": "2.0.6-dev.ce59737.0+ce59737" | ||
"web3-core": "4.3.3-dev.dd172c7.0+dd172c7", | ||
"web3-errors": "1.1.5-dev.dd172c7.0+dd172c7", | ||
"web3-eth": "4.6.1-dev.dd172c7.0+dd172c7", | ||
"web3-eth-contract": "4.4.1-dev.dd172c7.0+dd172c7", | ||
"web3-net": "4.0.8-dev.dd172c7.0+dd172c7", | ||
"web3-types": "1.6.1-dev.dd172c7.0+dd172c7", | ||
"web3-utils": "4.2.4-dev.dd172c7.0+dd172c7", | ||
"web3-validator": "2.0.6-dev.dd172c7.0+dd172c7" | ||
}, | ||
"gitHead": "ce5973719a598352831d871b4de167c363c4517f" | ||
"gitHead": "dd172c78daa518778aa2ac07aa2cc2a8bf0aa9e2" | ||
} |
@@ -19,3 +19,7 @@ /* | ||
import { Web3Context, Web3ContextObject } from 'web3-core'; | ||
import { ENSNetworkNotSyncedError, ENSUnsupportedNetworkError, RevertInstructionError } from 'web3-errors'; | ||
import { | ||
ENSNetworkNotSyncedError, | ||
ENSUnsupportedNetworkError, | ||
RevertInstructionError, | ||
} from 'web3-errors'; | ||
import { isSyncing } from 'web3-eth'; | ||
@@ -26,3 +30,2 @@ import { Contract } from 'web3-eth-contract'; | ||
Address, | ||
DEFAULT_RETURN_FORMAT, | ||
EthExecutionAPI, | ||
@@ -42,21 +45,21 @@ FMT_NUMBER, | ||
* This class is designed to interact with the ENS system on the Ethereum blockchain. | ||
* For using ENS package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that ENS features can be used as mentioned in following snippet. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* | ||
* const web3 = new Web3('https://127.0.0.1:4545'); | ||
* | ||
* console.log(await web3.eth.ens.getAddress('ethereum.eth')) | ||
* ``` | ||
* For using individual package install `web3-eth-ens` packages using: `npm i web3-eth-ens` or `yarn add web3-eth-ens`. This is more efficient approach for building lightweight applications. | ||
* | ||
* ```ts | ||
*import { ENS } from 'web3-eth-ens'; | ||
* | ||
* const ens = new ENS(undefined,'https://127.0.0.1:4545'); | ||
* | ||
* console.log(await ens.getAddress('vitalik.eth')); | ||
* ``` | ||
*/ | ||
* For using ENS package, first install Web3 package using: `npm i web3` or `yarn add web3` based on your package manager, after that ENS features can be used as mentioned in following snippet. | ||
* ```ts | ||
* | ||
* import { Web3 } from 'web3'; | ||
* | ||
* const web3 = new Web3('https://127.0.0.1:4545'); | ||
* | ||
* console.log(await web3.eth.ens.getAddress('ethereum.eth')) | ||
* ``` | ||
* For using individual package install `web3-eth-ens` packages using: `npm i web3-eth-ens` or `yarn add web3-eth-ens`. This is more efficient approach for building lightweight applications. | ||
* | ||
* ```ts | ||
*import { ENS } from 'web3-eth-ens'; | ||
* | ||
* const ens = new ENS(undefined,'https://127.0.0.1:4545'); | ||
* | ||
* console.log(await ens.getAddress('vitalik.eth')); | ||
* ``` | ||
*/ | ||
export class ENS extends Web3Context<EthExecutionAPI & Web3NetAPI> { | ||
@@ -181,3 +184,2 @@ /** | ||
/** | ||
@@ -253,3 +255,3 @@ * Resolves the name of an ENS node. | ||
const networkType = await getId(this, { | ||
...DEFAULT_RETURN_FORMAT, | ||
...this.defaultReturnFormat, | ||
number: FMT_NUMBER.HEX, | ||
@@ -300,6 +302,6 @@ }); // get the network from provider | ||
*/ | ||
public async setAddress( | ||
public async setAddress( | ||
name: string, | ||
address: Address, | ||
txConfig: PayableCallOptions | ||
txConfig: PayableCallOptions, | ||
): Promise<TransactionReceipt | RevertInstructionError> { | ||
@@ -306,0 +308,0 @@ return this._resolver.setAddress(name, address, txConfig); |
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
305667
7848