Skip to main content

Installation

Install the WalletConnect NotifyClient package.

yarn add @walletconnect/notify-client @walletconnect/react-native-compat

You will need to polyfill crypto depending on your environment. See instructions below.

yarn add expo-crypto
  1. Create a file called expo-crypto-shim.js at the root of your project
  2. Go to expo-crypto-shim.jsand paste the following snippet into it.
import { digest } from 'expo-crypto'

// eslint-disable-next-line no-undef
const webCrypto = typeof crypto !== 'undefined' ? crypto : new Crypto()
webCrypto.subtle = {
digest: (algo, data) => {
const buf = Buffer.from(data)
return digest(algo, buf)
}
}
;(() => {
if (typeof crypto === 'undefined') {
Object.defineProperty(window, 'crypto', {
configurable: true,
enumerable: true,
get: () => webCrypto
})
}
})()
  1. Then head over your index.js file at the root of your project and add the following imports.
import '@walletconnect/react-native-compat'
import './expo-crypto-shim.js'

Next Steps

Now that you've installed WalletConnect Notify, you're ready to start integrating it. The next section will walk you through the process of setting up your project to use the Notify API.