Kotlin

Requirements

  • Android min SDK 23

  • Java 11

To interact with Keeper Wallet in your Android app, complete the following steps:

For more information on how to use Kotlin implementation of WalletConnect, see their docs.

Step 1. Register your project in WalletConnect Cloud

  1. Go to WalletConnect Cloud and sign in or sign up.

  2. Click + New project.

  3. Give your project a name and click Create.

  4. On the project page, obtain a Project ID.

Step 2. Install WalletConnect

root/build.gradle.kts:

app/build.gradle.kts

Step 3. Initialize WalletConnect client

Step 4. Get a pairing URI for Keeper Wallet

Send a request to WalletConnect to get a pairing URI for Keeper Wallet.

Step 5. Connect Keeper Wallet

Here's how it works:

  1. Your app calls Keeper, specifying the callback URL in the request.

  2. The Keeper Wallet app opens and prompts the user to connect.

  3. Once the user confirms or cancels the connection, your app receives a callback.

Deep Links are used to interact with Keeper Wallet. For the callback, the Deep Link must be configured in your app.

The result of connecting is passed via onSessionApproved delegate function. Read more in SignClient.DappDelegate section of WalletConnect docs.

Step 6. Sign a transaction/order/message

Here is how it works:

  1. Your app sends a signing request via WalletConnect.

  2. Your app calls Keeper, specifying the callback URL in the request.

  3. The Keeper Wallet app opens and prompts the user to sign the transaction, order, or custom message.

  4. Once the user confirms or cancels the request, your app receives a callback.

Transaction

Order

Custom message

Call Keeper Wallet

Specify topic and callback in the request.

The result of signing the request comes in the onSessionRequestResponse function.

Last updated

Was this helpful?