The communications protocol for web3, Reown brings the ecosystem together by enabling hundreds of wallets and apps to securely connect and interact. This repository contains Kotlin implementation of Reown protocols for Android applications.
The Reown Kotlin SDK is a comprehensive mobile development kit that enables blockchain wallet functionality and wallet-to-dApp communication for Android applications. It implements the WalletConnect protocol suite, allowing mobile wallets to securely connect with decentralized applications (dApps).
- Wallet Implementation: Manage crypto accounts and transactions
- Sign Protocol: Secure connection between wallets and dApps
- Notify Protocol: Blockchain-related notifications
- Chain Abstraction: Simplified cross-chain transactions
- Authentication: Wallet verification mechanisms
- WalletKit: SDK for building wallet applications with full blockchain capabilities
- AppKit: SDK for building dApps that connect to wallets
- Protocol Layer: Implementations of Sign, Notify, and Auth protocols
The Reown Kotlin SDK is organized as a modular system with several layers:
-
Foundation Layer: Base libraries providing core functionality
foundation/: Fundamental libraries and utilities
-
Core Layer: Essential platform-specific implementations
core/android/: Core Android implementationcore/modal/: Core modal UI componentscore/bom/: Bill of Materials for dependency version management
-
Protocol Layer: Protocol-specific implementations
protocol/sign/: Implementation of the WalletConnect Sign protocolprotocol/notify/: Implementation of the WalletConnect Notify protocol
-
Product Layer: High-level SDK features
product/walletkit/: SDK for building wallet applicationsproduct/appkit/: SDK for building dApp applications
-
Sample Applications: Example implementations
sample/wallet/: Wallet sample applicationsample/dapp/: dApp sample applicationsample/pos/: POS sample applicationsample/modal/: Modal sample application
To integrate the Reown Kotlin SDK into your project, use the Bill of Materials (BOM) to manage compatible dependencies:
dependencies {
implementation(platform("com.reown:android-bom:{BOM version}"))
// Core SDK
implementation("com.reown:android-core")
// For wallet applications
implementation("com.reown:walletkit")
// For dApp applications
implementation("com.reown:appkit")
}The repository includes several sample applications that demonstrate different use cases of the Reown Kotlin SDK. Follow these instructions to build and run the sample apps:
- Android Studio Arctic Fox or later
- Android SDK API level 21 or higher
- Gradle 7.0 or later
- JDK 11 or later
-
Configure Keystore Properties Create a
secrets.propertiesfile in the root directory with empty strings:WC_KEYSTORE_ALIAS="" WC_KEYSTORE_ALIAS_DEBUG="" WC_FILENAME_DEBUG="" WC_STORE_PASSWORD_DEBUG="" WC_KEY_PASSWORD_DEBUG="" WC_FILENAME_INTERNAL="" WC_STORE_PASSWORD_INTERNAL="" WC_KEY_PASSWORD_INTERNAL="" WC_FILENAME_UPLOAD="" WC_STORE_PASSWORD_UPLOAD="" WC_KEY_PASSWORD_UPLOAD=""
-
Configure Google Services Each sample app requires a
google-services.jsonfile in itssrcdirectory. The file should contain:mobilesdk_app_id: Your Firebase project IDpackage_name: The sample app's package nameapi_key: Your Firebase API key
Example
google-services.jsonfile:{ "project_info": { "project_number": "1234567890", "project_id": "dummy-project-id", "storage_bucket": "dummy-project-id.appspot.com" }, "client": [ { "client_info": { "mobilesdk_app_id": "1:1234567890:android:abcdef123456", "android_client_info": { "package_name": "com.reown.sample.{sample_name}.debug" } }, "oauth_client": [ { "client_id": "1234567890-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com", "client_type": 3 } ], "api_key": [ { "current_key": "AIzaDummyKeyForSample123456" } ], "services": { "appinvite_service": { "other_platform_oauth_client": [] } } } ], "configuration_version": "1" }Note: Replace
{sample_name}with the actual sample name:wallet,dapp,pos, ormodal. You need to create this file for each sample app you want to build. Use the example content if you want to just build samples locally.
- Purpose: Demonstrates a complete wallet implementation
- Package:
com.reown.sample.wallet - Build Command:
./gradlew :sample:wallet:assembleDebug
- Purpose: Shows how to build a dApp that connects to wallets
- Package:
com.reown.sample.dapp - Build Command:
./gradlew :sample:dapp:assembleDebug
- Purpose: Point of Sale application example
- Package:
com.reown.sample.pos - Build Command:
./gradlew :sample:pos:assembleDebug
- Purpose: Modal UI integration example
- Package:
com.reown.sample.modal - Build Command:
./gradlew :sample:modal:assembleDebug
- Build all samples:
./gradlew :sample:assembleDebug - Build specific sample:
./gradlew :sample:{sample_name}:assembleDebug - Install on device:
./gradlew :sample:{sample_name}:installDebug - Run tests:
./gradlew :sample:{sample_name}:testDebugUnitTest
- Build errors: Ensure all dependencies are synced with
./gradlew build - Keystore issues: Verify
secrets.propertiescontains valid keystore information - Google Services: Ensure
google-services.jsonis properly configured for each sample - Gradle sync: Try
./gradlew cleanfollowed by./gradlew build