monero-wallet-sdk/lib/android/src/main/kotlin/im/molly/monero/WalletProvider.kt
Oscar Mira 6f0e214d87
Some checks failed
Test / Validate Gradle wrapper (push) Has been cancelled
Test / Run tests (push) Has been cancelled
lib: expand test coverage
2025-05-04 03:47:18 +02:00

36 lines
895 B
Kotlin

package im.molly.monero
import java.io.Closeable
interface WalletProvider : Closeable {
suspend fun createNewWallet(
network: MoneroNetwork,
dataStore: WalletDataStore? = null,
client: MoneroNodeClient? = null,
): MoneroWallet
suspend fun restoreWallet(
network: MoneroNetwork,
dataStore: WalletDataStore? = null,
client: MoneroNodeClient? = null,
secretSpendKey: SecretKey,
restorePoint: RestorePoint,
): MoneroWallet
suspend fun openWallet(
network: MoneroNetwork,
dataStore: WalletDataStore,
client: MoneroNodeClient? = null,
): MoneroWallet
fun isServiceIsolated(): Boolean
fun disconnect()
override fun close() {
disconnect()
}
/** Exception thrown if the wallet service cannot be bound. */
class ServiceNotBoundException : Exception()
}