Skip to content

Commit e373c53

Browse files
authored
Merge pull request #1495 from WalletConnect/deprecate
Deprecate
2 parents 743ff1e + 8395e0c commit e373c53

File tree

52 files changed

+391
-42
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+391
-42
lines changed

ReadMe.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
![WalletConnect V2](/docs/walletconnect-banner.svg)
22

3-
# **WalletConnect - Kotlin**
4-
5-
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
6-
WalletConnect v2 protocols for Android applications.
3+
# **Deprecated - WalletConnect - Kotlin**
4+
WalletConnect Inc is now Reown. As part of this transition, we are deprecating a number of repositories/packages across our supported platforms, and transitioning to their equivalents published under the Reown organization.
75

6+
This repository is now considered deprecated and will reach End-of-Life on February 17th 2025. For more details, including migration guides please see: https://docs.reown.com/advanced/walletconnect-deprecations
7+
8+
---
89
####
910

1011
## BOM Instructions:
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package com.walletconnect.android
22

3+
@Deprecated("com.walletconnect.android.CoreClient has been deprecated. Please use com.reown.android.CoreClient instead from - https://github.com/reown-com/reown-kotlin")
34
object CoreClient : CoreInterface by CoreProtocol.instance {
45

6+
@Deprecated("com.walletconnect.android.CoreDelegate has been deprecated. Please use com.reown.android.CoreDelegate instead from - https://github.com/reown-com/reown-kotlin")
57
interface CoreDelegate : CoreInterface.Delegate
6-
78
}

core/android/src/main/kotlin/com/walletconnect/android/CoreInterface.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import com.walletconnect.android.relay.NetworkClientTimeout
1010
import com.walletconnect.android.relay.RelayConnectionInterface
1111
import com.walletconnect.android.verify.client.VerifyInterface
1212

13+
@Deprecated("com.walletconnect.android.CoreInterface has been deprecated. Please use com.reown.android.CoreInterface instead from - https://github.com/reown-com/reown-kotlin")
1314
interface CoreInterface {
1415
val Pairing: PairingInterface
1516
val PairingController: PairingControllerInterface
@@ -20,10 +21,13 @@ interface CoreInterface {
2021
val Verify: VerifyInterface
2122
val Explorer: ExplorerInterface
2223

24+
@Deprecated("com.walletconnect.android.CoreInterface has been deprecated. Please use com.reown.android.CoreInterface instead from - https://github.com/reown-com/reown-kotlin")
2325
interface Delegate : PairingInterface.Delegate
2426

27+
@Deprecated("com.walletconnect.android.CoreInterface has been deprecated. Please use com.reown.android.CoreInterface instead from - https://github.com/reown-com/reown-kotlin")
2528
fun setDelegate(delegate: Delegate)
2629

30+
@Deprecated("com.walletconnect.android.CoreClient has been deprecated. Please use com.reown.android.CoreClient instead from - https://github.com/reown-com/reown-kotlin")
2731
fun initialize(
2832
metaData: Core.Model.AppMetaData,
2933
relayServerUrl: String,
@@ -36,6 +40,7 @@ interface CoreInterface {
3640
onError: (Core.Model.Error) -> Unit,
3741
)
3842

43+
@Deprecated("com.walletconnect.android.CoreClient has been deprecated. Please use com.reown.android.CoreClient instead from - https://github.com/reown-com/reown-kotlin")
3944
fun initialize(
4045
application: Application,
4146
projectId: String,

core/android/src/main/kotlin/com/walletconnect/android/CoreProtocol.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class CoreProtocol(private val koinApp: KoinApplication = wcKoinApp) : CoreInter
5757
plantTimber()
5858
}
5959

60+
@Deprecated("com.walletconnect.android.CoreClient has been deprecated. Please use com.reown.android.CoreClient instead from - https://github.com/reown-com/reown-kotlin")
6061
override fun setDelegate(delegate: CoreInterface.Delegate) {
6162
Pairing.setDelegate(delegate)
6263
}
@@ -65,6 +66,7 @@ class CoreProtocol(private val koinApp: KoinApplication = wcKoinApp) : CoreInter
6566
val instance = CoreProtocol()
6667
}
6768

69+
@Deprecated("com.walletconnect.android.CoreClient has been deprecated. Please use com.reown.android.CoreClient instead from - https://github.com/reown-com/reown-kotlin")
6870
override fun initialize(
6971
metaData: Core.Model.AppMetaData,
7072
relayServerUrl: String,
@@ -96,6 +98,7 @@ class CoreProtocol(private val koinApp: KoinApplication = wcKoinApp) : CoreInter
9698
}
9799
}
98100

101+
@Deprecated("com.walletconnect.android.CoreClient has been deprecated. Please use com.reown.android.CoreClient instead from - https://github.com/reown-com/reown-kotlin")
99102
override fun initialize(
100103
application: Application,
101104
projectId: String,

core/android/src/main/kotlin/com/walletconnect/android/relay/RelayClient.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import kotlinx.coroutines.supervisorScope
2323
import org.koin.core.KoinApplication
2424
import org.koin.core.qualifier.named
2525

26+
@Deprecated("com.walletconnect.android.relay.RelayClient has been deprecated. Please use com.reown.android.relay.RelayClient instead from - https://github.com/reown-com/reown-kotlin")
2627
class RelayClient(private val koinApp: KoinApplication = wcKoinApp) : BaseRelayClient(), RelayConnectionInterface {
2728
private val manualConnection: ManualConnectionLifecycle by lazy { koinApp.koin.get(named(AndroidCommonDITags.MANUAL_CONNECTION_LIFECYCLE)) }
2829
private val networkState: ConnectivityState by lazy { koinApp.koin.get(named(AndroidCommonDITags.CONNECTIVITY_STATE)) }

core/android/src/main/kotlin/com/walletconnect/android/relay/RelayConnectionInterface.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import com.walletconnect.android.Core
44
import com.walletconnect.foundation.network.RelayInterface
55
import kotlinx.coroutines.flow.StateFlow
66

7+
@Deprecated("com.walletconnect.android.relay.RelayConnectionInterface has been deprecated. Please use com.reown.android.relay.RelayConnectionInterface instead from - https://github.com/reown-com/reown-kotlin")
78
interface RelayConnectionInterface : RelayInterface {
89
val wssConnectionState: StateFlow<WSSConnectionState>
910
val isNetworkAvailable: StateFlow<Boolean?>

product/walletconnectmodal/ReadMe.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
# Installation
44

5-
:::caution
6-
**The WalletConnectModal SDK is currently in Alpha and is not production-ready**.
7-
8-
It's public API and associated documentation may still see significant and breaking changes.
9-
:::
10-
115
Kotlin implementation of WalletConnectModal for Android applications.
126

137
Android Core ![Maven Central](https://img.shields.io/maven-central/v/com.walletconnect/android-core)

product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/Modal.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import com.walletconnect.android.CoreInterface
77
import com.walletconnect.android.cacao.SignatureInterface
88
import com.walletconnect.android.internal.common.signing.cacao.Issuer
99

10+
@Deprecated("com.walletconnect.web3.modal.client.Wallet has been deprecated. Please use com.reown.appkit.client.Modal instead from - https://github.com/reown-com/reown-kotlin")
1011
object Modal {
1112

1213
sealed interface Listeners {

product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/Web3Modal.kt

Lines changed: 59 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import org.jetbrains.annotations.ApiStatus.Experimental
2626
import org.koin.core.qualifier.named
2727
import org.koin.dsl.module
2828

29+
@Deprecated("This package is now considered deprecated and will reach End-of-Life on February 17th 2025. For more details, including migration guides please see: docs.reown.com")
2930
object Web3Modal {
3031

3132
internal var chains: List<Modal.Model.Chain> = listOf()
@@ -38,6 +39,7 @@ object Web3Modal {
3839

3940
private lateinit var web3ModalEngine: Web3ModalEngine
4041

42+
@Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.ModalDelegate"))
4143
interface ModalDelegate {
4244
fun onSessionApproved(approvedSession: Modal.Model.ApprovedSession)
4345
fun onSessionRejected(rejectedSession: Modal.Model.RejectedSession)
@@ -64,13 +66,15 @@ object Web3Modal {
6466
fun onError(error: Modal.Model.Error)
6567
}
6668

69+
@Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.ComponentDelegate"))
6770
interface ComponentDelegate {
6871
fun onModalExpanded()
6972

7073
fun onModalHidden()
7174

7275
}
7376

77+
@Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.initialize(init, onSuccess, onError)"))
7478
fun initialize(
7579
init: Modal.Params.Init,
7680
onSuccess: () -> Unit = {},
@@ -91,12 +95,14 @@ object Web3Modal {
9195
)
9296
}
9397

98+
@Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.register(activity)"))
9499
@Experimental
95100
fun register(activity: ComponentActivity) {
96101
checkEngineInitialization()
97102
web3ModalEngine.registerCoinbaseLauncher(activity)
98103
}
99104

105+
@Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.unregister()"))
100106
@Experimental
101107
fun unregister() {
102108
checkEngineInitialization()
@@ -135,18 +141,22 @@ object Web3Modal {
135141
}
136142
}
137143

144+
@Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.setChains(chains)"))
138145
fun setChains(chains: List<Modal.Model.Chain>) {
139146
this.chains = chains
140147
}
141148

149+
@Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.setAuthRequestParams(authParams)"))
142150
fun setAuthRequestParams(authParams: Modal.Model.AuthPayloadParams) {
143151
authPayloadParams = authParams
144152
}
145153

154+
@Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.setSessionProperties(properties)"))
146155
fun setSessionProperties(properties: Map<String, String>) {
147156
sessionProperties = properties
148157
}
149158

159+
@Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.setDelegate(delegate)"))
150160
@Throws(IllegalStateException::class)
151161
fun setDelegate(delegate: ModalDelegate) {
152162
Web3ModalDelegate.connectionState.onEach { connectionState ->
@@ -189,6 +199,7 @@ object Web3Modal {
189199
) { onError(it.toModal()) }
190200
}
191201

202+
@Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.connect(connect, onSuccess, onError)"))
192203
fun connect(
193204
connect: Modal.Params.Connect,
194205
onSuccess: (String) -> Unit,
@@ -201,6 +212,10 @@ object Web3Modal {
201212
)
202213
}
203214

215+
@Deprecated(
216+
"Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin",
217+
replaceWith = ReplaceWith("AppKit.authenticate(authenticate, walletAppLink, onSuccess, onError)")
218+
)
204219
fun authenticate(
205220
authenticate: Modal.Params.Authenticate,
206221
walletAppLink: String? = null,
@@ -213,15 +228,19 @@ object Web3Modal {
213228
onError = { onError(it.toModal()) })
214229
}
215230

231+
@Deprecated(
232+
"Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin",
233+
replaceWith = ReplaceWith("AppKit.handleDeepLink(url, onError)")
234+
)
216235
fun handleDeepLink(url: String, onError: (Modal.Model.Error) -> Unit) {
217236
SignClient.dispatchEnvelope(url) {
218237
onError(it.toModal())
219238
}
220239
}
221240

222241
@Deprecated(
223-
message = "Modal.Params.Request is deprecated",
224-
replaceWith = ReplaceWith("com.walletconnect.web3.modal.client.models.Request")
242+
"Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin",
243+
replaceWith = ReplaceWith("AppKit.request(request, onSuccess, onError)")
225244
)
226245
fun request(
227246
request: Modal.Params.Request,
@@ -236,6 +255,10 @@ object Web3Modal {
236255
)
237256
}
238257

258+
@Deprecated(
259+
"Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin",
260+
replaceWith = ReplaceWith("AppKit.request(request, onSuccess, onError)")
261+
)
239262
fun request(
240263
request: Request,
241264
onSuccess: (SentRequestResult) -> Unit = {},
@@ -250,6 +273,10 @@ object Web3Modal {
250273
is SentRequestResult.WalletConnect -> Modal.Model.SentRequest(requestId, sessionTopic, method, params, chainId)
251274
}
252275

276+
@Deprecated(
277+
"Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin",
278+
replaceWith = ReplaceWith("AppKit.request(request, onSuccess, onError)")
279+
)
253280
fun request(
254281
request: Request,
255282
onSuccess: () -> Unit,
@@ -259,11 +286,15 @@ object Web3Modal {
259286
web3ModalEngine.request(request, { onSuccess() }, onError)
260287
}
261288

289+
@Deprecated(
290+
"Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin",
291+
replaceWith = ReplaceWith("AppKit.ping(sessionPing)")
292+
)
262293
fun ping(sessionPing: Modal.Listeners.SessionPing? = null) = web3ModalEngine.ping(sessionPing)
263294

264295
@Deprecated(
265-
message = "This has become deprecate in favor of the parameterless disconnect function",
266-
level = DeprecationLevel.WARNING
296+
"Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin",
297+
replaceWith = ReplaceWith("AppKit.disconnect(onSuccess, onError)")
267298
)
268299
fun disconnect(
269300
onSuccess: (Modal.Params.Disconnect) -> Unit = {},
@@ -281,6 +312,10 @@ object Web3Modal {
281312
)
282313
}
283314

315+
@Deprecated(
316+
"Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin",
317+
replaceWith = ReplaceWith("AppKit.disconnect(onSuccess, onError)")
318+
)
284319
fun disconnect(
285320
onSuccess: () -> Unit,
286321
onError: (Throwable) -> Unit,
@@ -293,6 +328,10 @@ object Web3Modal {
293328
* Caution: This function is blocking and runs on the current thread.
294329
* It is advised that this function be called from background operation
295330
*/
331+
@Deprecated(
332+
"Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin",
333+
replaceWith = ReplaceWith("AppKit.getSelectedChain()")
334+
)
296335
fun getSelectedChain() = selectedChain
297336
// fun getSelectedChain() = getSelectedChainUseCase()?.toChain()
298337

@@ -301,9 +340,8 @@ object Web3Modal {
301340
* It is advised that this function be called from background operation
302341
*/
303342
@Deprecated(
304-
message = "Getting active session is replaced with getAccount()",
305-
replaceWith = ReplaceWith("com.walletconnect.web3.modal.client.Web3Modal.getAccount()"),
306-
level = DeprecationLevel.WARNING
343+
"Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin",
344+
replaceWith = ReplaceWith("AppKit.getAccount()")
307345
)
308346
internal fun getActiveSessionByTopic(topic: String) = SignClient.getActiveSessionByTopic(topic)?.toModal()
309347

@@ -312,9 +350,8 @@ object Web3Modal {
312350
* It is advised that this function be called from background operation
313351
*/
314352
@Deprecated(
315-
message = "Getting active session is replaced with getAccount()",
316-
replaceWith = ReplaceWith("com.walletconnect.web3.modal.client.Web3Modal.getAccount()"),
317-
level = DeprecationLevel.WARNING
353+
"Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin",
354+
replaceWith = ReplaceWith("AppKit.getAccount()")
318355
)
319356
fun getActiveSession(): Modal.Model.Session? {
320357
checkEngineInitialization()
@@ -325,6 +362,10 @@ object Web3Modal {
325362
* Caution: This function is blocking and runs on the current thread.
326363
* It is advised that this function be called from background operation
327364
*/
365+
@Deprecated(
366+
"Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin",
367+
replaceWith = ReplaceWith("AppKit.getAccount()")
368+
)
328369
fun getAccount(): Account? {
329370
checkEngineInitialization()
330371
return web3ModalEngine.getAccount()
@@ -334,6 +375,10 @@ object Web3Modal {
334375
* Caution: This function is blocking and runs on the current thread.
335376
* It is advised that this function be called from background operation
336377
*/
378+
@Deprecated(
379+
"Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin",
380+
replaceWith = ReplaceWith("AppKit.getSession()")
381+
)
337382
fun getSession(): Session? {
338383
checkEngineInitialization()
339384
return web3ModalEngine.getSession()
@@ -343,6 +388,10 @@ object Web3Modal {
343388
* Caution: This function is blocking and runs on the current thread.
344389
* It is advised that this function be called from background operation
345390
*/
391+
@Deprecated(
392+
"Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin",
393+
replaceWith = ReplaceWith("AppKit.getConnectorType()")
394+
)
346395
fun getConnectorType(): Modal.ConnectorType? {
347396
checkEngineInitialization()
348397
return web3ModalEngine.getConnectorType()

product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/Account.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package com.walletconnect.web3.modal.client.models
22

33
import com.walletconnect.web3.modal.client.Modal
44

5+
@Deprecated("com.walletconnect.web3.modal.client.models.Account has been deprecated. Please use com.reown.appkit.client.models.Account instead from - https://github.com/reown-com/reown-kotlin")
56
data class Account(
67
val address: String,
78
val chain: Modal.Model.Chain

0 commit comments

Comments
 (0)