Skip to main content
Version: 2.0 beta

Kotlin Client (Android)

Kotlin implementation of WalletConnect v2 protocol for native Android applications.

caution

Note: The Kotlin client is in Alpha and should only be used for testing.

Installation

To get started, add the WalletConnect library as a module to your project

Project build.gradle.kts

implementation(project(":walletconnectV2"))

Requirements

  • Java 11

Usage

Using WalletConnect

Initialize WalletConnect Client

val initializeParams = ClientTypes.InitialParams(useTls = true, hostName = "relay.walletconnect.org", apiKey = "sample key", isController = true)
WalletConnectClient.initalize(initalizeParams)

The controller client will always be the "wallet" which is exposing blockchain accounts to a "dapp" and therefore is also in charge of signing.

Pair Clients

val pairParams = ClientTypes.PairParams("wc:...")
val pairListener = ClientListeners.Pairing { topic -> /* handle topic */ }
WalletConnectClient.pair(pairParams, pairListener)

API Keys

For api keys look at API Keys.