com.walletconnect.foundation.network.RelayInterface.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of foundation Show documentation
Show all versions of foundation Show documentation
Foundation SDK for WalletConnect
package com.walletconnect.foundation.network
import com.walletconnect.foundation.network.model.Relay
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharedFlow
interface RelayInterface {
val eventsFlow: SharedFlow
val subscriptionRequest: Flow
fun publish(
topic: String,
message: String,
params: Relay.Model.IrnParams,
onResult: (Result) -> Unit = {},
)
fun subscribe(topic: String, onResult: (Result) -> Unit)
fun batchSubscribe(topics: List, onResult: (Result) -> Unit)
fun unsubscribe(
topic: String,
subscriptionId: String,
onResult: (Result) -> Unit,
)
}