AccountService class

The AccountService class provides various functionalities for managing a user's account on the Haveno platform. It includes methods to check if an account exists, create an account, change the password, and handle potential gRPC errors.

This service is designed to work with a HavenoChannel, which must be connected to perform operations. The service throws custom exceptions if the client is not connected or if any gRPC errors are encountered.

Constructors

AccountService()
A flag indicating whether the account exists on the Haveno server. The value is null if the existence check has not been performed yet. Constructor for AccountService that initializes it with a HavenoChannel.

Properties

hashCode int
The hash code for this object.
no setterinherited
havenoChannel HavenoChannel
The HavenoChannel used for making requests to the Haveno server.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

accountExists() Future<bool>
Getter to retrieve the account existence flag.
backupAccount() Future<void>
changePassword(String oldPassword, String newPassword) Future<void>
Changes the account password on the Haveno daemon.
closeAccount() Future<void>
Closes the currently active account from the daemon
createAccount(String password) Future<void>
Creates a new account on the Haveno daemon using the specified password.
deleteAccount() Future<void>
Deletes the currently active account from the daemon
isAccountOpen() Future<bool>
Check if an account is open on the daemon
isAppInitialized() Future<bool>
Check an the account is initialized on the daemon
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openAccount(String? password) Future<void>
Opens an account with the Haveno backend, ensuring the gRPC channel is connected before making the request.
restoreAccount(List<int> zipBytes, Int64 offset, Int64 totalLength, bool hasMore) Future<void>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited