@okwallet/wagmi-okx-connector
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

okx wagmi connector

import { useAccount, useConnect, useDisconnect } from 'wagmi'
import { OKXConnector } from '@okwallet/wagmi-okx-connector'

function Profile() {
  const { address, isConnected } = useAccount()
  const { connect } = useConnect({
    connector: new OKXConnector(),
  })
  const { disconnect } = useDisconnect()

  if (isConnected)
    return (
      <div>
        Connected to {address}
        <button onClick={() => disconnect()}>Disconnect</button>
      </div>
    )
  return <button onClick={() => connect()}>Connect Wallet</button>
}

Readme

Keywords

none

Package Sidebar

Install

npm i @okwallet/wagmi-okx-connector

Weekly Downloads

101

Version

1.0.1

License

none

Unpacked Size

2.84 kB

Total Files

6

Last publish

Collaborators

  • linus.wang