@rahulserver/rlogin-web3-react-connector
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

original repo: https://github.com/rsksmart/rLogin-web3-react-connector adds additional supportedChainIds to it

logo

@rsksmart/rlogin-web3-react-connector

Wrapper for rLogin to make easier integrations with web3-react apps

ci Coverage Status npm

A Web3 React provider for rLogin. This package can be used with existing Web3 React implementations where you want to use the rLogin provider selector.

Features

Uses the rLogin provider selector, and authenticaion or data vault if required, and passes the provider to the Web3 React implementation.

Implementation

Add the dependecy to your project:

yarn add @rsksmart/rlogin-web3react-provider --save

Then connect with rLogin, convert the response with this package, and pass it to Web3React:

const { activate } = useWeb3React()

rLogin.connect()
  .then(rloginResponse => new Web3ReactProvider(rloginResponse))
  .then(connector => activate(connector, undefined, true))

Implementation notes

  • Tested with Metamask and WalletConnect.
  • Portis has known issues with estimating the gas price. You must use request when sending transacitons. See the rLogin docs for additional information about this error.

Run for development

Install dependencies:

npm i

Run unit tests

npm test

Coverage report with:

npm run test:coverage

Run linter

npm run lint

Auto-fix:

npm run lint:fix

Build for production

npm run build

Readme

Keywords

Package Sidebar

Install

npm i @rahulserver/rlogin-web3-react-connector

Weekly Downloads

0

Version

1.0.4

License

ISC

Unpacked Size

24.7 kB

Total Files

9

Last publish

Collaborators

  • rahulserver