@@ -27,13 +27,8 @@ Resolution is primarily built and maintained by
2727Resolution 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:
5045For 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
6450Resolution can be installed with either ` yarn ` or ` npm ` .
@@ -89,7 +75,7 @@ yarn add @unstoppabledomains/resolution
8975Create 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' );
9379const resolution = new Resolution ();
9480
9581function resolve (domain , currency ) {
@@ -125,7 +111,7 @@ brad.zil resolves to zil1yu5u4hegy9v3xgluweg4en54zm8f8auwxu0xxj
125111Create 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' );
129115const resolution = new Resolution ();
130116
131117function resolveIpfsHash (domain ) {
@@ -154,7 +140,7 @@ You can access this website via a public IPFS gateway: https://gateway.ipfs.io/i
154140Create 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' );
158144const resolution = new Resolution ();
159145
160146function resolveCustomRecord (domain , record ) {
@@ -196,9 +182,7 @@ Use the `-h` or `--help` flag to see all the available CLI options.
196182Resolution provides zero-configuration experience by using built-in
197183production-ready [ Infura] ( http://infura.io/ ) endpoint by default.
198184Default 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.
202186Default 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```
221210await Resolution.autonetwork({
222- cns: {provider},
223- ens: {url}
211+ uns: {provider},
224212});
225213```
214+
226215## Error Handling
227216
228217When 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 `
0 commit comments