cfx-walletconnect
v0.0.0-rc.1
Published
## cfx-walletconnect-client
Downloads
2
Readme
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();