React-Native WalletConnect Wallet
Library to connect React-Native mobile wallets to desktop Dapps using WalletConnect
You can read more about WalletConnect standard here: http://walletconnect.org/
Setup
- Install NPM Package
yarn add rn-walletconnect-wallet # OR npm install --save rn-walletconnect-wallet
- Nodify 'crypto' package for cryptography
# install "crypto" shims and run package-specific hacks rn-nodeify --install "crypto" --hack
Getting Started
/** * Create WalletConnector */const walletConnector = uri: 'ethereum:wc-8a5e5bdc-a0e4-47...TJRNmhWJmoxdFo6UDk2WlhaOyQ5N0U=' push: type: 'fcm' token: 'cSgGd8BWURk:APA91bGXsLd_...YdFbutyfc8pScl0Qe8-' webhook: 'https://push.walletconnect.org/notification/new' /** * Approve Session */await walletConnector /** * Reject Session */await walletConnector /** * Kill Session */await walletConnector /** * Handle push notification events & get call data */FCM; /** * Get all calls from bridge */const allCalls = await walletConnector; /** * Approve and share call result */walletConnector /** * Reject call request */walletConnector