mirror of
https://github.com/mollyim/monero-wallet-sdk.git
synced 2025-05-12 21:20:42 +01:00
36 lines
895 B
Kotlin
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()
|
|
}
|