@enslogin/sdk
TypeScript icon, indicating that this package has built-in type declarations

0.1.9 • Public • Published

ENS Login SDK

ENS Login SDK allows you to integrate ENS Login into your Dapp

Installation

yarn add @enslogin/sdk

Setting up on your Dapp

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()  
})

Setting up provider into your ENS name

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

Supported networks

  • Goerli, Rinkeby, Ropsten

Supported providers

Config params

Provider

  • [mandatory] network: name or node address
  • [optional] ens: address of the ens root on that network (default provided by ethers.js for named networks)

IPFS

  • [optional] host (default = ipfs.infura.io)
  • [optional] port (default = 5001)
  • [optional] protocol (default = https)

Readme

Keywords

none

Package Sidebar

Install

npm i @enslogin/sdk

Weekly Downloads

2

Version

0.1.9

License

MIT

Unpacked Size

1.18 MB

Total Files

46

Last publish

Collaborators

  • amxx