cfx-walletconnect

0.0.0-rc.1 • Public • Published

cfx-walletconnect

cfx-walletconnect-client

WalletConnect client for Conflux Network.

Example


Install

npm install cfx-walletconnect-client --save

# or
yarn add cfx-walletconnect-client

Usage

import WalletConnectCfx from 'cfx-walletconnect-client'

const bridge = "https://bridge.walletconnect.org";
// same api with @walletconnect/client
const connector = new WalletConnectCfx({ bridge }); 

methods

connector.sendTransaction(tx)

call cfx_sendTransaction to remote wallet

connector.signTransaction(tx)

call cfx_signTransaction to remote wallet

connector.signMessage(params)

call cfx_sign to remote wallet



WalletConnect QR Code Modal in Conflux Network

QR Code Modal for WalletConnect in Conflux network

import WalletConnectQRCodeModal from "test-cfx-walletconnect-qrcode-modal";

/**
 *  Get URI from WalletConnect object
 */
const uri = connector.uri;

WalletConnectQRCodeModal.updateMobileRegistry({
  // custom wallet registry
})

/**
 *  Open QR Code Modal
 */
WalletConnectQRCodeModal.open(uri);

/**
 *  Close QR Code Modal
 */
WalletConnectQRCodeModal.close();

Readme

Keywords

none

Package Sidebar

Install

npm i cfx-walletconnect

Weekly Downloads

0

Version

0.0.0-rc.1

License

none

Unpacked Size

18.3 kB

Total Files

30

Last publish

Collaborators

  • 21paradox