Gathering detailed insights and metrics for @walletconnect/react-native-dapp
Gathering detailed insights and metrics for @walletconnect/react-native-dapp
Gathering detailed insights and metrics for @walletconnect/react-native-dapp
Gathering detailed insights and metrics for @walletconnect/react-native-dapp
@walletconnect/react-native-compat
Shims for WalletConnect Protocol in React Native Projects
@deficonnect/react-native-dapp
WalletConnect for React Native dapps
wallet-connect-react-native-dapp-dibeling
WalletConnect for React Native dapps
@exodus/walletconnect-react-native-compat
Shims for WalletConnect Protocol in React Native Projects
npm install @walletconnect/react-native-dapp
Typescript
Module System
Node Version
NPM Version
@walletconnect/signer-connection@2.21.4
Updated on Jun 25, 2025
@walletconnect/core@2.21.4
Updated on Jun 25, 2025
@walletconnect/types@2.21.4
Updated on Jun 25, 2025
@walletconnect/react-native-compat@2.21.4
Updated on Jun 25, 2025
@walletconnect/universal-provider@2.21.4
Updated on Jun 25, 2025
@walletconnect/ethereum-provider@2.21.4
Updated on Jun 25, 2025
TypeScript (98.94%)
JavaScript (0.3%)
Kotlin (0.3%)
Shell (0.15%)
Ruby (0.14%)
Objective-C++ (0.12%)
Dockerfile (0.02%)
Objective-C (0.02%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
1,554 Stars
6,580 Commits
748 Forks
72 Watchers
158 Branches
151 Contributors
Updated on Jul 14, 2025
Latest Version
1.8.0
Package Id
@walletconnect/react-native-dapp@1.8.0
Unpacked Size
68.24 kB
Size
37.06 kB
File Count
46
NPM Version
8.5.5
Node Version
16.15.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
7
@walletconnect/react-native-dapp
A drop-in library which helps easily connect your React Native dapps to Ethereum Wallets on Android, iOS and the Web.
Notice: This library assumes you have already enabled prerequisite support for Web3 inside your application. This can be done by creating a new project using
npx create-react-native-dapp
, or by introducing support for Web3 in an existing project by usingnpx rn-nodeify --install --hack
.
For more details, check out the documentation.
To get started, install @walletconnect/react-native-dapp
:
1yarn add @walletconnect/react-native-dapp
If you haven't already, you may also need to install react-native-svg
alongside a persistent storage provider such as @react-native-async-storage/async-storage
:
1yarn add react-native-svg @react-native-async-storage/async-storage
This library is implemented using the React Context API, which is used to help make an instance of a connector
accessible globally throughout your application. This permits you to use a uniform instance within even deeply nested components, and ensures your rendered application is always synchronized against the connector state.
WalletConnectProvider
At the root of your application, you can declare a WalletConnectProvider
which controls access and persistence to a connector instance:
1import * as React from 'react'; 2import WalletConnectProvider from '@walletconnect/react-native-dapp'; 3import AsyncStorage from '@react-native-async-storage/async-storage'; 4 5export default function App(): JSX.Element { 6 return ( 7 <WalletConnectProvider 8 redirectUrl={Platform.OS === 'web' ? window.location.origin : 'yourappscheme://'} 9 storageOptions= {{ 10 asyncStorage AsyncStorage, 11 }}> 12 <>{/* awesome app here */}</> 13 </WalletConnectProvider> 14 ); 15}
Above, we pass the WalletConnectProvider
two required parameters; redirectUrl
and storageOptions
:
redirectUrl
is used to help control navigation between external wallets and your application. On the web
, you only need to specify a valid application route; whereas on mobile platforms, you must specify a deep link URI scheme.storageOptions
prop allows you to specify the storage engine which must be used to persist session data.
@react-native-async-storage/async-storage
, this can be which engine you please, provided it conforms to the IAsyncStorage
generic storage interface declaration.Notably, the WalletConnectProvider
optionally accepts WalletConnect
configuration arguments as defined by the IWalletConnectOptions
interface:
1import * as React from 'react'; 2import WalletConnectProvider from '@walletconnect/react-native-dapp'; 3import AsyncStorage from '@react-native-async-storage/async-storage'; 4 5export default function App(): JSX.Element { 6 return ( 7 <WalletConnectProvider 8 bridge="https://bridge.walletconnect.org" 9 clientMeta={{ 10 description: 'Connect with WalletConnect', 11 url: 'https://walletconnect.org', 12 icons: ['https://walletconnect.org/walletconnect-logo.png'], 13 name: 'WalletConnect', 14 }} 15 redirectUrl={Platform.OS === 'web' ? window.location.origin : 'yourappscheme://'} 16 storageOptions= {{ 17 asyncStorage AsyncStorage, 18 }}> 19 <>{/* awesome app here */}</> 20 </WalletConnectProvider> 21 ); 22}
In the snippet above, aside from the required props, we can see the default configuration of the WalletConnectProvider
.
Tip: Your custom options are merged deeply against this default configuration. Therefore it's possible to override individual nested properties without being required to define all of them.
withWalletConnect
Alternatively to manually using the WalletConnectProvider
, you can use the withWalletConnect
higher order component which will wrap your root application in a WalletConnectProvider
for you:
1import * as React from 'react'; 2import { withWalletConnect, useWalletConnect } from '@walletconnect/react-native-dapp'; 3import AsyncStorage from '@react-native-async-storage/async-storage'; 4 5function App(): JSX.Element { 6 const connector = useWalletConnect(); // valid 7 return <>{/* awesome app here */}</>; 8} 9 10export default withWalletConnect(App, { 11 clientMeta: { 12 description: 'Connect with WalletConnect', 13 }, 14 redirectUrl: Platform.OS === 'web' ? window.location.origin : 'yourappscheme://', 15 storageOptions: { 16 asyncStorage: AsyncStorage, 17 }, 18});
This is almost identical in functionality to the manual implementation of a WalletConnectProvider
, with the key difference that we're able to make a call to useWalletConnect
directly from the App
component. By contrast, in the previous example only child components of the WalletConnectProvider
may be able to invoke this hook.
useWalletConnect
The useWalletConnect
hook provides access to a WalletConnect
connector
instance which is accessible on Android, iOS and the Web. This conforms to the original specification:
1import AsyncStorage from '@react-native-async-storage/async-storage'; 2import { useWalletConnect, withWalletConnect } from '@walletconnect/react-native-dapp'; 3import * as React from 'react'; 4 5function App(): JSX.Element { 6 const connector = useWalletConnect(); 7 if (!connector.connected) { 8 /** 9 * Connect! 🎉 10 */ 11 return <Button title="Connect" onPress={() => connector.connect())} />; 12 } 13 return <Button title="Kill Session" onPress={() => connector.killSession()} />; 14} 15 16export default withWalletConnect(App, { 17 redirectUrl: Platform.OS === 'web' ? window.location.origin : 'yourappscheme://', 18 storageOptions: { 19 asyncStorage AsyncStorage, 20 }, 21});
@walletconnect/react-native-dapp
also permits you to customize the presentation of the QrcodeModal
. This is achieved by passing the Render Callback prop, renderQrcodeModal
, to our calls to withWalletConnect
or instances of WalletConnectProvider
.
For example, you could choose to render a wallet selection using a BottomSheet
opposed to a Modal
:
1import AsyncStorage from '@react-native-async-storage/async-storage'; 2import BottomSheet from 'react-native-reanimated-bottom-sheet'; 3import { Image, Text, TouchableOpacity } from 'react-native'; 4import { 5 useWalletConnect, 6 withWalletConnect, 7 RenderQrcodeModalProps, 8 WalletService, 9} from '@walletconnect/react-native-dapp'; 10import * as React from 'react'; 11 12function CustomBottomSheet({ 13 walletServices, 14 visible, 15 connectToWalletService, 16 uri, 17}: RenderQrcodeModalProps): JSX.Element { 18 const renderContent = React.useCallback(() => { 19 return walletServices.map((walletService: WalletService, i: number) => ( 20 <TouchableOpacity key={`i${i}`} onPress={() => connectToWalletService(walletService, uri)}> 21 <Image source={{ uri: walletService.logo }} /> 22 <Text>{walletService.name}</Text> 23 </TouchableOpacity> 24 )); 25 }, [walletServices, uri]); 26 return <BottomSheet renderContent={renderContent} {...etc} />; 27}; 28 29function App(): JSX.Element { 30 const connector = useWalletConnect(); 31 return <>{/* awesome custom app here */}</>; 32} 33 34export default withWalletConnect(App, { 35 redirectUrl: Platform.OS === 'web' ? window.location.origin : 'yourappscheme://', 36 storageOptions: { 37 asyncStorage AsyncStorage, 38 }, 39 renderQrcodeModal: (props: RenderQrcodeModalProps): JSX.Element => ( 40 <CustomBottomSheet {...props} /> 41 ), 42});
No vulnerabilities found.
Reason
30 commit(s) out of 30 and 9 issue activity out of 30 found in the last 90 days -- score normalized to 10
Reason
all last 30 commits are reviewed through GitHub
Reason
no vulnerabilities detected
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
update tool detected
Details
Reason
publishing workflow detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 5
Details
Reason
no badge detected
Reason
non read-only tokens detected in GitHub workflows
Details
Reason
0 out of 5 artifacts are signed or have provenance
Details
Reason
security policy file not detected
Reason
project is not fuzzed
Score
Last Scanned on 2022-08-15
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More