0.0.6 • Published 1 year ago

qp-walletprovider v0.0.6

Weekly downloads
-
License
Qoin
Repository
github
Last release
1 year ago

qp-walletprovider

Library to connect with qoinpay extension

NPM JavaScript Style Guide

Install

npm install --save qp-walletprovider

Usage

import React, { useEffect, useState } from 'react'

import Wallet from 'qp-walletprovider'

const App = () => {
  const [address, setAddress] = useState("")

  let wallet = new Wallet();

  const connectToWallet = () => {
    wallet.connect().then((res) => {
      setAddress(res)
    })
  }

  return (
    <React.Fragment>
      {address === "" ?
        (
          <button onClick={() => connectToWallet()}>
            Connect
          </button>
        ) : (
          <>
            Address : {address}
          </>
        )}

    </React.Fragment>
  )
}

export default App

Function

License

MIT © erwinrudi

0.0.5

1 year ago

0.0.4

1 year ago

0.0.6

1 year ago

0.0.3

1 year ago

0.0.2

2 years ago

0.0.1

2 years ago