@0xcert/ens 中文文档教程
ENS
ENS 模块,用于以太坊区块链上的 ens 域管理。 ENS 模块可在以太坊区块链上实现安全和去中心化的 ENS 域管理。 它将人类可读的名称映射到机器可读的标识符,例如以太坊地址,反之亦然。 阅读有关 Etherum 名称服务 的更多信息。
Usage
Init
// Provider is an instance of 0xcert framework provider.
const ens = new Ens(provider, NetworkKind.ROPSTEN);
Resolve domain into address
const address = await ens.getAddress('domain.eth');
Get domain from address
const domain = await ens.getDomain('address');
Live example
codesandbox 上的 ropsten 网络提供了实时示例: https://codesandbox.io/s/github/0xcert/ens-example?module=%2FREADME.md
ENS
ENS module for ens domain management on the Ethereum blockchain. The ENS module enables a secure and decentralized ENS domain management on the Ethereum blockchain. It maps human-readable names to machine-readable identifiers such as Ethereum addresses and vice versa. Read more about about the Etherum Name Service.
Usage
Init
// Provider is an instance of 0xcert framework provider.
const ens = new Ens(provider, NetworkKind.ROPSTEN);
Resolve domain into address
const address = await ens.getAddress('domain.eth');
Get domain from address
const domain = await ens.getDomain('address');
Live example
Live example is available for ropsten network on codesandbox: https://codesandbox.io/s/github/0xcert/ens-example?module=%2FREADME.md