ENS Login SDK allows you to integrate ENS Login into your Dapp
yarn add @enslogin/sdk
import ENSLoginSDK from '@enslogin/sdk'
const config = {
provider:
{
network: 'goerli',
ens: '0x112234455c3a32fd11230c42e7bccd4a84e02010'
},
ipfs:{
host: 'ipfs.infura.io',
port: 5001,
protocol: 'https',
}
}
ENSLoginSDK.connect(username, config).then((provider)=>{
window.ethereum = provider
window.web3 = new Web3(provider)
provider.enable()
})
Until ENS manager supports arbitrary text record, please update web3-provider
field via etherscan.
You can get the labelhash of your node via this pastebin
- Goerli, Rinkeby, Ropsten
- You can find out the list of providers from
enslogin.eth
- [mandatory] network: name or node address
- [optional] ens: address of the ens root on that network (default provided by ethers.js for named networks)
- [optional] host (default = ipfs.infura.io)
- [optional] port (default = 5001)
- [optional] protocol (default = https)