Skip to content

Commit 6c8f110

Browse files
author
Ryan Le
authored
Merge pull request #193 from unstoppabledomains/ryan/remove-ens
2 parents 9cab483 + 73dcff4 commit 6c8f110

17 files changed

Lines changed: 49 additions & 2270 deletions

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 7.0.0
2+
3+
- ENS support is completely removed
4+
- Removes `bip44-constants`, `@ensdomains/address-encoder`, and `content-hash`
5+
package dependencies
6+
- Methods that query ENS domains (.eth, .luxe, .xyz, .kred, .reverse) throw
7+
UnsupportedDomain
18
## 6.0.3
29
- Remove relative imports to avoid issues in bundlers. Restrict relative imports by adding eslint rule.
310

README.md

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,8 @@ Resolution is primarily built and maintained by
2727
Resolution supports decentralized domains across three main zones:
2828

2929
- Zilliqa Name Service (ZNS)
30-
- `.zil`
3130

32-
- Ethereum Name Service (ENS)
33-
- `.eth`
34-
- `.kred`
35-
- `.xyz`
36-
- `.luxe`
31+
- `.zil`
3732

3833
- Unstoppable Name Service (UNS)
3934
- `.crypto`
@@ -50,15 +45,6 @@ Resolution supports decentralized domains across three main zones:
5045
For more information, see our detailed
5146
[API Referrence](https://unstoppabledomains.github.io/resolution/).
5247

53-
### ENS support
54-
**Note: Ethereum Name Service requires installing additional packages
55-
otherwise library throws error when trying to resolve ENS domain.**
56-
57-
#### Required packages
58-
- `"bip44-constants": "^8.0.5"`
59-
- `"@ensdomains/address-encoder": ">= 0.1.x <= 0.2.x"`
60-
- `"content-hash": "^2.5.2"`
61-
6248
## Installing Resolution
6349

6450
Resolution can be installed with either `yarn` or `npm`.
@@ -89,7 +75,7 @@ yarn add @unstoppabledomains/resolution
8975
Create a new file in your project, `address.js`.
9076

9177
```javascript
92-
const { default: Resolution } = require('@unstoppabledomains/resolution');
78+
const {default: Resolution} = require('@unstoppabledomains/resolution');
9379
const resolution = new Resolution();
9480

9581
function resolve(domain, currency) {
@@ -125,7 +111,7 @@ brad.zil resolves to zil1yu5u4hegy9v3xgluweg4en54zm8f8auwxu0xxj
125111
Create a new file in your project, `ipfs_hash.js`.
126112

127113
```javascript
128-
const { default: Resolution } = require('@unstoppabledomains/resolution');
114+
const {default: Resolution} = require('@unstoppabledomains/resolution');
129115
const resolution = new Resolution();
130116

131117
function resolveIpfsHash(domain) {
@@ -154,7 +140,7 @@ You can access this website via a public IPFS gateway: https://gateway.ipfs.io/i
154140
Create a new file in your project, `custom-resolution.js`.
155141

156142
```javascript
157-
const { default: Resolution } = require('@unstoppabledomains/resolution');
143+
const {default: Resolution} = require('@unstoppabledomains/resolution');
158144
const resolution = new Resolution();
159145

160146
function resolveCustomRecord(domain, record) {
@@ -196,9 +182,7 @@ Use the `-h` or `--help` flag to see all the available CLI options.
196182
Resolution provides zero-configuration experience by using built-in
197183
production-ready [Infura](http://infura.io/) endpoint by default.
198184
Default Ethereum provider is free to use without restrictions and rate-limits
199-
for `CNS (.crypto domains)` resolution.
200-
To resolve `ENS` domains on production it's recommended to change Ethereum
201-
provider.
185+
for `UNS` resolution.
202186
Default provider can be changed by changing constructor options
203187
`new Resolution(options)` or by using one of the factory methods:
204188

@@ -211,18 +195,23 @@ To see all constructor options and factory methods check
211195
[Unstoppable API reference](https://unstoppabledomains.github.io/resolution).
212196

213197
## Autoconfiguration of blockchain network
214-
In some scenarios system might not be flexible enough to easy distinguish between various Ethereum testnets on compile time.
215-
For this case Resolution library provide a special async constructor which should be waited for
216-
`await Resolution.autonetwork(options)`. This method makes a JSON RPC "net_version" call to the provider to get the network id.
217198

218-
This method configures only Ens and Cns, Zns is supported only on Zilliqa mainnet which is going to be used in any cases.
219-
You can provide a configured provider or a blockchain url as in the following example:
199+
In some scenarios system might not be flexible enough to easy distinguish
200+
between various Ethereum testnets on compile time. For this case Resolution
201+
library provide a special async constructor which should be waited for
202+
`await Resolution.autonetwork(options)`. This method makes a JSON RPC
203+
"net_version" call to the provider to get the network id.
204+
205+
This method configures only Uns. Zns is supported only on Zilliqa mainnet which
206+
is going to be used in any cases. You can provide a configured provider or a
207+
blockchain url as in the following example:
208+
220209
```
221210
await Resolution.autonetwork({
222-
cns: {provider},
223-
ens: {url}
211+
uns: {provider},
224212
});
225213
```
214+
226215
## Error Handling
227216

228217
When resolution encounters an error it returns the error code instead of
@@ -264,6 +253,7 @@ or **Linux shell**).
264253
### Internal config
265254

266255
#### To update:
256+
267257
- Network config: `$ yarn network-config:pull`
268258
- Resolver keys: `$ yarn resolver-keys:pull`
269259
- Both configs: `$ yarn config:pull`

package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"cns",
4848
".crypto",
4949
"zns",
50-
"ens",
5150
"ethereum",
5251
"zilliqa",
5352
"blockchain",
@@ -62,7 +61,6 @@
6261
},
6362
"homepage": "https://github.com/unstoppabledomains/resolution.git#readme",
6463
"devDependencies": {
65-
"@ensdomains/address-encoder": "0.2.6",
6664
"@ethersproject/providers": "^5.4.5",
6765
"@types/bn.js": "^4.11.6",
6866
"@types/elliptic": "^6.4.13",
@@ -74,8 +72,6 @@
7472
"@unstoppabledomains/sizecheck": "^4.0.0",
7573
"@zilliqa-js/core": "2.3.0-alpha.0",
7674
"audit-ci": "^3.1.1",
77-
"bip44-constants": "^8.0.5",
78-
"content-hash": "^2.5.2",
7975
"dotenv": "^8.2.0",
8076
"eslint": "^7.7.0",
8177
"eslint-config-prettier": "^8.3.0",
@@ -105,7 +101,6 @@
105101
"bn.js": "^4.4.0",
106102
"cross-fetch": "^3.1.4",
107103
"elliptic": "^6.5.4",
108-
"ethereum-ens-network-map": "^1.0.2",
109104
"js-sha256": "^0.9.0",
110105
"js-sha3": "^0.8.0"
111106
},

0 commit comments

Comments
 (0)