├── ios ├── Assets │ └── .gitkeep ├── Classes │ ├── WalletConnectV2Plugin.h │ ├── WalletConnectV2Plugin.m │ └── SwiftWalletConnectV2Plugin.swift ├── .gitignore └── wallet_connect_v2.podspec ├── android ├── settings.gradle ├── .gitignore ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── avacus │ │ └── wallet_connect_v2 │ │ └── WalletConnectV2Plugin.kt └── build.gradle ├── example ├── ios │ ├── Runner │ │ ├── Runner-Bridging-Header.h │ │ ├── Assets.xcassets │ │ │ ├── LaunchImage.imageset │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ ├── README.md │ │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ └── Contents.json │ │ ├── AppDelegate.swift │ │ ├── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ │ └── Info.plist │ ├── Flutter │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── AppFrameworkInfo.plist │ ├── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── xcshareddata │ │ │ └── xcschemes │ │ │ │ └── Runner.xcscheme │ │ └── project.pbxproj │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── .gitignore │ ├── Podfile │ └── Podfile.lock ├── android │ ├── gradle.properties │ ├── app │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── drawable │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── drawable-v21 │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ ├── values │ │ │ │ │ │ └── styles.xml │ │ │ │ │ └── values-night │ │ │ │ │ │ └── styles.xml │ │ │ │ ├── kotlin │ │ │ │ │ └── com │ │ │ │ │ │ └── avacus │ │ │ │ │ │ └── wallet_connect_v2_example │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ ├── proguard-rules.pro │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── .gitignore │ ├── settings.gradle │ └── build.gradle ├── README.md ├── .gitignore ├── test │ └── widget_test.dart ├── analysis_options.yaml ├── pubspec.yaml └── pubspec.lock ├── lib ├── src │ └── model │ │ ├── connection_status.dart │ │ ├── session_delete.dart │ │ ├── session_update.dart │ │ ├── session_rejection.dart │ │ ├── extension.dart │ │ ├── session_approval.dart │ │ ├── request.dart │ │ ├── session_delete.g.dart │ │ ├── session_update.g.dart │ │ ├── session_rejection.g.dart │ │ ├── proposal_namespace.dart │ │ ├── app_metadata.dart │ │ ├── session_namespace.dart │ │ ├── session_response.dart │ │ ├── request.g.dart │ │ ├── session_response.g.dart │ │ ├── session_proposal.dart │ │ ├── session_approval.g.dart │ │ ├── extension.g.dart │ │ ├── session_request.dart │ │ ├── session.dart │ │ ├── app_metadata.g.dart │ │ ├── session_request.g.dart │ │ ├── session.g.dart │ │ ├── proposal_namespace.g.dart │ │ ├── session_namespace.g.dart │ │ └── session_proposal.g.dart ├── wallet_connect_v2_platform_interface.dart ├── wallet_connect_v2_method_channel.dart └── wallet_connect_v2.dart ├── analysis_options.yaml ├── .gitignore ├── test ├── wallet_connect_v2_method_channel_test.dart └── wallet_connect_v2_test.dart ├── LICENSE ├── .metadata ├── CHANGELOG.md ├── pubspec.yaml └── README.md /ios/Assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'wallet_connect_v2' 2 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /lib/src/model/connection_status.dart: -------------------------------------------------------------------------------- 1 | class ConnectionStatus { 2 | bool isConnected; 3 | 4 | ConnectionStatus(this.isConnected); 5 | } 6 | -------------------------------------------------------------------------------- /ios/Classes/WalletConnectV2Plugin.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface WalletConnectV2Plugin : NSObject 4 | @end 5 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .cxx 10 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | # Additional information about this file can be found at 4 | # https://dart.dev/guides/language/analysis-options 5 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wakumo/flutter-wallet-connect-v2/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/kotlin/com/avacus/wallet_connect_v2_example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.avacus.wallet_connect_v2_example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/src/model/session_delete.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'session_delete.g.dart'; 4 | 5 | @JsonSerializable(explicitToJson: true) 6 | class SessionDelete { 7 | final String topic; 8 | 9 | SessionDelete(this.topic); 10 | 11 | factory SessionDelete.fromJson(Map json) => 12 | _$SessionDeleteFromJson(json); 13 | 14 | Map toJson() => _$SessionDeleteToJson(this); 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/model/session_update.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'session_update.g.dart'; 4 | 5 | @JsonSerializable(explicitToJson: true) 6 | class SessionUpdate { 7 | final String topic; 8 | 9 | SessionUpdate(this.topic); 10 | 11 | factory SessionUpdate.fromJson(Map json) => 12 | _$SessionUpdateFromJson(json); 13 | 14 | Map toJson() => _$SessionUpdateToJson(this); 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/model/session_rejection.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'session_rejection.g.dart'; 4 | 5 | @JsonSerializable(explicitToJson: true) 6 | class SessionRejection { 7 | final String topic; 8 | 9 | SessionRejection(this.topic); 10 | 11 | factory SessionRejection.fromJson(Map json) => 12 | _$SessionRejectionFromJson(json); 13 | 14 | Map toJson() => _$SessionRejectionToJson(this); 15 | } 16 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | -keep class com.walletconnect.android.** { *; } 2 | -keep interface com.walletconnect.** { *; } 3 | -keep class kotlinx.coroutines.** { *; } 4 | -keepnames class com.walletconnect.** { *; } 5 | -keepnames interface com.walletconnect.** { *; } 6 | 7 | -dontwarn kotlinx.coroutines.** 8 | -dontwarn org.conscrypt.** 9 | -dontwarn org.bouncycastle.** 10 | -dontwarn org.openjsse.** 11 | -dontwarn okhttp3.internal.platform.** 12 | 13 | -repackageclasses 'com.walletconnect' 14 | -allowaccessmodification 15 | -keeppackagenames doNotKeepAThing -------------------------------------------------------------------------------- /lib/src/model/extension.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'extension.g.dart'; 4 | 5 | @JsonSerializable(explicitToJson: true) 6 | class Extension { 7 | final List chains; 8 | final List methods; 9 | final List events; 10 | 11 | Extension( 12 | {required this.chains, required this.methods, required this.events}); 13 | 14 | factory Extension.fromJson(Map json) => 15 | _$ExtensionFromJson(json); 16 | 17 | Map toJson() => _$ExtensionToJson(this); 18 | } 19 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | /Flutter/ephemeral/ 38 | /Flutter/flutter_export_environment.sh -------------------------------------------------------------------------------- /lib/src/model/session_approval.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | import 'session_namespace.dart'; 4 | 5 | part 'session_approval.g.dart'; 6 | 7 | @JsonSerializable(explicitToJson: true) 8 | class SessionApproval { 9 | final String id; 10 | final Map namespaces; 11 | 12 | SessionApproval({required this.id, required this.namespaces}); 13 | 14 | factory SessionApproval.fromJson(Map json) => 15 | _$SessionApprovalFromJson(json); 16 | 17 | Map toJson() => _$SessionApprovalToJson(this); 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/model/request.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'request.g.dart'; 4 | 5 | @JsonSerializable(explicitToJson: true) 6 | class Request { 7 | final String method; 8 | final String chainId; 9 | final String topic; 10 | final dynamic params; 11 | 12 | Request( 13 | {required this.method, 14 | required this.chainId, 15 | required this.topic, 16 | required this.params}); 17 | 18 | factory Request.fromJson(Map json) => 19 | _$RequestFromJson(json); 20 | 21 | Map toJson() => _$RequestToJson(this); 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/model/session_delete.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'session_delete.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SessionDelete _$SessionDeleteFromJson(Map json) => 10 | SessionDelete( 11 | json['topic'] as String, 12 | ); 13 | 14 | Map _$SessionDeleteToJson(SessionDelete instance) => 15 | { 16 | 'topic': instance.topic, 17 | }; 18 | -------------------------------------------------------------------------------- /lib/src/model/session_update.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'session_update.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SessionUpdate _$SessionUpdateFromJson(Map json) => 10 | SessionUpdate( 11 | json['topic'] as String, 12 | ); 13 | 14 | Map _$SessionUpdateToJson(SessionUpdate instance) => 15 | { 16 | 'topic': instance.topic, 17 | }; 18 | -------------------------------------------------------------------------------- /lib/src/model/session_rejection.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'session_rejection.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SessionRejection _$SessionRejectionFromJson(Map json) => 10 | SessionRejection( 11 | json['topic'] as String, 12 | ); 13 | 14 | Map _$SessionRejectionToJson(SessionRejection instance) => 15 | { 16 | 'topic': instance.topic, 17 | }; 18 | -------------------------------------------------------------------------------- /lib/src/model/proposal_namespace.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'proposal_namespace.g.dart'; 4 | 5 | @JsonSerializable(explicitToJson: true) 6 | class ProposalNamespace { 7 | @JsonKey(includeIfNull: false) 8 | final List? chains; 9 | final List methods; 10 | final List events; 11 | 12 | ProposalNamespace({this.chains, required this.methods, required this.events}); 13 | 14 | factory ProposalNamespace.fromJson(Map json) => 15 | _$ProposalNamespaceFromJson(json); 16 | 17 | Map toJson() => _$ProposalNamespaceToJson(this); 18 | } 19 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # wallet_connect_v2_example 2 | 3 | Demonstrates how to use the wallet_connect_v2 plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) 13 | 14 | For help getting started with Flutter development, view the 15 | [online documentation](https://docs.flutter.dev/), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 26 | /pubspec.lock 27 | **/doc/api/ 28 | .dart_tool/ 29 | .packages 30 | build/ 31 | -------------------------------------------------------------------------------- /ios/Classes/WalletConnectV2Plugin.m: -------------------------------------------------------------------------------- 1 | #import "WalletConnectV2Plugin.h" 2 | #if __has_include() 3 | #import 4 | #else 5 | // Support project import fallback if the generated compatibility header 6 | // is not copied when this plugin is created as a library. 7 | // https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 8 | #import "wallet_connect_v2-Swift.h" 9 | #endif 10 | 11 | @implementation WalletConnectV2Plugin 12 | + (void)registerWithRegistrar:(NSObject*)registrar { 13 | [SwiftWalletConnectV2Plugin registerWithRegistrar:registrar]; 14 | } 15 | @end 16 | -------------------------------------------------------------------------------- /lib/src/model/app_metadata.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'app_metadata.g.dart'; 4 | 5 | @JsonSerializable(explicitToJson: true) 6 | class AppMetadata { 7 | final String name; 8 | final String url; 9 | final String description; 10 | final List icons; 11 | final String? redirect; 12 | 13 | AppMetadata( 14 | {required this.name, 15 | required this.url, 16 | required this.description, 17 | required this.icons, 18 | this.redirect}); 19 | 20 | factory AppMetadata.fromJson(Map json) => 21 | _$AppMetadataFromJson(json); 22 | 23 | Map toJson() => _$AppMetadataToJson(this); 24 | } 25 | -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /lib/src/model/session_namespace.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'session_namespace.g.dart'; 4 | 5 | @JsonSerializable(explicitToJson: true) 6 | class SessionNamespace { 7 | @JsonKey(includeIfNull: false) 8 | final List? chains; 9 | final List accounts; 10 | final List methods; 11 | final List events; 12 | 13 | SessionNamespace( 14 | {required this.accounts, 15 | required this.methods, 16 | required this.events, 17 | this.chains}); 18 | 19 | factory SessionNamespace.fromJson(Map json) => 20 | _$SessionNamespaceFromJson(json); 21 | 22 | Map toJson() => _$SessionNamespaceToJson(this); 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/model/session_response.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | part 'session_response.g.dart'; 6 | 7 | @JsonSerializable(explicitToJson: true) 8 | class SessionResponse { 9 | final String id; 10 | final String topic; 11 | 12 | @JsonKey(fromJson: fromResultsJson) 13 | dynamic results; 14 | 15 | SessionResponse({required this.id, required this.topic, this.results}); 16 | 17 | factory SessionResponse.fromJson(Map json) => 18 | _$SessionResponseFromJson(json); 19 | 20 | Map toJson() => _$SessionResponseToJson(this); 21 | 22 | static dynamic fromResultsJson(String json) { 23 | return jsonDecode(json); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.8.0' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.4.1' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | maven { url "https://jitpack.io" } 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | 30 | task clean(type: Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /lib/src/model/request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Request _$RequestFromJson(Map json) => Request( 10 | method: json['method'] as String, 11 | chainId: json['chainId'] as String, 12 | topic: json['topic'] as String, 13 | params: json['params'], 14 | ); 15 | 16 | Map _$RequestToJson(Request instance) => { 17 | 'method': instance.method, 18 | 'chainId': instance.chainId, 19 | 'topic': instance.topic, 20 | 'params': instance.params, 21 | }; 22 | -------------------------------------------------------------------------------- /lib/src/model/session_response.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'session_response.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SessionResponse _$SessionResponseFromJson(Map json) => 10 | SessionResponse( 11 | id: json['id'] as String, 12 | topic: json['topic'] as String, 13 | results: SessionResponse.fromResultsJson(json['results'] as String), 14 | ); 15 | 16 | Map _$SessionResponseToJson(SessionResponse instance) => 17 | { 18 | 'id': instance.id, 19 | 'topic': instance.topic, 20 | 'results': instance.results, 21 | }; 22 | -------------------------------------------------------------------------------- /lib/src/model/session_proposal.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | import 'app_metadata.dart'; 4 | import 'proposal_namespace.dart'; 5 | 6 | part 'session_proposal.g.dart'; 7 | 8 | @JsonSerializable(explicitToJson: true) 9 | class SessionProposal { 10 | final String id; 11 | final AppMetadata proposer; 12 | final Map? namespaces; 13 | @JsonKey(includeIfNull: false) 14 | final Map? optionalNamespaces; 15 | 16 | SessionProposal( 17 | {required this.id, 18 | required this.proposer, 19 | required this.namespaces, 20 | this.optionalNamespaces}); 21 | 22 | factory SessionProposal.fromJson(Map json) => 23 | _$SessionProposalFromJson(json); 24 | 25 | Map toJson() => _$SessionProposalToJson(this); 26 | } 27 | -------------------------------------------------------------------------------- /test/wallet_connect_v2_method_channel_test.dart: -------------------------------------------------------------------------------- 1 | // import 'package:flutter/services.dart'; 2 | // import 'package:flutter_test/flutter_test.dart'; 3 | // import 'package:wallet_connect_v2/wallet_connect_v2_method_channel.dart'; 4 | // 5 | // void main() { 6 | // MethodChannelWalletConnectV2 platform = MethodChannelWalletConnectV2(); 7 | // const MethodChannel channel = MethodChannel('wallet_connect_v2'); 8 | // 9 | // TestWidgetsFlutterBinding.ensureInitialized(); 10 | // 11 | // setUp(() { 12 | // channel.setMockMethodCallHandler((MethodCall methodCall) async { 13 | // return '42'; 14 | // }); 15 | // }); 16 | // 17 | // tearDown(() { 18 | // channel.setMockMethodCallHandler(null); 19 | // }); 20 | // 21 | // test('getPlatformVersion', () async { 22 | // expect(await platform.getPlatformVersion(), '42'); 23 | // }); 24 | // } 25 | -------------------------------------------------------------------------------- /lib/src/model/session_approval.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'session_approval.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SessionApproval _$SessionApprovalFromJson(Map json) => 10 | SessionApproval( 11 | id: json['id'] as String, 12 | namespaces: (json['namespaces'] as Map).map( 13 | (k, e) => 14 | MapEntry(k, SessionNamespace.fromJson(e as Map)), 15 | ), 16 | ); 17 | 18 | Map _$SessionApprovalToJson(SessionApproval instance) => 19 | { 20 | 'id': instance.id, 21 | 'namespaces': instance.namespaces.map((k, e) => MapEntry(k, e.toJson())), 22 | }; 23 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | -------------------------------------------------------------------------------- /lib/src/model/extension.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'extension.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Extension _$ExtensionFromJson(Map json) => Extension( 10 | chains: 11 | (json['chains'] as List).map((e) => e as String).toList(), 12 | methods: 13 | (json['methods'] as List).map((e) => e as String).toList(), 14 | events: 15 | (json['events'] as List).map((e) => e as String).toList(), 16 | ); 17 | 18 | Map _$ExtensionToJson(Extension instance) => { 19 | 'chains': instance.chains, 20 | 'methods': instance.methods, 21 | 'events': instance.events, 22 | }; 23 | -------------------------------------------------------------------------------- /lib/src/model/session_request.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:json_annotation/json_annotation.dart'; 4 | 5 | part 'session_request.g.dart'; 6 | 7 | @JsonSerializable(explicitToJson: true) 8 | class SessionRequest { 9 | final String id; 10 | final String method; 11 | final String? chainId; 12 | final String topic; 13 | 14 | @JsonKey(fromJson: fromParamsJson) 15 | final List params; 16 | 17 | SessionRequest( 18 | {required this.id, 19 | required this.method, 20 | this.chainId, 21 | required this.topic, 22 | required this.params}); 23 | 24 | factory SessionRequest.fromJson(Map json) => 25 | _$SessionRequestFromJson(json); 26 | 27 | Map toJson() => _$SessionRequestToJson(this); 28 | 29 | static List fromParamsJson(String json) { 30 | return jsonDecode(json) as List; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/src/model/session.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | import 'app_metadata.dart'; 4 | import 'session_namespace.dart'; 5 | 6 | part 'session.g.dart'; 7 | 8 | @JsonSerializable(explicitToJson: true) 9 | class Session { 10 | final String topic; 11 | final AppMetadata peer; 12 | 13 | @JsonKey(fromJson: fromExpirationJson) 14 | final DateTime expiration; 15 | 16 | final Map namespaces; 17 | 18 | Session( 19 | {required this.topic, 20 | required this.peer, 21 | required this.expiration, 22 | required this.namespaces}); 23 | 24 | factory Session.fromJson(Map json) => 25 | _$SessionFromJson(json); 26 | 27 | Map toJson() => _$SessionToJson(this); 28 | 29 | static DateTime fromExpirationJson(String timestampInISO8601) { 30 | return DateTime.parse(timestampInISO8601).toLocal(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/src/model/app_metadata.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'app_metadata.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | AppMetadata _$AppMetadataFromJson(Map json) => AppMetadata( 10 | name: json['name'] as String, 11 | url: json['url'] as String, 12 | description: json['description'] as String, 13 | icons: (json['icons'] as List).map((e) => e as String).toList(), 14 | redirect: json['redirect'] as String?, 15 | ); 16 | 17 | Map _$AppMetadataToJson(AppMetadata instance) => 18 | { 19 | 'name': instance.name, 20 | 'url': instance.url, 21 | 'description': instance.description, 22 | 'icons': instance.icons, 23 | 'redirect': instance.redirect, 24 | }; 25 | -------------------------------------------------------------------------------- /lib/src/model/session_request.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'session_request.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SessionRequest _$SessionRequestFromJson(Map json) => 10 | SessionRequest( 11 | id: json['id'] as String, 12 | method: json['method'] as String, 13 | chainId: json['chainId'] as String?, 14 | topic: json['topic'] as String, 15 | params: SessionRequest.fromParamsJson(json['params'] as String), 16 | ); 17 | 18 | Map _$SessionRequestToJson(SessionRequest instance) => 19 | { 20 | 'id': instance.id, 21 | 'method': instance.method, 22 | 'chainId': instance.chainId, 23 | 'topic': instance.topic, 24 | 'params': instance.params, 25 | }; 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2023 Wakumo Vietnam 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:wallet_connect_v2_example/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Verify Platform version', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const HomeView()); 17 | 18 | // Verify that platform version is retrieved. 19 | expect( 20 | find.byWidgetPredicate( 21 | (Widget widget) => widget is Text && 22 | widget.data!.startsWith('Running on:'), 23 | ), 24 | findsOneWidget, 25 | ); 26 | }); 27 | } 28 | -------------------------------------------------------------------------------- /ios/wallet_connect_v2.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. 3 | # Run `pod lib lint wallet_connect_v2.podspec` to validate before publishing. 4 | # 5 | Pod::Spec.new do |s| 6 | s.name = 'wallet_connect_v2' 7 | s.version = '0.0.1' 8 | s.summary = 'Wallet Connect V2 for Flutter' 9 | s.description = <<-DESC 10 | Wallet Connect V2 for Flutter 11 | DESC 12 | s.homepage = 'http://example.com' 13 | s.license = { :file => '../LICENSE' } 14 | s.author = { 'Your Company' => 'email@example.com' } 15 | s.source = { :path => '.' } 16 | s.source_files = 'Classes/**/*' 17 | s.dependency 'Flutter' 18 | s.dependency 'WalletConnectSwiftV2', '1.6.15' 19 | s.dependency 'Starscream', '3.1.1' 20 | s.platform = :ios, '13.0' 21 | 22 | # Flutter.framework does not contain a i386 slice. 23 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } 24 | s.swift_version = '5.0' 25 | end 26 | -------------------------------------------------------------------------------- /lib/src/model/session.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'session.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Session _$SessionFromJson(Map json) => Session( 10 | topic: json['topic'] as String, 11 | peer: AppMetadata.fromJson(json['peer'] as Map), 12 | expiration: Session.fromExpirationJson(json['expiration'] as String), 13 | namespaces: (json['namespaces'] as Map).map( 14 | (k, e) => 15 | MapEntry(k, SessionNamespace.fromJson(e as Map)), 16 | ), 17 | ); 18 | 19 | Map _$SessionToJson(Session instance) => { 20 | 'topic': instance.topic, 21 | 'peer': instance.peer.toJson(), 22 | 'expiration': instance.expiration.toIso8601String(), 23 | 'namespaces': instance.namespaces.map((k, e) => MapEntry(k, e.toJson())), 24 | }; 25 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/src/model/proposal_namespace.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'proposal_namespace.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ProposalNamespace _$ProposalNamespaceFromJson(Map json) => 10 | ProposalNamespace( 11 | chains: 12 | (json['chains'] as List?)?.map((e) => e as String).toList(), 13 | methods: 14 | (json['methods'] as List).map((e) => e as String).toList(), 15 | events: 16 | (json['events'] as List).map((e) => e as String).toList(), 17 | ); 18 | 19 | Map _$ProposalNamespaceToJson(ProposalNamespace instance) { 20 | final val = {}; 21 | 22 | void writeNotNull(String key, dynamic value) { 23 | if (value != null) { 24 | val[key] = value; 25 | } 26 | } 27 | 28 | writeNotNull('chains', instance.chains); 29 | val['methods'] = instance.methods; 30 | val['events'] = instance.events; 31 | return val; 32 | } 33 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: 52b3dc25f6471c27b2144594abb11c741cb88f57 8 | channel: stable 9 | 10 | project_type: plugin 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57 17 | base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57 18 | - platform: android 19 | create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57 20 | base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57 21 | - platform: ios 22 | create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57 23 | base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57 24 | 25 | # User provided section 26 | 27 | # List of Local paths (relative to this file) that should be 28 | # ignored by the migrate tool. 29 | # 30 | # Files that are not part of the templates will be ignored by default. 31 | unmanaged_files: 32 | - 'lib/main.dart' 33 | - 'ios/Runner.xcodeproj/project.pbxproj' 34 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | * Initial plugin package 4 | 5 | ## 0.1.0 6 | 7 | * Initial release to support WalletConnect V2 for Wallet app 8 | 9 | ## 0.1.1 10 | 11 | * Upgrade to the latest SDKs Android Bom 1.4.1, iOS 1.3.0 12 | 13 | ## 1.0.0 14 | 15 | * Official support for DApps by creating Pairing, connect with Wallet, send Request and receive Response 16 | 17 | ## 1.0.1 18 | 19 | * Upgrade to the latest SDKs Android Bom 1.8.0 20 | 21 | ## 1.0.2 22 | 23 | * Add `redirect` field into AppMetadata 24 | 25 | ## 1.0.3 26 | 27 | * Update session request params, add example for sending request 28 | 29 | ## 1.0.4 30 | 31 | * Upgrade to the latest SDKs Android Bom 1.9.3 32 | * Add missing redirect field from session proposal 33 | 34 | ## 1.0.5 35 | 36 | * Upgrade to the latest SDKs Android Bom 1.10.0 37 | 38 | ## 1.0.6 39 | 40 | * Upgrade to the latest SDKs Android Bom 1.13.1, iOS 1.6.12 41 | * Support optional namespaces 42 | 43 | ## 1.0.7 44 | 45 | * Upgrade to the latest SDKs Android Bom 1.15.0, iOS 1.6.15 46 | 47 | ## 1.0.8 48 | 49 | * Upgrade to the latest SDK Android Bom 1.19.1 50 | * Wrap session extend callback to fire session update event to Flutter 51 | 52 | ## 1.0.9 53 | 54 | * Declare namespaces nullable 55 | -------------------------------------------------------------------------------- /lib/src/model/session_namespace.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'session_namespace.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SessionNamespace _$SessionNamespaceFromJson(Map json) => 10 | SessionNamespace( 11 | accounts: 12 | (json['accounts'] as List).map((e) => e as String).toList(), 13 | methods: 14 | (json['methods'] as List).map((e) => e as String).toList(), 15 | events: 16 | (json['events'] as List).map((e) => e as String).toList(), 17 | chains: 18 | (json['chains'] as List?)?.map((e) => e as String).toList(), 19 | ); 20 | 21 | Map _$SessionNamespaceToJson(SessionNamespace instance) { 22 | final val = {}; 23 | 24 | void writeNotNull(String key, dynamic value) { 25 | if (value != null) { 26 | val[key] = value; 27 | } 28 | } 29 | 30 | writeNotNull('chains', instance.chains); 31 | val['accounts'] = instance.accounts; 32 | val['methods'] = instance.methods; 33 | val['events'] = instance.events; 34 | return val; 35 | } 36 | -------------------------------------------------------------------------------- /test/wallet_connect_v2_test.dart: -------------------------------------------------------------------------------- 1 | // import 'package:flutter_test/flutter_test.dart'; 2 | // import 'package:wallet_connect_v2/wallet_connect_v2.dart'; 3 | // import 'package:wallet_connect_v2/wallet_connect_v2_platform_interface.dart'; 4 | // import 'package:wallet_connect_v2/wallet_connect_v2_method_channel.dart'; 5 | // import 'package:plugin_platform_interface/plugin_platform_interface.dart'; 6 | // 7 | // class MockWalletConnectV2Platform 8 | // with MockPlatformInterfaceMixin 9 | // implements WalletConnectV2Platform { 10 | // 11 | // @override 12 | // Future getPlatformVersion() => Future.value('42'); 13 | // } 14 | // 15 | // void main() { 16 | // final WalletConnectV2Platform initialPlatform = WalletConnectV2Platform.instance; 17 | // 18 | // test('$MethodChannelWalletConnectV2 is the default instance', () { 19 | // expect(initialPlatform, isInstanceOf()); 20 | // }); 21 | // 22 | // test('getPlatformVersion', () async { 23 | // WalletConnectV2 walletConnectV2Plugin = WalletConnectV2(); 24 | // MockWalletConnectV2Platform fakePlatform = MockWalletConnectV2Platform(); 25 | // WalletConnectV2Platform.instance = fakePlatform; 26 | // 27 | // expect(await walletConnectV2Plugin.getPlatformVersion(), '42'); 28 | // }); 29 | // } 30 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | group 'com.avacus.wallet_connect_v2' 2 | version '1.0-SNAPSHOT' 3 | 4 | buildscript { 5 | ext.kotlin_version = '1.8.0' 6 | repositories { 7 | google() 8 | mavenCentral() 9 | } 10 | 11 | dependencies { 12 | classpath 'com.android.tools.build:gradle:7.1.2' 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | } 22 | } 23 | 24 | apply plugin: 'com.android.library' 25 | apply plugin: 'kotlin-android' 26 | apply plugin: 'kotlin-kapt' 27 | 28 | android { 29 | compileSdkVersion 31 30 | 31 | compileOptions { 32 | sourceCompatibility JavaVersion.VERSION_11 33 | targetCompatibility JavaVersion.VERSION_11 34 | } 35 | 36 | kotlinOptions { 37 | jvmTarget = JavaVersion.VERSION_11 38 | } 39 | 40 | sourceSets { 41 | main.java.srcDirs += 'src/main/kotlin' 42 | } 43 | 44 | defaultConfig { 45 | minSdkVersion 23 46 | } 47 | 48 | dependencies { 49 | implementation 'com.google.code.gson:gson:2.10' 50 | implementation(platform("com.walletconnect:android-bom:1.19.1")) 51 | implementation("com.walletconnect:android-core") 52 | implementation("com.walletconnect:sign") 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '13.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /lib/src/model/session_proposal.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'session_proposal.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | SessionProposal _$SessionProposalFromJson(Map json) => 10 | SessionProposal( 11 | id: json['id'] as String, 12 | proposer: AppMetadata.fromJson(json['proposer'] as Map), 13 | namespaces: (json['namespaces'] as Map?)?.map( 14 | (k, e) => 15 | MapEntry(k, ProposalNamespace.fromJson(e as Map)), 16 | ), 17 | optionalNamespaces: 18 | (json['optionalNamespaces'] as Map?)?.map( 19 | (k, e) => 20 | MapEntry(k, ProposalNamespace.fromJson(e as Map)), 21 | ), 22 | ); 23 | 24 | Map _$SessionProposalToJson(SessionProposal instance) { 25 | final val = { 26 | 'id': instance.id, 27 | 'proposer': instance.proposer.toJson(), 28 | 'namespaces': instance.namespaces?.map((k, e) => MapEntry(k, e.toJson())), 29 | }; 30 | 31 | void writeNotNull(String key, dynamic value) { 32 | if (value != null) { 33 | val[key] = value; 34 | } 35 | } 36 | 37 | writeNotNull('optionalNamespaces', 38 | instance.optionalNamespaces?.map((k, e) => MapEntry(k, e.toJson()))); 39 | return val; 40 | } 41 | -------------------------------------------------------------------------------- /example/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 38 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Wallet Connect V2 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | wallet_connect_v2_example 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CFBundleURLTypes 47 | 48 | 49 | CFBundleTypeRole 50 | Editor 51 | CFBundleURLSchemes 52 | 53 | wcexample 54 | 55 | 56 | 57 | CADisableMinimumFrameDurationOnPhone 58 | 59 | UIApplicationSupportsIndirectInputEvents 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: wallet_connect_v2 2 | description: Wallet Connect V2 for Flutter, available for both Wallet and DApp to interact easier 3 | version: 1.0.9 4 | homepage: https://avacus.cc 5 | repository: https://github.com/wakumo/flutter-wallet-connect-v2 6 | 7 | environment: 8 | sdk: '>=2.18.5 <4.0.0' 9 | flutter: ">=2.5.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | plugin_platform_interface: ^2.0.2 15 | json_annotation: ^4.7.0 16 | 17 | dev_dependencies: 18 | flutter_test: 19 | sdk: flutter 20 | flutter_lints: ^2.0.0 21 | build_runner: ^2.3.2 22 | json_serializable: ^6.5.4 23 | 24 | # For information on the generic Dart part of this file, see the 25 | # following page: https://dart.dev/tools/pub/pubspec 26 | 27 | # The following section is specific to Flutter packages. 28 | flutter: 29 | # This section identifies this Flutter project as a plugin project. 30 | # The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.) 31 | # which should be registered in the plugin registry. This is required for 32 | # using method channels. 33 | # The Android 'package' specifies package in which the registered class is. 34 | # This is required for using method channels on Android. 35 | # The 'ffiPlugin' specifies that native code should be built and bundled. 36 | # This is required for using `dart:ffi`. 37 | # All these are used by the tooling to maintain consistency when 38 | # adding or updating assets for this project. 39 | plugin: 40 | platforms: 41 | android: 42 | package: com.avacus.wallet_connect_v2 43 | pluginClass: WalletConnectV2Plugin 44 | ios: 45 | pluginClass: WalletConnectV2Plugin 46 | 47 | # To add assets to your plugin package, add an assets section, like this: 48 | # assets: 49 | # - images/a_dot_burr.jpeg 50 | # - images/a_dot_ham.jpeg 51 | # 52 | # For details regarding assets in packages, see 53 | # https://flutter.dev/assets-and-images/#from-packages 54 | # 55 | # An image asset can refer to one or more resolution-specific "variants", see 56 | # https://flutter.dev/assets-and-images/#resolution-aware 57 | 58 | # To add custom fonts to your plugin package, add a fonts section here, 59 | # in this "flutter" section. Each entry in this list should have a 60 | # "family" key with the font family name, and a "fonts" key with a 61 | # list giving the asset and other descriptors for the font. For 62 | # example: 63 | # fonts: 64 | # - family: Schyler 65 | # fonts: 66 | # - asset: fonts/Schyler-Regular.ttf 67 | # - asset: fonts/Schyler-Italic.ttf 68 | # style: italic 69 | # - family: Trajan Pro 70 | # fonts: 71 | # - asset: fonts/TrajanPro.ttf 72 | # - asset: fonts/TrajanPro_Bold.ttf 73 | # weight: 700 74 | # 75 | # For details regarding fonts in packages, see 76 | # https://flutter.dev/custom-fonts/#from-packages 77 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply plugin: 'kotlin-kapt' 27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 28 | 29 | android { 30 | compileSdkVersion flutter.compileSdkVersion 31 | ndkVersion flutter.ndkVersion 32 | 33 | compileOptions { 34 | sourceCompatibility JavaVersion.VERSION_11 35 | targetCompatibility JavaVersion.VERSION_11 36 | } 37 | 38 | kotlinOptions { 39 | jvmTarget = JavaVersion.VERSION_11 40 | } 41 | 42 | sourceSets { 43 | main.java.srcDirs += 'src/main/kotlin' 44 | } 45 | 46 | defaultConfig { 47 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 48 | applicationId "com.avacus.wallet_connect_v2_example" 49 | // You can update the following values to match your application needs. 50 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 51 | minSdkVersion 23 52 | targetSdkVersion flutter.targetSdkVersion 53 | versionCode flutterVersionCode.toInteger() 54 | versionName flutterVersionName 55 | } 56 | 57 | buildTypes { 58 | debug { 59 | // TODO: Add your own signing config for the release build. 60 | // Signing with the debug keys for now, so `flutter run --release` works. 61 | signingConfig signingConfigs.debug 62 | } 63 | release { 64 | // TODO: Add your own signing config for the release build. 65 | // Signing with the debug keys for now, so `flutter run --release` works. 66 | signingConfig signingConfigs.debug 67 | minifyEnabled true 68 | shrinkResources true 69 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 70 | } 71 | } 72 | namespace 'com.avacus.wallet_connect_v2_example' 73 | 74 | packagingOptions { 75 | exclude "META-INF/INDEX.LIST" 76 | exclude "META-INF/DEPENDENCIES" 77 | exclude "META-INF/LICENSE.md" 78 | exclude "META-INF/NOTICE.md" 79 | exclude "META-INF/versions/9/previous-compilation-data.bin" 80 | } 81 | } 82 | 83 | flutter { 84 | source '../..' 85 | } 86 | 87 | dependencies { 88 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 89 | } 90 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # wallet_connect_v2 2 | 3 | WalletConnect V2 for Flutter, available for both Wallet and DApp! 4 | 5 | Fully support at [Avacus](https://avacus.cc), you can experience both Mainnet and Testnet as it supports network customization. 6 | 7 | Feel free to use and don't hesitate to raise issue if there are. 8 | 9 | ## Getting Started 10 | 11 | We make very detail in example so you can follow it for both Wallet and Dapp. 12 | 13 | The connection is kept stable follow app lifecycle. 14 | 15 | Import and create instance 16 | ```dart 17 | import 'package:wallet_connect_v2/wallet_connect_v2.dart'; 18 | 19 | final _client = WalletConnectV2(); 20 | ``` 21 | 22 | Initiate WalletConnect SDK 23 | ```dart 24 | _client.init(projectId: projectId, appMetadata: walletMetadata); 25 | ``` 26 | 27 | Listen needed events from our export 28 | ```dart 29 | // Wallet & DApp, listen to socket connection change 30 | _client.onConnectionStatus = (isConnected) { 31 | // do something, for e.g update UI 32 | } 33 | 34 | // Wallet only, listen to session proposal from DApp 35 | _client.onSessionProposal = (proposal) { 36 | // proposal request, handle to approve or reject 37 | } 38 | 39 | // Wallet & DApp, listen to new session which has been established 40 | _client.onSessionSettle = (session) { 41 | // we have detail information of session 42 | } 43 | 44 | // Wallet & DApp 45 | _client.onSessionUpdate = (topic) { 46 | // the session of topic has been updated 47 | } 48 | 49 | // Wallet & DApp 50 | _client.onSessionDelete = (topic) { 51 | // the session of topic has been deleted 52 | } 53 | 54 | // Wallet & DApp 55 | _client.onSessionRequest = (request) { 56 | // session request, handle to approve or reject 57 | } 58 | 59 | // DApp only, when Wallet reject the proposal 60 | _client.onSessionRejection = (topic) { 61 | // handle rejection here, for e.g hide the uri popup 62 | } 63 | 64 | // DApp only, when Wallet approve and reject session request 65 | _client.onSessionResponse = (topic) { 66 | // handle response here, for e.g update UI 67 | } 68 | ``` 69 | 70 | Connect to listen event, for Wallet & DApp to connect to Relay service 71 | ```dart 72 | _client.connect(); 73 | ``` 74 | 75 | Disconnect, for Wallet & DApp to disconnect with Relay service 76 | ```dart 77 | _client.disconnect(); 78 | ``` 79 | 80 | Pair with DApps for Wallet only 81 | ```dart 82 | _client.pair(uri: uri); 83 | ``` 84 | 85 | Approve session for Wallet only 86 | ```dart 87 | _client.approveSession(approval: approval); 88 | ``` 89 | 90 | Reject session for Wallet only 91 | ```dart 92 | _client.rejectSession(proposalId: proposal.id); 93 | ``` 94 | 95 | Disconnect session for Wallet & DApp 96 | ```dart 97 | _client.disconnectSession(topic: topic); 98 | ``` 99 | 100 | Update session for Wallet & DApp 101 | ```dart 102 | _client.updateSession(approval: updateApproval); 103 | ``` 104 | 105 | Approve request for Wallet only 106 | ```dart 107 | _client.approveRequest(topic: topic, requestId: requestId, result: result); 108 | ``` 109 | 110 | Reject request for Wallet only 111 | ```dart 112 | _client.rejectRequest(topic: topic, requestId: requestId); 113 | ``` 114 | 115 | Create pair for DApp only 116 | ```dart 117 | _client.createPair(namespaces: namespaces); 118 | ``` 119 | 120 | Send request for DApp only 121 | ```dart 122 | _client.sendRequest(request: request); 123 | ``` -------------------------------------------------------------------------------- /lib/wallet_connect_v2_platform_interface.dart: -------------------------------------------------------------------------------- 1 | import 'package:plugin_platform_interface/plugin_platform_interface.dart'; 2 | 3 | import 'src/model/app_metadata.dart'; 4 | import 'src/model/proposal_namespace.dart'; 5 | import 'src/model/request.dart'; 6 | import 'src/model/session.dart'; 7 | import 'src/model/session_approval.dart'; 8 | import 'wallet_connect_v2_method_channel.dart'; 9 | 10 | abstract class WalletConnectV2Platform extends PlatformInterface { 11 | /// Constructs a WalletConnectV2Platform. 12 | WalletConnectV2Platform() : super(token: _token); 13 | 14 | static final Object _token = Object(); 15 | 16 | static WalletConnectV2Platform _instance = MethodChannelWalletConnectV2(); 17 | 18 | /// The default instance of [WalletConnectV2Platform] to use. 19 | /// 20 | /// Defaults to [MethodChannelWalletConnectV2]. 21 | static WalletConnectV2Platform get instance => _instance; 22 | 23 | get onEvent { 24 | throw UnimplementedError('onEvent has not been implemented.'); 25 | } 26 | 27 | /// Platform-specific implementations should set this with their own 28 | /// platform-specific class that extends [WalletConnectV2Platform] when 29 | /// they register themselves. 30 | static set instance(WalletConnectV2Platform instance) { 31 | PlatformInterface.verifyToken(instance, _token); 32 | _instance = instance; 33 | } 34 | 35 | Future init( 36 | {required String projectId, required AppMetadata appMetadata}) { 37 | throw UnimplementedError('init() has not been implemented.'); 38 | } 39 | 40 | Future connect() { 41 | throw UnimplementedError('connect() has not been implemented.'); 42 | } 43 | 44 | Future disconnect() { 45 | throw UnimplementedError('disconnect() has not been implemented.'); 46 | } 47 | 48 | Future pair({required String uri}) { 49 | throw UnimplementedError('pair() has not been implemented.'); 50 | } 51 | 52 | Future approve({required SessionApproval approval}) { 53 | throw UnimplementedError('approve() has not been implemented.'); 54 | } 55 | 56 | Future reject({required String proposalId}) { 57 | throw UnimplementedError('reject() has not been implemented.'); 58 | } 59 | 60 | Future> getActivatedSessions() { 61 | throw UnimplementedError( 62 | 'getActivatedSessions() has not been implemented.'); 63 | } 64 | 65 | Future rejectRequest( 66 | {required String topic, required String requestId}) { 67 | throw UnimplementedError('rejectRequest() has not been implemented.'); 68 | } 69 | 70 | Future approveRequest( 71 | {required String topic, 72 | required String requestId, 73 | required String result}) { 74 | throw UnimplementedError('approveRequest() has not been implemented.'); 75 | } 76 | 77 | Future disconnectSession({required String topic}) { 78 | throw UnimplementedError('disconnectSession() has not been implemented.'); 79 | } 80 | 81 | Future updateSession({required SessionApproval updateApproval}) { 82 | throw UnimplementedError('updateSession() has not been implemented.'); 83 | } 84 | 85 | Future createPair( 86 | {required Map namespaces}) { 87 | throw UnimplementedError('createPair() has not been implemented.'); 88 | } 89 | 90 | Future sendRequest({required Request request}) { 91 | throw UnimplementedError('sendRequest() has not been implemented.'); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - shared_preferences_ios (0.0.1): 4 | - Flutter 5 | - Starscream (3.1.1) 6 | - url_launcher_ios (0.0.1): 7 | - Flutter 8 | - wallet_connect_v2 (0.0.1): 9 | - Flutter 10 | - Starscream (= 3.1.1) 11 | - WalletConnectSwiftV2 (= 1.6.15) 12 | - WalletConnectSwiftV2 (1.6.15): 13 | - WalletConnectSwiftV2/WalletConnect (= 1.6.15) 14 | - WalletConnectSwiftV2/Commons (1.6.15) 15 | - WalletConnectSwiftV2/HTTPClient (1.6.15) 16 | - WalletConnectSwiftV2/JSONRPC (1.6.15): 17 | - WalletConnectSwiftV2/Commons 18 | - WalletConnectSwiftV2/WalletConnect (1.6.15): 19 | - WalletConnectSwiftV2/WalletConnectAuth 20 | - WalletConnectSwiftV2/WalletConnectEcho 21 | - WalletConnectSwiftV2/WalletConnectSign 22 | - WalletConnectSwiftV2/WalletConnectVerify 23 | - WalletConnectSwiftV2/WalletConnectAuth (1.6.15): 24 | - WalletConnectSwiftV2/WalletConnectPairing 25 | - WalletConnectSwiftV2/WalletConnectSigner 26 | - WalletConnectSwiftV2/WalletConnectVerify 27 | - WalletConnectSwiftV2/WalletConnectEcho (1.6.15): 28 | - WalletConnectSwiftV2/WalletConnectJWT 29 | - WalletConnectSwiftV2/WalletConnectNetworking 30 | - WalletConnectSwiftV2/WalletConnectJWT (1.6.15): 31 | - WalletConnectSwiftV2/WalletConnectKMS 32 | - WalletConnectSwiftV2/WalletConnectKMS (1.6.15): 33 | - WalletConnectSwiftV2/WalletConnectUtils 34 | - WalletConnectSwiftV2/WalletConnectNetworking (1.6.15): 35 | - WalletConnectSwiftV2/HTTPClient 36 | - WalletConnectSwiftV2/WalletConnectRelay 37 | - WalletConnectSwiftV2/WalletConnectPairing (1.6.15): 38 | - WalletConnectSwiftV2/WalletConnectNetworking 39 | - WalletConnectSwiftV2/WalletConnectRelay (1.6.15): 40 | - WalletConnectSwiftV2/WalletConnectJWT 41 | - WalletConnectSwiftV2/WalletConnectSign (1.6.15): 42 | - WalletConnectSwiftV2/WalletConnectPairing 43 | - WalletConnectSwiftV2/WalletConnectVerify 44 | - WalletConnectSwiftV2/WalletConnectSigner (1.6.15): 45 | - WalletConnectSwiftV2/WalletConnectNetworking 46 | - WalletConnectSwiftV2/WalletConnectUtils (1.6.15): 47 | - WalletConnectSwiftV2/JSONRPC 48 | - WalletConnectSwiftV2/WalletConnectVerify (1.6.15): 49 | - WalletConnectSwiftV2/WalletConnectNetworking 50 | - WalletConnectSwiftV2/WalletConnectUtils 51 | 52 | DEPENDENCIES: 53 | - Flutter (from `Flutter`) 54 | - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`) 55 | - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) 56 | - wallet_connect_v2 (from `.symlinks/plugins/wallet_connect_v2/ios`) 57 | 58 | SPEC REPOS: 59 | trunk: 60 | - Starscream 61 | - WalletConnectSwiftV2 62 | 63 | EXTERNAL SOURCES: 64 | Flutter: 65 | :path: Flutter 66 | shared_preferences_ios: 67 | :path: ".symlinks/plugins/shared_preferences_ios/ios" 68 | url_launcher_ios: 69 | :path: ".symlinks/plugins/url_launcher_ios/ios" 70 | wallet_connect_v2: 71 | :path: ".symlinks/plugins/wallet_connect_v2/ios" 72 | 73 | SPEC CHECKSUMS: 74 | Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 75 | shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad 76 | Starscream: 4bb2f9942274833f7b4d296a55504dcfc7edb7b0 77 | url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 78 | wallet_connect_v2: 78e20efdb3991c6658034d1b41c397fa65377555 79 | WalletConnectSwiftV2: 1fe475684ebc12eff1c82dfec06c724abd6215e8 80 | 81 | PODFILE CHECKSUM: cc1f88378b4bfcf93a6ce00d2c587857c6008d3b 82 | 83 | COCOAPODS: 1.11.3 84 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: wallet_connect_v2_example 2 | description: Demonstrates how to use the wallet_connect_v2 plugin. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | environment: 9 | sdk: '>=2.18.4 <3.0.0' 10 | 11 | # Dependencies specify other packages that your package needs in order to work. 12 | # To automatically upgrade your package dependencies to the latest versions 13 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 14 | # dependencies can be manually updated by changing the version numbers below to 15 | # the latest version available on pub.dev. To see which dependencies have newer 16 | # versions available, run `flutter pub outdated`. 17 | dependencies: 18 | flutter: 19 | sdk: flutter 20 | 21 | wallet_connect_v2: 22 | # When depending on this package from a real application you should use: 23 | # wallet_connect_v2: ^x.y.z 24 | # See https://dart.dev/tools/pub/dependencies#version-constraints 25 | # The example app is bundled with the plugin so we use a path dependency on 26 | # the parent directory to use the current plugin's version. 27 | path: ../ 28 | 29 | # The following adds the Cupertino Icons font to your application. 30 | # Use with the CupertinoIcons class for iOS style icons. 31 | cupertino_icons: ^1.0.2 32 | web3dart: 2.3.3 33 | bip39: ^1.0.6 34 | bip32: ^2.0.0 35 | eth_sig_util: ^0.0.9 36 | shared_preferences: ^2.0.15 37 | url_launcher: ^6.1.10 38 | qr_flutter: ^4.0.0 39 | 40 | dev_dependencies: 41 | flutter_test: 42 | sdk: flutter 43 | 44 | # The "flutter_lints" package below contains a set of recommended lints to 45 | # encourage good coding practices. The lint set provided by the package is 46 | # activated in the `analysis_options.yaml` file located at the root of your 47 | # package. See that file for information about deactivating specific lint 48 | # rules and activating additional ones. 49 | flutter_lints: ^2.0.0 50 | 51 | # For information on the generic Dart part of this file, see the 52 | # following page: https://dart.dev/tools/pub/pubspec 53 | 54 | # The following section is specific to Flutter packages. 55 | flutter: 56 | 57 | # The following line ensures that the Material Icons font is 58 | # included with your application, so that you can use the icons in 59 | # the material Icons class. 60 | uses-material-design: true 61 | 62 | # To add assets to your application, add an assets section, like this: 63 | # assets: 64 | # - images/a_dot_burr.jpeg 65 | # - images/a_dot_ham.jpeg 66 | 67 | # An image asset can refer to one or more resolution-specific "variants", see 68 | # https://flutter.dev/assets-and-images/#resolution-aware 69 | 70 | # For details regarding adding assets from package dependencies, see 71 | # https://flutter.dev/assets-and-images/#from-packages 72 | 73 | # To add custom fonts to your application, add a fonts section here, 74 | # in this "flutter" section. Each entry in this list should have a 75 | # "family" key with the font family name, and a "fonts" key with a 76 | # list giving the asset and other descriptors for the font. For 77 | # example: 78 | # fonts: 79 | # - family: Schyler 80 | # fonts: 81 | # - asset: fonts/Schyler-Regular.ttf 82 | # - asset: fonts/Schyler-Italic.ttf 83 | # style: italic 84 | # - family: Trajan Pro 85 | # fonts: 86 | # - asset: fonts/TrajanPro.ttf 87 | # - asset: fonts/TrajanPro_Bold.ttf 88 | # weight: 700 89 | # 90 | # For details regarding fonts from package dependencies, 91 | # see https://flutter.dev/custom-fonts/#from-packages 92 | -------------------------------------------------------------------------------- /lib/wallet_connect_v2_method_channel.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter/foundation.dart'; 4 | import 'package:flutter/services.dart'; 5 | 6 | import 'src/model/app_metadata.dart'; 7 | import 'src/model/connection_status.dart'; 8 | import 'src/model/proposal_namespace.dart'; 9 | import 'src/model/request.dart'; 10 | import 'src/model/session.dart'; 11 | import 'src/model/session_approval.dart'; 12 | import 'src/model/session_delete.dart'; 13 | import 'src/model/session_proposal.dart'; 14 | import 'src/model/session_rejection.dart'; 15 | import 'src/model/session_request.dart'; 16 | import 'src/model/session_response.dart'; 17 | import 'src/model/session_update.dart'; 18 | import 'wallet_connect_v2_platform_interface.dart'; 19 | 20 | /// An implementation of [WalletConnectV2Platform] that uses method channels. 21 | class MethodChannelWalletConnectV2 extends WalletConnectV2Platform { 22 | /// The method channel used to interact with the native platform. 23 | @visibleForTesting 24 | final methodChannel = const MethodChannel('wallet_connect_v2'); 25 | 26 | final eventChannel = const EventChannel('wallet_connect_v2/event'); 27 | 28 | Stream? _onEvent; 29 | 30 | @override 31 | Future init( 32 | {required String projectId, required AppMetadata appMetadata}) { 33 | return methodChannel.invokeMethod( 34 | 'init', {'projectId': projectId, 'appMetadata': appMetadata.toJson()}); 35 | } 36 | 37 | @override 38 | Future connect() { 39 | return methodChannel.invokeMethod('connect'); 40 | } 41 | 42 | @override 43 | Future disconnect() { 44 | return methodChannel.invokeMethod('disconnect'); 45 | } 46 | 47 | @override 48 | Future pair({required String uri}) { 49 | return methodChannel.invokeMethod('pair', {'uri': uri}); 50 | } 51 | 52 | @override 53 | Future approve({required SessionApproval approval}) { 54 | return methodChannel.invokeMethod('approve', approval.toJson()); 55 | } 56 | 57 | @override 58 | Future reject({required String proposalId}) { 59 | return methodChannel.invokeMethod('reject', {'id': proposalId}); 60 | } 61 | 62 | @override 63 | Future> getActivatedSessions() async { 64 | final rawSessions = 65 | await methodChannel.invokeMethod('getActivatedSessions'); 66 | final List result = jsonDecode(jsonEncode(rawSessions)); 67 | return result.map((e) => Session.fromJson(e)).toList(); 68 | } 69 | 70 | @override 71 | Future disconnectSession({required String topic}) { 72 | return methodChannel.invokeMethod('disconnectSession', {'topic': topic}); 73 | } 74 | 75 | @override 76 | Future updateSession({required SessionApproval updateApproval}) { 77 | return methodChannel.invokeMethod('updateSession', updateApproval.toJson()); 78 | } 79 | 80 | @override 81 | Future approveRequest( 82 | {required String topic, 83 | required String requestId, 84 | required String result}) { 85 | return methodChannel.invokeMethod('approveRequest', 86 | {'requestId': requestId, 'topic': topic, 'result': result}); 87 | } 88 | 89 | @override 90 | Future rejectRequest( 91 | {required String topic, required String requestId}) { 92 | return methodChannel.invokeMethod( 93 | 'rejectRequest', {'requestId': requestId, 'topic': topic}); 94 | } 95 | 96 | @override 97 | Future createPair( 98 | {required Map namespaces}) { 99 | return methodChannel.invokeMethod('createPair', 100 | namespaces.map((key, value) => MapEntry(key, value.toJson()))); 101 | } 102 | 103 | @override 104 | Future sendRequest({required Request request}) { 105 | return methodChannel.invokeMethod('sendRequest', request.toJson()); 106 | } 107 | 108 | @override 109 | Stream get onEvent { 110 | _onEvent ??= 111 | eventChannel.receiveBroadcastStream().distinct().map((dynamic event) { 112 | final Map result = jsonDecode(jsonEncode(event)); 113 | debugPrint('onEvent data = ${result.toString()}'); 114 | final eventName = result['name'] as String; 115 | final eventData = result['data'] as Map; 116 | switch (eventName) { 117 | case "connection_status": 118 | return ConnectionStatus(eventData['isConnected']); 119 | case "proposal": 120 | return SessionProposal.fromJson(eventData); 121 | case "session_settle": 122 | return Session.fromJson(eventData); 123 | case "session_request": 124 | return SessionRequest.fromJson(eventData); 125 | case "session_update": 126 | return SessionUpdate.fromJson(eventData); 127 | case "session_delete": 128 | return SessionDelete.fromJson(eventData); 129 | case "session_rejection": 130 | return SessionRejection.fromJson(eventData); 131 | case "session_response": 132 | return SessionResponse.fromJson(eventData); 133 | default: 134 | break; 135 | } 136 | }); 137 | return _onEvent!; 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /lib/wallet_connect_v2.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/services.dart'; 4 | 5 | import 'src/model/app_metadata.dart'; 6 | import 'src/model/connection_status.dart'; 7 | import 'src/model/proposal_namespace.dart'; 8 | import 'src/model/request.dart'; 9 | import 'src/model/session.dart'; 10 | import 'src/model/session_approval.dart'; 11 | import 'src/model/session_delete.dart'; 12 | import 'src/model/session_proposal.dart'; 13 | import 'src/model/session_rejection.dart'; 14 | import 'src/model/session_request.dart'; 15 | import 'src/model/session_response.dart'; 16 | import 'src/model/session_update.dart'; 17 | import 'wallet_connect_v2_platform_interface.dart'; 18 | 19 | export 'src/model/app_metadata.dart'; 20 | export 'src/model/proposal_namespace.dart'; 21 | export 'src/model/request.dart'; 22 | export 'src/model/session.dart'; 23 | export 'src/model/session_approval.dart'; 24 | export 'src/model/session_namespace.dart'; 25 | export 'src/model/session_proposal.dart'; 26 | export 'src/model/session_request.dart'; 27 | export 'src/model/session_response.dart'; 28 | 29 | class WalletConnectV2 { 30 | StreamSubscription? _eventSubscription; 31 | 32 | OnConnectionStatus? onConnectionStatus; 33 | OnSessionProposal? onSessionProposal; 34 | OnSessionSettle? onSessionSettle; 35 | OnSessionUpdate? onSessionUpdate; 36 | OnSessionDelete? onSessionDelete; 37 | OnSessionRequest? onSessionRequest; 38 | OnEventError? onEventError; 39 | 40 | /// DAPP only, listen to action of reject proposal from wallet 41 | OnSessionRejection? onSessionRejection; 42 | 43 | /// DAPP only, listen to action of approve/reject request from wallet 44 | OnSessionResponse? onSessionResponse; 45 | 46 | /// Initiate SDKs 47 | Future init( 48 | {required String projectId, required AppMetadata appMetadata}) { 49 | _eventSubscription = 50 | WalletConnectV2Platform.instance.onEvent.listen((event) { 51 | if (event is ConnectionStatus) { 52 | onConnectionStatus?.call(event.isConnected); 53 | } else if (event is SessionProposal) { 54 | onSessionProposal?.call(event); 55 | } else if (event is Session) { 56 | onSessionSettle?.call(event); 57 | } else if (event is SessionRequest) { 58 | onSessionRequest?.call(event); 59 | } else if (event is SessionUpdate) { 60 | onSessionUpdate?.call(event.topic); 61 | } else if (event is SessionDelete) { 62 | onSessionDelete?.call(event.topic); 63 | } else if (event is SessionRejection) { 64 | onSessionRejection?.call(event.topic); 65 | } else if (event is SessionResponse) { 66 | onSessionResponse?.call(event); 67 | } 68 | }, onError: (error) { 69 | if (error is PlatformException) { 70 | onEventError?.call(error.code, error.message ?? "Internal error"); 71 | } else { 72 | onEventError?.call('general_error', "Internal error"); 73 | } 74 | }); 75 | return WalletConnectV2Platform.instance 76 | .init(projectId: projectId, appMetadata: appMetadata); 77 | } 78 | 79 | /// Connect to listen event, for Wallet & DApp to connect to Relay service 80 | Future connect() { 81 | return WalletConnectV2Platform.instance.connect(); 82 | } 83 | 84 | /// Disconnect, for Wallet & DApp to disconnect with Relay service 85 | Future disconnect() { 86 | return WalletConnectV2Platform.instance.disconnect(); 87 | } 88 | 89 | /// Pair with DApps for Wallet only 90 | Future pair({required String uri}) { 91 | return WalletConnectV2Platform.instance.pair(uri: uri); 92 | } 93 | 94 | /// Approve session for Wallet only 95 | Future approveSession({required SessionApproval approval}) { 96 | return WalletConnectV2Platform.instance.approve(approval: approval); 97 | } 98 | 99 | /// Reject session for Wallet only 100 | Future rejectSession({required String proposalId}) { 101 | return WalletConnectV2Platform.instance.reject(proposalId: proposalId); 102 | } 103 | 104 | /// Get current activated sessions 105 | Future> getActivatedSessions() { 106 | return WalletConnectV2Platform.instance.getActivatedSessions(); 107 | } 108 | 109 | /// Disconnect session for Wallet & DApp 110 | Future disconnectSession({required String topic}) { 111 | return WalletConnectV2Platform.instance.disconnectSession(topic: topic); 112 | } 113 | 114 | /// Update session for Wallet & DApp 115 | Future updateSession({required SessionApproval updateApproval}) { 116 | return WalletConnectV2Platform.instance 117 | .updateSession(updateApproval: updateApproval); 118 | } 119 | 120 | /// Approve request for Wallet only 121 | Future approveRequest( 122 | {required String topic, 123 | required String requestId, 124 | required String result}) { 125 | return WalletConnectV2Platform.instance 126 | .approveRequest(topic: topic, requestId: requestId, result: result); 127 | } 128 | 129 | /// Reject request for Wallet only 130 | Future rejectRequest( 131 | {required String topic, required String requestId}) { 132 | return WalletConnectV2Platform.instance 133 | .rejectRequest(topic: topic, requestId: requestId); 134 | } 135 | 136 | /// DAPP only, to create PAIR URI to pair with wallet 137 | Future createPair( 138 | {required Map namespaces}) { 139 | return WalletConnectV2Platform.instance.createPair(namespaces: namespaces); 140 | } 141 | 142 | /// DAPP only, to send request to wallet 143 | Future sendRequest({required Request request}) { 144 | return WalletConnectV2Platform.instance.sendRequest(request: request); 145 | } 146 | 147 | /// Dispose the event subscription 148 | Future dispose() async { 149 | _eventSubscription?.cancel(); 150 | _eventSubscription = null; 151 | } 152 | } 153 | 154 | typedef OnConnectionStatus = Function(bool isConnected); 155 | typedef OnSessionProposal = Function(SessionProposal proposal); 156 | typedef OnSessionSettle = Function(Session session); 157 | typedef OnSessionUpdate = Function(String topic); 158 | typedef OnSessionDelete = Function(String topic); 159 | typedef OnSessionRejection = Function(String topic); 160 | typedef OnSessionResponse = Function(SessionResponse response); 161 | typedef OnSessionRequest = Function(SessionRequest request); 162 | typedef OnEventError = Function(String code, String message); 163 | -------------------------------------------------------------------------------- /ios/Classes/SwiftWalletConnectV2Plugin.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import WalletConnectSwiftV2 3 | import UIKit 4 | import Starscream 5 | import Combine 6 | 7 | public class SwiftWalletConnectV2Plugin: NSObject, FlutterPlugin, FlutterStreamHandler { 8 | private var publishers = [AnyCancellable]() 9 | 10 | private var eventSink: FlutterEventSink? 11 | 12 | public static func register(with registrar: FlutterPluginRegistrar) { 13 | let channel = FlutterMethodChannel(name: "wallet_connect_v2", binaryMessenger: registrar.messenger()) 14 | let eventChannel = FlutterEventChannel( 15 | name: "wallet_connect_v2/event", 16 | binaryMessenger: registrar.messenger()) 17 | let instance = SwiftWalletConnectV2Plugin() 18 | eventChannel.setStreamHandler(instance) 19 | registrar.addMethodCallDelegate(instance, channel: channel) 20 | } 21 | 22 | public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { 23 | switch call.method { 24 | case "init": do { 25 | let arguments = call.arguments as! [String: Any] 26 | let projectId = arguments["projectId"] as! String 27 | var appMetadata = arguments["appMetadata"] as! [String: Any] 28 | if (appMetadata["redirect"] != nil) { 29 | appMetadata["redirect"] = [ 30 | "native": (appMetadata["redirect"] as! String).starts(with: "http") ? nil : (appMetadata["redirect"] as? String), 31 | "universal": (appMetadata["redirect"] as! String).starts(with: "http") ? (appMetadata["redirect"] as? String) : nil, 32 | ]; 33 | } 34 | let metadata: AppMetadata = try! JSONDecoder().decode(AppMetadata.self, from: JSONSerialization.data(withJSONObject: appMetadata)) 35 | 36 | Networking.configure(projectId: projectId, socketFactory: SocketFactory(), socketConnectionType: .manual) 37 | 38 | Pair.configure(metadata: metadata) 39 | 40 | Sign.instance.socketConnectionStatusPublisher 41 | .receive(on: DispatchQueue.main) 42 | .sink { [weak self] status in 43 | self?.onEvent(name: "connection_status", data: [ 44 | "isConnected": status == .connected 45 | ]) 46 | }.store(in: &publishers) 47 | 48 | Sign.instance.sessionProposalPublisher 49 | .receive(on: DispatchQueue.main) 50 | .sink { [weak self] sessionProposal in 51 | self?.onEvent(name: "proposal", data: [ 52 | "id": sessionProposal.proposal.id, 53 | "proposer": sessionProposal.proposal.proposer.toFlutterValue(), 54 | "namespaces": sessionProposal.proposal.requiredNamespaces.mapValues { value in value.toFlutterValue() 55 | }, 56 | "optionalNamespaces": sessionProposal.proposal.optionalNamespaces?.mapValues { value in value.toFlutterValue() 57 | } as Any 58 | ]) 59 | }.store(in: &publishers) 60 | 61 | Sign.instance.sessionSettlePublisher 62 | .receive(on: DispatchQueue.main) 63 | .sink { [weak self] session in 64 | self?.onEvent(name: "session_settle", data: [ 65 | "topic": session.topic, 66 | "peer": session.peer.toFlutterValue(), 67 | "expiration": session.expiryDate.toUtcIsoDateString(), 68 | "namespaces": session.namespaces.mapValues { value in value.toFlutterValue() 69 | } 70 | ]) 71 | }.store(in: &publishers) 72 | 73 | Sign.instance.sessionDeletePublisher 74 | .receive(on: DispatchQueue.main) 75 | .sink { [weak self] session in 76 | self?.onEvent(name: "session_delete", data: [ 77 | "topic": session.0 78 | ]) 79 | }.store(in: &publishers) 80 | 81 | Sign.instance.sessionUpdatePublisher 82 | .receive(on: DispatchQueue.main) 83 | .sink { [weak self] session in 84 | self?.onEvent(name: "session_update", data: [ 85 | "topic": session.0 86 | ]) 87 | }.store(in: &publishers) 88 | 89 | Sign.instance.sessionRequestPublisher 90 | .receive(on: DispatchQueue.main) 91 | .sink { [weak self] request in 92 | self?.onEvent(name: "session_request", data: request.request.toFlutterValue()) 93 | }.store(in: &publishers) 94 | 95 | Sign.instance.sessionResponsePublisher 96 | .receive(on: DispatchQueue.main) 97 | .sink { [weak self] response in 98 | self?.onEvent(name: "session_response", data: response.toFlutterValue()) 99 | }.store(in: &publishers) 100 | 101 | Sign.instance.sessionRejectionPublisher 102 | .receive(on: DispatchQueue.main) 103 | .sink { [weak self] rejection in 104 | self?.onEvent(name: "session_rejection", data: toRejectionValue(rejection: rejection)) 105 | }.store(in: &publishers) 106 | 107 | result(nil) 108 | } 109 | case "connect": do { 110 | do { 111 | try Networking.instance.connect() 112 | } catch let error { 113 | onError(code: "connect_error", errorMessage: error.localizedDescription) 114 | } 115 | result(nil) 116 | } 117 | case "disconnect": do { 118 | do { 119 | try Networking.instance.disconnect(closeCode: URLSessionWebSocketTask.CloseCode(rawValue: 1000)!) 120 | } catch let error { 121 | onError(code: "disconnect_error", errorMessage: error.localizedDescription) 122 | } 123 | result(nil) 124 | } 125 | case "pair": do { 126 | Task { 127 | do { 128 | let arguments = call.arguments as! [String: Any] 129 | let wcUri = WalletConnectURI(string: arguments["uri"] as! String) 130 | if (wcUri == nil) { 131 | result(nil) 132 | onError(code: "pair_error", errorMessage: "Pairing with DApp not success due to wrong URI") 133 | return 134 | } 135 | try await Pair.instance.pair(uri: wcUri!) 136 | } catch let error { 137 | onError(code: "pair_error", errorMessage: error.localizedDescription) 138 | } 139 | result(nil) 140 | } 141 | } 142 | case "approve": do { 143 | Task { 144 | do { 145 | let arguments = call.arguments as! [String: Any] 146 | let rawNamespaces = arguments["namespaces"] as! [String: [String: Any]] 147 | let namespaces = rawNamespaces.mapValues { 148 | SessionNamespace(accounts: Set(($0["accounts"] as! [String]).map{ account in 149 | Account(account)! 150 | }), methods: Set($0["methods"] as! [String]), events: Set($0["events"] as! [String])) 151 | } 152 | try await Sign.instance.approve(proposalId: arguments["id"] as! String, namespaces: namespaces) 153 | } catch let error { 154 | onError(code: "approve_error", errorMessage: error.localizedDescription) 155 | } 156 | result(nil) 157 | } 158 | } 159 | case "reject": do { 160 | Task { 161 | do { 162 | let arguments = call.arguments as! [String: Any] 163 | try await Sign.instance.reject(proposalId: arguments["id"] as! String, reason: .userRejected) 164 | } catch let error { 165 | onError(code: "reject_error", errorMessage: error.localizedDescription) 166 | } 167 | result(nil) 168 | } 169 | } 170 | case "getActivatedSessions": do { 171 | let sessions = Sign.instance.getSessions() 172 | result(sessions.map { value in [ 173 | "topic": value.topic, 174 | "peer": value.peer.toFlutterValue(), 175 | "expiration": value.expiryDate.toUtcIsoDateString(), 176 | "namespaces": value.namespaces.mapValues { value in value.toFlutterValue() 177 | }, 178 | ] }) 179 | } 180 | case "disconnectSession": do { 181 | Task { 182 | do { 183 | let arguments = call.arguments as! [String: Any] 184 | try await Sign.instance.disconnect(topic: arguments["topic"] as! String) 185 | } catch let error { 186 | onError(code: "disconnect_session_error", errorMessage: error.localizedDescription) 187 | } 188 | result(nil) 189 | } 190 | } 191 | case "updateSession": do { 192 | Task { 193 | do { 194 | let arguments = call.arguments as! [String: Any] 195 | let rawNamespaces = arguments["namespaces"] as! [String: [String: Any]] 196 | let namespaces = rawNamespaces.mapValues { 197 | SessionNamespace(accounts: Set(($0["accounts"] as! [String]).map{ account in 198 | Account(account)! 199 | }), methods: Set($0["methods"] as! [String]), events: Set($0["events"] as! [String])) 200 | } 201 | try await Sign.instance.update(topic: arguments["id"] as! String, namespaces: namespaces) 202 | } catch let error { 203 | onError(code: "update_session_error", errorMessage: error.localizedDescription) 204 | } 205 | result(nil) 206 | } 207 | } 208 | case "approveRequest": do { 209 | Task { 210 | do { 211 | let arguments = call.arguments as! [String: Any] 212 | let requestId = RPCID(Int64(arguments["requestId"] as! String)!) 213 | try await Sign.instance.respond(topic: arguments["topic"] as! String, requestId: requestId, response: .response(RPCResponse(id: requestId, result: arguments["result"] as! String).result!)) 214 | } catch let error { 215 | onError(code: "approve_request_error", errorMessage: error.localizedDescription) 216 | } 217 | result(nil) 218 | } 219 | } 220 | case "rejectRequest": do { 221 | Task { 222 | do { 223 | let arguments = call.arguments as! [String: Any] 224 | let requestId = RPCID(Int64(arguments["requestId"] as! String)!) 225 | try await Sign.instance.respond(topic: arguments["topic"] as! String, requestId: requestId, response: .error(JSONRPCError(code: 4001, message: "User rejected the request"))) 226 | } catch let error { 227 | onError(code: "reject_request_error", errorMessage: error.localizedDescription) 228 | } 229 | result(nil) 230 | } 231 | } 232 | case "createPair": do { 233 | Task { 234 | do { 235 | let arguments = call.arguments as! [String: [String: Any]] 236 | let namespaces = arguments.mapValues { value in 237 | let chains = (value["chains"] as! Array).map { chain in 238 | Blockchain(chain)! 239 | } 240 | let methods = Set(value["methods"] as! [String]) 241 | let events = Set(value["events"] as! [String]) 242 | return ProposalNamespace(chains: Set(chains), methods: methods, events: events) 243 | } 244 | let uri = try await Pair.instance.create() 245 | try await Sign.instance.connect(requiredNamespaces: namespaces, topic: uri.topic) 246 | result(uri.absoluteString) 247 | } catch let error { 248 | onError(code: "create_pair_error", errorMessage: error.localizedDescription) 249 | result(nil) 250 | } 251 | } 252 | } 253 | case "sendRequest": do { 254 | Task { 255 | do { 256 | let arguments = call.arguments as! [String: Any] 257 | let topic = arguments["topic"] as! String 258 | let method = arguments["method"] as! String 259 | let chainId = Blockchain(arguments["chainId"] as! String)! 260 | let requestParams: AnyCodable = try! JSONDecoder().decode(AnyCodable.self, from: JSONSerialization.data(withJSONObject: arguments["params"]!)) 261 | let request = Request(topic: topic, method: method, params: requestParams, chainId: chainId) 262 | try await Sign.instance.request(params: request) 263 | } catch let error { 264 | onError(code: "send_request_error", errorMessage: error.localizedDescription) 265 | } 266 | result(nil) 267 | } 268 | } 269 | default: 270 | result(FlutterMethodNotImplemented) 271 | } 272 | } 273 | 274 | public func onListen(withArguments arguments: Any?, eventSink events: @escaping FlutterEventSink) -> FlutterError? { 275 | eventSink = events 276 | return nil 277 | } 278 | 279 | public func onCancel(withArguments arguments: Any?) -> FlutterError? { 280 | eventSink = nil 281 | return nil 282 | } 283 | 284 | private func onEvent(name: String, data: NSDictionary) { 285 | DispatchQueue.main.async { 286 | self.eventSink?([ 287 | "name": name, 288 | "data": data 289 | ]) 290 | } 291 | } 292 | 293 | private func onError(code: String, errorMessage: String = "") { 294 | DispatchQueue.main.async { 295 | self.eventSink?(self.toFlutterError(code: code, errorMessage: errorMessage)) 296 | } 297 | } 298 | 299 | private func toFlutterError(code: String, errorMessage: String = "") -> FlutterError { 300 | return FlutterError(code: code, 301 | message: errorMessage, 302 | details: nil); 303 | } 304 | } 305 | 306 | extension WebSocket: WebSocketConnecting { } 307 | 308 | struct SocketFactory: WebSocketFactory { 309 | func create(with url: URL) -> WebSocketConnecting { 310 | return WebSocket(url: url) 311 | } 312 | } 313 | 314 | extension AppMetadata { 315 | func toFlutterValue() -> NSDictionary { 316 | return [ 317 | "name": self.name, 318 | "description": self.description, 319 | "url": self.url, 320 | "icons": self.icons, 321 | "redirect": self.redirect?.universal != nil ? self.redirect?.universal as Any : self.redirect?.native as Any 322 | ]; 323 | } 324 | } 325 | 326 | extension ProposalNamespace { 327 | func toFlutterValue() -> NSDictionary { 328 | return [ 329 | "chains": self.chains?.map( { String($0) }) as Any, 330 | "methods": Array(self.methods), 331 | "events": Array(self.events) 332 | ]; 333 | } 334 | } 335 | 336 | extension SessionNamespace { 337 | func toFlutterValue() -> NSDictionary { 338 | return [ 339 | "accounts": Array(self.accounts).map( { String($0) }), 340 | "methods": Array(self.methods), 341 | "events": Array(self.events), 342 | "chains": self.chains?.map( { String($0) }) as Any, 343 | ]; 344 | } 345 | } 346 | 347 | extension Request { 348 | func toFlutterValue() -> NSDictionary { 349 | return [ 350 | "id": try! self.id.json(), 351 | "topic": self.topic, 352 | "chainId": String(self.chainId), 353 | "method": self.method, 354 | "params": try! self.params.json() 355 | ]; 356 | } 357 | } 358 | 359 | extension Response { 360 | func toFlutterValue() -> NSDictionary { 361 | return [ 362 | "id": try! self.id.json(), 363 | "topic": self.topic, 364 | "results": try! self.result.json() 365 | ]; 366 | } 367 | } 368 | 369 | extension Date { 370 | func toUtcIsoDateString() -> String { 371 | let utcISODateFormatter = ISO8601DateFormatter() 372 | return utcISODateFormatter.string(from: self); 373 | } 374 | } 375 | 376 | func toRejectionValue(rejection: (Session.Proposal, Reason)) -> NSDictionary { 377 | return [ 378 | "topic": rejection.0.pairingTopic 379 | ]; 380 | } 381 | -------------------------------------------------------------------------------- /android/src/main/kotlin/com/avacus/wallet_connect_v2/WalletConnectV2Plugin.kt: -------------------------------------------------------------------------------- 1 | package com.avacus.wallet_connect_v2 2 | 3 | import android.app.Activity 4 | import android.app.Application 5 | import androidx.annotation.NonNull 6 | import com.google.gson.Gson 7 | import com.walletconnect.android.Core 8 | import com.walletconnect.android.CoreClient 9 | import com.walletconnect.android.relay.ConnectionType 10 | import com.walletconnect.sign.client.Sign 11 | import com.walletconnect.sign.client.SignClient 12 | import io.flutter.embedding.engine.plugins.FlutterPlugin 13 | import io.flutter.embedding.engine.plugins.activity.ActivityAware 14 | import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding 15 | import io.flutter.plugin.common.EventChannel 16 | import io.flutter.plugin.common.MethodCall 17 | import io.flutter.plugin.common.MethodChannel 18 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler 19 | import io.flutter.plugin.common.MethodChannel.Result 20 | import java.text.DateFormat 21 | import java.text.SimpleDateFormat 22 | import java.util.* 23 | 24 | /** WalletConnectV2Plugin */ 25 | class WalletConnectV2Plugin : FlutterPlugin, MethodCallHandler, ActivityAware, 26 | EventChannel.StreamHandler { 27 | private lateinit var context: Application 28 | private var activity: Activity? = null 29 | 30 | private lateinit var channel: MethodChannel 31 | private lateinit var eventChannel: EventChannel 32 | private var eventSink: EventChannel.EventSink? = null 33 | 34 | override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { 35 | context = flutterPluginBinding.applicationContext as Application 36 | channel = MethodChannel(flutterPluginBinding.binaryMessenger, "wallet_connect_v2") 37 | channel.setMethodCallHandler(this) 38 | eventChannel = EventChannel(flutterPluginBinding.binaryMessenger, "wallet_connect_v2/event") 39 | eventChannel.setStreamHandler(this) 40 | } 41 | 42 | override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) { 43 | when (call.method) { 44 | "init" -> { 45 | val arguments = call.arguments>() 46 | val projectId = arguments?.get("projectId") 47 | val serverUrl = "wss://relay.walletconnect.com?projectId=$projectId" 48 | val connectionType = ConnectionType.MANUAL 49 | 50 | val gson = Gson() 51 | val appMetaData = gson.fromJson( 52 | gson.toJson(arguments?.get("appMetadata")), Core.Model.AppMetaData::class.java 53 | ) 54 | 55 | CoreClient.initialize( 56 | relayServerUrl = serverUrl, 57 | connectionType = connectionType, 58 | application = context, 59 | metaData = appMetaData 60 | ) { 61 | onError( 62 | "init_core_error", errorMessage = it.throwable.message ?: "" 63 | ) 64 | } 65 | 66 | val init = Sign.Params.Init(core = CoreClient) 67 | 68 | SignClient.initialize(init) { 69 | onError("init_sign_error", errorMessage = it.throwable.message ?: "") 70 | } 71 | 72 | val walletDelegate = object : SignClient.WalletDelegate { 73 | override fun onSessionProposal( 74 | sessionProposal: Sign.Model.SessionProposal, 75 | verifyContext: Sign.Model.VerifyContext 76 | ) { 77 | onEvent( 78 | name = "proposal", data = sessionProposal.toFlutterValue() 79 | ) 80 | } 81 | 82 | override fun onSessionRequest( 83 | sessionRequest: Sign.Model.SessionRequest, 84 | verifyContext: Sign.Model.VerifyContext 85 | ) { 86 | onEvent( 87 | name = "session_request", data = sessionRequest.toFlutterValue() 88 | ) 89 | } 90 | 91 | override fun onSessionDelete(deletedSession: Sign.Model.DeletedSession) { 92 | if (deletedSession is Sign.Model.DeletedSession.Success) { 93 | onEvent( 94 | name = "session_delete", data = mapOf( 95 | "topic" to deletedSession.topic 96 | ) 97 | ) 98 | } 99 | } 100 | 101 | override fun onSessionExtend(session: Sign.Model.Session) { 102 | onEvent( 103 | name = "session_update", data = mapOf( 104 | "topic" to session.topic 105 | ) 106 | ) 107 | } 108 | 109 | override fun onSessionSettleResponse(settleSessionResponse: Sign.Model.SettledSessionResponse) { 110 | if (settleSessionResponse is Sign.Model.SettledSessionResponse.Result) { 111 | val session = settleSessionResponse.session 112 | onEvent( 113 | name = "session_settle", data = session.toFlutterValue() 114 | ) 115 | } 116 | } 117 | 118 | override fun onSessionUpdateResponse(sessionUpdateResponse: Sign.Model.SessionUpdateResponse) { 119 | if (sessionUpdateResponse is Sign.Model.SessionUpdateResponse.Result) { 120 | onEvent( 121 | name = "session_update", data = mapOf( 122 | "topic" to sessionUpdateResponse.topic 123 | ) 124 | ) 125 | } 126 | } 127 | 128 | override fun onConnectionStateChange(state: Sign.Model.ConnectionState) { 129 | onEvent( 130 | name = "connection_status", data = mapOf( 131 | "isConnected" to state.isAvailable 132 | ) 133 | ) 134 | } 135 | 136 | override fun onError(error: Sign.Model.Error) { 137 | onError( 138 | "delegate_error", 139 | errorMessage = error.throwable.message ?: "" 140 | ) 141 | } 142 | } 143 | SignClient.setWalletDelegate(walletDelegate) 144 | 145 | val dappDelegate = object : SignClient.DappDelegate { 146 | override fun onSessionApproved(approvedSession: Sign.Model.ApprovedSession) { 147 | val session = SignClient.getActiveSessionByTopic(approvedSession.topic) 148 | if (session != null) { 149 | onEvent( 150 | name = "session_settle", data = session.toFlutterValue() 151 | ) 152 | } 153 | } 154 | 155 | override fun onSessionRejected(rejectedSession: Sign.Model.RejectedSession) { 156 | onEvent( 157 | name = "session_rejection", data = rejectedSession.toFlutterValue() 158 | ) 159 | } 160 | 161 | override fun onSessionUpdate(updatedSession: Sign.Model.UpdatedSession) { 162 | // Unused 163 | } 164 | 165 | override fun onSessionExtend(session: Sign.Model.Session) { 166 | // Unused 167 | } 168 | 169 | override fun onSessionEvent(sessionEvent: Sign.Model.SessionEvent) { 170 | // Unused 171 | } 172 | 173 | override fun onSessionDelete(deletedSession: Sign.Model.DeletedSession) { 174 | // Handled by Wallet Delegate 175 | } 176 | 177 | override fun onSessionRequestResponse(response: Sign.Model.SessionRequestResponse) { 178 | onEvent( 179 | name = "session_response", data = response.toFlutterValue() 180 | ) 181 | } 182 | 183 | override fun onConnectionStateChange(state: Sign.Model.ConnectionState) { 184 | // Handled by Wallet Delegate 185 | } 186 | 187 | override fun onError(error: Sign.Model.Error) { 188 | onError( 189 | "delegate_error", 190 | errorMessage = error.throwable.message ?: "" 191 | ) 192 | } 193 | } 194 | 195 | SignClient.setDappDelegate(dappDelegate) 196 | 197 | result.success(null) 198 | } 199 | "connect" -> { 200 | val handleError: (Core.Model.Error) -> Unit = { 201 | onError("connect_error", errorMessage = it.throwable.message ?: "") 202 | } 203 | CoreClient.Relay.connect(onError = handleError) 204 | result.success(null) 205 | } 206 | "disconnect" -> { 207 | val handleError: (Core.Model.Error) -> Unit = { 208 | onError("disconnect_error", errorMessage = it.throwable.message ?: "") 209 | } 210 | CoreClient.Relay.disconnect(onError = handleError) 211 | result.success(null) 212 | } 213 | "pair" -> { 214 | val uri = call.argument("uri")!! 215 | CoreClient.Pairing.pair(pair = Core.Params.Pair(uri = uri), onError = { 216 | onError( 217 | "pair_error", 218 | errorMessage = it.throwable.message ?: "" 219 | ) 220 | }) 221 | result.success(null) 222 | } 223 | "approve" -> { 224 | val arguments = call.arguments>()!! 225 | val gson = Gson() 226 | val rawNamespaces = arguments["namespaces"] as Map<*, *> 227 | val namespaces = rawNamespaces.mapValues { 228 | gson.fromJson( 229 | gson.toJson(it.value), Sign.Model.Namespace.Session::class.java 230 | ) 231 | } 232 | @Suppress("UNCHECKED_CAST") val approve = Sign.Params.Approve( 233 | proposerPublicKey = arguments["id"] as String, 234 | namespaces = namespaces as Map 235 | ) 236 | SignClient.approveSession(approve = approve) { 237 | onError( 238 | "approve_error", 239 | errorMessage = it.throwable.message ?: "" 240 | ) 241 | } 242 | result.success(null) 243 | } 244 | "reject" -> { 245 | val arguments = call.arguments>()!! 246 | val reject = Sign.Params.Reject( 247 | proposerPublicKey = arguments["id"] as String, reason = "user_rejected" 248 | ) 249 | SignClient.rejectSession(reject = reject) { 250 | onError( 251 | "reject_error", 252 | errorMessage = it.throwable.message ?: "" 253 | ) 254 | } 255 | result.success(null) 256 | } 257 | "getActivatedSessions" -> { 258 | val sessions = SignClient.getListOfActiveSessions() 259 | result.success(sessions.map { it.toFlutterValue() }) 260 | } 261 | "disconnectSession" -> { 262 | val arguments = call.arguments>()!! 263 | SignClient.disconnect(disconnect = Sign.Params.Disconnect(sessionTopic = arguments["topic"] as String)) { 264 | onError( 265 | "disconnect_session_error", errorMessage = it.throwable.message ?: "" 266 | ) 267 | } 268 | result.success(null) 269 | } 270 | "updateSession" -> { 271 | val arguments = call.arguments>()!! 272 | val gson = Gson() 273 | val rawNamespaces = arguments["namespaces"] as Map<*, *> 274 | val namespaces = rawNamespaces.mapValues { 275 | gson.fromJson( 276 | gson.toJson(it.value), Sign.Model.Namespace.Session::class.java 277 | ) 278 | } 279 | @Suppress("UNCHECKED_CAST") val update = Sign.Params.Update( 280 | sessionTopic = arguments["id"] as String, 281 | namespaces = namespaces as Map 282 | ) 283 | SignClient.update(update = update) { 284 | onError( 285 | "update_session_error", errorMessage = it.throwable.message ?: "" 286 | ) 287 | } 288 | result.success(null) 289 | } 290 | "approveRequest" -> { 291 | val arguments = call.arguments>()!! 292 | SignClient.respond(response = Sign.Params.Response( 293 | sessionTopic = arguments["topic"] as String, 294 | Sign.Model.JsonRpcResponse.JsonRpcResult( 295 | id = (arguments["requestId"] as String).toLong(), 296 | result = arguments["result"] as String 297 | ) 298 | ), onError = { 299 | onError( 300 | "approve_request_error", 301 | errorMessage = it.throwable.message ?: "" 302 | ) 303 | }) 304 | result.success(null) 305 | } 306 | "rejectRequest" -> { 307 | val arguments = call.arguments>()!! 308 | SignClient.respond(response = Sign.Params.Response( 309 | sessionTopic = arguments["topic"] as String, 310 | Sign.Model.JsonRpcResponse.JsonRpcError( 311 | id = (arguments["requestId"] as String).toLong(), 312 | code = 4001, 313 | message = "User rejected the request" 314 | ) 315 | ), onError = { 316 | onError("reject_request_error", errorMessage = it.throwable.message ?: "") 317 | }) 318 | result.success(null) 319 | } 320 | "createPair" -> { 321 | val arguments = call.arguments>()!! 322 | val gson = Gson() 323 | val namespaces = arguments.mapValues { 324 | gson.fromJson( 325 | gson.toJson(it.value), Sign.Model.Namespace.Proposal::class.java 326 | ) 327 | } 328 | val pairing: Core.Model.Pairing? = CoreClient.Pairing.create { 329 | onError("create_pair_error", errorMessage = it.throwable.message ?: "") 330 | } 331 | if (pairing == null) { 332 | result.success(null) 333 | return 334 | } 335 | val connectParams = Sign.Params.Connect(namespaces = namespaces, pairing = pairing) 336 | SignClient.connect(connectParams, { 337 | result.success(pairing.uri) 338 | }, { 339 | result.success(null) 340 | onError("create_pair_error", errorMessage = it.throwable.message ?: "") 341 | }) 342 | } 343 | "sendRequest" -> { 344 | val arguments = call.arguments>()!! 345 | val gson = Gson() 346 | val requestParams = Sign.Params.Request( 347 | sessionTopic = arguments["topic"] as String, 348 | method = arguments["method"] as String, 349 | chainId = arguments["chainId"] as String, 350 | params = gson.toJson(arguments["params"]) 351 | ) 352 | val handleSuccess: (Sign.Model.SentRequest) -> Unit = { 353 | result.success(null) 354 | } 355 | val handleError: (Sign.Model.Error) -> Unit = { 356 | result.success(null) 357 | onError("send_request_error", errorMessage = it.throwable.message ?: "") 358 | } 359 | SignClient.request(requestParams, onError = handleError, onSuccess = handleSuccess) 360 | } 361 | else -> { 362 | result.notImplemented() 363 | } 364 | } 365 | } 366 | 367 | override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) { 368 | channel.setMethodCallHandler(null) 369 | eventChannel.setStreamHandler(null) 370 | } 371 | 372 | override fun onListen(arguments: Any?, events: EventChannel.EventSink?) { 373 | eventSink = events 374 | } 375 | 376 | override fun onCancel(arguments: Any?) { 377 | eventSink = null 378 | } 379 | 380 | private fun onEvent(name: String, data: Any) { 381 | activity?.runOnUiThread { 382 | eventSink?.success( 383 | mapOf( 384 | "name" to name, "data" to data 385 | ) 386 | ) 387 | } 388 | } 389 | 390 | private fun onError(code: String, errorMessage: String = "") { 391 | activity?.runOnUiThread { 392 | eventSink?.error(code, errorMessage, null) 393 | } 394 | } 395 | 396 | override fun onAttachedToActivity(binding: ActivityPluginBinding) { 397 | activity = binding.activity 398 | } 399 | 400 | override fun onDetachedFromActivityForConfigChanges() { 401 | } 402 | 403 | override fun onReattachedToActivityForConfigChanges(binding: ActivityPluginBinding) { 404 | } 405 | 406 | override fun onDetachedFromActivity() { 407 | activity = null 408 | } 409 | } 410 | 411 | fun Sign.Model.SessionProposal.toFlutterValue(): Map { 412 | return mapOf( 413 | "id" to this.proposerPublicKey, 414 | "proposer" to mapOf( 415 | "name" to this.name, 416 | "description" to this.description, 417 | "url" to this.url, 418 | "icons" to this.icons.map { it.toString() }, 419 | "redirect" to this.redirect.ifBlank { null } 420 | ), 421 | "namespaces" to this.requiredNamespaces.map { (key, value) -> 422 | key to mapOf( 423 | "chains" to value.chains, 424 | "methods" to value.methods, 425 | "events" to value.events 426 | ) 427 | }.toMap(), 428 | "optionalNamespaces" to this.optionalNamespaces.map { (key, value) -> 429 | key to mapOf( 430 | "chains" to value.chains, 431 | "methods" to value.methods, 432 | "events" to value.events 433 | ) 434 | }.toMap() 435 | ) 436 | } 437 | 438 | fun Sign.Model.Session.toFlutterValue(): Map { 439 | return mapOf( 440 | "topic" to this.topic, 441 | "peer" to mapOf( 442 | "name" to this.metaData?.name, 443 | "description" to this.metaData?.description, 444 | "url" to this.metaData?.url, 445 | "icons" to this.metaData?.icons, 446 | "redirect" to this.metaData?.redirect 447 | ), 448 | "expiration" to Date(this.expiry).toUtcIsoDateString(), 449 | "namespaces" to this.namespaces.map { (key, value) -> 450 | key to mapOf( 451 | "accounts" to value.accounts, 452 | "methods" to value.methods, 453 | "events" to value.events 454 | ) 455 | }.toMap() 456 | ) 457 | } 458 | 459 | fun Sign.Model.SessionRequest.toFlutterValue(): Map { 460 | return mapOf( 461 | "id" to this.request.id.toString(), 462 | "topic" to this.topic, 463 | "chainId" to this.chainId, 464 | "method" to this.request.method, 465 | "params" to this.request.params 466 | ) 467 | } 468 | 469 | fun Date.toUtcIsoDateString(): String { 470 | val dateFormat: DateFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") 471 | return dateFormat.format(this) 472 | } 473 | 474 | fun Sign.Model.RejectedSession.toFlutterValue(): Map { 475 | return mapOf( 476 | "topic" to this.topic 477 | ) 478 | } 479 | 480 | fun Sign.Model.SessionRequestResponse.toFlutterValue(): Map { 481 | val results: Any = if (this.result is Sign.Model.JsonRpcResponse.JsonRpcResult) { 482 | Gson().toJson((this.result as Sign.Model.JsonRpcResponse.JsonRpcResult).result) 483 | } else { 484 | Gson().toJson( 485 | mapOf( 486 | "code" to (this.result as Sign.Model.JsonRpcResponse.JsonRpcError).code, 487 | "message" to (this.result as Sign.Model.JsonRpcResponse.JsonRpcError).message 488 | ) 489 | ) 490 | } 491 | return mapOf( 492 | "id" to this.result.id.toString(), 493 | "topic" to this.topic, 494 | "results" to results 495 | ) 496 | } 497 | -------------------------------------------------------------------------------- /example/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | _fe_analyzer_shared: 5 | dependency: transitive 6 | description: 7 | name: _fe_analyzer_shared 8 | sha256: "3444216bfd127af50bbe4862d8843ed44db946dd933554f0d7285e89f10e28ac" 9 | url: "https://pub.dev" 10 | source: hosted 11 | version: "50.0.0" 12 | analyzer: 13 | dependency: transitive 14 | description: 15 | name: analyzer 16 | sha256: "68796c31f510c8455a06fed75fc97d8e5ad04d324a830322ab3efc9feb6201c1" 17 | url: "https://pub.dev" 18 | source: hosted 19 | version: "5.2.0" 20 | args: 21 | dependency: transitive 22 | description: 23 | name: args 24 | sha256: b003c3098049a51720352d219b0bb5f219b60fbfb68e7a4748139a06a5676515 25 | url: "https://pub.dev" 26 | source: hosted 27 | version: "2.3.1" 28 | async: 29 | dependency: transitive 30 | description: 31 | name: async 32 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" 33 | url: "https://pub.dev" 34 | source: hosted 35 | version: "2.11.0" 36 | bip32: 37 | dependency: "direct main" 38 | description: 39 | name: bip32 40 | sha256: "54787cd7a111e9d37394aabbf53d1fc5e2e0e0af2cd01c459147a97c0e3f8a97" 41 | url: "https://pub.dev" 42 | source: hosted 43 | version: "2.0.0" 44 | bip39: 45 | dependency: "direct main" 46 | description: 47 | name: bip39 48 | sha256: de1ee27ebe7d96b84bb3a04a4132a0a3007dcdd5ad27dd14aa87a29d97c45edc 49 | url: "https://pub.dev" 50 | source: hosted 51 | version: "1.0.6" 52 | boolean_selector: 53 | dependency: transitive 54 | description: 55 | name: boolean_selector 56 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" 57 | url: "https://pub.dev" 58 | source: hosted 59 | version: "2.1.1" 60 | bs58check: 61 | dependency: transitive 62 | description: 63 | name: bs58check 64 | sha256: c4a164d42b25c2f6bc88a8beccb9fc7d01440f3c60ba23663a20a70faf484ea9 65 | url: "https://pub.dev" 66 | source: hosted 67 | version: "1.0.2" 68 | buffer: 69 | dependency: transitive 70 | description: 71 | name: buffer 72 | sha256: "850b666e7d27c5cf42f39c43d3a9d37b7b35519b9715d9f85b418d76201518c6" 73 | url: "https://pub.dev" 74 | source: hosted 75 | version: "1.1.1" 76 | build: 77 | dependency: transitive 78 | description: 79 | name: build 80 | sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" 81 | url: "https://pub.dev" 82 | source: hosted 83 | version: "2.3.1" 84 | build_config: 85 | dependency: transitive 86 | description: 87 | name: build_config 88 | sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 89 | url: "https://pub.dev" 90 | source: hosted 91 | version: "1.1.1" 92 | built_collection: 93 | dependency: transitive 94 | description: 95 | name: built_collection 96 | sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" 97 | url: "https://pub.dev" 98 | source: hosted 99 | version: "5.1.1" 100 | built_value: 101 | dependency: transitive 102 | description: 103 | name: built_value 104 | sha256: "59e08b0079bb75f7e27392498e26339387c1089c6bd58525a14eb8508637277b" 105 | url: "https://pub.dev" 106 | source: hosted 107 | version: "8.4.2" 108 | characters: 109 | dependency: transitive 110 | description: 111 | name: characters 112 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" 113 | url: "https://pub.dev" 114 | source: hosted 115 | version: "1.3.0" 116 | checked_yaml: 117 | dependency: transitive 118 | description: 119 | name: checked_yaml 120 | sha256: dd007e4fb8270916820a0d66e24f619266b60773cddd082c6439341645af2659 121 | url: "https://pub.dev" 122 | source: hosted 123 | version: "2.0.1" 124 | clock: 125 | dependency: transitive 126 | description: 127 | name: clock 128 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf 129 | url: "https://pub.dev" 130 | source: hosted 131 | version: "1.1.1" 132 | code_builder: 133 | dependency: transitive 134 | description: 135 | name: code_builder 136 | sha256: "02ce3596b459c666530f045ad6f96209474e8fee6e4855940a3cee65fb872ec5" 137 | url: "https://pub.dev" 138 | source: hosted 139 | version: "4.3.0" 140 | collection: 141 | dependency: transitive 142 | description: 143 | name: collection 144 | sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 145 | url: "https://pub.dev" 146 | source: hosted 147 | version: "1.17.2" 148 | convert: 149 | dependency: transitive 150 | description: 151 | name: convert 152 | sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" 153 | url: "https://pub.dev" 154 | source: hosted 155 | version: "3.1.1" 156 | crypto: 157 | dependency: transitive 158 | description: 159 | name: crypto 160 | sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 161 | url: "https://pub.dev" 162 | source: hosted 163 | version: "3.0.2" 164 | cupertino_icons: 165 | dependency: "direct main" 166 | description: 167 | name: cupertino_icons 168 | sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be 169 | url: "https://pub.dev" 170 | source: hosted 171 | version: "1.0.5" 172 | dart_style: 173 | dependency: transitive 174 | description: 175 | name: dart_style 176 | sha256: "7a03456c3490394c8e7665890333e91ae8a49be43542b616e414449ac358acd4" 177 | url: "https://pub.dev" 178 | source: hosted 179 | version: "2.2.4" 180 | equatable: 181 | dependency: transitive 182 | description: 183 | name: equatable 184 | sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 185 | url: "https://pub.dev" 186 | source: hosted 187 | version: "2.0.5" 188 | eth_sig_util: 189 | dependency: "direct main" 190 | description: 191 | name: eth_sig_util 192 | sha256: "20fdc5ce3864e70e5ade1c1cd03cce4ef01018db00adab107303f9055d26b01a" 193 | url: "https://pub.dev" 194 | source: hosted 195 | version: "0.0.9" 196 | fake_async: 197 | dependency: transitive 198 | description: 199 | name: fake_async 200 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" 201 | url: "https://pub.dev" 202 | source: hosted 203 | version: "1.3.1" 204 | ffi: 205 | dependency: transitive 206 | description: 207 | name: ffi 208 | sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 209 | url: "https://pub.dev" 210 | source: hosted 211 | version: "2.0.1" 212 | file: 213 | dependency: transitive 214 | description: 215 | name: file 216 | sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" 217 | url: "https://pub.dev" 218 | source: hosted 219 | version: "6.1.4" 220 | fixnum: 221 | dependency: transitive 222 | description: 223 | name: fixnum 224 | sha256: "04be3e934c52e082558cc9ee21f42f5c1cd7a1262f4c63cd0357c08d5bba81ec" 225 | url: "https://pub.dev" 226 | source: hosted 227 | version: "1.0.1" 228 | flutter: 229 | dependency: "direct main" 230 | description: flutter 231 | source: sdk 232 | version: "0.0.0" 233 | flutter_lints: 234 | dependency: "direct dev" 235 | description: 236 | name: flutter_lints 237 | sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c 238 | url: "https://pub.dev" 239 | source: hosted 240 | version: "2.0.1" 241 | flutter_test: 242 | dependency: "direct dev" 243 | description: flutter 244 | source: sdk 245 | version: "0.0.0" 246 | flutter_web_plugins: 247 | dependency: transitive 248 | description: flutter 249 | source: sdk 250 | version: "0.0.0" 251 | glob: 252 | dependency: transitive 253 | description: 254 | name: glob 255 | sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" 256 | url: "https://pub.dev" 257 | source: hosted 258 | version: "2.1.1" 259 | hex: 260 | dependency: transitive 261 | description: 262 | name: hex 263 | sha256: "4e7cd54e4b59ba026432a6be2dd9d96e4c5205725194997193bf871703b82c4a" 264 | url: "https://pub.dev" 265 | source: hosted 266 | version: "0.2.0" 267 | http: 268 | dependency: transitive 269 | description: 270 | name: http 271 | sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" 272 | url: "https://pub.dev" 273 | source: hosted 274 | version: "0.13.5" 275 | http_parser: 276 | dependency: transitive 277 | description: 278 | name: http_parser 279 | sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" 280 | url: "https://pub.dev" 281 | source: hosted 282 | version: "4.0.2" 283 | js: 284 | dependency: transitive 285 | description: 286 | name: js 287 | sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" 288 | url: "https://pub.dev" 289 | source: hosted 290 | version: "0.6.5" 291 | json_annotation: 292 | dependency: transitive 293 | description: 294 | name: json_annotation 295 | sha256: "3520fa844009431b5d4491a5a778603520cdc399ab3406332dcc50f93547258c" 296 | url: "https://pub.dev" 297 | source: hosted 298 | version: "4.7.0" 299 | json_rpc_2: 300 | dependency: transitive 301 | description: 302 | name: json_rpc_2 303 | sha256: "5e469bffa23899edacb7b22787780068d650b106a21c76db3c49218ab7ca447e" 304 | url: "https://pub.dev" 305 | source: hosted 306 | version: "3.0.2" 307 | lints: 308 | dependency: transitive 309 | description: 310 | name: lints 311 | sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" 312 | url: "https://pub.dev" 313 | source: hosted 314 | version: "2.0.1" 315 | logging: 316 | dependency: transitive 317 | description: 318 | name: logging 319 | sha256: c0bbfe94d46aedf9b8b3e695cf3bd48c8e14b35e3b2c639e0aa7755d589ba946 320 | url: "https://pub.dev" 321 | source: hosted 322 | version: "1.1.0" 323 | matcher: 324 | dependency: transitive 325 | description: 326 | name: matcher 327 | sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" 328 | url: "https://pub.dev" 329 | source: hosted 330 | version: "0.12.16" 331 | material_color_utilities: 332 | dependency: transitive 333 | description: 334 | name: material_color_utilities 335 | sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" 336 | url: "https://pub.dev" 337 | source: hosted 338 | version: "0.5.0" 339 | meta: 340 | dependency: transitive 341 | description: 342 | name: meta 343 | sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" 344 | url: "https://pub.dev" 345 | source: hosted 346 | version: "1.9.1" 347 | package_config: 348 | dependency: transitive 349 | description: 350 | name: package_config 351 | sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" 352 | url: "https://pub.dev" 353 | source: hosted 354 | version: "2.1.0" 355 | path: 356 | dependency: transitive 357 | description: 358 | name: path 359 | sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" 360 | url: "https://pub.dev" 361 | source: hosted 362 | version: "1.8.3" 363 | path_provider_linux: 364 | dependency: transitive 365 | description: 366 | name: path_provider_linux 367 | sha256: ab0987bf95bc591da42dffb38c77398fc43309f0b9b894dcc5d6f40c4b26c379 368 | url: "https://pub.dev" 369 | source: hosted 370 | version: "2.1.7" 371 | path_provider_platform_interface: 372 | dependency: transitive 373 | description: 374 | name: path_provider_platform_interface 375 | sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76 376 | url: "https://pub.dev" 377 | source: hosted 378 | version: "2.0.5" 379 | path_provider_windows: 380 | dependency: transitive 381 | description: 382 | name: path_provider_windows 383 | sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c 384 | url: "https://pub.dev" 385 | source: hosted 386 | version: "2.1.3" 387 | platform: 388 | dependency: transitive 389 | description: 390 | name: platform 391 | sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" 392 | url: "https://pub.dev" 393 | source: hosted 394 | version: "3.1.0" 395 | plugin_platform_interface: 396 | dependency: transitive 397 | description: 398 | name: plugin_platform_interface 399 | sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a 400 | url: "https://pub.dev" 401 | source: hosted 402 | version: "2.1.3" 403 | pointycastle: 404 | dependency: transitive 405 | description: 406 | name: pointycastle 407 | sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346 408 | url: "https://pub.dev" 409 | source: hosted 410 | version: "3.6.2" 411 | process: 412 | dependency: transitive 413 | description: 414 | name: process 415 | sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" 416 | url: "https://pub.dev" 417 | source: hosted 418 | version: "4.2.4" 419 | pub_semver: 420 | dependency: transitive 421 | description: 422 | name: pub_semver 423 | sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" 424 | url: "https://pub.dev" 425 | source: hosted 426 | version: "2.1.3" 427 | pubspec_parse: 428 | dependency: transitive 429 | description: 430 | name: pubspec_parse 431 | sha256: "75f6614d6dde2dc68948dffbaa4fe5dae32cd700eb9fb763fe11dfb45a3c4d0a" 432 | url: "https://pub.dev" 433 | source: hosted 434 | version: "1.2.1" 435 | qr: 436 | dependency: transitive 437 | description: 438 | name: qr 439 | sha256: "5c4208b4dc0d55c3184d10d83ee0ded6212dc2b5e2ba17c5a0c0aab279128d21" 440 | url: "https://pub.dev" 441 | source: hosted 442 | version: "2.1.0" 443 | qr_flutter: 444 | dependency: "direct main" 445 | description: 446 | name: qr_flutter 447 | sha256: c5c121c54cb6dd837b9b9d57eb7bc7ec6df4aee741032060c8833a678c80b87e 448 | url: "https://pub.dev" 449 | source: hosted 450 | version: "4.0.0" 451 | shared_preferences: 452 | dependency: "direct main" 453 | description: 454 | name: shared_preferences 455 | sha256: "76917b7d4b9526b2ba416808a7eb9fb2863c1a09cf63ec85f1453da240fa818a" 456 | url: "https://pub.dev" 457 | source: hosted 458 | version: "2.0.15" 459 | shared_preferences_android: 460 | dependency: transitive 461 | description: 462 | name: shared_preferences_android 463 | sha256: "8e251f3c986002b65fed6396bce81f379fb63c27317d49743cf289fd0fd1ab97" 464 | url: "https://pub.dev" 465 | source: hosted 466 | version: "2.0.14" 467 | shared_preferences_ios: 468 | dependency: transitive 469 | description: 470 | name: shared_preferences_ios 471 | sha256: "585a14cefec7da8c9c2fb8cd283a3bb726b4155c0952afe6a0caaa7b2272de34" 472 | url: "https://pub.dev" 473 | source: hosted 474 | version: "2.1.1" 475 | shared_preferences_linux: 476 | dependency: transitive 477 | description: 478 | name: shared_preferences_linux 479 | sha256: fbc3cd6826896b66a5f576b025e4f344f780c84ea7f8203097a353370607a2c8 480 | url: "https://pub.dev" 481 | source: hosted 482 | version: "2.1.2" 483 | shared_preferences_macos: 484 | dependency: transitive 485 | description: 486 | name: shared_preferences_macos 487 | sha256: fbb94bf296576f49be37a1496d5951796211a8db0aa22cc0d68c46440dad808c 488 | url: "https://pub.dev" 489 | source: hosted 490 | version: "2.0.4" 491 | shared_preferences_platform_interface: 492 | dependency: transitive 493 | description: 494 | name: shared_preferences_platform_interface 495 | sha256: da9431745ede5ece47bc26d5d73a9d3c6936ef6945c101a5aca46f62e52c1cf3 496 | url: "https://pub.dev" 497 | source: hosted 498 | version: "2.1.0" 499 | shared_preferences_web: 500 | dependency: transitive 501 | description: 502 | name: shared_preferences_web 503 | sha256: a4b5bc37fe1b368bbc81f953197d55e12f49d0296e7e412dfe2d2d77d6929958 504 | url: "https://pub.dev" 505 | source: hosted 506 | version: "2.0.4" 507 | shared_preferences_windows: 508 | dependency: transitive 509 | description: 510 | name: shared_preferences_windows 511 | sha256: "07c274c2115d4d5e4280622abb09f0980e2c5b1fcdc98ae9f59a3bad5bfc1f26" 512 | url: "https://pub.dev" 513 | source: hosted 514 | version: "2.1.2" 515 | sky_engine: 516 | dependency: transitive 517 | description: flutter 518 | source: sdk 519 | version: "0.0.99" 520 | source_span: 521 | dependency: transitive 522 | description: 523 | name: source_span 524 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" 525 | url: "https://pub.dev" 526 | source: hosted 527 | version: "1.10.0" 528 | stack_trace: 529 | dependency: transitive 530 | description: 531 | name: stack_trace 532 | sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 533 | url: "https://pub.dev" 534 | source: hosted 535 | version: "1.11.0" 536 | stream_channel: 537 | dependency: transitive 538 | description: 539 | name: stream_channel 540 | sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" 541 | url: "https://pub.dev" 542 | source: hosted 543 | version: "2.1.1" 544 | stream_transform: 545 | dependency: transitive 546 | description: 547 | name: stream_transform 548 | sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" 549 | url: "https://pub.dev" 550 | source: hosted 551 | version: "2.1.0" 552 | string_scanner: 553 | dependency: transitive 554 | description: 555 | name: string_scanner 556 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" 557 | url: "https://pub.dev" 558 | source: hosted 559 | version: "1.2.0" 560 | term_glyph: 561 | dependency: transitive 562 | description: 563 | name: term_glyph 564 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 565 | url: "https://pub.dev" 566 | source: hosted 567 | version: "1.2.1" 568 | test_api: 569 | dependency: transitive 570 | description: 571 | name: test_api 572 | sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" 573 | url: "https://pub.dev" 574 | source: hosted 575 | version: "0.6.0" 576 | typed_data: 577 | dependency: transitive 578 | description: 579 | name: typed_data 580 | sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" 581 | url: "https://pub.dev" 582 | source: hosted 583 | version: "1.3.1" 584 | url_launcher: 585 | dependency: "direct main" 586 | description: 587 | name: url_launcher 588 | sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e" 589 | url: "https://pub.dev" 590 | source: hosted 591 | version: "6.1.10" 592 | url_launcher_android: 593 | dependency: transitive 594 | description: 595 | name: url_launcher_android 596 | sha256: dd729390aa936bf1bdf5cd1bc7468ff340263f80a2c4f569416507667de8e3c8 597 | url: "https://pub.dev" 598 | source: hosted 599 | version: "6.0.26" 600 | url_launcher_ios: 601 | dependency: transitive 602 | description: 603 | name: url_launcher_ios 604 | sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2" 605 | url: "https://pub.dev" 606 | source: hosted 607 | version: "6.1.4" 608 | url_launcher_linux: 609 | dependency: transitive 610 | description: 611 | name: url_launcher_linux 612 | sha256: "206fb8334a700ef7754d6a9ed119e7349bc830448098f21a69bf1b4ed038cabc" 613 | url: "https://pub.dev" 614 | source: hosted 615 | version: "3.0.4" 616 | url_launcher_macos: 617 | dependency: transitive 618 | description: 619 | name: url_launcher_macos 620 | sha256: "0ef2b4f97942a16523e51256b799e9aa1843da6c60c55eefbfa9dbc2dcb8331a" 621 | url: "https://pub.dev" 622 | source: hosted 623 | version: "3.0.4" 624 | url_launcher_platform_interface: 625 | dependency: transitive 626 | description: 627 | name: url_launcher_platform_interface 628 | sha256: "6c9ca697a5ae218ce56cece69d46128169a58aa8653c1b01d26fcd4aad8c4370" 629 | url: "https://pub.dev" 630 | source: hosted 631 | version: "2.1.2" 632 | url_launcher_web: 633 | dependency: transitive 634 | description: 635 | name: url_launcher_web 636 | sha256: "81fe91b6c4f84f222d186a9d23c73157dc4c8e1c71489c4d08be1ad3b228f1aa" 637 | url: "https://pub.dev" 638 | source: hosted 639 | version: "2.0.16" 640 | url_launcher_windows: 641 | dependency: transitive 642 | description: 643 | name: url_launcher_windows 644 | sha256: a83ba3607a507758669cfafb03f9de09bf6e6280c14d9b9cb18f013e406dcacd 645 | url: "https://pub.dev" 646 | source: hosted 647 | version: "3.0.5" 648 | uuid: 649 | dependency: transitive 650 | description: 651 | name: uuid 652 | sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" 653 | url: "https://pub.dev" 654 | source: hosted 655 | version: "3.0.7" 656 | vector_math: 657 | dependency: transitive 658 | description: 659 | name: vector_math 660 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" 661 | url: "https://pub.dev" 662 | source: hosted 663 | version: "2.1.4" 664 | wallet_connect_v2: 665 | dependency: "direct main" 666 | description: 667 | path: ".." 668 | relative: true 669 | source: path 670 | version: "1.0.9" 671 | watcher: 672 | dependency: transitive 673 | description: 674 | name: watcher 675 | sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" 676 | url: "https://pub.dev" 677 | source: hosted 678 | version: "1.0.2" 679 | web: 680 | dependency: transitive 681 | description: 682 | name: web 683 | sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 684 | url: "https://pub.dev" 685 | source: hosted 686 | version: "0.1.4-beta" 687 | web3dart: 688 | dependency: "direct main" 689 | description: 690 | name: web3dart 691 | sha256: "3812ca8188d2586c698c8563865ce142bc30c698849d9bbb5d29cac36dc07f6f" 692 | url: "https://pub.dev" 693 | source: hosted 694 | version: "2.3.3" 695 | win32: 696 | dependency: transitive 697 | description: 698 | name: win32 699 | sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 700 | url: "https://pub.dev" 701 | source: hosted 702 | version: "3.1.3" 703 | xdg_directories: 704 | dependency: transitive 705 | description: 706 | name: xdg_directories 707 | sha256: "11541eedefbcaec9de35aa82650b695297ce668662bbd6e3911a7fabdbde589f" 708 | url: "https://pub.dev" 709 | source: hosted 710 | version: "0.2.0+2" 711 | yaml: 712 | dependency: transitive 713 | description: 714 | name: yaml 715 | sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" 716 | url: "https://pub.dev" 717 | source: hosted 718 | version: "3.1.1" 719 | sdks: 720 | dart: ">=3.1.0-185.0.dev <4.0.0" 721 | flutter: ">=3.3.0" 722 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 509908205AC62BB6C07DE433 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BBC5DA1F6E85842CEAFBE60 /* Pods_Runner.framework */; }; 13 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXCopyFilesBuildPhase section */ 20 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 21 | isa = PBXCopyFilesBuildPhase; 22 | buildActionMask = 2147483647; 23 | dstPath = ""; 24 | dstSubfolderSpec = 10; 25 | files = ( 26 | ); 27 | name = "Embed Frameworks"; 28 | runOnlyForDeploymentPostprocessing = 0; 29 | }; 30 | /* End PBXCopyFilesBuildPhase section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 34 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 35 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 36 | 4BBC5DA1F6E85842CEAFBE60 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 37 | 5907443F21E5A4A20644E1CE /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 38 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 39 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 41 | 928AB4617C0063396378E311 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 42 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 43 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 44 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 46 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 47 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 48 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | FFEB6B79E823F9C336F38FCF /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | 509908205AC62BB6C07DE433 /* Pods_Runner.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 0B9A00909FD5BE60CAB8C5B7 /* Pods */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 928AB4617C0063396378E311 /* Pods-Runner.debug.xcconfig */, 68 | 5907443F21E5A4A20644E1CE /* Pods-Runner.release.xcconfig */, 69 | FFEB6B79E823F9C336F38FCF /* Pods-Runner.profile.xcconfig */, 70 | ); 71 | name = Pods; 72 | path = Pods; 73 | sourceTree = ""; 74 | }; 75 | 9740EEB11CF90186004384FC /* Flutter */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 79 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 80 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 81 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 82 | ); 83 | name = Flutter; 84 | sourceTree = ""; 85 | }; 86 | 97C146E51CF9000F007C117D = { 87 | isa = PBXGroup; 88 | children = ( 89 | 9740EEB11CF90186004384FC /* Flutter */, 90 | 97C146F01CF9000F007C117D /* Runner */, 91 | 97C146EF1CF9000F007C117D /* Products */, 92 | 0B9A00909FD5BE60CAB8C5B7 /* Pods */, 93 | CCAC9448A96521981A967013 /* Frameworks */, 94 | ); 95 | sourceTree = ""; 96 | }; 97 | 97C146EF1CF9000F007C117D /* Products */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 97C146EE1CF9000F007C117D /* Runner.app */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | 97C146F01CF9000F007C117D /* Runner */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 109 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 110 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 111 | 97C147021CF9000F007C117D /* Info.plist */, 112 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 113 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 114 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 115 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 116 | ); 117 | path = Runner; 118 | sourceTree = ""; 119 | }; 120 | CCAC9448A96521981A967013 /* Frameworks */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 4BBC5DA1F6E85842CEAFBE60 /* Pods_Runner.framework */, 124 | ); 125 | name = Frameworks; 126 | sourceTree = ""; 127 | }; 128 | /* End PBXGroup section */ 129 | 130 | /* Begin PBXNativeTarget section */ 131 | 97C146ED1CF9000F007C117D /* Runner */ = { 132 | isa = PBXNativeTarget; 133 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 134 | buildPhases = ( 135 | 73FF07EC05CC2D62B4AAD69C /* [CP] Check Pods Manifest.lock */, 136 | 9740EEB61CF901F6004384FC /* Run Script */, 137 | 97C146EA1CF9000F007C117D /* Sources */, 138 | 97C146EB1CF9000F007C117D /* Frameworks */, 139 | 97C146EC1CF9000F007C117D /* Resources */, 140 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 141 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 142 | 599F46A266B40D6E8F70267A /* [CP] Embed Pods Frameworks */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = Runner; 149 | productName = Runner; 150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | 97C146E61CF9000F007C117D /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastUpgradeCheck = 1300; 160 | ORGANIZATIONNAME = ""; 161 | TargetAttributes = { 162 | 97C146ED1CF9000F007C117D = { 163 | CreatedOnToolsVersion = 7.3.1; 164 | LastSwiftMigration = 1100; 165 | }; 166 | }; 167 | }; 168 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 169 | compatibilityVersion = "Xcode 9.3"; 170 | developmentRegion = en; 171 | hasScannedForEncodings = 0; 172 | knownRegions = ( 173 | en, 174 | Base, 175 | ); 176 | mainGroup = 97C146E51CF9000F007C117D; 177 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 178 | projectDirPath = ""; 179 | projectRoot = ""; 180 | targets = ( 181 | 97C146ED1CF9000F007C117D /* Runner */, 182 | ); 183 | }; 184 | /* End PBXProject section */ 185 | 186 | /* Begin PBXResourcesBuildPhase section */ 187 | 97C146EC1CF9000F007C117D /* Resources */ = { 188 | isa = PBXResourcesBuildPhase; 189 | buildActionMask = 2147483647; 190 | files = ( 191 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 192 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 193 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 194 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | /* End PBXResourcesBuildPhase section */ 199 | 200 | /* Begin PBXShellScriptBuildPhase section */ 201 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 202 | isa = PBXShellScriptBuildPhase; 203 | alwaysOutOfDate = 1; 204 | buildActionMask = 2147483647; 205 | files = ( 206 | ); 207 | inputPaths = ( 208 | ); 209 | name = "Thin Binary"; 210 | outputPaths = ( 211 | ); 212 | runOnlyForDeploymentPostprocessing = 0; 213 | shellPath = /bin/sh; 214 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 215 | }; 216 | 599F46A266B40D6E8F70267A /* [CP] Embed Pods Frameworks */ = { 217 | isa = PBXShellScriptBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | ); 221 | inputFileListPaths = ( 222 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", 223 | ); 224 | name = "[CP] Embed Pods Frameworks"; 225 | outputFileListPaths = ( 226 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", 227 | ); 228 | runOnlyForDeploymentPostprocessing = 0; 229 | shellPath = /bin/sh; 230 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 231 | showEnvVarsInLog = 0; 232 | }; 233 | 73FF07EC05CC2D62B4AAD69C /* [CP] Check Pods Manifest.lock */ = { 234 | isa = PBXShellScriptBuildPhase; 235 | buildActionMask = 2147483647; 236 | files = ( 237 | ); 238 | inputFileListPaths = ( 239 | ); 240 | inputPaths = ( 241 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 242 | "${PODS_ROOT}/Manifest.lock", 243 | ); 244 | name = "[CP] Check Pods Manifest.lock"; 245 | outputFileListPaths = ( 246 | ); 247 | outputPaths = ( 248 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 249 | ); 250 | runOnlyForDeploymentPostprocessing = 0; 251 | shellPath = /bin/sh; 252 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 253 | showEnvVarsInLog = 0; 254 | }; 255 | 9740EEB61CF901F6004384FC /* Run Script */ = { 256 | isa = PBXShellScriptBuildPhase; 257 | alwaysOutOfDate = 1; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | ); 261 | inputPaths = ( 262 | ); 263 | name = "Run Script"; 264 | outputPaths = ( 265 | ); 266 | runOnlyForDeploymentPostprocessing = 0; 267 | shellPath = /bin/sh; 268 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 269 | }; 270 | /* End PBXShellScriptBuildPhase section */ 271 | 272 | /* Begin PBXSourcesBuildPhase section */ 273 | 97C146EA1CF9000F007C117D /* Sources */ = { 274 | isa = PBXSourcesBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 278 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 279 | ); 280 | runOnlyForDeploymentPostprocessing = 0; 281 | }; 282 | /* End PBXSourcesBuildPhase section */ 283 | 284 | /* Begin PBXVariantGroup section */ 285 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 286 | isa = PBXVariantGroup; 287 | children = ( 288 | 97C146FB1CF9000F007C117D /* Base */, 289 | ); 290 | name = Main.storyboard; 291 | sourceTree = ""; 292 | }; 293 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 294 | isa = PBXVariantGroup; 295 | children = ( 296 | 97C147001CF9000F007C117D /* Base */, 297 | ); 298 | name = LaunchScreen.storyboard; 299 | sourceTree = ""; 300 | }; 301 | /* End PBXVariantGroup section */ 302 | 303 | /* Begin XCBuildConfiguration section */ 304 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 305 | isa = XCBuildConfiguration; 306 | buildSettings = { 307 | ALWAYS_SEARCH_USER_PATHS = NO; 308 | CLANG_ANALYZER_NONNULL = YES; 309 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 310 | CLANG_CXX_LIBRARY = "libc++"; 311 | CLANG_ENABLE_MODULES = YES; 312 | CLANG_ENABLE_OBJC_ARC = YES; 313 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 314 | CLANG_WARN_BOOL_CONVERSION = YES; 315 | CLANG_WARN_COMMA = YES; 316 | CLANG_WARN_CONSTANT_CONVERSION = YES; 317 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 318 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 319 | CLANG_WARN_EMPTY_BODY = YES; 320 | CLANG_WARN_ENUM_CONVERSION = YES; 321 | CLANG_WARN_INFINITE_RECURSION = YES; 322 | CLANG_WARN_INT_CONVERSION = YES; 323 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 325 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 326 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 327 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 328 | CLANG_WARN_STRICT_PROTOTYPES = YES; 329 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 330 | CLANG_WARN_UNREACHABLE_CODE = YES; 331 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 332 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 333 | COPY_PHASE_STRIP = NO; 334 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 335 | ENABLE_NS_ASSERTIONS = NO; 336 | ENABLE_STRICT_OBJC_MSGSEND = YES; 337 | GCC_C_LANGUAGE_STANDARD = gnu99; 338 | GCC_NO_COMMON_BLOCKS = YES; 339 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 340 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 341 | GCC_WARN_UNDECLARED_SELECTOR = YES; 342 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 343 | GCC_WARN_UNUSED_FUNCTION = YES; 344 | GCC_WARN_UNUSED_VARIABLE = YES; 345 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 346 | MTL_ENABLE_DEBUG_INFO = NO; 347 | SDKROOT = iphoneos; 348 | SUPPORTED_PLATFORMS = iphoneos; 349 | TARGETED_DEVICE_FAMILY = "1,2"; 350 | VALIDATE_PRODUCT = YES; 351 | }; 352 | name = Profile; 353 | }; 354 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 355 | isa = XCBuildConfiguration; 356 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 357 | buildSettings = { 358 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 359 | CLANG_ENABLE_MODULES = YES; 360 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 361 | DEVELOPMENT_TEAM = D3ZNGP8ES3; 362 | ENABLE_BITCODE = NO; 363 | INFOPLIST_FILE = Runner/Info.plist; 364 | LD_RUNPATH_SEARCH_PATHS = ( 365 | "$(inherited)", 366 | "@executable_path/Frameworks", 367 | ); 368 | PRODUCT_BUNDLE_IDENTIFIER = com.avacus.walletConnectV2Example; 369 | PRODUCT_NAME = "$(TARGET_NAME)"; 370 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 371 | SWIFT_VERSION = 5.0; 372 | VERSIONING_SYSTEM = "apple-generic"; 373 | }; 374 | name = Profile; 375 | }; 376 | 97C147031CF9000F007C117D /* Debug */ = { 377 | isa = XCBuildConfiguration; 378 | buildSettings = { 379 | ALWAYS_SEARCH_USER_PATHS = NO; 380 | CLANG_ANALYZER_NONNULL = YES; 381 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 382 | CLANG_CXX_LIBRARY = "libc++"; 383 | CLANG_ENABLE_MODULES = YES; 384 | CLANG_ENABLE_OBJC_ARC = YES; 385 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 386 | CLANG_WARN_BOOL_CONVERSION = YES; 387 | CLANG_WARN_COMMA = YES; 388 | CLANG_WARN_CONSTANT_CONVERSION = YES; 389 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 390 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 391 | CLANG_WARN_EMPTY_BODY = YES; 392 | CLANG_WARN_ENUM_CONVERSION = YES; 393 | CLANG_WARN_INFINITE_RECURSION = YES; 394 | CLANG_WARN_INT_CONVERSION = YES; 395 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 396 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 397 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 398 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 399 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 400 | CLANG_WARN_STRICT_PROTOTYPES = YES; 401 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 402 | CLANG_WARN_UNREACHABLE_CODE = YES; 403 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 404 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 405 | COPY_PHASE_STRIP = NO; 406 | DEBUG_INFORMATION_FORMAT = dwarf; 407 | ENABLE_STRICT_OBJC_MSGSEND = YES; 408 | ENABLE_TESTABILITY = YES; 409 | GCC_C_LANGUAGE_STANDARD = gnu99; 410 | GCC_DYNAMIC_NO_PIC = NO; 411 | GCC_NO_COMMON_BLOCKS = YES; 412 | GCC_OPTIMIZATION_LEVEL = 0; 413 | GCC_PREPROCESSOR_DEFINITIONS = ( 414 | "DEBUG=1", 415 | "$(inherited)", 416 | ); 417 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 418 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 419 | GCC_WARN_UNDECLARED_SELECTOR = YES; 420 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 421 | GCC_WARN_UNUSED_FUNCTION = YES; 422 | GCC_WARN_UNUSED_VARIABLE = YES; 423 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 424 | MTL_ENABLE_DEBUG_INFO = YES; 425 | ONLY_ACTIVE_ARCH = YES; 426 | SDKROOT = iphoneos; 427 | TARGETED_DEVICE_FAMILY = "1,2"; 428 | }; 429 | name = Debug; 430 | }; 431 | 97C147041CF9000F007C117D /* Release */ = { 432 | isa = XCBuildConfiguration; 433 | buildSettings = { 434 | ALWAYS_SEARCH_USER_PATHS = NO; 435 | CLANG_ANALYZER_NONNULL = YES; 436 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 437 | CLANG_CXX_LIBRARY = "libc++"; 438 | CLANG_ENABLE_MODULES = YES; 439 | CLANG_ENABLE_OBJC_ARC = YES; 440 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 441 | CLANG_WARN_BOOL_CONVERSION = YES; 442 | CLANG_WARN_COMMA = YES; 443 | CLANG_WARN_CONSTANT_CONVERSION = YES; 444 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 445 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 446 | CLANG_WARN_EMPTY_BODY = YES; 447 | CLANG_WARN_ENUM_CONVERSION = YES; 448 | CLANG_WARN_INFINITE_RECURSION = YES; 449 | CLANG_WARN_INT_CONVERSION = YES; 450 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 451 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 452 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 453 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 454 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 455 | CLANG_WARN_STRICT_PROTOTYPES = YES; 456 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 457 | CLANG_WARN_UNREACHABLE_CODE = YES; 458 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 459 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 460 | COPY_PHASE_STRIP = NO; 461 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 462 | ENABLE_NS_ASSERTIONS = NO; 463 | ENABLE_STRICT_OBJC_MSGSEND = YES; 464 | GCC_C_LANGUAGE_STANDARD = gnu99; 465 | GCC_NO_COMMON_BLOCKS = YES; 466 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 467 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 468 | GCC_WARN_UNDECLARED_SELECTOR = YES; 469 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 470 | GCC_WARN_UNUSED_FUNCTION = YES; 471 | GCC_WARN_UNUSED_VARIABLE = YES; 472 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 473 | MTL_ENABLE_DEBUG_INFO = NO; 474 | SDKROOT = iphoneos; 475 | SUPPORTED_PLATFORMS = iphoneos; 476 | SWIFT_COMPILATION_MODE = wholemodule; 477 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 478 | TARGETED_DEVICE_FAMILY = "1,2"; 479 | VALIDATE_PRODUCT = YES; 480 | }; 481 | name = Release; 482 | }; 483 | 97C147061CF9000F007C117D /* Debug */ = { 484 | isa = XCBuildConfiguration; 485 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 486 | buildSettings = { 487 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 488 | CLANG_ENABLE_MODULES = YES; 489 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 490 | DEVELOPMENT_TEAM = D3ZNGP8ES3; 491 | ENABLE_BITCODE = NO; 492 | INFOPLIST_FILE = Runner/Info.plist; 493 | LD_RUNPATH_SEARCH_PATHS = ( 494 | "$(inherited)", 495 | "@executable_path/Frameworks", 496 | ); 497 | PRODUCT_BUNDLE_IDENTIFIER = com.avacus.walletConnectV2Example; 498 | PRODUCT_NAME = "$(TARGET_NAME)"; 499 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 500 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 501 | SWIFT_VERSION = 5.0; 502 | VERSIONING_SYSTEM = "apple-generic"; 503 | }; 504 | name = Debug; 505 | }; 506 | 97C147071CF9000F007C117D /* Release */ = { 507 | isa = XCBuildConfiguration; 508 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 509 | buildSettings = { 510 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 511 | CLANG_ENABLE_MODULES = YES; 512 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 513 | DEVELOPMENT_TEAM = D3ZNGP8ES3; 514 | ENABLE_BITCODE = NO; 515 | INFOPLIST_FILE = Runner/Info.plist; 516 | LD_RUNPATH_SEARCH_PATHS = ( 517 | "$(inherited)", 518 | "@executable_path/Frameworks", 519 | ); 520 | PRODUCT_BUNDLE_IDENTIFIER = com.avacus.walletConnectV2Example; 521 | PRODUCT_NAME = "$(TARGET_NAME)"; 522 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 523 | SWIFT_VERSION = 5.0; 524 | VERSIONING_SYSTEM = "apple-generic"; 525 | }; 526 | name = Release; 527 | }; 528 | /* End XCBuildConfiguration section */ 529 | 530 | /* Begin XCConfigurationList section */ 531 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 532 | isa = XCConfigurationList; 533 | buildConfigurations = ( 534 | 97C147031CF9000F007C117D /* Debug */, 535 | 97C147041CF9000F007C117D /* Release */, 536 | 249021D3217E4FDB00AE95B9 /* Profile */, 537 | ); 538 | defaultConfigurationIsVisible = 0; 539 | defaultConfigurationName = Release; 540 | }; 541 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 542 | isa = XCConfigurationList; 543 | buildConfigurations = ( 544 | 97C147061CF9000F007C117D /* Debug */, 545 | 97C147071CF9000F007C117D /* Release */, 546 | 249021D4217E4FDB00AE95B9 /* Profile */, 547 | ); 548 | defaultConfigurationIsVisible = 0; 549 | defaultConfigurationName = Release; 550 | }; 551 | /* End XCConfigurationList section */ 552 | }; 553 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 554 | } 555 | --------------------------------------------------------------------------------