Giter Site home page Giter Site logo

walletconnectkotlinv2's Introduction

WalletConnect V2

WalletConnect - Kotlin

The communications protocol for web3, WalletConnect brings the ecosystem together by enabling hundreds of wallets and apps to securely connect and interact. This repository contains Kotlin implementation of WalletConnect v2 protocols for Android applications.

BOM Instructions:

To help manage compatible dependencies stay in sync, we've introduced a BOM to the Kotlin SDK. With this, you only need to update the BOM version to get the latest SDKs. Just add the BOM as a dependency and then list the SDKs you want to include into your project.

example build.gradle.kts

dependencies {
    implementation(platform("com.walletconnect:android-bom:{BOM version}"))
    implementation("com.walletconnect:android-core")
    implementation("com.walletconnect:web3wallet")
}

SDK Chart

BOM Core SDK Sign SDK Auth SDK Chat SDK Notify SDK web3wallet web3modal WalletConnectModal
1.33.1 1.33.1 2.33.1 1.28.5 1.0.0.beta32 1.3.6 1.33.1 1.6.1 1.5.6
1.33.0 1.33.0 2.33.0 1.28.4 1.0.0.beta31 1.3.5 1.33.0 1.6.0 1.5.5
1.32.1 1.32.0 2.32.0 1.28.3 1.0.0.beta30 1.3.4 1.32.1 1.5.4 1.5.4
1.31.3 1.31.2 2.31.2 1.28.2 1.0.0.beta30 1.3.2 1.31.2 1.5.2 1.5.2
1.31.1 1.31.1 2.31.1 1.28.1 1.0.0.beta26 1.3.1 1.31.1 1.5.1 1.5.1
1.31.0** 1.31.0 2.31.0 1.28.0 1.0.0.beta25 1.3.0 1.31.0 1.5.0 1.5.0
1.30.0 1.30.0 2.30.0 1.27.0 1.0.0.beta25 1.2.0 1.30.0 1.4.0 1.4.0
1.23.0 1.28.0 2.26.0 1.26.0 1.0.0.beta25 1.1.0 1.21.0 1.3.0 1.3.0
1.22.2 1.27.2 2.25.2 1.25.2 1.0.0.beta25 1.0.2 1.20.2 1.2.2 1.2.2
1.22.1 1.27.0 2.25.0 1.25.0 1.0.0.beta23 1.0.0 1.20.0 1.2.1 1.2.0
1.22.0 1.27.0 2.25.0 1.25.0 1.0.0.beta23 1.0.0 1.20.0 1.2.0 1.2.0
1.21.1 1.26.0 2.24.0 1.24.0 1.0.0.beta23 1.0.0-beta04 1.19.0 1.1.1 1.1.1
1.21.0 1.26.0 2.24.0 1.24.0 1.0.0.beta23 1.0.0-beta04 1.19.0 1.1.0 1.1.0
1.20.0 1.25.0 2.23.0 1.23.0 1.0.0.beta22 1.0.0-beta03 1.18.0 1.0.0 1.0.0-beta02
1.19.1 1.24.0 2.22.0 1.22.0 1.0.0.beta21 1.0.0-beta02 1.17.0 1.0.0-beta02 1.0.0-beta01
1.19.0 1.24.0 2.22.0 1.22.0 1.0.0.beta21 1.0.0-beta02 1.17.0 1.0.0-beta01 1.0.0-beta01
1.18.0 1.23.0 2.21.0 1.21.0 1.0.0.beta20 1.0.0-beta01 1.16.0 1.0.0-alpha11 1.0.0-alpha07
1.17.2 1.22.1 2.20.1 1.20.1 1.0.0.beta19 1.0.0-alpha05 1.15.1 1.0.0-alpha10 1.0.0-alpha06
1.17.1 1.22.0 2.20.0 1.20.0 1.0.0.beta18 1.0.0-alpha04 1.15.0 1.0.0-alpha09 1.0.0-alpha05
1.17.0 1.22.0 2.20.0 1.20.0 1.0.0.beta18 1.0.0-alpha03 1.15.0 1.0.0-alpha09 1.0.0-alpha05
1.16.0 1.21.0 2.19.0 1.19.0 1.0.0.beta17 1.0.0-alpha02 1.14.0 1.0.0-alpha04
1.15.0 1.20.0 2.18.0 1.18.0 1.0.0-beta16 1.13.0 1.0.0-alpha03
1.14.0 1.19.0 2.17.0 1.17.0 1.0.0-beta15 1.12.0 1.0.0-alpha02
1.13.1 1.18.0 2.16.0 1.16.0 1.0.0-beta14 1.11.0 1.0.0-alpha01
1.12.0 1.17.0 2.15.0 1.15.0 1.0.0-beta13 1.10.0
1.11.1 1.16.1 2.14.1 1.14.1 1.0.0-beta12 1.9.1
1.11.0 1.16.0 2.14.0 1.14.0 1.0.0-beta11 1.9.0
1.10.0 1.15.0 2.13.0 1.13.0 1.0.0-beta10 1.8.0
1.9.3 1.14.3 2.12.3 1.12.3 1.0.0-beta09 1.7.3
1.9.2 1.14.2 2.12.2 1.12.2 1.0.0-beta08 1.7.2
1.9.1 1.14.1 2.12.1 1.12.1 1.0.0-beta07 1.7.1
1.9.0** 1.14.0 2.12.0 1.12.0 1.0.0-beta06 1.7.0
1.8.0 1.13.0 2.11.0 1.11.0 1.0.0-beta05 1.6.0
1.7.0 1.12.0 2.10.0 1.10.0 1.0.0-beta04 1.5.0
1.6.1 1.11.1 2.9.1 1.9.1 1.0.0-beta03 1.4.1
1.6.0 1.11.0 2.9.0 1.9.0 1.0.0-beta02 1.4.0
1.5.0 1.10.0 2.8.0 1.8.0 1.0.0-beta01 1.3.0
1.4.1 1.9.1 2.7.1 1.7.1 1.0.0-alpha09 1.2.1
1.3.0 1.8.0 2.6.0 1.6.0 1.0.0-alpha07 1.1.0
1.2.0 1.7.0 2.5.0 1.5.0 1.0.0-alpha06 1.0.0
1.1.1 1.6.0 2.4.0 1.4.0 1.0.0-alpha05
1.0.1 1.5.0 2.3.1 1.3.0 1.0.0-alpha04
1.4.0 2.2.0 1.2.0 1.0.0-alpha03
1.3.0 2.1.0 1.1.0 1.0.0-alpha02
1.2.0 1.0.0-alpha01
1.1.0 2.0.0 1.0.0
1.0.0 2.0.0-rc.5 1.0.0-alpha01

License

WalletConnect v2 is released under the Apache 2.0 license. See LICENSE for details.

walletconnectkotlinv2's People

Contributors

alexzhirkevich avatar arein avatar bffcorreia avatar biranyucel avatar chadyj avatar elyniss avatar imtianx avatar jakubuid avatar kacperoak avatar ligi avatar michaeltchuang avatar mitsinsar avatar mobilekosmos avatar rockyoung avatar soshial avatar spartan-thangtranduc avatar talhaali00 avatar valeryponomarenko avatar vcoolish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

walletconnectkotlinv2's Issues

Javadoc documentation

Add Javadoc documentation into to the WalletConnectClient and WalletConnectClientListeners public methods to help developers with the integrations of SDK.

Handle all errors and add validations

Our plan is to document any errors we expect to see while developing the happy path in code with TODOs. This will allow us to look at the errors at the end and try to come up with general error handling where it's appropriate. Handle all errors highlighted in the engine behavioural logic doc.

Also, add validation of input that comes from wallet, as well as validate the data that comes from peer.

Meet the validation of permissions guides within the engine behavioural logic doc.

Session stored validation

SDK should check if under given topic a settled session exists before performing any actions on it.

If there is no session under given topic, SDK should throw an error.

Create GenericAdapter for Moshi

Moshi can't generate a list of multiple types. The Eth method eth_signTypedData is defined as an array of a string and an object. It's possible to create a GenericAdapter that will accept a generic type T that will be passed by wallet developers. In the adapter in the fromJson function, pass the stringified json into either JSONObject or JSONArray based on the the beginning token. Then parse T and try to generate the properties of T by getting matching properties from JSONObject/JSONArray

Implement the connect method

Add mechanizm of handling the proposer and responder in the singleton instance of Kotlin SDK.

Implement the connect method for proposer to propose a session to responder.

CI/CD

Add CI to the project using Github Actions. Run all tests when pushing new changes to develop and to feature branch.

Mobile linking example in the sample app

We got some developer feedback that they would appreciate mobile linking examples in the sample app.

we probably don't need any special handling by the sdk, but it could be a nice addition to the sample app as a guide for wallet developers

Let's help the devs out, and show them how to deal with mobile links in our sample app.

add cacao-compatible auth permission (sessions-only)

Placeholder issue to support https://github.com/ethereum/EIPs/blob/9a9c5d0abdaf5ce5c5dd6dc88c6d8db1b130e95b/EIPS/eip-4361.md

Support EIP-4361 Sign-In with Ethereum

Priority: Post-beta

we discussed that we should implement EIP-4361 (https://eips.ethereum.org/EIPS/eip-4361) as part of the session settlement

CACAO essentially does this already so we can basically add a new set of permissions where the client will expect signature proofs for each account provided in the session state
the proposal would include a CACAO Payload and the approval response would include full CACAO objects (header, payload, signature)
these can even be serialized

{
  "h": {
    "t": "eip4361-eip191"
  },
  "p": {
    "aud": "http://localhost:3000",
    "exp": 1635517748,
    "iat": 1635514148,
    "iss": "did:pkh:eip155:1:0xfa3F54AE9C4287CA09a486dfaFaCe7d1d4095d93",
    "nbf": 1635514148,
    "uri": "http://localhost:3000/login",
    "nonce": 328917,
    "version": 1,
    "requestId": "request-id-random",
    "resources": [
      "ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq",
      "https://example.com/my-web2-claim.json"
    ],
    "statement": "I accept the ServiceOrg Terms of Service: https://service.org/tos"
  },
  "s": {
    "s": "0xe56e2cdb90d070b8aa1639e1cef36f6a49da8460f86f4a51415a1c3cf0e8f9664a6669dc50250e6bcade9f58e4852da81d97676ee96c22e9ff23b4508955c68d1b" // IPLD bytes presented as hex-prefixed string
  }
}

and serialized would look like this

uOqJlcm9vdHOB2CpYJQABcRIgwfKyc_T-HH2gEAe1ZgoJ-KAuIPXvz2U7PuelvCGEHCJndmVyc2lvbgGHBAFxEiDB8rJz9P4cfaAQB7VmCgn4oC4g9e_PZTs-56W8IYQcIqNhaKFhdG5laXA0MzYxLWVpcDE5MWFwrGNhdWR1aHR0cDovL2xvY2FsaG9zdDozMDAwY2V4cBphfAU0Y2lhdBphe_ckY2lzc3gqMHhmYTNGNTRBRTlDNDI4N0NBMDlhNDg2ZGZhRmFDZTdkMWQ0MDk1ZDkzY25iZhphe_ckY3VyaXgbaHR0cDovL2xvY2FsaG9zdDozMDAwL2xvZ2luZW5vbmNlGgAFBNVnY2hhaW5JZAFndmVyc2lvbgFpcmVxdWVzdElkcXJlcXVlc3QtaWQtcmFuZG9taXJlc291cmNlc4J4QmlwZnM6Ly9iYWZ5YmVpZW14ZjVhYmp3amJpa296NG1jM2EzZGxhNnVhbDNqc2dwZHI0Y2pyM296M2V2Znlhdmh3cXgmaHR0cHM6Ly9leGFtcGxlLmNvbS9teS13ZWIyLWNsYWltLmpzb25pc3RhdGVtZW50eEFJIGFjY2VwdCB0aGUgU2VydmljZU9yZyBUZXJtcyBvZiBTZXJ2aWNlOiBodHRwczovL3NlcnZpY2Uub3JnL3Rvc2FzoWFzWEHlbizbkNBwuKoWOeHO829qSdqEYPhvSlFBWhw88Oj5ZkpmadxQJQ5ryt6fWOSFLagdl2du6Wwi6f8jtFCJVcaNGw-3yciatpgOo4vtCSBjZ3bctBejGCW8UyNc9dQUgqNhaKFhdGdlaXA0MzYxYXCsY2F1ZHVodHRwOi8vbG9jYWxob3N0OjMwMDBjZXhwGmF7-MVjaWF0GmF76rVjaXNzeCoweGZhM0Y1NEFFOUM0Mjg3Q0EwOWE0ODZkZmFGYUNlN2QxZDQwOTVkOTNjbmJmGmF76rVjdXJpeBtodHRwOi8vbG9jYWxob3N0OjMwMDAvbG9naW5lbm9uY2UaAAUE1WdjaGFpbklkAWd2ZXJzaW9uAWlyZXF1ZXN0SWRxcmVxdWVzdC1pZC1yYW5kb21pcmVzb3VyY2VzgnhCaXBmczovL2JhZnliZWllbXhmNWFiandqYmlrb3o0bWMzYTNkbGE2dWFsM2pzZ3BkcjRjanIzb3ozZXZmeWF2aHdxeCZodHRwczovL2V4YW1wbGUuY29tL215LXdlYjItY2xhaW0uanNvbmlzdGF0ZW1lbnR4QUkgYWNjZXB0IHRoZSBTZXJ2aWNlT3JnIFRlcm1zIG9mIFNlcnZpY2U6IGh0dHBzOi8vc2VydmljZS5vcmcvdG9zYXOhYXNYQeXC_kN9a4-7cySLEe_aUkQN4dENMwUbeS416tnbFcO3FGtWMXCLjmpW4RUoi5WWH_vcgx9TCcEn3H3S00sMROQb

Create Core module along with Android and Kotlin addon modules

Accessing internal storage might be an issue with the Android implementation. If we decide to keep the the WC SDK as a JVM library, we will need to have a core dependency and then a dependency to handle storage on Android and a separate dependency to handle storage on the JVM.

Review Engine Behavioral Logic doc to make sure we are matching the requirements

Validate that the behavioral documentation is followed when handling both the Controller and Non-Controller logic inside the Engine class.

Go through all engine method in behavioral logic doc and check if the current implementation meets the requirements.

Handle the validation logic if the method can be completed based on the controller flag.
Messages validations and errors are included in this task: #24

Methods:

  • init
  • connect
  • pair
  • approve
  • reject
  • respond
  • request
  • upgrade
  • update
  • ping
  • notify
  • disconnect

Create Miro doc with all the different layers

Create doc to show the different layers of the SDK. Once the doc is ready, update the SDK to rearchitect to a layered architecture and group classes into packaged based on layers

Review how parsing the URI is done

Currently, the SDK attempts to create a proper URI from the out-of-band URI. While trying to parse "wc:e564bf79bf845a3c5cb6cb65d3dfbafa0228151fb0632790a0505e575966d937@2?controller=false&publicKey=61a8c2d85a8579eca9534260f09eb9a377011579b077eff7bf476d4f86e5b402&relay=%7B%22protocol%22%3A%22waku%22%7D", only the controller property is being parsed out with the current implementation

Implement the get active pairings method

Implement the get active pairings methods for proposer to propose new session on active pairing on topic B.
Pairings should be persisted in the local storage of the sdk when app restarts.

JSONException when trying to pair

I trying to pair wallet with wc:b5d84e98-8660-4e34-b82e-2d91b531956c@1?bridge=https%3A%2F%2Fe.bridge.walletconnect.org&key=6ba41ee0dc492234390efb9e42e32cec51c01a638766ca087ff01ca1897a3ce6 (https://app.uniswap.org/) and get this exception.
Problem in this:
val relay = JSONObject(mapOfQueryParameters["relay"] ?: "{}").getString("protocol") ?: String.Empty
What am I doing wrong? Or its your mistake?
Process: co.bitfrost, PID: 15004
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:549)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)ย 
Caused by: org.json.JSONException: No value for protocol
at org.json.JSONObject.get(JSONObject.java:399)
at org.json.JSONObject.getString(JSONObject.java:560)
at com.walletconnect.walletconnectv2.engine.model.mapper.EngineMapperKt.toPairProposal(EngineMapper.kt:32)
at com.walletconnect.walletconnectv2.engine.domain.EngineInteractor.pair$walletconnectv2_release(EngineInteractor.kt:121)
at com.walletconnect.walletconnectv2.client.WalletConnectClient.pair(WalletConnectClient.kt:80)
at co.bitfrost.other.connect.WalletConnectManager.pairConnection(WalletConnectManager.kt:60)
at co.bitfrost.presentation.ui.fragments.main.wallet.WalletFragment$setupClickListeners$1$3$1.invoke(WalletFragment.kt:95)
at co.bitfrost.presentation.ui.fragments.main.wallet.WalletFragment$setupClickListeners$1$3$1.invoke(WalletFragment.kt:127)
at co.bitfrost.presentation.ui.dialogs.QRScannerDialog.handleResult(QRScannerDialog.kt:131)
at me.dm7.barcodescanner.zxing.ZXingScannerView$1.run(ZXingScannerView.java:164)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7560)

InitSessionsList is empny -> InitSessionsList(sessions=[])

I scanned this QR code
wc:e531daf9-b0dd-4c41-89f1-90760e9ef2b5@1?bridge=https%3A%2F%2Fr.bridge.walletconnect.org&key=c5520ca3c5c33f7505b8fca20cd75dd4e3e535b6ffd73c6d64a149aca476853f

publicKey instead of key, it's leading me to the crash issue

MappingFunctions.kt

internal fun String.toPairProposal(): Pairing.Proposal {
    val properUriString = if (contains("wc://")) this else replace("wc:", "wc://")
    val pairUri = URI(properUriString)
    val mapOfQueryParameters: Map<String, String> =
        pairUri.query.split("&")
            .associate { query -> query.substringBefore("=") to query.substringAfter("=") }
    val relay = JSONObject(mapOfQueryParameters["relay"] ?: "{}")
    val publicKey = mapOfQueryParameters["publicKey"] ?: ""
    val controller: Boolean = mapOfQueryParameters["controller"].toBoolean()
    val ttl: Long = Duration.days(30).inWholeSeconds

    return Pairing.Proposal(
        topic = Topic(pairUri.userInfo),
        relay = relay,
        pairingProposer = PairingProposer(publicKey, controller),
        pairingSignal = PairingSignal("uri", PairingSignalParams(properUriString)),
        permissions = PairingProposedPermissions(JsonRPC(listOf(JsonRpcMethod.WC_SESSION_PROPOSE))),
        ttl = Ttl(ttl)
    )
}

After I changed publicKey to key, I scanned the QR code

But I am getting event sessions as empty

WalletFragment

lifecycleScope.launch {
            viewModel.eventFlow.observe(viewLifecycleOwner) { event ->
                Log.d(TAG, "onViewCreated: $event")
                when (event) {
                    is InitSessionsList -> sessionAdapter.updateList(event.sessions)
                    is ShowSessionProposalDialog -> {
                        proposalDialog = SessionProposalDialog(
                            requireContext(),
                            viewModel::approve,
                            viewModel::reject,
                            event.proposal
                        )
                        proposalDialog?.show()
                    }
                    is ShowSessionRequestDialog -> {
                        requestDialog = SessionRequestDialog(
                            requireContext(),
                            { sessionRequest -> viewModel.respondRequest(sessionRequest) },
                            { sessionRequest -> viewModel.rejectRequest(sessionRequest) },
                            event.sessionRequest,
                            event.session
                        )
                        requestDialog?.show()
                    }
                    is UpdateActiveSessions -> {
                        proposalDialog?.dismiss()
                        sessionAdapter.updateList(event.sessions)
                        event.message?.let {
                            Toast.makeText(requireContext(), it, Toast.LENGTH_SHORT).show()
                        }
                    }
                    is RejectSession -> proposalDialog?.dismiss()
                    is PingSuccess -> Toast.makeText(requireContext(), "Successful session ping", Toast.LENGTH_SHORT).show()
                }
            }
        }

Refactor SDK Engines using smaller classes

The 'EngineInteractor' had grown really large in file size and most of the functions can be split up into individual use case files. Will need to do some research into what breaking up the class will look like

Encrypt storage

Using SqlCipher to encrypt the DB. Use Android security to generate key for the DB encryption

Array Index out of Bounds exception on Scan dApp

Hello Walletconnect team,
When I try to connect the walletConnect with dApp I got the exception, here is the log, Please checkout and let me know what I am doing wrong?
Thanks in advance

java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
at org.bouncycastle.math.ec.rfc7748.X25519Field.decode32(Unknown Source:0)
at org.bouncycastle.math.ec.rfc7748.X25519Field.decode128(Unknown Source:2)
at org.bouncycastle.math.ec.rfc7748.X25519Field.decode(Unknown Source:1)
at org.bouncycastle.math.ec.rfc7748.X25519.scalarMult(Unknown Source:11)
at com.walletconnect.walletconnectv2.crypto.managers.BouncyCastleCryptoManager.generateTopicAndSharedKey-XzpjbtE(BouncyCastleCryptoManager.kt:38)
at com.walletconnect.walletconnectv2.engine.EngineInteractor.settlePairingSequence-5X_OPRs(EngineInteractor.kt:385)
at com.walletconnect.walletconnectv2.engine.EngineInteractor.pair$walletconnectv2_release(EngineInteractor.kt:86)
at com.walletconnect.walletconnectv2.WalletConnectClient.pair(WalletConnectClient.kt:43)
at com.xigu.sdk_test_demo.MainActivity.pair(MainActivity.java:96)
at com.xigu.sdk_test_demo.MainActivity.lambda$initScannerResult$0$com-xigu-sdk_test_demo-MainActivity(MainActivity.java:334)
at com.xigu.sdk_test_demo.MainActivity$$ExternalSyntheticLambda0.onActivityResult(Unknown Source:4)
at androidx.activity.result.ActivityResultRegistry$1.onStateChanged(ActivityResultRegistry.java:148)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:354)
at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:265)
at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:307)
at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:148)
at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:134)
at androidx.lifecycle.ReportFragment.dispatch(ReportFragment.java:68)
at androidx.lifecycle.ReportFragment$LifecycleCallbacks.onActivityPostStarted(ReportFragment.java:187)
at android.app.Activity.dispatchActivityPostStarted(Activity.java:1279)
at android.app.Activity.performStart(Activity.java:7967)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3364)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2073)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:225)
at android.app.ActivityThread.main(ActivityThread.java:7563)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:994)

The proposer implementation

WalletConnectClient as proposer should expose public methods to app:

  • connect() - to propose a session to a responder over active pairings
  • disconnect() - to disconnect a session
  • request() - to request JSON-RPC
  • notify() - to send notifications
  • ping() - to ping and verify peer is online
  • getActivePairings() - to return all active pairings to the wallet

Internal calls:

  • onSessionNotification()
  • onPairingApprove()
  • onPairingUpdate()
  • onPairingDelete()
  • onSessionApprove()
  • onSessionReject()
  • onSessionUpdate()
  • onSessionUpgrade()

Investigate Dependency Injection

Look into a dependency injection framework to help manage dependencies through out the app. Prefer a compile time injection frameworks that support JSR-333 over service locator frameworks. Do some benchmark tests for each framework such as build times and size of compiled SDK. Use Dagger 2 as the control

Options:

Imported from https://github.com/WalletConnect-Labs/WalletConnectKotlinV2/issues/24

Wallet signer functionality

Create a wallet signer that presents the basic signer functionality.
Sample app should show case the basic session request handling, parsing the string object to expected object.
Sample app should present what tools, libraries are recommended for signer functionality.
Code samples of parsing the string to expected json rpc object should be added to ReadMe

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.