Skip to content

gaspare100/deficonnect-monorepo

Repository files navigation

deficonnect

Install

npm install "deficonnect"

Usage

for web3-react

if you use web3-react, it is easy to integrat:

DeFiWeb3Connector has implement AbstractConnector from web3-react

import { DeFiWeb3Connector } from 'deficonnect'

const connector = new DeFiWeb3Connector({
  supportedChainIds: [1],
  rpc: { 1: 'https://mainnet.infura.io/v3/INFURA_API_KEY' },
  pollingInterval: 15000,
})
connector.activate()

normally

import { DeFiWeb3Connector } from 'deficonnect'
import Web3 from "web3"

const connector = new DeFiWeb3Connector({
  supportedChainIds: [1],
  rpc: [1: 'https://mainnet.infura.io/v3/INFURA_API_KEY'],
  pollingInterval: 15000,
})
connector.activate()
const provider = await connector.getProvider()
const web3 = new Web3(provider)

release package step

  1. change the package.json version, and create PR to master.
  2. approved release on CI control
  3. create a new tag on Github

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published