package com.adealink.weparty.wallet.manager

import com.adealink.frame.base.Rlt
import com.adealink.frame.frame.IBaseFrame
import com.adealink.weparty.module.wallet.data.Currency
import com.adealink.weparty.wallet.recharge.data.RechargeProduct

interface IWalletManager : IBaseFrame<IWalletListener> {
    fun init()

    //cache
    fun getWalletData()

    fun refreshWalletData()

    fun getBalance(currency: Currency): Double

    suspend fun pullWalletData(): Rlt<Map<Currency, Double>>

    suspend fun recharge(data: RechargeProduct): Rlt<Any>

    suspend fun loadConvertConfig(from: Currency, to: Currency): Rlt<Double>

    suspend fun convertTo(
        fromCurrency: Currency,
        toCurrency: Currency,
        amount: Double
    ): Rlt<Any>
}