loadWalletSync function
void
loadWalletSync(
{ - required String path,
- required String password,
- int nettype = 0,
})
Implementation
void loadWalletSync(
{required String path, required String password, int nettype = 0}) {
final pathPointer = path.toNativeUtf8().cast<Char>();
final passwordPointer = password.toNativeUtf8().cast<Char>();
final errorBoxPointer = monero_flutter.buildErrorBoxPointer();
monero_flutter.bindings
.load_wallet(pathPointer, passwordPointer, nettype, errorBoxPointer);
final errorInfo = monero_flutter.extractErrorInfo(errorBoxPointer);
calloc.free(pathPointer);
calloc.free(passwordPointer);
if (0 != errorInfo.code) {
throw WalletRestoreFromKeysException(message: errorInfo.getErrorMessage());
}
}