Sample crypto wallet for Wallet Link SDK.

Related tags

App DemoWallet
Overview

DemoWallet

This repo is sample app for Wallet Link SDK.

WalletLink is an open protocol that lets users connect their mobile wallets to your DApp.

With the WalletLink SDK, your mobile wallet will be able to interact with DApps on the desktop and be able to sign web3 transactions and messages.

For more info check SDK

The origin repo

Usage

Wallet Side

  1. Monitoring the network and Init the walletlink instance
    val intentFilter = IntentFilter().apply { addAction(ConnectivityManager.CONNECTIVITY_ACTION) }
    this.registerReceiver(Internet, intentFilter)
    Internet.startMonitoring()
    val walletLink = WalletLink(notificationUrl, context)
  1. Link to bridge server, the session id and secret come from Dapp will generate a dapp instance and be subscribed on walletlink instance.
    // To pair the device with a browser after scanning WalletLink QR code
    walletLink.link(
        sessionId = sessionId,
        secret = secret,
        url = serverUrl,
        userId = userId,
        metadata = mapOf(ClientMetadataKey.EthereumAddress to wallet.primaryAddress)
    )
        .subscribeBy(onSuccess = {
    // New WalletLink connection was established
        }, onError = { error ->
    // Error while connecting to WalletLink server (walletlinkd)
        })
        .addTo(disposeBag)
  1. Listen on incoming requests from the subscribed Dapp
    /*
    Listen on incoming requests, it should be requestsObservable not requests,
    the origin sdk readme is incorrect
    */
    walletLink.requestsObservable
        .observeOn(AndroidSchedulers.mainThread())
        .subscribeBy(onNext = { request ->
    // New unseen request
        })
        .addTo(disposeBag)
  1. The function is not provided in original branch
    // Approve DApp permission request (EIP-1102)
    walletLink.approveDappPermission(request.hostRequestId)
        .subscribeBy(onSuccess = {
    // Dapp received EIP-1102 approval
        }, onError = { error ->
    // Dapp failed to receive EIP-1102 approval
        })
        .addTo(disposeBag)
  1. Approve or reject the request come from Dapp
    // Approve a given transaction/message signing request
    walletLink.approve(request.hostRequestId, signedData)
        .subscribeBy(onSuccess = {
    // Dapp received request approval
        }, onError = { error ->
    // Dapp failed to receive request approval
        })
        .addTo(disposeBag)


    // Reject transaction/message/EIP-1102 request
    walletLink.reject(request.hostRequestId)
        .subscribeBy(onSuccess = {
    // Dapp received request rejection
        }, onError = { error ->
    // Dapp failed to receive request rejection
        })
        .addTo(disposeBag)
You might also like...
A sample application showcasing authenticators using OIE android SDK

Embedded Auth with Okta OIE Android SDK - Kotlin Sample Application ❕ The sample uses an SDK that requires usage of the Okta Identity Engine. This fun

EU Digital COVID Certificate Wallet App - Android

This repository contains the source code of the EU Digital COVID Certificate Wallet App for Android.

Ergo Wallet for Android, built on top of Ergo Appkit.
Ergo Wallet for Android, built on top of Ergo Appkit.

Ergo Wallet Android Ergo Wallet for Android, built on top of Ergo Appkit. You need at least Android 7 to run Ergo Wallet. Features: generating wallets

Ivy Wallet is an Open Source money manager app for android that you can either build or download from Google Play.
Ivy Wallet is an Open Source money manager app for android that you can either build or download from Google Play.

Ivy Wallet is an Open Source money manager app for android that you can either build or download from Google Play.

The Odysee Android app with wallet functionality

Odysee Android Release To create an APK file which can be installed on real devices, you will need to create a digital signature and then edit app/bui

Ergo Wallet for Android
Ergo Wallet for Android

Ergo Wallet Android Official Ergo Wallet for Android (official announcement) Features: generating wallets, restoring wallets in a way compatible to Yo

Bitcoin Wallet - a standalone Bitcoin payment app for your Android device

Bitcoin Wallet app for your Android device. Standalone Bitcoin node, no centralized backend required Google Colab

Bitcoin-Wallet-Android Google Colab

Beta channel Run Google Colab https://colab.research.google.com/drive/1OShIMVcFZ_khsUIBOIV1lzrqAGo1gfm_?usp=sharing In order to receive updates quicke

Lightning Dev Kit Android Demo Wallet

uMlando-wallet Lightning Dev Kit Android Demo Wallet This project uses a .aar package for the Android platforms that provide language bindings for the

Owner
null
Scp-wallet-android - Lightweight ScPrime wallet for Android

SCP Wallet Android SCP Wallet is lightweight ScPrime wallet for Android. Get sta

Paolo Biglioli 3 Mar 31, 2022
Open source Crypto Currency Tracker Android App made fully in Kotlin

CoinBit CoinBit is a beautiful CryptoCurrency app, completely open sourced and 100% in kotlin. It supports following features Track prices of over 300

Pranay Airan 50 Dec 5, 2022
A small Crypto app with neat UI.

CryptoAppUI A small Crypto app with neat UI. Note: To login in or sign up just enter any dummy values. Perform crypto transaction though this app usin

Zain Khalid 3 Jul 17, 2022
CAP - Crypto API

CAP - Crypto API A PoC for an example financial data stream service. It's based on public cryptocurrency data. cap-source This project is the upstream

Yavuz Tas 2 Dec 15, 2022
Link to GTA Vice City Soundtracks by station

SoundsLink Link to GTA Vice City Soundtracks by station The Basics This application was built for those who loved everything about GTA Vice City inclu

Ayana Bando 0 Oct 31, 2021
My solutions for the Advent of Code 2021. See the link for a playlist with recordings of me solving each puzzle.

Advent of Code 2021 My solutions for the Advent of Code 2021 solved with Kotlin. What is the Advent of Code? Advent of Code is an online event created

The Self-Taught Software Engineer 6 Jan 5, 2022
App that helps to scan barcodes, Qr that sends to destined link

ScanCode Aplicación Android ScanCode Escanea cualquier código Implementación de

David Hernández Netzahualcóyotl 0 Dec 29, 2021
Link previews between JetBrains Space and Slack

slack-unfurls This is the application for providing link previews between Slack and Space in both directions. It provides link previews for Slack mess

JetBrains 5 Sep 8, 2022
A simple Android app to demonstrate the use of Hover SDK for M-PESA Send Money while offline. This SDK does not require an internet connection, it automates USSD sessions in the background of an android application.

HoverSDKDemo Hover SDK is an Android SDK that lets mobile developers to add money features to the applications. This SDK does not require an internet

Joel Kanyi 9 Dec 21, 2022
Unity-Android-SDK-Plugins - Android SDK/Library/Plugins (aar) for Unity Developers

Unity Android SDK Plugins Unity Android SDK Plugins is an Open Source project th

NNK 1 Aug 14, 2022