diff --git a/ReadMe.md b/ReadMe.md index 48be1d964a..20a5f59287 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,10 +1,11 @@ ![WalletConnect V2](/docs/walletconnect-banner.svg) -# **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. +# **Deprecated - WalletConnect - Kotlin** +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. +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 + +--- #### ## BOM Instructions: diff --git a/core/android/src/main/kotlin/com/walletconnect/android/CoreClient.kt b/core/android/src/main/kotlin/com/walletconnect/android/CoreClient.kt index f6f8c15efd..039dc60ac9 100644 --- a/core/android/src/main/kotlin/com/walletconnect/android/CoreClient.kt +++ b/core/android/src/main/kotlin/com/walletconnect/android/CoreClient.kt @@ -1,7 +1,8 @@ package com.walletconnect.android +@Deprecated("com.walletconnect.android.CoreClient has been deprecated. Please use com.reown.android.CoreClient instead from - https://github.com/reown-com/reown-kotlin") object CoreClient : CoreInterface by CoreProtocol.instance { + @Deprecated("com.walletconnect.android.CoreDelegate has been deprecated. Please use com.reown.android.CoreDelegate instead from - https://github.com/reown-com/reown-kotlin") interface CoreDelegate : CoreInterface.Delegate - } \ No newline at end of file diff --git a/core/android/src/main/kotlin/com/walletconnect/android/CoreInterface.kt b/core/android/src/main/kotlin/com/walletconnect/android/CoreInterface.kt index f80658faec..f08fce846b 100644 --- a/core/android/src/main/kotlin/com/walletconnect/android/CoreInterface.kt +++ b/core/android/src/main/kotlin/com/walletconnect/android/CoreInterface.kt @@ -10,6 +10,7 @@ import com.walletconnect.android.relay.NetworkClientTimeout import com.walletconnect.android.relay.RelayConnectionInterface import com.walletconnect.android.verify.client.VerifyInterface +@Deprecated("com.walletconnect.android.CoreInterface has been deprecated. Please use com.reown.android.CoreInterface instead from - https://github.com/reown-com/reown-kotlin") interface CoreInterface { val Pairing: PairingInterface val PairingController: PairingControllerInterface @@ -20,10 +21,13 @@ interface CoreInterface { val Verify: VerifyInterface val Explorer: ExplorerInterface + @Deprecated("com.walletconnect.android.CoreInterface has been deprecated. Please use com.reown.android.CoreInterface instead from - https://github.com/reown-com/reown-kotlin") interface Delegate : PairingInterface.Delegate + @Deprecated("com.walletconnect.android.CoreInterface has been deprecated. Please use com.reown.android.CoreInterface instead from - https://github.com/reown-com/reown-kotlin") fun setDelegate(delegate: Delegate) + @Deprecated("com.walletconnect.android.CoreClient has been deprecated. Please use com.reown.android.CoreClient instead from - https://github.com/reown-com/reown-kotlin") fun initialize( metaData: Core.Model.AppMetaData, relayServerUrl: String, @@ -36,6 +40,7 @@ interface CoreInterface { onError: (Core.Model.Error) -> Unit, ) + @Deprecated("com.walletconnect.android.CoreClient has been deprecated. Please use com.reown.android.CoreClient instead from - https://github.com/reown-com/reown-kotlin") fun initialize( application: Application, projectId: String, diff --git a/core/android/src/main/kotlin/com/walletconnect/android/CoreProtocol.kt b/core/android/src/main/kotlin/com/walletconnect/android/CoreProtocol.kt index d90923d325..da1779a376 100644 --- a/core/android/src/main/kotlin/com/walletconnect/android/CoreProtocol.kt +++ b/core/android/src/main/kotlin/com/walletconnect/android/CoreProtocol.kt @@ -57,6 +57,7 @@ class CoreProtocol(private val koinApp: KoinApplication = wcKoinApp) : CoreInter plantTimber() } + @Deprecated("com.walletconnect.android.CoreClient has been deprecated. Please use com.reown.android.CoreClient instead from - https://github.com/reown-com/reown-kotlin") override fun setDelegate(delegate: CoreInterface.Delegate) { Pairing.setDelegate(delegate) } @@ -65,6 +66,7 @@ class CoreProtocol(private val koinApp: KoinApplication = wcKoinApp) : CoreInter val instance = CoreProtocol() } + @Deprecated("com.walletconnect.android.CoreClient has been deprecated. Please use com.reown.android.CoreClient instead from - https://github.com/reown-com/reown-kotlin") override fun initialize( metaData: Core.Model.AppMetaData, relayServerUrl: String, @@ -96,6 +98,7 @@ class CoreProtocol(private val koinApp: KoinApplication = wcKoinApp) : CoreInter } } + @Deprecated("com.walletconnect.android.CoreClient has been deprecated. Please use com.reown.android.CoreClient instead from - https://github.com/reown-com/reown-kotlin") override fun initialize( application: Application, projectId: String, diff --git a/core/android/src/main/kotlin/com/walletconnect/android/relay/RelayClient.kt b/core/android/src/main/kotlin/com/walletconnect/android/relay/RelayClient.kt index dd39a8e986..60ee10ce41 100644 --- a/core/android/src/main/kotlin/com/walletconnect/android/relay/RelayClient.kt +++ b/core/android/src/main/kotlin/com/walletconnect/android/relay/RelayClient.kt @@ -23,6 +23,7 @@ import kotlinx.coroutines.supervisorScope import org.koin.core.KoinApplication import org.koin.core.qualifier.named +@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") class RelayClient(private val koinApp: KoinApplication = wcKoinApp) : BaseRelayClient(), RelayConnectionInterface { private val manualConnection: ManualConnectionLifecycle by lazy { koinApp.koin.get(named(AndroidCommonDITags.MANUAL_CONNECTION_LIFECYCLE)) } private val networkState: ConnectivityState by lazy { koinApp.koin.get(named(AndroidCommonDITags.CONNECTIVITY_STATE)) } diff --git a/core/android/src/main/kotlin/com/walletconnect/android/relay/RelayConnectionInterface.kt b/core/android/src/main/kotlin/com/walletconnect/android/relay/RelayConnectionInterface.kt index c3f13d6b94..4cf7ca4cf4 100644 --- a/core/android/src/main/kotlin/com/walletconnect/android/relay/RelayConnectionInterface.kt +++ b/core/android/src/main/kotlin/com/walletconnect/android/relay/RelayConnectionInterface.kt @@ -4,6 +4,7 @@ import com.walletconnect.android.Core import com.walletconnect.foundation.network.RelayInterface import kotlinx.coroutines.flow.StateFlow +@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") interface RelayConnectionInterface : RelayInterface { val wssConnectionState: StateFlow val isNetworkAvailable: StateFlow diff --git a/product/walletconnectmodal/ReadMe.md b/product/walletconnectmodal/ReadMe.md index 52c16f0f6a..1887be2418 100644 --- a/product/walletconnectmodal/ReadMe.md +++ b/product/walletconnectmodal/ReadMe.md @@ -2,12 +2,6 @@ # Installation -:::caution -**The WalletConnectModal SDK is currently in Alpha and is not production-ready**. - -It's public API and associated documentation may still see significant and breaking changes. -::: - Kotlin implementation of WalletConnectModal for Android applications. Android Core ![Maven Central](https://img.shields.io/maven-central/v/com.walletconnect/android-core) diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/Modal.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/Modal.kt index 950a1f73f6..5974446f1c 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/Modal.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/Modal.kt @@ -7,6 +7,7 @@ import com.walletconnect.android.CoreInterface import com.walletconnect.android.cacao.SignatureInterface import com.walletconnect.android.internal.common.signing.cacao.Issuer +@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") object Modal { sealed interface Listeners { diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/Web3Modal.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/Web3Modal.kt index ec0c89c814..d4758d154f 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/Web3Modal.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/Web3Modal.kt @@ -26,6 +26,7 @@ import org.jetbrains.annotations.ApiStatus.Experimental import org.koin.core.qualifier.named import org.koin.dsl.module +@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") object Web3Modal { internal var chains: List = listOf() @@ -38,6 +39,7 @@ object Web3Modal { private lateinit var web3ModalEngine: Web3ModalEngine + @Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.ModalDelegate")) interface ModalDelegate { fun onSessionApproved(approvedSession: Modal.Model.ApprovedSession) fun onSessionRejected(rejectedSession: Modal.Model.RejectedSession) @@ -64,6 +66,7 @@ object Web3Modal { fun onError(error: Modal.Model.Error) } + @Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.ComponentDelegate")) interface ComponentDelegate { fun onModalExpanded() @@ -71,6 +74,7 @@ object Web3Modal { } + @Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.initialize(init, onSuccess, onError)")) fun initialize( init: Modal.Params.Init, onSuccess: () -> Unit = {}, @@ -91,12 +95,14 @@ object Web3Modal { ) } + @Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.register(activity)")) @Experimental fun register(activity: ComponentActivity) { checkEngineInitialization() web3ModalEngine.registerCoinbaseLauncher(activity) } + @Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.unregister()")) @Experimental fun unregister() { checkEngineInitialization() @@ -135,18 +141,22 @@ object Web3Modal { } } + @Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.setChains(chains)")) fun setChains(chains: List) { this.chains = chains } + @Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.setAuthRequestParams(authParams)")) fun setAuthRequestParams(authParams: Modal.Model.AuthPayloadParams) { authPayloadParams = authParams } + @Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.setSessionProperties(properties)")) fun setSessionProperties(properties: Map) { sessionProperties = properties } + @Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.setDelegate(delegate)")) @Throws(IllegalStateException::class) fun setDelegate(delegate: ModalDelegate) { Web3ModalDelegate.connectionState.onEach { connectionState -> @@ -189,6 +199,7 @@ object Web3Modal { ) { onError(it.toModal()) } } + @Deprecated("Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("AppKit.connect(connect, onSuccess, onError)")) fun connect( connect: Modal.Params.Connect, onSuccess: (String) -> Unit, @@ -201,6 +212,10 @@ object Web3Modal { ) } + @Deprecated( + "Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("AppKit.authenticate(authenticate, walletAppLink, onSuccess, onError)") + ) fun authenticate( authenticate: Modal.Params.Authenticate, walletAppLink: String? = null, @@ -213,6 +228,10 @@ object Web3Modal { onError = { onError(it.toModal()) }) } + @Deprecated( + "Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("AppKit.handleDeepLink(url, onError)") + ) fun handleDeepLink(url: String, onError: (Modal.Model.Error) -> Unit) { SignClient.dispatchEnvelope(url) { onError(it.toModal()) @@ -220,8 +239,8 @@ object Web3Modal { } @Deprecated( - message = "Modal.Params.Request is deprecated", - replaceWith = ReplaceWith("com.walletconnect.web3.modal.client.models.Request") + "Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("AppKit.request(request, onSuccess, onError)") ) fun request( request: Modal.Params.Request, @@ -236,6 +255,10 @@ object Web3Modal { ) } + @Deprecated( + "Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("AppKit.request(request, onSuccess, onError)") + ) fun request( request: Request, onSuccess: (SentRequestResult) -> Unit = {}, @@ -250,6 +273,10 @@ object Web3Modal { is SentRequestResult.WalletConnect -> Modal.Model.SentRequest(requestId, sessionTopic, method, params, chainId) } + @Deprecated( + "Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("AppKit.request(request, onSuccess, onError)") + ) fun request( request: Request, onSuccess: () -> Unit, @@ -259,11 +286,15 @@ object Web3Modal { web3ModalEngine.request(request, { onSuccess() }, onError) } + @Deprecated( + "Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("AppKit.ping(sessionPing)") + ) fun ping(sessionPing: Modal.Listeners.SessionPing? = null) = web3ModalEngine.ping(sessionPing) @Deprecated( - message = "This has become deprecate in favor of the parameterless disconnect function", - level = DeprecationLevel.WARNING + "Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("AppKit.disconnect(onSuccess, onError)") ) fun disconnect( onSuccess: (Modal.Params.Disconnect) -> Unit = {}, @@ -281,6 +312,10 @@ object Web3Modal { ) } + @Deprecated( + "Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("AppKit.disconnect(onSuccess, onError)") + ) fun disconnect( onSuccess: () -> Unit, onError: (Throwable) -> Unit, @@ -293,6 +328,10 @@ object Web3Modal { * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated( + "Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("AppKit.getSelectedChain()") + ) fun getSelectedChain() = selectedChain // fun getSelectedChain() = getSelectedChainUseCase()?.toChain() @@ -301,9 +340,8 @@ object Web3Modal { * It is advised that this function be called from background operation */ @Deprecated( - message = "Getting active session is replaced with getAccount()", - replaceWith = ReplaceWith("com.walletconnect.web3.modal.client.Web3Modal.getAccount()"), - level = DeprecationLevel.WARNING + "Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("AppKit.getAccount()") ) internal fun getActiveSessionByTopic(topic: String) = SignClient.getActiveSessionByTopic(topic)?.toModal() @@ -312,9 +350,8 @@ object Web3Modal { * It is advised that this function be called from background operation */ @Deprecated( - message = "Getting active session is replaced with getAccount()", - replaceWith = ReplaceWith("com.walletconnect.web3.modal.client.Web3Modal.getAccount()"), - level = DeprecationLevel.WARNING + "Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("AppKit.getAccount()") ) fun getActiveSession(): Modal.Model.Session? { checkEngineInitialization() @@ -325,6 +362,10 @@ object Web3Modal { * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated( + "Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("AppKit.getAccount()") + ) fun getAccount(): Account? { checkEngineInitialization() return web3ModalEngine.getAccount() @@ -334,6 +375,10 @@ object Web3Modal { * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated( + "Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("AppKit.getSession()") + ) fun getSession(): Session? { checkEngineInitialization() return web3ModalEngine.getSession() @@ -343,6 +388,10 @@ object Web3Modal { * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated( + "Web3Modal has been deprecated. Please use AppKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("AppKit.getConnectorType()") + ) fun getConnectorType(): Modal.ConnectorType? { checkEngineInitialization() return web3ModalEngine.getConnectorType() diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/Account.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/Account.kt index 7a45f221ed..c2437e22fd 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/Account.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/Account.kt @@ -2,6 +2,7 @@ package com.walletconnect.web3.modal.client.models import com.walletconnect.web3.modal.client.Modal +@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") data class Account( val address: String, val chain: Modal.Model.Chain diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/Exceptions.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/Exceptions.kt index b6eb6d7537..644af32cdc 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/Exceptions.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/Exceptions.kt @@ -2,5 +2,8 @@ package com.walletconnect.web3.modal.client.models import com.walletconnect.android.internal.common.exception.WalletConnectException +@Deprecated("com.walletconnect.web3.modal.client.models.Web3ModelClientAlreadyInitializedException has been deprecated. Please use com.reown.appkit.client.models.Web3ModelClientAlreadyInitializedException instead from - https://github.com/reown-com/reown-kotlin") class Web3ModelClientAlreadyInitializedException : WalletConnectException("Web3Modal already initialized") + +@Deprecated("com.walletconnect.web3.modal.client.models.CoinbaseClientAlreadyInitializedException has been deprecated. Please use com.reown.appkit.client.models.CoinbaseClientAlreadyInitializedException instead from - https://github.com/reown-com/reown-kotlin") class CoinbaseClientAlreadyInitializedException : WalletConnectException("Coinbase already initialized") \ No newline at end of file diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/Session.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/Session.kt index 7eaefc2e0c..2d12eadc20 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/Session.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/Session.kt @@ -3,8 +3,8 @@ package com.walletconnect.web3.modal.client.models import com.walletconnect.android.Core import com.walletconnect.web3.modal.client.Modal +@Deprecated("com.walletconnect.web3.modal.client.models.Session has been deprecated. Please use com.reown.appkit.client.models.Modal instead from - https://github.com/reown-com/reown-kotlin") sealed class Session { - data class WalletConnectSession( val pairingTopic: String, val topic: String, diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/request/Request.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/request/Request.kt index 94f9aec12e..4990c288d0 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/request/Request.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/request/Request.kt @@ -1,5 +1,6 @@ package com.walletconnect.web3.modal.client.models.request +@Deprecated("com.walletconnect.web3.modal.client.models.request.Request has been deprecated. Please use com.reown.appkit.client.models.request.Request instead from - https://github.com/reown-com/reown-kotlin") data class Request( val method: String, val params: String, diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/request/SentRequestResult.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/request/SentRequestResult.kt index 2ce7dd9f61..723c1e3ab7 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/request/SentRequestResult.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/client/models/request/SentRequestResult.kt @@ -3,6 +3,7 @@ package com.walletconnect.web3.modal.client.models.request import com.walletconnect.sign.client.Sign import com.walletconnect.web3.modal.engine.coinbase.CoinbaseResult +@Deprecated("com.walletconnect.web3.modal.client.models.request.SentRequestResult has been deprecated. Please use com.reown.appkit.client.models.request.SentRequestResult instead from - https://github.com/reown-com/reown-kotlin") sealed class SentRequestResult { abstract val method: String abstract val params: String diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/presets/Web3ModalChainsPresets.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/presets/Web3ModalChainsPresets.kt index cf21ffa444..d7e5728400 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/presets/Web3ModalChainsPresets.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/presets/Web3ModalChainsPresets.kt @@ -3,6 +3,7 @@ package com.walletconnect.web3.modal.presets import com.walletconnect.web3.modal.client.Modal import com.walletconnect.web3.modal.utils.EthUtils +@Deprecated("com.walletconnect.web3.modal.presets.Web3ModalChainsPresets has been deprecated. Please use com.reown.appkit.presets.AppKitChainsPresets instead from - https://github.com/reown-com/reown-kotlin") object Web3ModalChainsPresets { val ethToken = Modal.Model.Token(name = "Ether", symbol = "ETH", decimal = 18) diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3Modal.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3Modal.kt index 4ed334e6da..a0ef2af80e 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3Modal.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3Modal.kt @@ -21,10 +21,18 @@ internal const val CHOOSE_NETWORK_KEY = "chooseNetwork" private const val CHOOSE_NETWORK_ARG = "{chooseNetwork}" private val web3ModalPath = Route.WEB3MODAL.path + "/" + CHOOSE_NETWORK_ARG +@Deprecated( + "com.walletconnect.web3.modal.web3Modal has been deprecated. Please use com.reown.appkit.modal.ui.appKit instead from - https://github.com/reown-com/reown-kotlin", + ReplaceWith("appKit()") +) fun NavGraphBuilder.web3Modal() { dialog(web3ModalPath) { argument(CHOOSE_NETWORK_KEY) { type = NavType.BoolType } } } +@Deprecated( + "com.walletconnect.web3.modal.openWeb3Modal has been deprecated. Please use com.reown.appkit.modal.ui.openAppKit instead from - https://github.com/reown-com/reown-kotlin", + ReplaceWith("openAppKit(shouldOpenChooseNetwork, onError") +) @SuppressLint("RestrictedApi") fun NavController.openWeb3Modal( shouldOpenChooseNetwork: Boolean = false, @@ -36,16 +44,22 @@ fun NavController.openWeb3Modal( putBoolean(CHOOSE_NETWORK_KEY, shouldOpenChooseNetwork) }, navOptions = buildWeb3ModalNavOptions()) } + findDestination(web3ModalPath) != null -> { navigate( route = Route.WEB3MODAL.path + "/$shouldOpenChooseNetwork", navOptions = buildWeb3ModalNavOptions() ) } + else -> onError(IllegalStateException("Invalid web3Modal path")) } } +@Deprecated( + "com.walletconnect.web3.modal.ui.NavGraphBuilder has been deprecated. Please use com.reown.appkit.modal.ui.NavGraphBuilder instead from - https://github.com/reown-com/reown-kotlin", + ReplaceWith("appKitGraph(navController") +) fun NavGraphBuilder.web3ModalGraph(navController: NavController) { bottomSheet( route = web3ModalPath, diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalEvents.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalEvents.kt index 6acfeeaf8f..1b3617010f 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalEvents.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalEvents.kt @@ -1,5 +1,6 @@ package com.walletconnect.web3.modal.ui +@Deprecated("com.walletconnect.web3.modal.ui.Web3ModalEvents has been deprecated. Please use com.reown.appkit.modal.ui.Web3ModalEvents instead from - https://github.com/reown-com/reown-kotlin") sealed class Web3ModalEvents { object SessionApproved: Web3ModalEvents() object SessionRejected: Web3ModalEvents() diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalSheet.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalSheet.kt index 19d0335f53..b4c9c1d7f1 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalSheet.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalSheet.kt @@ -33,6 +33,7 @@ import com.walletconnect.web3.modal.R import com.walletconnect.web3.modal.ui.components.internal.Web3ModalComponent import com.walletconnect.web3.modal.ui.theme.ColorPalette +@Deprecated("com.walletconnect.web3.modal.ui.Web3ModalSheet has been deprecated. Please use com.reown.appkit.modal.ui.AppKitSheet instead from - https://github.com/reown-com/reown-kotlin") class Web3ModalSheet : BottomSheetDialogFragment() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalState.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalState.kt index ee9a543304..703cfa0543 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalState.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalState.kt @@ -1,5 +1,5 @@ package com.walletconnect.web3.modal.ui - +@Deprecated("com.walletconnect.web3.modal.ui.Web3ModalState has been deprecated. Please use com.reown.appkit.modal.ui.AppKitState instead from - https://github.com/reown-com/reown-kotlin") internal sealed class Web3ModalState { object Connect : Web3ModalState() diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalTheme.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalTheme.kt index f1dd8a62f5..a3a75bd3ec 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalTheme.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalTheme.kt @@ -9,6 +9,7 @@ import com.walletconnect.web3.modal.ui.theme.LocalCustomComposition import com.walletconnect.web3.modal.ui.theme.defaultDarkWeb3ModalColors import com.walletconnect.web3.modal.ui.theme.defaultLightWeb3ModalColors +@Deprecated("com.walletconnect.web3.modal.ui.Web3ModalTheme has been deprecated. Please use com.reown.appkit.modal.ui.AppKitTheme instead from - https://github.com/reown-com/reown-kotlin") @Composable fun Web3ModalTheme( mode: Web3ModalTheme.Mode = Web3ModalTheme.Mode.AUTO, @@ -28,6 +29,7 @@ fun Web3ModalTheme( } } +@Deprecated("com.walletconnect.web3.modal.ui.Web3ModalTheme has been deprecated. Please use com.reown.appkit.modal.ui.AppKitTheme instead from - https://github.com/reown-com/reown-kotlin") object Web3ModalTheme { fun provideLightWeb3ModalColors( diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalView.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalView.kt index 2afd387e48..7fb5882ed2 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalView.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/Web3ModalView.kt @@ -9,6 +9,7 @@ import androidx.compose.ui.platform.ViewCompositionStrategy import com.walletconnect.web3.modal.R import com.walletconnect.web3.modal.ui.components.internal.Web3ModalComponent +@Deprecated("com.walletconnect.web3.modal.ui.Web3ModalView has been deprecated. Please use com.reown.appkit.modal.ui.AppKitView instead from - https://github.com/reown-com/reown-kotlin") class Web3ModalView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, @@ -18,6 +19,7 @@ class Web3ModalView @JvmOverloads constructor( private var shouldOpenNetwork: Boolean private var closeModal: () -> Unit = {} + @Deprecated("com.walletconnect.web3.modal.ui.setOnCloseModal has been deprecated. Please use com.reown.appkit.modal.ui.setOnCloseModal instead from - https://github.com/reown-com/reown-kotlin", ReplaceWith("AppKit.setOnCloseModal(onCloseModal)")) fun setOnCloseModal(onCloseModal: () -> Unit) { closeModal = onCloseModal } diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/AccountButton.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/AccountButton.kt index ef4ad0f173..b0ce576c7d 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/AccountButton.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/AccountButton.kt @@ -40,6 +40,7 @@ import com.walletconnect.web3.modal.ui.theme.Web3ModalTheme import com.walletconnect.web3.modal.utils.getImageData import com.walletconnect.web3.modal.utils.toVisibleAddress +@Deprecated("com.walletconnect.web3.modal.ui.components.AccountButtonType has been deprecated. Please use com.reown.appkit.modal.ui.components.AccountButtonType instead from - https://github.com/reown-com/reown-kotlin") enum class AccountButtonType { NORMAL, MIXED } @@ -59,6 +60,7 @@ internal sealed class AccountButtonState { object Invalid : AccountButtonState() } +@Deprecated("com.walletconnect.web3.modal.ui.components.AccountButton has been deprecated. Please use com.reown.appkit.modal.ui.components.AccountButton instead from - https://github.com/reown-com/reown-kotlin") @Composable fun AccountButton( state: Web3ModalState, diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/ConnectButton.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/ConnectButton.kt index 5e13f1a2cc..c2d1b89406 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/ConnectButton.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/ConnectButton.kt @@ -13,10 +13,12 @@ import com.walletconnect.web3.modal.ui.previews.MultipleComponentsPreview import com.walletconnect.web3.modal.ui.previews.UiModePreview import com.walletconnect.web3.modal.ui.theme.ProvideWeb3ModalThemeComposition +@Deprecated("com.walletconnect.web3.modal.ui.components.ConnectButtonSize has been deprecated. Please use com.reown.appkit.modal.ui.components.ConnectButtonSize instead from - https://github.com/reown-com/reown-kotlin") enum class ConnectButtonSize { NORMAL, SMALL } +@Deprecated("com.walletconnect.web3.modal.ui.components.ConnectButton has been deprecated. Please use com.reown.appkit.modal.ui.components.ConnectButton instead from - https://github.com/reown-com/reown-kotlin") @Composable fun ConnectButton( state: Web3ModalState, diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/NetworkButton.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/NetworkButton.kt index 538b777cc5..9230f870ce 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/NetworkButton.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/NetworkButton.kt @@ -12,6 +12,7 @@ import com.walletconnect.web3.modal.ui.components.internal.commons.network.Circl import com.walletconnect.web3.modal.ui.theme.ProvideWeb3ModalThemeComposition import com.walletconnect.web3.modal.utils.getImageData +@Deprecated("com.walletconnect.web3.modal.ui.components.button.NetworkButton has been deprecated. Please use com.reown.appkit.modal.ui.components.button.NetworkButton instead from - https://github.com/reown-com/reown-kotlin") @Composable fun NetworkButton( state: Web3ModalState diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/Web3Button.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/Web3Button.kt index 34c1f27ff6..fe4f8fdf6b 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/Web3Button.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/Web3Button.kt @@ -5,6 +5,7 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue +@Deprecated("com.walletconnect.web3.modal.ui.components.button.Web3Button has been deprecated. Please use com.reown.appkit.modal.ui.components.button.Web3Button instead from - https://github.com/reown-com/reown-kotlin") @Composable fun Web3Button( state: Web3ModalState, diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/Web3ModalState.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/Web3ModalState.kt index ed5f71a36f..a26e49ce6d 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/Web3ModalState.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/Web3ModalState.kt @@ -31,6 +31,9 @@ import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.stateIn +@Deprecated("com.walletconnect.web3.modal.ui.components.button.rememberWeb3ModalState has been deprecated. Please use com.reown.appkit.modal.ui.components.button.rememberAppKitState instead from - https://github.com/reown-com/reown-kotlin", + ReplaceWith("rememberAppKitState(navController)") +) @Composable fun rememberWeb3ModalState( coroutineScope: CoroutineScope = rememberCoroutineScope(), @@ -41,6 +44,7 @@ fun rememberWeb3ModalState( } } +@Deprecated("com.walletconnect.web3.modal.ui.components.button.Web3ModalState has been deprecated. Please use com.reown.appkit.modal.ui.components.button.AppKitState instead from - https://github.com/reown-com/reown-kotlin") class Web3ModalState( coroutineScope: CoroutineScope, private val navController: NavController diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/views/AccountButton.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/views/AccountButton.kt index 65fb440387..f421876468 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/views/AccountButton.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/views/AccountButton.kt @@ -12,6 +12,7 @@ import com.walletconnect.web3.modal.ui.components.button.AccountButton import com.walletconnect.web3.modal.ui.components.button.rememberWeb3ModalState import com.walletconnect.web3.modal.utils.toAccountButtonType +@Deprecated("com.walletconnect.web3.modal.ui.components.buttons.views.AccountButton has been deprecated. Please use com.reown.appkit.modal.ui.components.buttons.views.AccountButton instead from - https://github.com/reown-com/reown-kotlin") class AccountButton @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 ) : FrameLayout(context, attrs, defStyleAttr) { diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/views/ConnectButton.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/views/ConnectButton.kt index eb00689ef5..da5ae63bd0 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/views/ConnectButton.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/views/ConnectButton.kt @@ -12,6 +12,7 @@ import com.walletconnect.web3.modal.ui.components.button.ConnectButton import com.walletconnect.web3.modal.ui.components.button.rememberWeb3ModalState import com.walletconnect.web3.modal.utils.toConnectButtonSize +@Deprecated("com.walletconnect.web3.modal.ui.components.buttons.views.ConnectButton has been deprecated. Please use com.reown.appkit.modal.ui.components.buttons.views.ConnectButton instead from - https://github.com/reown-com/reown-kotlin") class ConnectButton @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 ) : FrameLayout(context, attrs, defStyleAttr) { diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/views/Web3Button.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/views/Web3Button.kt index 734c7b3060..ad1fc662f7 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/views/Web3Button.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/ui/components/button/views/Web3Button.kt @@ -13,6 +13,7 @@ import com.walletconnect.web3.modal.ui.components.button.rememberWeb3ModalState import com.walletconnect.web3.modal.utils.toAccountButtonType import com.walletconnect.web3.modal.utils.toConnectButtonSize +@Deprecated("com.walletconnect.web3.modal.ui.components.buttons.views.Web3Button has been deprecated. Please use com.reown.appkit.modal.ui.components.buttons.views.Web3Button instead from - https://github.com/reown-com/reown-kotlin") class Web3Button @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 ) : FrameLayout(context, attrs, defStyleAttr) { diff --git a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/utils/EthUtils.kt b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/utils/EthUtils.kt index c6ef624d3d..1dd761d306 100644 --- a/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/utils/EthUtils.kt +++ b/product/web3modal/src/main/kotlin/com/walletconnect/web3/modal/utils/EthUtils.kt @@ -1,5 +1,6 @@ package com.walletconnect.web3.modal.utils +@Deprecated("com.walletconnect.web3.modal.utils.EthUtils has been deprecated. Please use com.reown.appkit.utils.EthUtils instead from - https://github.com/reown-com/reown-kotlin") object EthUtils { const val walletSwitchEthChain = "wallet_switchEthereumChain" const val walletAddEthChain = "wallet_addEthereumChain" diff --git a/product/web3wallet/src/main/kotlin/com/walletconnect/web3/wallet/client/Wallet.kt b/product/web3wallet/src/main/kotlin/com/walletconnect/web3/wallet/client/Wallet.kt index 4de98c9806..242969086d 100644 --- a/product/web3wallet/src/main/kotlin/com/walletconnect/web3/wallet/client/Wallet.kt +++ b/product/web3wallet/src/main/kotlin/com/walletconnect/web3/wallet/client/Wallet.kt @@ -8,6 +8,7 @@ import java.net.URI import kotlin.time.Duration import kotlin.time.Duration.Companion.seconds +@Deprecated("com.walletconnect.web3.wallet.client.Wallet has been deprecated. Please use com.reown.walletkit.client.Wallet instead from - https://github.com/reown-com/reown-kotlin") object Wallet { sealed interface Listeners { diff --git a/product/web3wallet/src/main/kotlin/com/walletconnect/web3/wallet/client/Web3Wallet.kt b/product/web3wallet/src/main/kotlin/com/walletconnect/web3/wallet/client/Web3Wallet.kt index 52de508ca8..09937bfd2b 100644 --- a/product/web3wallet/src/main/kotlin/com/walletconnect/web3/wallet/client/Web3Wallet.kt +++ b/product/web3wallet/src/main/kotlin/com/walletconnect/web3/wallet/client/Web3Wallet.kt @@ -12,9 +12,11 @@ import com.walletconnect.sign.common.exceptions.SignClientAlreadyInitializedExce import kotlinx.coroutines.* import java.util.* +@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") object Web3Wallet { private lateinit var coreClient: CoreInterface + @Deprecated("Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("WalletKit.WalletDelegate")) interface WalletDelegate { fun onSessionProposal(sessionProposal: Wallet.Model.SessionProposal, verifyContext: Wallet.Model.VerifyContext) val onSessionAuthenticate: ((Wallet.Model.SessionAuthenticate, Wallet.Model.VerifyContext) -> Unit)? get() = null @@ -45,6 +47,7 @@ object Web3Wallet { fun onError(error: Wallet.Model.Error) } + @Deprecated("Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", replaceWith = ReplaceWith("WalletKit.setWalletDelegate(delegate)")) @Throws(IllegalStateException::class) fun setWalletDelegate(delegate: WalletDelegate) { val isSessionAuthenticateImplemented = delegate.onSessionAuthenticate != null @@ -119,6 +122,10 @@ object Web3Wallet { AuthClient.setResponderDelegate(authWalletDelegate) } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.initialize(params, onSuccess, onError)") + ) @Throws(IllegalStateException::class) fun initialize(params: Wallet.Params.Init, onSuccess: () -> Unit = {}, onError: (Wallet.Model.Error) -> Unit) { coreClient = params.core @@ -143,11 +150,19 @@ object Web3Wallet { validateInitializationCount(clientInitCounter, onSuccess, onError) } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.registerDeviceToken(firebaseAccessToken, enableEncrypted, onSuccess, onError)") + ) @Throws(IllegalStateException::class) fun registerDeviceToken(firebaseAccessToken: String, enableEncrypted: Boolean = false, onSuccess: () -> Unit, onError: (Wallet.Model.Error) -> Unit) { coreClient.Echo.register(firebaseAccessToken, enableEncrypted, onSuccess) { error -> onError(Wallet.Model.Error(error)) } } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.decryptMessage(params, onSuccess, onError)") + ) @Throws(IllegalStateException::class) fun decryptMessage(params: Wallet.Params.DecryptMessage, onSuccess: (Wallet.Model.Message) -> Unit, onError: (Wallet.Model.Error) -> Unit) { scope.launch { @@ -165,6 +180,10 @@ object Web3Wallet { } } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.dispatchEnvelope(urlWithEnvelope, onError)") + ) @Throws(IllegalStateException::class) fun dispatchEnvelope(urlWithEnvelope: String, onError: (Wallet.Model.Error) -> Unit) { scope.launch { @@ -176,11 +195,19 @@ object Web3Wallet { } } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.pair(params, onSuccess, onError)") + ) @Throws(IllegalStateException::class) fun pair(params: Wallet.Params.Pair, onSuccess: (Wallet.Params.Pair) -> Unit = {}, onError: (Wallet.Model.Error) -> Unit = {}) { coreClient.Pairing.pair(Core.Params.Pair(params.uri), { onSuccess(params) }, { error -> onError(Wallet.Model.Error(error.throwable)) }) } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.approveSession(params, onSuccess, onError)") + ) @Throws(IllegalStateException::class) fun approveSession( params: Wallet.Params.SessionApprove, @@ -191,11 +218,19 @@ object Web3Wallet { SignClient.approveSession(signParams, { onSuccess(params) }, { error -> onError(Wallet.Model.Error(error.throwable)) }) } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.generateApprovedNamespaces(sessionProposal, supportedNamespaces, onError)") + ) @Throws(Exception::class) fun generateApprovedNamespaces(sessionProposal: Wallet.Model.SessionProposal, supportedNamespaces: Map): Map { return com.walletconnect.sign.client.utils.generateApprovedNamespaces(sessionProposal.toSign(), supportedNamespaces.toSign()).toWallet() } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.rejectSession(params, onSuccess, onError)") + ) @Throws(IllegalStateException::class) fun rejectSession( params: Wallet.Params.SessionReject, @@ -206,6 +241,10 @@ object Web3Wallet { SignClient.rejectSession(signParams, { onSuccess(params) }, { error -> onError(Wallet.Model.Error(error.throwable)) }) } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.approveSessionAuthenticate(params, onSuccess, onError)") + ) @Throws(IllegalStateException::class) fun approveSessionAuthenticate( params: Wallet.Params.ApproveSessionAuthenticate, @@ -216,6 +255,10 @@ object Web3Wallet { SignClient.approveAuthenticate(signParams, { onSuccess(params) }, { error -> onError(Wallet.Model.Error(error.throwable)) }) } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.rejectSessionAuthenticate(params, onSuccess, onError)") + ) @Throws(IllegalStateException::class) fun rejectSessionAuthenticate( params: Wallet.Params.RejectSessionAuthenticate, @@ -226,16 +269,28 @@ object Web3Wallet { SignClient.rejectAuthenticate(signParams, { onSuccess(params) }, { error -> onError(Wallet.Model.Error(error.throwable)) }) } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.generateAuthObject(payloadParams, issuer, signature)") + ) @Throws(Exception::class) fun generateAuthObject(payloadParams: Wallet.Model.PayloadAuthRequestParams, issuer: String, signature: Wallet.Model.Cacao.Signature): Wallet.Model.Cacao { return com.walletconnect.sign.client.utils.generateAuthObject(payloadParams.toSign(), issuer, signature.toSign()).toWallet() } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.generateAuthPayloadParams(payloadParams, supportedChains, supportedMethods)") + ) @Throws(Exception::class) fun generateAuthPayloadParams(payloadParams: Wallet.Model.PayloadAuthRequestParams, supportedChains: List, supportedMethods: List): Wallet.Model.PayloadAuthRequestParams { return com.walletconnect.sign.client.utils.generateAuthPayloadParams(payloadParams.toSign(), supportedChains, supportedMethods).toWallet() } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.updateSession(params, onSuccess, onError)") + ) @Throws(IllegalStateException::class) fun updateSession( params: Wallet.Params.SessionUpdate, @@ -246,6 +301,10 @@ object Web3Wallet { SignClient.update(signParams, { onSuccess(params) }, { error -> onError(Wallet.Model.Error(error.throwable)) }) } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.extendSession(params, onSuccess, onError)") + ) @Throws(IllegalStateException::class) fun extendSession( params: Wallet.Params.SessionExtend, @@ -256,6 +315,10 @@ object Web3Wallet { SignClient.extend(signParams, { onSuccess(params) }, { error -> onError(Wallet.Model.Error(error.throwable)) }) } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.respondSessionRequest(params, onSuccess, onError)") + ) @Throws(IllegalStateException::class) fun respondSessionRequest( params: Wallet.Params.SessionRequestResponse, @@ -266,7 +329,10 @@ object Web3Wallet { SignClient.respond(signParams, { onSuccess(params) }, { error -> onError(Wallet.Model.Error(error.throwable)) }) } - + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.emitSessionEvent(params, onSuccess, onError)") + ) @Throws(IllegalStateException::class) fun emitSessionEvent( params: Wallet.Params.SessionEmit, @@ -277,6 +343,10 @@ object Web3Wallet { SignClient.emit(signParams, { onSuccess(params) }, { error -> onError(Wallet.Model.Error(error.throwable)) }) } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.disconnectSession(params, onSuccess, onError)") + ) @Throws(IllegalStateException::class) fun disconnectSession( params: Wallet.Params.SessionDisconnect, @@ -287,6 +357,10 @@ object Web3Wallet { SignClient.disconnect(signParams, { onSuccess(params) }, { error -> onError(Wallet.Model.Error(error.throwable)) }) } + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.pingSession(params, sessionPing)") + ) @Throws(IllegalStateException::class) fun pingSession( params: Wallet.Params.Ping, @@ -310,6 +384,10 @@ object Web3Wallet { * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.formatAuthMessage(params)") + ) @Throws(IllegalStateException::class) fun formatAuthMessage(params: Wallet.Params.FormatAuthMessage): String { val signParams = Sign.Params.FormatMessage(params.payloadParams.toSign(), params.issuer) @@ -321,8 +399,8 @@ object Web3Wallet { * It is advised that this function be called from background operation */ @Deprecated( - "AuthSDK has been deprecated. Please use updated Web3Wallet and Sign SDKs instead.", - replaceWith = ReplaceWith("fun formatAuthMessage(formatMessage: Sign.Params.FormatMessage): String? in Web3Wallet SDK") + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.formatAuthMessage(params)") ) @Throws(IllegalStateException::class) fun formatMessage(params: Wallet.Params.FormatMessage): String? { @@ -331,8 +409,8 @@ object Web3Wallet { } @Deprecated( - "AuthSDK has been deprecated. Please use updated Web3Wallet and Sign SDKs instead.", - replaceWith = ReplaceWith("fun approveSessionAuthenticated(approve: Sign.Params.ApproveSessionAuthenticate, onSuccess: (Sign.Params.ApproveSessionAuthenticate) -> Unit, onError: (Sign.Model.Error) -> Unit) or fun rejectSessionAuthenticated(reject: Sign.Params.RejectSessionAuthenticate, onSuccess: (Sign.Params.RejectSessionAuthenticate) -> Unit, onError: (Sign.Model.Error) -> Unit) in Web3Wallet SDK") + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.approveSessionAuthenticate(params, onSuccess, onError)") ) @Throws(IllegalStateException::class) fun respondAuthRequest( @@ -347,6 +425,10 @@ object Web3Wallet { * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.getListOfActiveSessions()") + ) @Throws(IllegalStateException::class) @JvmStatic fun getListOfActiveSessions(): List { @@ -357,6 +439,10 @@ object Web3Wallet { * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.getActiveSessionByTopic()") + ) @Throws(IllegalStateException::class) fun getActiveSessionByTopic(topic: String): Wallet.Model.Session? { return SignClient.getActiveSessionByTopic(topic)?.toWallet() @@ -367,9 +453,13 @@ object Web3Wallet { * It is advised that this function be called from background operation */ + /** + * Caution: This function is blocking and runs on the current thread. + * It is advised that this function be called from background operation + */ @Deprecated( - "The return type of getPendingRequests methods has been replaced with SessionRequest list", - replaceWith = ReplaceWith("getPendingSessionRequests(topic: String): List") + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.getPendingSessionRequests(topic)") ) @Throws(IllegalStateException::class) fun getPendingSessionRequests(topic: String): List { @@ -380,7 +470,10 @@ object Web3Wallet { * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ - + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.getPendingListOfSessionRequests(topic)") + ) @Throws(IllegalStateException::class) fun getPendingListOfSessionRequests(topic: String): List { return SignClient.getPendingSessionRequests(topic).mapToPendingSessionRequests() @@ -391,6 +484,10 @@ object Web3Wallet { * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.getSessionProposals()") + ) @Throws(IllegalStateException::class) fun getSessionProposals(): List { return SignClient.getSessionProposals().map(Sign.Model.SessionProposal::toWallet) @@ -413,6 +510,10 @@ object Web3Wallet { * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.getVerifyContext(id)") + ) @Throws(IllegalStateException::class) fun getVerifyContext(id: Long): Wallet.Model.VerifyContext? { return SignClient.getVerifyContext(id)?.toWallet() @@ -422,6 +523,10 @@ object Web3Wallet { * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated( + "Web3Wallet has been deprecated. Please use WalletKit instead from - https://github.com/reown-com/reown-kotlin", + replaceWith = ReplaceWith("WalletKit.getListOfVerifyContexts()") + ) @Throws(IllegalStateException::class) fun getListOfVerifyContexts(): List { return SignClient.getListOfVerifyContexts().map { verifyContext -> verifyContext.toWallet() } @@ -446,4 +551,4 @@ object Web3Wallet { } private const val TIMEOUT: Long = 10000 -} +} \ No newline at end of file diff --git a/product/web3wallet/src/main/kotlin/com/walletconnect/web3/wallet/utils/CacaoSigner.kt b/product/web3wallet/src/main/kotlin/com/walletconnect/web3/wallet/utils/CacaoSigner.kt index bbeae4e866..0cc9315901 100644 --- a/product/web3wallet/src/main/kotlin/com/walletconnect/web3/wallet/utils/CacaoSigner.kt +++ b/product/web3wallet/src/main/kotlin/com/walletconnect/web3/wallet/utils/CacaoSigner.kt @@ -13,4 +13,6 @@ enum class SignatureType(override val header: String) : ISignatureType { EIP191("eip191"), EIP1271("eip1271"); } + +@Deprecated("com.walletconnect.web3.wallet.utils.CacaoSigner has been deprecated. Please use com.reown.walletkit.utils.CacaoSigner instead from - https://github.com/reown-com/reown-kotlin") object CacaoSigner : CacaoSignerInterface \ No newline at end of file diff --git a/protocol/auth/src/main/kotlin/com/walletconnect/auth/client/AuthProtocol.kt b/protocol/auth/src/main/kotlin/com/walletconnect/auth/client/AuthProtocol.kt index bcc9bd8039..b8898b2d59 100644 --- a/protocol/auth/src/main/kotlin/com/walletconnect/auth/client/AuthProtocol.kt +++ b/protocol/auth/src/main/kotlin/com/walletconnect/auth/client/AuthProtocol.kt @@ -23,6 +23,7 @@ import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking import org.koin.core.KoinApplication +@Deprecated("AuthSDK has been deprecated") internal class AuthProtocol(private val koinApp: KoinApplication = wcKoinApp) : AuthInterface { private lateinit var authEngine: AuthEngine diff --git a/protocol/chat/src/main/kotlin/com/walletconnect/chat/cacao/CacaoSigner.kt b/protocol/chat/src/main/kotlin/com/walletconnect/chat/cacao/CacaoSigner.kt index 09fbd28692..80e410ea2c 100644 --- a/protocol/chat/src/main/kotlin/com/walletconnect/chat/cacao/CacaoSigner.kt +++ b/protocol/chat/src/main/kotlin/com/walletconnect/chat/cacao/CacaoSigner.kt @@ -3,4 +3,5 @@ package com.walletconnect.chat.cacao import com.walletconnect.android.utils.cacao.CacaoSignerInterface import com.walletconnect.chat.client.Chat +@Deprecated("ChatSDK has been deprecated") object CacaoSigner : CacaoSignerInterface diff --git a/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/Chat.kt b/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/Chat.kt index d1447f9517..68fb036fe7 100644 --- a/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/Chat.kt +++ b/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/Chat.kt @@ -4,6 +4,7 @@ import androidx.annotation.Keep import com.walletconnect.android.CoreInterface import com.walletconnect.android.cacao.SignatureInterface +@Deprecated("ChatSDK has been deprecated") object Chat { sealed interface Listeners { fun onError(error: Model.Error) diff --git a/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/ChatClient.kt b/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/ChatClient.kt index 09cf03136d..9ef12224db 100644 --- a/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/ChatClient.kt +++ b/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/ChatClient.kt @@ -1,5 +1,5 @@ package com.walletconnect.chat.client - +@Deprecated("ChatSDK has been deprecated") object ChatClient: ChatInterface by ChatProtocol.instance { interface ChatDelegate: ChatInterface.ChatDelegate } \ No newline at end of file diff --git a/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/ChatInterface.kt b/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/ChatInterface.kt index 2b31a61894..6cefb3cee3 100644 --- a/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/ChatInterface.kt +++ b/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/ChatInterface.kt @@ -1,33 +1,59 @@ package com.walletconnect.chat.client +@Deprecated("ChatSDK has been deprecated") interface ChatInterface { + @Deprecated("ChatSDK has been deprecated") interface ChatDelegate { + @Deprecated("ChatSDK has been deprecated") fun onInvite(onInvite: Chat.Model.Events.OnInvite) + @Deprecated("ChatSDK has been deprecated") fun onInviteAccepted(onInviteAccepted: Chat.Model.Events.OnInviteAccepted) + @Deprecated("ChatSDK has been deprecated") fun onInviteRejected(onInviteRejected: Chat.Model.Events.OnInviteRejected) + @Deprecated("ChatSDK has been deprecated") fun onMessage(onMessage: Chat.Model.Events.OnMessage) + @Deprecated("ChatSDK has been deprecated") fun onLeft(onLeft: Chat.Model.Events.OnLeft) + @Deprecated("ChatSDK has been deprecated") fun onConnectionStateChange(state: Chat.Model.ConnectionState) + @Deprecated("ChatSDK has been deprecated") fun onError(error: Chat.Model.Error) } + @Deprecated("ChatSDK has been deprecated") fun setChatDelegate(delegate: ChatDelegate) + @Deprecated("ChatSDK has been deprecated") fun initialize(init: Chat.Params.Init, onError: (Chat.Model.Error) -> Unit) + @Deprecated("ChatSDK has been deprecated") fun register(register: Chat.Params.Register, listener: Chat.Listeners.Register) + @Deprecated("ChatSDK has been deprecated") fun unregister(unregister: Chat.Params.Unregister, listener: Chat.Listeners.Unregister) + @Deprecated("ChatSDK has been deprecated") fun resolve(resolve: Chat.Params.Resolve, listener: Chat.Listeners.Resolve) + @Deprecated("ChatSDK has been deprecated") fun goPrivate(goPrivate: Chat.Params.GoPrivate, onSuccess: () -> Unit, onError: (Chat.Model.Error) -> Unit) + @Deprecated("ChatSDK has been deprecated") fun goPublic(goPublic: Chat.Params.GoPublic, onSuccess: (String) -> Unit, onError: (Chat.Model.Error) -> Unit) + @Deprecated("ChatSDK has been deprecated") fun invite(invite: Chat.Params.Invite, onSuccess: (Long) -> Unit, onError: (Chat.Model.Error) -> Unit) + @Deprecated("ChatSDK has been deprecated") fun accept(accept: Chat.Params.Accept, onSuccess: (String) -> Unit, onError: (Chat.Model.Error) -> Unit) + @Deprecated("ChatSDK has been deprecated") fun reject(reject: Chat.Params.Reject, onSuccess: () -> Unit, onError: (Chat.Model.Error) -> Unit) + @Deprecated("ChatSDK has been deprecated") fun message(message: Chat.Params.Message, onSuccess: () -> Unit, onError: (Chat.Model.Error) -> Unit) + @Deprecated("ChatSDK has been deprecated") fun ping(ping: Chat.Params.Ping, onSuccess: (String) -> Unit, onError: (Chat.Model.Error) -> Unit) + @Deprecated("ChatSDK has been deprecated") fun leave(leave: Chat.Params.Leave, onError: (Chat.Model.Error) -> Unit) + @Deprecated("ChatSDK has been deprecated") fun getReceivedInvites(getReceivedInvites: Chat.Params.GetReceivedInvites): Map + @Deprecated("ChatSDK has been deprecated") fun getSentInvites(getSentInvites: Chat.Params.GetSentInvites): Map + @Deprecated("ChatSDK has been deprecated") fun getThreads(getThreads: Chat.Params.GetThreads): Map + @Deprecated("ChatSDK has been deprecated") fun getMessages(getMessages: Chat.Params.GetMessages): List } \ No newline at end of file diff --git a/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/ChatProtocol.kt b/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/ChatProtocol.kt index 309dc2d6ac..18ea0e71c7 100644 --- a/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/ChatProtocol.kt +++ b/protocol/chat/src/main/kotlin/com/walletconnect/chat/client/ChatProtocol.kt @@ -24,6 +24,7 @@ internal class ChatProtocol(private val koinApp: KoinApplication = wcKoinApp) : val instance = ChatProtocol() } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun initialize(init: Chat.Params.Init, onError: (Chat.Model.Error) -> Unit) { try { @@ -42,6 +43,7 @@ internal class ChatProtocol(private val koinApp: KoinApplication = wcKoinApp) : } } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun setChatDelegate(delegate: ChatInterface.ChatDelegate): Unit = wrapWithEngineInitializationCheck() { scope.launch { @@ -59,6 +61,7 @@ internal class ChatProtocol(private val koinApp: KoinApplication = wcKoinApp) : } } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun resolve(resolve: Chat.Params.Resolve, listener: Chat.Listeners.Resolve) = protocolFunction(listener::onError) { chatEngine.resolveAccount( @@ -68,66 +71,79 @@ internal class ChatProtocol(private val koinApp: KoinApplication = wcKoinApp) : ) } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun goPrivate(goPrivate: Chat.Params.GoPrivate, onSuccess: () -> Unit, onError: (Chat.Model.Error) -> Unit) = protocolFunction(onError) { chatEngine.goPrivate(goPrivate.account.toCommon(), { onSuccess() }, { error -> onError(Chat.Model.Error(error)) }) } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun goPublic(goPublic: Chat.Params.GoPublic, onSuccess: (String) -> Unit, onError: (Chat.Model.Error) -> Unit) = protocolFunction(onError) { chatEngine.goPublic(goPublic.account.toCommon(), { inviteKey -> onSuccess(inviteKey) }, { error -> onError(Chat.Model.Error(error)) }) } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun invite(invite: Chat.Params.Invite, onSuccess: (Long) -> Unit, onError: (Chat.Model.Error) -> Unit) = protocolFunction(onError) { scope.launch { chatEngine.invite(invite.toCommon(), { inviteId -> onSuccess(inviteId) }, { error -> onError(Chat.Model.Error(error)) }) } } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun accept(accept: Chat.Params.Accept, onSuccess: (String) -> Unit, onError: (Chat.Model.Error) -> Unit) = protocolFunction(onError) { chatEngine.accept(accept.inviteId, { threadTopic -> onSuccess(threadTopic) }, { error -> onError(Chat.Model.Error(error)) }) } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun reject(reject: Chat.Params.Reject, onSuccess: () -> Unit, onError: (Chat.Model.Error) -> Unit) = protocolFunction(onError) { chatEngine.reject(reject.inviteId, onSuccess) { error -> onError(Chat.Model.Error(error)) } } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun message(message: Chat.Params.Message, onSuccess: () -> Unit, onError: (Chat.Model.Error) -> Unit) = protocolFunction(onError) { chatEngine.message(message.topic, message.toCommon(), onSuccess) { error -> onError(Chat.Model.Error(error)) } } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun ping(ping: Chat.Params.Ping, onSuccess: (String) -> Unit, onError: (Chat.Model.Error) -> Unit) = protocolFunction(onError) { chatEngine.ping(ping.topic, onSuccess = { topic -> onSuccess(topic) }, { error -> onError(Chat.Model.Error(error)) }) } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun leave(leave: Chat.Params.Leave, onError: (Chat.Model.Error) -> Unit) = protocolFunction(onError) { chatEngine.leave(leave.topic) { error -> onError(Chat.Model.Error(error)) } } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun getReceivedInvites(getReceivedInvites: Chat.Params.GetReceivedInvites): Map = wrapWithEngineInitializationCheck() { chatEngine.getReceivedInvites(getReceivedInvites.account.value).mapValues { (_, invite) -> invite.toClient() } } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun getSentInvites(getSentInvites: Chat.Params.GetSentInvites): Map = wrapWithEngineInitializationCheck() { chatEngine.getSentInvites(getSentInvites.account.value).mapValues { (_, invite) -> invite.toClient() } } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun getThreads(getThreads: Chat.Params.GetThreads): Map = wrapWithEngineInitializationCheck() { chatEngine.getThreads(getThreads.account.value).mapValues { (_, thread) -> thread.toClient() } } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun getMessages(getMessages: Chat.Params.GetMessages): List = wrapWithEngineInitializationCheck() { chatEngine.getMessages(getMessages.topic).map { message -> message.toClient() }.sortedBy { message -> message.timestamp } } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun register(register: Chat.Params.Register, listener: Chat.Listeners.Register) = protocolFunction(listener::onError) { chatEngine.register( @@ -139,6 +155,7 @@ internal class ChatProtocol(private val koinApp: KoinApplication = wcKoinApp) : ) } + @Deprecated("ChatSDK has been deprecated") @Throws(IllegalStateException::class) override fun unregister(unregister: Chat.Params.Unregister, listener: Chat.Listeners.Unregister) = protocolFunction(listener::onError) { chatEngine.unregister( @@ -148,7 +165,6 @@ internal class ChatProtocol(private val koinApp: KoinApplication = wcKoinApp) : ) } - @Throws(IllegalStateException::class) private fun wrapWithEngineInitializationCheck(block: () -> R): R { check(::chatEngine.isInitialized) { diff --git a/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/Notify.kt b/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/Notify.kt index 156b014fa7..1dfcf5c53c 100644 --- a/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/Notify.kt +++ b/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/Notify.kt @@ -8,6 +8,7 @@ import com.walletconnect.android.cacao.SignatureInterface import com.walletconnect.foundation.common.model.PrivateKey import kotlin.time.Duration +@Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") object Notify { sealed class Model { diff --git a/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyClient.kt b/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyClient.kt index 9736a7be4f..08642c973f 100644 --- a/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyClient.kt +++ b/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyClient.kt @@ -1,5 +1,6 @@ package com.walletconnect.notify.client +@Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") object NotifyClient: NotifyInterface by NotifyProtocol.instance { interface Delegate: NotifyInterface.Delegate } \ No newline at end of file diff --git a/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyException.kt b/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyException.kt index edd3b3aa46..f9048580f0 100644 --- a/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyException.kt +++ b/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyException.kt @@ -2,9 +2,15 @@ package com.walletconnect.notify.client import com.walletconnect.android.internal.common.exception.WalletConnectException +@Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") class InvalidDidJsonFileException(override val message: String?) : WalletConnectException(message) +@Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") class AccountIsNotRegisteredException(val account: String) : WalletConnectException("Account: $account is not registered") +@Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") class AccountIsNotRegisteredForAppException(val account: String) : WalletConnectException("Account: $account is not registered for this app") +@Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") class AccountIsNotRegisteredForAllAppsException(val account: String) : WalletConnectException("Account: $account is not registered for all apps") +@Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") class AccountIsRegisteredForAllAppsException(val account: String) : WalletConnectException("Account: $account is registered for all apps") +@Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") class AccountIsMissingIdentityKeysException(val account: String) : WalletConnectException("Account: $account is missing identity keys") \ No newline at end of file diff --git a/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyInterface.kt b/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyInterface.kt index 9645f096e4..6b01805b1e 100644 --- a/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyInterface.kt +++ b/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyInterface.kt @@ -1,6 +1,8 @@ package com.walletconnect.notify.client +@Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") interface NotifyInterface { + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") interface Delegate { fun onNotifyNotification(notifyNotification: Notify.Event.Notification) @@ -9,58 +11,70 @@ interface NotifyInterface { fun onSubscriptionsChanged(subscriptionsChanged: Notify.Event.SubscriptionsChanged) } + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") fun initialize(init: Notify.Params.Init, onError: (Notify.Model.Error) -> Unit) + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") fun setDelegate(delegate: Delegate) /** * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") fun subscribe(params: Notify.Params.Subscribe) : Notify.Result.Subscribe /** * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") fun updateSubscription(params: Notify.Params.UpdateSubscription) : Notify.Result.UpdateSubscription /** * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") fun deleteSubscription(params: Notify.Params.DeleteSubscription): Notify.Result.DeleteSubscription /** * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") fun getNotificationTypes(params: Notify.Params.GetNotificationTypes): Map /** * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") fun getActiveSubscriptions(params: Notify.Params.GetActiveSubscriptions): Map /** * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") fun getNotificationHistory(params: Notify.Params.GetNotificationHistory): Notify.Result.GetNotificationHistory - + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") fun decryptNotification(params: Notify.Params.DecryptNotification, onSuccess: (Notify.Model.Notification.Decrypted) -> Unit, onError: (Notify.Model.Error) -> Unit) + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") fun register(params: Notify.Params.Register, onSuccess: (String) -> Unit, onError: (Notify.Model.Error) -> Unit) + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") fun prepareRegistration(params: Notify.Params.PrepareRegistration, onSuccess: (Notify.Model.CacaoPayloadWithIdentityPrivateKey, String) -> Unit, onError: (Notify.Model.Error) -> Unit) /** * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") fun isRegistered(params: Notify.Params.IsRegistered): Boolean + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") fun unregister(params: Notify.Params.Unregister, onSuccess: (String) -> Unit, onError: (Notify.Model.Error) -> Unit) } \ No newline at end of file diff --git a/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyProtocol.kt b/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyProtocol.kt index 469fef6dec..662afd73de 100644 --- a/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyProtocol.kt +++ b/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/NotifyProtocol.kt @@ -26,6 +26,7 @@ class NotifyProtocol(private val koinApp: KoinApplication = wcKoinApp) : NotifyI val instance = NotifyProtocol() } + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") override fun initialize(init: Notify.Params.Init, onError: (Notify.Model.Error) -> Unit) { try { koinApp.modules( @@ -41,6 +42,7 @@ class NotifyProtocol(private val koinApp: KoinApplication = wcKoinApp) : NotifyI } } + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") override fun setDelegate(delegate: NotifyInterface.Delegate) { checkEngineInitialization() @@ -53,6 +55,7 @@ class NotifyProtocol(private val koinApp: KoinApplication = wcKoinApp) : NotifyI }.launchIn(scope) } + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") override fun subscribe(params: Notify.Params.Subscribe): Notify.Result.Subscribe { checkEngineInitialization() @@ -65,6 +68,7 @@ class NotifyProtocol(private val koinApp: KoinApplication = wcKoinApp) : NotifyI } } + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") override fun updateSubscription(params: Notify.Params.UpdateSubscription): Notify.Result.UpdateSubscription { checkEngineInitialization() @@ -77,6 +81,7 @@ class NotifyProtocol(private val koinApp: KoinApplication = wcKoinApp) : NotifyI } } + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") override fun getNotificationTypes(params: Notify.Params.GetNotificationTypes): Map { checkEngineInitialization() @@ -85,7 +90,7 @@ class NotifyProtocol(private val koinApp: KoinApplication = wcKoinApp) : NotifyI } } - + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") override fun getActiveSubscriptions(params: Notify.Params.GetActiveSubscriptions): Map { checkEngineInitialization() @@ -94,6 +99,7 @@ class NotifyProtocol(private val koinApp: KoinApplication = wcKoinApp) : NotifyI } } + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") override fun getNotificationHistory(params: Notify.Params.GetNotificationHistory): Notify.Result.GetNotificationHistory { checkEngineInitialization() @@ -106,6 +112,7 @@ class NotifyProtocol(private val koinApp: KoinApplication = wcKoinApp) : NotifyI } } + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") override fun deleteSubscription(params: Notify.Params.DeleteSubscription): Notify.Result.DeleteSubscription { checkEngineInitialization() @@ -118,9 +125,11 @@ class NotifyProtocol(private val koinApp: KoinApplication = wcKoinApp) : NotifyI } } + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") override fun decryptNotification(params: Notify.Params.DecryptNotification, onSuccess: (Notify.Model.Notification.Decrypted) -> Unit, onError: (Notify.Model.Error) -> Unit) { scope.launch { notifyEngine.decryptNotification(params.topic, params.encryptedMessage, + onSuccess = { notification -> (notification as? Core.Model.Message.Notify)?.run { onSuccess(notification.toClient(params.topic)) } }, @@ -129,11 +138,13 @@ class NotifyProtocol(private val koinApp: KoinApplication = wcKoinApp) : NotifyI } } + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") override fun register(params: Notify.Params.Register, onSuccess: (String) -> Unit, onError: (Notify.Model.Error) -> Unit) { checkEngineInitialization() scope.launch { notifyEngine.register( + cacaoPayloadWithIdentityPrivateKey = params.cacaoPayloadWithIdentityPrivateKey.toCommon(), signature = params.signature.toCommon(), onSuccess = { onSuccess(it) }, @@ -142,6 +153,7 @@ class NotifyProtocol(private val koinApp: KoinApplication = wcKoinApp) : NotifyI } } + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") override fun isRegistered(params: Notify.Params.IsRegistered): Boolean { checkEngineInitialization() @@ -150,6 +162,7 @@ class NotifyProtocol(private val koinApp: KoinApplication = wcKoinApp) : NotifyI } } + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") override fun prepareRegistration( params: Notify.Params.PrepareRegistration, onSuccess: (Notify.Model.CacaoPayloadWithIdentityPrivateKey, String) -> Unit, @@ -167,6 +180,7 @@ class NotifyProtocol(private val koinApp: KoinApplication = wcKoinApp) : NotifyI } } + @Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") override fun unregister(params: Notify.Params.Unregister, onSuccess: (String) -> Unit, onError: (Notify.Model.Error) -> Unit) { checkEngineInitialization() diff --git a/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/cacao/CacaoSigner.kt b/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/cacao/CacaoSigner.kt index e6454e2e90..2f4d872ef5 100644 --- a/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/cacao/CacaoSigner.kt +++ b/protocol/notify/src/main/kotlin/com/walletconnect/notify/client/cacao/CacaoSigner.kt @@ -3,4 +3,5 @@ package com.walletconnect.notify.client.cacao import com.walletconnect.android.utils.cacao.CacaoSignerInterface import com.walletconnect.notify.client.Notify +@Deprecated("com.walletconnect.notify.client.NotifyClient has been deprecated. Please use com.reown.notify.client.NotifyClient instead from - https://github.com/reown-com/reown-kotlin") object CacaoSigner : CacaoSignerInterface \ No newline at end of file diff --git a/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/Sign.kt b/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/Sign.kt index 5a776b4070..0769ac12e9 100644 --- a/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/Sign.kt +++ b/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/Sign.kt @@ -9,6 +9,7 @@ import java.net.URI import kotlin.time.Duration import kotlin.time.Duration.Companion.seconds +@Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") object Sign { sealed interface Listeners { diff --git a/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/SignClient.kt b/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/SignClient.kt index 663f898d34..11a999d1e3 100644 --- a/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/SignClient.kt +++ b/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/SignClient.kt @@ -1,6 +1,9 @@ package com.walletconnect.sign.client +@Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") object SignClient : SignInterface by SignProtocol.instance { + @Deprecated("com.walletconnect.sign.client.WalletDelegate has been deprecated. Please use com.reown.sign.client.WalletDelegate instead from - https://github.com/reown-com/reown-kotlin") interface WalletDelegate: SignInterface.WalletDelegate + @Deprecated("com.walletconnect.sign.client.DappDelegate has been deprecated. Please use com.reown.sign.client.DappDelegate instead from - https://github.com/reown-com/reown-kotlin") interface DappDelegate: SignInterface.DappDelegate } \ No newline at end of file diff --git a/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/SignInterface.kt b/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/SignInterface.kt index 0be223d602..c4b939412a 100644 --- a/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/SignInterface.kt +++ b/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/SignInterface.kt @@ -1,6 +1,8 @@ package com.walletconnect.sign.client +@Deprecated("com.walletconnect.sign.client.SignInterface has been deprecated. Please use com.reown.sign.client.SignInterface instead from - https://github.com/reown-com/reown-kotlin") interface SignInterface { + @Deprecated("com.walletconnect.sign.client.WalletDelegate has been deprecated. Please use com.reown.sign.client.WalletDelegate instead from - https://github.com/reown-com/reown-kotlin") interface WalletDelegate { fun onSessionProposal(sessionProposal: Sign.Model.SessionProposal, verifyContext: Sign.Model.VerifyContext) val onSessionAuthenticate: ((Sign.Model.SessionAuthenticate, Sign.Model.VerifyContext) -> Unit)? get() = null @@ -25,6 +27,7 @@ interface SignInterface { fun onError(error: Sign.Model.Error) } + @Deprecated("com.walletconnect.sign.client.DappDelegate has been deprecated. Please use com.reown.sign.client.DappDelegate instead from - https://github.com/reown-com/reown-kotlin") interface DappDelegate { fun onSessionApproved(approvedSession: Sign.Model.ApprovedSession) fun onSessionRejected(rejectedSession: Sign.Model.RejectedSession) @@ -51,8 +54,11 @@ interface SignInterface { fun onError(error: Sign.Model.Error) } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun initialize(init: Sign.Params.Init, onSuccess: () -> Unit = {}, onError: (Sign.Model.Error) -> Unit) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun setWalletDelegate(delegate: WalletDelegate) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun setDappDelegate(delegate: DappDelegate) @Deprecated( @@ -64,12 +70,15 @@ interface SignInterface { onError: (Sign.Model.Error) -> Unit, ) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun connect( connect: Sign.Params.Connect, onSuccess: (String) -> Unit, onError: (Sign.Model.Error) -> Unit, ) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun authenticate(authenticate: Sign.Params.Authenticate, walletAppLink: String? = null, onSuccess: (String) -> Unit, onError: (Sign.Model.Error) -> Unit) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun dispatchEnvelope(urlWithEnvelope: String, onError: (Sign.Model.Error) -> Unit) @Deprecated( @@ -77,10 +86,15 @@ interface SignInterface { replaceWith = ReplaceWith(expression = "CoreClient.Pairing.pair()", imports = ["com.walletconnect.android.CoreClient"]) ) fun pair(pair: Sign.Params.Pair, onSuccess: (Sign.Params.Pair) -> Unit = {}, onError: (Sign.Model.Error) -> Unit) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun approveSession(approve: Sign.Params.Approve, onSuccess: (Sign.Params.Approve) -> Unit = {}, onError: (Sign.Model.Error) -> Unit) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun rejectSession(reject: Sign.Params.Reject, onSuccess: (Sign.Params.Reject) -> Unit = {}, onError: (Sign.Model.Error) -> Unit) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun approveAuthenticate(approve: Sign.Params.ApproveAuthenticate, onSuccess: (Sign.Params.ApproveAuthenticate) -> Unit, onError: (Sign.Model.Error) -> Unit) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun rejectAuthenticate(reject: Sign.Params.RejectAuthenticate, onSuccess: (Sign.Params.RejectAuthenticate) -> Unit, onError: (Sign.Model.Error) -> Unit) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun formatAuthMessage(formatMessage: Sign.Params.FormatMessage): String @Deprecated( @@ -93,26 +107,35 @@ interface SignInterface { onSuccessWithSentRequest: (Sign.Model.SentRequest) -> Unit = { it: Sign.Model.SentRequest -> Unit }, onError: (Sign.Model.Error) -> Unit, ) - + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun request(request: Sign.Params.Request, onSuccess: (Sign.Model.SentRequest) -> Unit = {}, onError: (Sign.Model.Error) -> Unit) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun respond(response: Sign.Params.Response, onSuccess: (Sign.Params.Response) -> Unit = {}, onError: (Sign.Model.Error) -> Unit) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun update(update: Sign.Params.Update, onSuccess: (Sign.Params.Update) -> Unit = {}, onError: (Sign.Model.Error) -> Unit) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun extend(extend: Sign.Params.Extend, onSuccess: (Sign.Params.Extend) -> Unit = {}, onError: (Sign.Model.Error) -> Unit) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun emit(emit: Sign.Params.Emit, onSuccess: (Sign.Params.Emit) -> Unit = {}, onError: (Sign.Model.Error) -> Unit) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun ping(ping: Sign.Params.Ping, sessionPing: Sign.Listeners.SessionPing? = null) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun disconnect(disconnect: Sign.Params.Disconnect, onSuccess: (Sign.Params.Disconnect) -> Unit = {}, onError: (Sign.Model.Error) -> Unit) + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun decryptMessage(params: Sign.Params.DecryptMessage, onSuccess: (Sign.Model.Message) -> Unit, onError: (Sign.Model.Error) -> Unit) /** * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun getListOfActiveSessions(): List /** * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun getActiveSessionByTopic(topic: String): Sign.Model.Session? /** @@ -159,29 +182,34 @@ interface SignInterface { * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun getPendingSessionRequests(topic: String): List /** * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun getSessionProposals(): List /** * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun getVerifyContext(id: Long): Sign.Model.VerifyContext? /** * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun getPendingAuthenticateRequests(): List /** * Caution: This function is blocking and runs on the current thread. * It is advised that this function be called from background operation */ + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") fun getListOfVerifyContexts(): List } \ No newline at end of file diff --git a/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/SignProtocol.kt b/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/SignProtocol.kt index ca5333dcb7..e2f67bda4e 100644 --- a/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/SignProtocol.kt +++ b/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/SignProtocol.kt @@ -28,6 +28,7 @@ import org.koin.core.qualifier.named import org.koin.dsl.module import java.util.concurrent.atomic.AtomicBoolean +@Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInterface { private lateinit var signEngine: SignEngine private var atomicBoolean: AtomicBoolean? = null @@ -36,6 +37,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter val instance = SignProtocol() } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") override fun initialize(init: Sign.Params.Init, onSuccess: () -> Unit, onError: (Sign.Model.Error) -> Unit) { // TODO: re-init scope if (!::signEngine.isInitialized) { @@ -57,6 +59,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun setWalletDelegate(delegate: SignInterface.WalletDelegate) { checkEngineInitialization() @@ -81,6 +84,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter }.launchIn(scope) } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun setDappDelegate(delegate: SignInterface.DappDelegate) { checkEngineInitialization() @@ -109,6 +113,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter }.launchIn(scope) } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun connect( connect: Sign.Params.Connect, @@ -132,6 +137,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun authenticate( authenticate: Sign.Params.Authenticate, @@ -154,6 +160,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun dispatchEnvelope(urlWithEnvelope: String, onError: (Sign.Model.Error) -> Unit) { checkEngineInitialization() @@ -166,12 +173,14 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun formatAuthMessage(formatMessage: Sign.Params.FormatMessage): String { checkEngineInitialization() return runBlocking { signEngine.formatMessage(formatMessage.payloadParams.toEngine(), formatMessage.iss) } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun pair( pair: Sign.Params.Pair, @@ -193,6 +202,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun approveSession(approve: Sign.Params.Approve, onSuccess: (Sign.Params.Approve) -> Unit, onError: (Sign.Model.Error) -> Unit) { checkEngineInitialization() @@ -212,6 +222,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun rejectSession(reject: Sign.Params.Reject, onSuccess: (Sign.Params.Reject) -> Unit, onError: (Sign.Model.Error) -> Unit) { checkEngineInitialization() @@ -227,6 +238,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun approveAuthenticate(approve: Sign.Params.ApproveAuthenticate, onSuccess: (Sign.Params.ApproveAuthenticate) -> Unit, onError: (Sign.Model.Error) -> Unit) { checkEngineInitialization() @@ -245,6 +257,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun rejectAuthenticate(reject: Sign.Params.RejectAuthenticate, onSuccess: (Sign.Params.RejectAuthenticate) -> Unit, onError: (Sign.Model.Error) -> Unit) { checkEngineInitialization() @@ -258,6 +271,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun request(request: Sign.Params.Request, onSuccess: (Sign.Model.SentRequest) -> Unit, onError: (Sign.Model.Error) -> Unit) { checkEngineInitialization() @@ -275,6 +289,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun respond(response: Sign.Params.Response, onSuccess: (Sign.Params.Response) -> Unit, onError: (Sign.Model.Error) -> Unit) { checkEngineInitialization() @@ -293,6 +308,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun update(update: Sign.Params.Update, onSuccess: (Sign.Params.Update) -> Unit, onError: (Sign.Model.Error) -> Unit) { checkEngineInitialization() @@ -311,6 +327,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun extend(extend: Sign.Params.Extend, onSuccess: (Sign.Params.Extend) -> Unit, onError: (Sign.Model.Error) -> Unit) { checkEngineInitialization() @@ -328,6 +345,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun emit(emit: Sign.Params.Emit, onSuccess: (Sign.Params.Emit) -> Unit, onError: (Sign.Model.Error) -> Unit) { checkEngineInitialization() @@ -346,6 +364,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun ping(ping: Sign.Params.Ping, sessionPing: Sign.Listeners.SessionPing?) { checkEngineInitialization() @@ -364,6 +383,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun disconnect(disconnect: Sign.Params.Disconnect, onSuccess: (Sign.Params.Disconnect) -> Unit, onError: (Sign.Model.Error) -> Unit) { checkEngineInitialization() @@ -381,6 +401,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") override fun decryptMessage(params: Sign.Params.DecryptMessage, onSuccess: (Sign.Model.Message) -> Unit, onError: (Sign.Model.Error) -> Unit) { checkEngineInitialization() @@ -407,6 +428,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun getListOfActiveSessions(): List { checkEngineInitialization() @@ -415,6 +437,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun getActiveSessionByTopic(topic: String): Sign.Model.Session? { checkEngineInitialization() @@ -424,6 +447,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun getListOfSettledSessions(): List { checkEngineInitialization() @@ -432,6 +456,7 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun getSettledSessionByTopic(topic: String): Sign.Model.Session? { checkEngineInitialization() @@ -441,30 +466,35 @@ class SignProtocol(private val koinApp: KoinApplication = wcKoinApp) : SignInter } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun getPendingSessionRequests(topic: String): List { checkEngineInitialization() return runBlocking { signEngine.getPendingSessionRequests(Topic(topic)).mapToPendingSessionRequests() } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun getSessionProposals(): List { checkEngineInitialization() return runBlocking { signEngine.getSessionProposals().map(EngineDO.SessionProposal::toClientSessionProposal) } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun getPendingAuthenticateRequests(): List { checkEngineInitialization() return runBlocking { signEngine.getPendingAuthenticateRequests().map { request -> request.toClient() } } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun getVerifyContext(id: Long): Sign.Model.VerifyContext? { checkEngineInitialization() return runBlocking { signEngine.getVerifyContext(id)?.toCore() } } + @Deprecated("com.walletconnect.sign.client.SignClient has been deprecated. Please use com.reown.sign.client.SignClient instead from - https://github.com/reown-com/reown-kotlin") @Throws(IllegalStateException::class) override fun getListOfVerifyContexts(): List { checkEngineInitialization() diff --git a/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/utils/CacaoSigner.kt b/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/utils/CacaoSigner.kt index 6273140fd4..bfb1a68864 100644 --- a/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/utils/CacaoSigner.kt +++ b/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/utils/CacaoSigner.kt @@ -13,4 +13,5 @@ enum class SignatureType(override val header: String) : ISignatureType { EIP191("eip191"), EIP1271("eip1271"); } +@Deprecated("com.walletconnect.sign.client.utils.CacaoSigner has been deprecated. Please use com.reown.sign.client.utils.CacaoSigner instead from - https://github.com/reown-com/reown-kotlin") object CacaoSigner : CacaoSignerInterface \ No newline at end of file diff --git a/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/utils/Utils.kt b/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/utils/Utils.kt index ec62a64f9c..a94508d917 100644 --- a/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/utils/Utils.kt +++ b/protocol/sign/src/main/kotlin/com/walletconnect/sign/client/utils/Utils.kt @@ -20,6 +20,7 @@ import com.walletconnect.sign.common.validator.SignValidator import org.json.JSONArray import org.json.JSONObject +@Deprecated("com.walletconnect.sign.client.utils.generateApprovedNamespaces has been deprecated. Please use com.reown.sign.client.utils.generateApprovedNamespaces instead from - https://github.com/reown-com/reown-kotlin") fun generateApprovedNamespaces( proposal: Sign.Model.SessionProposal, supportedNamespaces: Map, @@ -84,6 +85,7 @@ private fun MutableMap.getChains(normalizedKey: Stri private fun MutableMap.getMethods(normalizedKey: String) = (this[normalizedKey]?.methods ?: emptyList()) private fun MutableMap.getEvents(normalizedKey: String) = (this[normalizedKey]?.events ?: emptyList()) +@Deprecated("com.walletconnect.sign.client.utils.generateAuthObject has been deprecated. Please use com.reown.sign.client.utils.generateAuthObject instead from - https://github.com/reown-com/reown-kotlin") fun generateAuthObject(payload: Sign.Model.PayloadParams, issuer: String, signature: Sign.Model.Cacao.Signature): Sign.Model.Cacao { return Sign.Model.Cacao( header = Sign.Model.Cacao.Header(t = CacaoType.CAIP222.header), @@ -92,6 +94,7 @@ fun generateAuthObject(payload: Sign.Model.PayloadParams, issuer: String, signat ) } +@Deprecated("com.walletconnect.sign.client.utils.generateAuthPayloadParams has been deprecated. Please use com.reown.sign.client.utils.generateAuthPayloadParams instead from - https://github.com/reown-com/reown-kotlin") fun generateAuthPayloadParams(payloadParams: Sign.Model.PayloadParams, supportedChains: List, supportedMethods: List): Sign.Model.PayloadParams { val reCapsJson: String? = payloadParams.resources.decodeReCaps() if (reCapsJson.isNullOrEmpty() || !reCapsJson.contains("eip155")) return payloadParams diff --git a/sample/modal/src/main/kotlin/com/walletconnect/sample/modal/ui/theme/Theme.kt b/sample/modal/src/main/kotlin/com/walletconnect/sample/modal/ui/theme/Theme.kt index ca96f22e0d..88167b0372 100644 --- a/sample/modal/src/main/kotlin/com/walletconnect/sample/modal/ui/theme/Theme.kt +++ b/sample/modal/src/main/kotlin/com/walletconnect/sample/modal/ui/theme/Theme.kt @@ -6,12 +6,7 @@ import androidx.compose.material.MaterialTheme import androidx.compose.material.darkColors import androidx.compose.material.lightColors import androidx.compose.runtime.Composable -import androidx.compose.runtime.MutableState import androidx.compose.runtime.SideEffect -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.platform.LocalView @@ -31,6 +26,7 @@ internal val lightColorScheme = lightColors( onPrimary = Color(0xFF141414) ) +@Deprecated("com.walletconnect.web3.modal.ui.theme.WalletConnectTheme has been deprecated. Please use com.reown.appkit.modal.ui.theme.WalletConnectTheme instead from - https://github.com/reown-com/reown-kotlin") @Composable fun WalletConnectTheme( darkTheme: Boolean = isSystemInDarkTheme(),