The library is divided in 3 main parts:
Contracts
include all read methods on the contracts.Identity
abstracts away all read methods (1) by wrapping them for a specific node.IdentitySigner
interacts with the contracts through a specific signer.ethers.js
If you need to gather records from various ENS names, then the Contracts
class should suffice.
const provider = new InfuraProvider("homestead", process.env.INFURA_API_KEY);
const contracts = await initContracts(provider);
const ppy = await contracts.getPricePerYear();
Abstracts away all the parameters such as node
and address
.
const address = "0x";
const identity = await newIdentity(address, provider);
const hasIdentity = await identity.hasIdentity();
const signer = provider.getSigner();
const identity = await newIdentitySigner(signer);
await identity.setText("com.telegram", "john_doe");
Generated using TypeDoc