This content provides detailed instructions on integrating the Sequence Embedded Wallet SDK with React Native for complete wallet and indexer integration.
The Sequence Embedded Wallet SDK can be used with React Native for complete Sequence Embedded Wallet and Indexer integration.
You can see a full example of how to use the SDK or download the template in the Embedded Wallet React Native Demo repository.
Follow this guide to get your project access key and other credentials/keys: https://docs.sequence.xyz/solutions/builder/embedded-wallet/
Using Expo, you can set GIDClientID in ios > infoPlist in the app.json file.
Manually, you can set GIDClientID in the Info.plist file for Google sign in.
Using Expo, you can set the intent-filter in android > intentFilters in the app.json file.
Manually, you can set the intent-filter in the AndroidManifest.xml file for Google sign in.
Setup shims for ethers and other crypto related packages
First, let’s check contents of cryptoSetup.ts for the set up of the shims and registering pbkdf2
for ethers
from react-native-quick-crypto
below:
Then make sure to import cryptoSetup.ts
as early in the app lifecycle as you can. In this demo these are imported and set at the top in App.tsx.
Secondly, we need to set aliases for some shims, in babel.config.js
with help of the babel-plugin-module-resolver
dev dependency. See babel.config.js for the code snippet to update the aliases.
Initialize Sequence WaaS
(Check waasSetup.ts file for more details)
Signing in
Once you have an initialized Sequence WaaS instance, you can use it to sign in with email, Google or Apple. See the google code snippet below for an example, and check the App.tsx file for more details.
Wallet operations
Once signed in, you can use the sequenceWaas
instance to perform wallet operations like sending transactions, signing messages, etc. See the google code snippet below for an example, and check the App.tsx file for more details.
Migration notes for Ethers v6 update
react-native-quick-crypto-ethers-patch.js
and related configuration is no longer needed since ethers v6 allows us to register the pbkdf2 function directly from the react-native-quick-crypto
package. (See cryptoSetup.ts for the related code.)ethers
ethersproject/shims
expo
react-native-quick-crypto
react-native-mmkv
react-native-keychain
babel-plugin-module-resolver (as dev dependency)
This content provides detailed instructions on integrating the Sequence Embedded Wallet SDK with React Native for complete wallet and indexer integration.
The Sequence Embedded Wallet SDK can be used with React Native for complete Sequence Embedded Wallet and Indexer integration.
You can see a full example of how to use the SDK or download the template in the Embedded Wallet React Native Demo repository.
Follow this guide to get your project access key and other credentials/keys: https://docs.sequence.xyz/solutions/builder/embedded-wallet/
Using Expo, you can set GIDClientID in ios > infoPlist in the app.json file.
Manually, you can set GIDClientID in the Info.plist file for Google sign in.
Using Expo, you can set the intent-filter in android > intentFilters in the app.json file.
Manually, you can set the intent-filter in the AndroidManifest.xml file for Google sign in.
Setup shims for ethers and other crypto related packages
First, let’s check contents of cryptoSetup.ts for the set up of the shims and registering pbkdf2
for ethers
from react-native-quick-crypto
below:
Then make sure to import cryptoSetup.ts
as early in the app lifecycle as you can. In this demo these are imported and set at the top in App.tsx.
Secondly, we need to set aliases for some shims, in babel.config.js
with help of the babel-plugin-module-resolver
dev dependency. See babel.config.js for the code snippet to update the aliases.
Initialize Sequence WaaS
(Check waasSetup.ts file for more details)
Signing in
Once you have an initialized Sequence WaaS instance, you can use it to sign in with email, Google or Apple. See the google code snippet below for an example, and check the App.tsx file for more details.
Wallet operations
Once signed in, you can use the sequenceWaas
instance to perform wallet operations like sending transactions, signing messages, etc. See the google code snippet below for an example, and check the App.tsx file for more details.
Migration notes for Ethers v6 update
react-native-quick-crypto-ethers-patch.js
and related configuration is no longer needed since ethers v6 allows us to register the pbkdf2 function directly from the react-native-quick-crypto
package. (See cryptoSetup.ts for the related code.)ethers
ethersproject/shims
expo
react-native-quick-crypto
react-native-mmkv
react-native-keychain
babel-plugin-module-resolver (as dev dependency)