Integrate Web3Auth with the Mint Blockchain in Flutter
While using the Web3Auth Flutter SDK, you get the private key within the user scope after successful authorization. This private key can be used to retrieve the user's address, and interact with Mint Blockchain to make any blockchain calls. We have highlighted a few here for getting you started quickly on that.
Prerequisites
This doc assumes you have already setup your project in Web3Auth Dashboard, and have integrated Web3Auth in your Flutter app. If you haven't done that yet, you can learn how to integrate Web3Auth in your Flutter app.
Installation
To interact with the Ethereum compatible blockchains in Flutter, you can use any
EIP1193
compatible package. Here, we're using
web3dart to demonstrate how to make blockchain calls using it
with Web3Auth.
To install the web3dart
package, you have two options. You can either manually add the package in
the pubspec.yaml
file, or you can use the flutter pub add
command.
- Console
- Pubspec
Add web3dart
using flutter pub add
command.
flutter pub add web3dart
Add web3dart
as a dependency to your pubspec.yaml
.
dependencies:
web3dart: ^2.7.3