@onflow/fcl-wc
TypeScript icon, indicating that this package has built-in type declarations

5.5.1 • Public • Published

@onflow/fcl-wc

WalletConnect adapter for FCL-JS.

Status

  • Last Updated: Aug 2022
  • Stable: No
  • Risk of Breaking Change: Yes

Install

npm install --save @onflow/fcl-wc

Usage

The package exports init and utils. Currently, a WalletConnect projectId is required and can be obtained @ https://cloud.walletconnect.com. Metadata is optional.

Initializtion returns FclWcServicePlugin and a Walletconnect client. The client can be used to subscribe to events, disconnect from a wallet, and query session and pairing status. Passing FclWcServicePlugin to fcl.pluginRegistry.add() will enable use of the "WC/RPC" service strategy and add new and existing WalletConnect services to FCL Discovery.

import * as fcl from '@onflow/fcl'
import { init } from '@onflow/fcl-wc'

const { FclWcServicePlugin, client } = await init({
  projectId: PROJECT_ID,
  metadata: {
    name: 'FCL WC DApp',
    description: 'FCL DApp with support for WalletConnect',
    url: 'https://flow.com/',
    icons: ['https://avatars.githubusercontent.com/u/62387156?s=280&v=4']
  }
})

fcl.pluginRegistry.add(FclWcServicePlugin)

Readme

Keywords

none

Package Sidebar

Install

npm i @onflow/fcl-wc

Homepage

onflow.org

Weekly Downloads

1,234

Version

5.5.1

License

Apache-2.0

Unpacked Size

147 kB

Total Files

6

Last publish

Collaborators

  • han210
  • dapperj
  • dapper_labs
  • jeffreydoyle
  • harry.eth
  • turbolent_flow
  • chasefleming
  • gregsantos
  • gregorggg
  • jribbink
  • bthaile
  • nialexsan
  • sisyphussmiling