Socket
Socket
Sign inDemoInstall

web3-eth-ens

Package Overview
Dependencies
9
Maintainers
4
Versions
377
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.2.1-dev.5a579fa.0 to 4.2.1-dev.5fd9dbb.0

38

lib/commonjs/ens.d.ts

@@ -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.5a579fa.0+5a579fa",
"version": "4.2.1-dev.5fd9dbb.0+5fd9dbb",
"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.5a579fa.0+5a579fa",
"web3-errors": "1.1.5-dev.5a579fa.0+5a579fa",
"web3-eth": "4.5.1-dev.5a579fa.0+5a579fa",
"web3-eth-contract": "4.3.1-dev.5a579fa.0+5a579fa",
"web3-net": "4.0.8-dev.5a579fa.0+5a579fa",
"web3-types": "1.5.1-dev.5a579fa.0+5a579fa",
"web3-utils": "4.2.3-dev.5a579fa.0+5a579fa",
"web3-validator": "2.0.6-dev.5a579fa.0+5a579fa"
"web3-core": "4.3.3-dev.5fd9dbb.0+5fd9dbb",
"web3-errors": "1.1.5-dev.5fd9dbb.0+5fd9dbb",
"web3-eth": "4.6.1-dev.5fd9dbb.0+5fd9dbb",
"web3-eth-contract": "4.4.1-dev.5fd9dbb.0+5fd9dbb",
"web3-net": "4.0.8-dev.5fd9dbb.0+5fd9dbb",
"web3-types": "1.6.1-dev.5fd9dbb.0+5fd9dbb",
"web3-utils": "4.2.4-dev.5fd9dbb.0+5fd9dbb",
"web3-validator": "2.0.6-dev.5fd9dbb.0+5fd9dbb"
},
"gitHead": "5a579fa3e46ad0c44bdead69876491f51852d82a"
"gitHead": "5fd9dbb2eda58b22c1d83033e6c2d2a263b3b9e6"
}

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc