All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.walletconnect.foundation.network.RelayInterface.kt Maven / Gradle / Ivy

There is a newer version: 1.18.3
Show newest version
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,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy