This package has been deprecated

Author message:

This package has been deprecated. Please check this repo https://github.com/crypto-com/deficonnect-monorepo

@deficonnect/defi-link
TypeScript icon, indicating that this package has built-in type declarations

1.0.11 • Public • Published

@deficonnect/defi-link

Deprecated: This package has been deprecated. Please use this package instead: https://www.npmjs.com/package/deficonnect

Install

yarn add "@deficonnect/defi-link"

Usage

for web3-react

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

DeFiLinkConnector has implement AbstractConnector from web3-react

import { DeFiLinkConnector } from '@deficonnect/defi-link'

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

normally

import { DeFiLinkConnector } from '@deficonnect/defi-link'
import Web3 from "web3"

const connector = new DeFiLinkConnector({
  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)

Readme

Keywords

none

Package Sidebar

Install

npm i @deficonnect/defi-link

Weekly Downloads

1

Version

1.0.11

License

MIT

Unpacked Size

186 kB

Total Files

33

Last publish

Collaborators

  • cryptocom