#56: rename wallet to Monfluo

This commit is contained in:
- 2025-01-04 20:00:02 +01:00
parent 87e7c39065
commit 10735e57e8
74 changed files with 417 additions and 423 deletions

View File

@ -1,14 +1,15 @@
# Mysu
# Monfluo
A no-bullshit, pure Monero wallet suitable for both newcomers and experienced users.
Originally forked from the Monerujo codebase, it has been entirely rewritten on the Java side into Kotlin.
The monerujo.cpp C++ file still exists but has been updated/modified.
Project was initially started by pokkst, and is now maintained by anoncontributorxmr.
Monfluo is a fork of Mysu (previously known as MyNero) originally developed by pokkst.
Mysu was a fork of Monerujo developed by m2049r.
## QUICKSTART
Note: there are no production releases of mysu available yet. Only proceed if you would like to use a beta/testing release.
Note: there are no production releases of Monfluo available yet. Only proceed if you would like to use a beta/testing release.
- Download the latest release [here](https://codeberg.org/anoncontributorxmr/mysu/actions)
- Download the latest release [here](https://codeberg.org/anoncontributorxmr/monfluo/actions)
- Click on the newest action that is successful (has a green tick to the left) and originates from the `master` branch (has a label with the same name to the right).
- If the action has a label different than `master` - this is a work in progress release not intended for general audience, proceed only if you know what you are doing.
- Look for `apks` artifact and click on it (this will start the download of a zip file).
@ -17,13 +18,14 @@ Note: there are no production releases of mysu available yet. Only proceed if yo
- See the [FAQ](doc/FAQ.md)
## Disclaimer
Be sure to back up your wallet recovery phrase (and seed offset/passphrase, if you set one.
Mysu enforces seed offsets/passphrases for Polyseed wallets).
Be sure to back up your wallet recovery phrase (and seed offset/passphrase, if you set one).
Monfluo enforces seed offsets/passphrases for Polyseed wallets).
We are NOT responsible for lost or stolen funds.
## Notable Features
- Tor and I2P support (no built-in daemons though)
- Coin control (UTXO management)
- Coin control (UTXO/enote management)
- Seed passphrases/offsets
- Polyseed
@ -34,20 +36,11 @@ Then, fire up Android Studio and build the APK like any other android app.
## Donations
### pokkst
pokkst is the original author of mysu.
XMR address: `87BqQYkugEzh6Tuyotm2uc3DzJzKM6MuZaC161e6u1TsQxxPmXVPHpdNRyK47JY4d1hhbe25YVz4e9vTXCLDxvHkRXEAeBC`
### anoncontributorxmr
anoncontributorxmr is the current maintainer of mysu.
Maintaining Monfluo incurs some costs, so please consider donating.
XMR address: `48KqWkaWd8KcJKkakWfknJEo16scc8YkycfKpb8JYchiKJfukY1ompX9eQ9n3CfEBU1ADGj3P5FLAb731J2UghQt142LwHQ`
#### Expenses (excluding developer time)
Maintaining mysu incurs some costs, so please consider donating to the address above.
- Build server for CI/CD: 10 EUR / month
- Domain (monfluo.org): 15 EUR / year

View File

@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.4.1)
message(STATUS ABI_INFO = ${ANDROID_ABI})
add_library( monerujo
add_library( monfluo
SHARED
src/main/cpp/monerujo.cpp )
src/main/cpp/monfluo.cpp )
set(EXTERNAL_LIBS_DIR ${CMAKE_SOURCE_DIR}/../external-libs)
@ -203,7 +203,7 @@ else()
set(EXTRA_LIBS "")
endif()
target_link_libraries( monerujo
target_link_libraries( monfluo
wallet_api
wallet

View File

@ -5,7 +5,7 @@ apply plugin: 'kotlin-android'
android {
ndkVersion '27.1.12297006'
defaultConfig {
applicationId "net.mynero.wallet"
applicationId "org.monfluo.wallet"
minSdkVersion 26
targetSdkVersion 34
compileSdk 34
@ -105,7 +105,7 @@ android {
kotlinOptions {
jvmTarget = "17"
}
namespace 'net.mynero.wallet'
namespace 'org.monfluo.wallet'
buildFeatures {
viewBinding true
}

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name" translatable="false">Mysu [beta]</string>
<string name="app_name" translatable="false">Monfluo [beta]</string>
</resources>

View File

@ -15,7 +15,7 @@
*/
#include <inttypes.h>
#include "monerujo.h"
#include "monfluo.h"
#include "wallet2_api.h"
//TODO explicit casting jlong, jint, jboolean to avoid warnings
@ -58,15 +58,15 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *jvm, void *reserved) {
class_Pair = static_cast<jclass>(jenv->NewGlobalRef(
jenv->FindClass("android/util/Pair")));
class_TransactionInfo = static_cast<jclass>(jenv->NewGlobalRef(
jenv->FindClass("net/mynero/wallet/model/TransactionInfo")));
jenv->FindClass("org/monfluo/wallet/model/TransactionInfo")));
class_Transfer = static_cast<jclass>(jenv->NewGlobalRef(
jenv->FindClass("net/mynero/wallet/model/Transfer")));
jenv->FindClass("org/monfluo/wallet/model/Transfer")));
class_WalletListener = static_cast<jclass>(jenv->NewGlobalRef(
jenv->FindClass("net/mynero/wallet/model/WalletListener")));
jenv->FindClass("org/monfluo/wallet/model/WalletListener")));
class_WalletStatus = static_cast<jclass>(jenv->NewGlobalRef(
jenv->FindClass("net/mynero/wallet/model/Wallet$Status")));
jenv->FindClass("org/monfluo/wallet/model/Wallet$Status")));
class_CoinsInfo = static_cast<jclass>(jenv->NewGlobalRef(
jenv->FindClass("net/mynero/wallet/model/Enote")));
jenv->FindClass("org/monfluo/wallet/model/Enote")));
return JNI_VERSION_1_6;
}
#ifdef __cplusplus
@ -366,7 +366,7 @@ extern "C"
/********** WalletManager *********/
/**********************************/
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_WalletManager_createWalletJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_createWalletJ(JNIEnv *env, jobject instance,
jstring path, jstring password,
jstring language,
jint networkType) {
@ -389,7 +389,7 @@ Java_net_mynero_wallet_model_WalletManager_createWalletJ(JNIEnv *env, jobject in
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_WalletManager_createWalletPolyseedJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_createWalletPolyseedJ(JNIEnv *env, jobject instance,
jstring path, jstring password,
jstring passpharse,
jstring language,
@ -425,7 +425,7 @@ Java_net_mynero_wallet_model_WalletManager_createWalletPolyseedJ(JNIEnv *env, jo
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_WalletManager_openWalletJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_openWalletJ(JNIEnv *env, jobject instance,
jstring path, jstring password,
jint networkType) {
const char *_path = env->GetStringUTFChars(path, nullptr);
@ -444,7 +444,7 @@ Java_net_mynero_wallet_model_WalletManager_openWalletJ(JNIEnv *env, jobject inst
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_WalletManager_recoveryWalletJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_recoveryWalletJ(JNIEnv *env, jobject instance,
jstring path, jstring password,
jstring mnemonic, jstring offset,
jint networkType,
@ -473,7 +473,7 @@ Java_net_mynero_wallet_model_WalletManager_recoveryWalletJ(JNIEnv *env, jobject
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_WalletManager_recoveryWalletPolyseedJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_recoveryWalletPolyseedJ(JNIEnv *env, jobject instance,
jstring path, jstring password,
jstring mnemonic, jstring offset,
jint networkType) {
@ -500,7 +500,7 @@ Java_net_mynero_wallet_model_WalletManager_recoveryWalletPolyseedJ(JNIEnv *env,
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_WalletManager_createWalletFromKeysJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_createWalletFromKeysJ(JNIEnv *env, jobject instance,
jstring path, jstring password,
jstring language,
jint networkType,
@ -540,7 +540,7 @@ Java_net_mynero_wallet_model_WalletManager_createWalletFromKeysJ(JNIEnv *env, jo
// virtual void setSubaddressLookahead(uint32_t major, uint32_t minor) = 0;
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_WalletManager_createWalletFromDeviceJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_createWalletFromDeviceJ(JNIEnv *env, jobject instance,
jstring path,
jstring password,
jint networkType,
@ -570,7 +570,7 @@ Java_net_mynero_wallet_model_WalletManager_createWalletFromDeviceJ(JNIEnv *env,
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_WalletManager_walletExists(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_walletExists(JNIEnv *env, jobject instance,
jstring path) {
const char *_path = env->GetStringUTFChars(path, nullptr);
bool exists =
@ -580,7 +580,7 @@ Java_net_mynero_wallet_model_WalletManager_walletExists(JNIEnv *env, jobject ins
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_WalletManager_verifyWalletPassword(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_verifyWalletPassword(JNIEnv *env, jobject instance,
jstring keys_file_name,
jstring password,
jboolean watch_only) {
@ -596,7 +596,7 @@ Java_net_mynero_wallet_model_WalletManager_verifyWalletPassword(JNIEnv *env, job
//virtual int queryWalletHardware(const std::string &keys_file_name, const std::string &password) const = 0;
JNIEXPORT jint JNICALL
Java_net_mynero_wallet_model_WalletManager_queryWalletDeviceJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_queryWalletDeviceJ(JNIEnv *env, jobject instance,
jstring keys_file_name,
jstring password) {
const char *_keys_file_name = env->GetStringUTFChars(keys_file_name, nullptr);
@ -613,7 +613,7 @@ Java_net_mynero_wallet_model_WalletManager_queryWalletDeviceJ(JNIEnv *env, jobje
}
JNIEXPORT jobject JNICALL
Java_net_mynero_wallet_model_WalletManager_findWallets(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_findWallets(JNIEnv *env, jobject instance,
jstring path) {
const char *_path = env->GetStringUTFChars(path, nullptr);
std::vector<std::string> walletPaths =
@ -625,7 +625,7 @@ Java_net_mynero_wallet_model_WalletManager_findWallets(JNIEnv *env, jobject inst
//TODO virtual bool checkPayment(const std::string &address, const std::string &txid, const std::string &txkey, const std::string &daemon_address, uint64_t &received, uint64_t &height, std::string &error) const = 0;
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_WalletManager_setDaemonAddressJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_setDaemonAddressJ(JNIEnv *env, jobject instance,
jstring address) {
const char *_address = env->GetStringUTFChars(address, nullptr);
Monero::WalletManagerFactory::getWalletManager()->setDaemonAddress(std::string(_address));
@ -634,7 +634,7 @@ Java_net_mynero_wallet_model_WalletManager_setDaemonAddressJ(JNIEnv *env, jobjec
// returns whether the daemon can be reached, and its version number
JNIEXPORT jint JNICALL
Java_net_mynero_wallet_model_WalletManager_getDaemonVersion(JNIEnv *env,
Java_org_monfluo_wallet_model_WalletManager_getDaemonVersion(JNIEnv *env,
jobject instance) {
uint32_t version;
bool isConnected =
@ -644,40 +644,40 @@ Java_net_mynero_wallet_model_WalletManager_getDaemonVersion(JNIEnv *env,
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_WalletManager_getBlockchainHeight(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_WalletManager_getBlockchainHeight(JNIEnv *env, jobject instance) {
auto wm = Monero::WalletManagerFactory::getWalletManager();
auto result = wm->blockchainHeight();
return static_cast<jlong>(result);
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_WalletManager_getBlockchainTargetHeight(JNIEnv *env,
Java_org_monfluo_wallet_model_WalletManager_getBlockchainTargetHeight(JNIEnv *env,
jobject instance) {
return Monero::WalletManagerFactory::getWalletManager()->blockchainTargetHeight();
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_WalletManager_getNetworkDifficulty(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_WalletManager_getNetworkDifficulty(JNIEnv *env, jobject instance) {
return Monero::WalletManagerFactory::getWalletManager()->networkDifficulty();
}
JNIEXPORT jdouble JNICALL
Java_net_mynero_wallet_model_WalletManager_getMiningHashRate(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_WalletManager_getMiningHashRate(JNIEnv *env, jobject instance) {
return Monero::WalletManagerFactory::getWalletManager()->miningHashRate();
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_WalletManager_getBlockTarget(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_WalletManager_getBlockTarget(JNIEnv *env, jobject instance) {
return Monero::WalletManagerFactory::getWalletManager()->blockTarget();
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_WalletManager_isMining(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_WalletManager_isMining(JNIEnv *env, jobject instance) {
return static_cast<jboolean>(Monero::WalletManagerFactory::getWalletManager()->isMining());
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_WalletManager_startMining(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_startMining(JNIEnv *env, jobject instance,
jstring address,
jboolean background_mining,
jboolean ignore_battery) {
@ -691,12 +691,12 @@ Java_net_mynero_wallet_model_WalletManager_startMining(JNIEnv *env, jobject inst
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_WalletManager_stopMining(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_WalletManager_stopMining(JNIEnv *env, jobject instance) {
return static_cast<jboolean>(Monero::WalletManagerFactory::getWalletManager()->stopMining());
}
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_WalletManager_resolveOpenAlias(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_resolveOpenAlias(JNIEnv *env, jobject instance,
jstring address,
jboolean dnssec_valid) {
const char *_address = env->GetStringUTFChars(address, nullptr);
@ -710,7 +710,7 @@ Java_net_mynero_wallet_model_WalletManager_resolveOpenAlias(JNIEnv *env, jobject
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_WalletManager_setProxyJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_setProxyJ(JNIEnv *env, jobject instance,
jstring address) {
const char *_address = env->GetStringUTFChars(address, nullptr);
bool rc =
@ -723,7 +723,7 @@ Java_net_mynero_wallet_model_WalletManager_setProxyJ(JNIEnv *env, jobject instan
//TODO static std::tuple<bool, std::string, std::string, std::string, std::string> checkUpdates(const std::string &software, const std::string &subdir);
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_WalletManager_closeJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_WalletManager_closeJ(JNIEnv *env, jobject instance,
jobject walletInstance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, walletInstance);
bool closeSuccess = Monero::WalletManagerFactory::getWalletManager()->closeWallet(wallet,
@ -748,7 +748,7 @@ Java_net_mynero_wallet_model_WalletManager_closeJ(JNIEnv *env, jobject instance,
/**********************************/
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_getSeed(JNIEnv *env, jobject instance, jstring seedOffset) {
Java_org_monfluo_wallet_model_Wallet_getSeed(JNIEnv *env, jobject instance, jstring seedOffset) {
const char *_seedOffset = env->GetStringUTFChars(seedOffset, nullptr);
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -772,7 +772,7 @@ Java_net_mynero_wallet_model_Wallet_getSeed(JNIEnv *env, jobject instance, jstri
}
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_getLegacySeed(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_getLegacySeed(JNIEnv *env, jobject instance,
jstring seedOffset) {
const char *_seedOffset = env->GetStringUTFChars(seedOffset, nullptr);
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -788,7 +788,7 @@ Java_net_mynero_wallet_model_Wallet_getLegacySeed(JNIEnv *env, jobject instance,
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_Wallet_isPolyseedSupported(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_isPolyseedSupported(JNIEnv *env, jobject instance,
jstring seedOffset) {
const char *_seedOffset = env->GetStringUTFChars(seedOffset, nullptr);
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -803,13 +803,13 @@ Java_net_mynero_wallet_model_Wallet_isPolyseedSupported(JNIEnv *env, jobject ins
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_getSeedLanguage(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getSeedLanguage(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return env->NewStringUTF(wallet->getSeedLanguage().c_str());
}
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_Wallet_setSeedLanguage(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_setSeedLanguage(JNIEnv *env, jobject instance,
jstring language) {
const char *_language = env->GetStringUTFChars(language, nullptr);
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -818,7 +818,7 @@ Java_net_mynero_wallet_model_Wallet_setSeedLanguage(JNIEnv *env, jobject instanc
}
JNIEXPORT jint JNICALL
Java_net_mynero_wallet_model_Wallet_getStatusJ(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getStatusJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->status();
}
@ -834,7 +834,7 @@ jobject newWalletStatusInstance(JNIEnv *env, int status, const std::string &erro
JNIEXPORT jobject JNICALL
Java_net_mynero_wallet_model_Wallet_statusWithErrorString(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_statusWithErrorString(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
int status;
@ -845,7 +845,7 @@ Java_net_mynero_wallet_model_Wallet_statusWithErrorString(JNIEnv *env, jobject i
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_Wallet_setPassword(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_setPassword(JNIEnv *env, jobject instance,
jstring password) {
const char *_password = env->GetStringUTFChars(password, nullptr);
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -855,7 +855,7 @@ Java_net_mynero_wallet_model_Wallet_setPassword(JNIEnv *env, jobject instance,
}
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_getAddressJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_getAddressJ(JNIEnv *env, jobject instance,
jint accountIndex,
jint addressIndex) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -864,13 +864,13 @@ Java_net_mynero_wallet_model_Wallet_getAddressJ(JNIEnv *env, jobject instance,
}
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_getPath(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getPath(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return env->NewStringUTF(wallet->path().c_str());
}
JNIEXPORT jint JNICALL
Java_net_mynero_wallet_model_Wallet_nettype(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_nettype(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->nettype();
}
@ -879,7 +879,7 @@ Java_net_mynero_wallet_model_Wallet_nettype(JNIEnv *env, jobject instance) {
//TODO virtual bool useForkRules(uint8_t version, int64_t early_blocks) const = 0;
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_getIntegratedAddress(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_getIntegratedAddress(JNIEnv *env, jobject instance,
jstring payment_id) {
const char *_payment_id = env->GetStringUTFChars(payment_id, nullptr);
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -889,19 +889,19 @@ Java_net_mynero_wallet_model_Wallet_getIntegratedAddress(JNIEnv *env, jobject in
}
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_getSecretViewKey(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getSecretViewKey(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return env->NewStringUTF(wallet->secretViewKey().c_str());
}
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_getSecretSpendKey(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getSecretSpendKey(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return env->NewStringUTF(wallet->secretSpendKey().c_str());
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_Wallet_store(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_store(JNIEnv *env, jobject instance,
jstring path) {
const char *_path = env->GetStringUTFChars(path, nullptr);
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -914,7 +914,7 @@ Java_net_mynero_wallet_model_Wallet_store(JNIEnv *env, jobject instance,
}
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_getFilename(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getFilename(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return env->NewStringUTF(wallet->filename().c_str());
}
@ -922,7 +922,7 @@ Java_net_mynero_wallet_model_Wallet_getFilename(JNIEnv *env, jobject instance) {
// virtual std::string keysFilename() const = 0;
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_Wallet_initJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_initJ(JNIEnv *env, jobject instance,
jstring daemon_address,
jlong upper_transaction_size_limit,
jstring daemon_username, jstring daemon_password,
@ -946,14 +946,14 @@ Java_net_mynero_wallet_model_Wallet_initJ(JNIEnv *env, jobject instance,
// virtual bool createWatchOnly(const std::string &path, const std::string &password, const std::string &language) const = 0;
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_Wallet_setRestoreHeight(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_setRestoreHeight(JNIEnv *env, jobject instance,
jlong height) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
wallet->setRefreshFromBlockHeight((uint64_t) height);
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_getRestoreHeight(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getRestoreHeight(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->getRefreshFromBlockHeight();
}
@ -962,12 +962,12 @@ Java_net_mynero_wallet_model_Wallet_getRestoreHeight(JNIEnv *env, jobject instan
// virtual bool connectToDaemon() = 0;
JNIEXPORT jint JNICALL
Java_net_mynero_wallet_model_Wallet_getConnectionStatusJ(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getConnectionStatusJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->connected();
}
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_Wallet_setTrustedDaemonJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_setTrustedDaemonJ(JNIEnv *env, jobject instance,
jboolean trusted) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
if (trusted) {
@ -977,7 +977,7 @@ Java_net_mynero_wallet_model_Wallet_setTrustedDaemonJ(JNIEnv *env, jobject insta
}
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_Wallet_isTrustedDaemonJ(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_isTrustedDaemonJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
bool td = wallet->trustedDaemon();
return td;
@ -985,7 +985,7 @@ Java_net_mynero_wallet_model_Wallet_isTrustedDaemonJ(JNIEnv *env, jobject instan
//TODO virtual bool trustedDaemon() const = 0;
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_Wallet_setProxyJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_setProxyJ(JNIEnv *env, jobject instance,
jstring address) {
const char *_address = env->GetStringUTFChars(address, nullptr);
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -995,84 +995,84 @@ Java_net_mynero_wallet_model_Wallet_setProxyJ(JNIEnv *env, jobject instance,
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_getBalance(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_getBalance(JNIEnv *env, jobject instance,
jint accountIndex) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->balance((uint32_t) accountIndex);
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_getBalanceAll(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getBalanceAll(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->balanceAll();
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_getUnlockedBalance(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_getUnlockedBalance(JNIEnv *env, jobject instance,
jint accountIndex) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->unlockedBalance((uint32_t) accountIndex);
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_getUnlockedBalanceAll(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getUnlockedBalanceAll(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->unlockedBalanceAll();
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_Wallet_isWatchOnly(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_isWatchOnly(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return static_cast<jboolean>(wallet->watchOnly());
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_getBlockChainHeightJ(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getBlockChainHeightJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->blockChainHeight();
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_getApproximateBlockChainHeight(JNIEnv *env,
Java_org_monfluo_wallet_model_Wallet_getApproximateBlockChainHeight(JNIEnv *env,
jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->approximateBlockChainHeight();
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_getDaemonBlockChainHeightJ(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getDaemonBlockChainHeightJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->daemonBlockChainHeight();
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_getDaemonBlockChainTargetHeight(JNIEnv *env,
Java_org_monfluo_wallet_model_Wallet_getDaemonBlockChainTargetHeight(JNIEnv *env,
jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->daemonBlockChainTargetHeight();
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_Wallet_isSynchronizedJ(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_isSynchronizedJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return static_cast<jboolean>(wallet->synchronized());
}
JNIEXPORT jint JNICALL
Java_net_mynero_wallet_model_Wallet_getDeviceTypeJ(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getDeviceTypeJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
Monero::Wallet::Device device_type = wallet->getDeviceType();
return static_cast<jint>(device_type);
}
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_getDisplayAmount(JNIEnv *env, jclass clazz,
Java_org_monfluo_wallet_model_Wallet_getDisplayAmount(JNIEnv *env, jclass clazz,
jlong amount) {
return env->NewStringUTF(Monero::Wallet::displayAmount(amount).c_str());
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_getAmountFromString(JNIEnv *env, jclass clazz,
Java_org_monfluo_wallet_model_Wallet_getAmountFromString(JNIEnv *env, jclass clazz,
jstring amount) {
const char *_amount = env->GetStringUTFChars(amount, nullptr);
uint64_t x = Monero::Wallet::amountFromString(_amount);
@ -1081,18 +1081,18 @@ Java_net_mynero_wallet_model_Wallet_getAmountFromString(JNIEnv *env, jclass claz
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_getAmountFromDouble(JNIEnv *env, jclass clazz,
Java_org_monfluo_wallet_model_Wallet_getAmountFromDouble(JNIEnv *env, jclass clazz,
jdouble amount) {
return Monero::Wallet::amountFromDouble(amount);
}
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_generatePaymentId(JNIEnv *env, jclass clazz) {
Java_org_monfluo_wallet_model_Wallet_generatePaymentId(JNIEnv *env, jclass clazz) {
return env->NewStringUTF(Monero::Wallet::genPaymentId().c_str());
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_Wallet_isPaymentIdValid(JNIEnv *env, jclass clazz,
Java_org_monfluo_wallet_model_Wallet_isPaymentIdValid(JNIEnv *env, jclass clazz,
jstring payment_id) {
const char *_payment_id = env->GetStringUTFChars(payment_id, nullptr);
bool isValid = Monero::Wallet::paymentIdValid(_payment_id);
@ -1101,7 +1101,7 @@ Java_net_mynero_wallet_model_Wallet_isPaymentIdValid(JNIEnv *env, jclass clazz,
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_Wallet_isAddressValid(JNIEnv *env, jclass clazz,
Java_org_monfluo_wallet_model_Wallet_isAddressValid(JNIEnv *env, jclass clazz,
jstring address, jint networkType) {
const char *_address = env->GetStringUTFChars(address, nullptr);
Monero::NetworkType _networkType = static_cast<Monero::NetworkType>(networkType);
@ -1111,7 +1111,7 @@ Java_net_mynero_wallet_model_Wallet_isAddressValid(JNIEnv *env, jclass clazz,
}
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_getPaymentIdFromAddress(JNIEnv *env, jclass clazz,
Java_org_monfluo_wallet_model_Wallet_getPaymentIdFromAddress(JNIEnv *env, jclass clazz,
jstring address,
jint networkType) {
Monero::NetworkType _networkType = static_cast<Monero::NetworkType>(networkType);
@ -1122,30 +1122,30 @@ Java_net_mynero_wallet_model_Wallet_getPaymentIdFromAddress(JNIEnv *env, jclass
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_getMaximumAllowedAmount(JNIEnv *env, jclass clazz) {
Java_org_monfluo_wallet_model_Wallet_getMaximumAllowedAmount(JNIEnv *env, jclass clazz) {
return Monero::Wallet::maximumAllowedAmount();
}
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_Wallet_startRefreshJ(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_startRefreshJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
wallet->startRefresh();
}
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_Wallet_pauseRefresh(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_pauseRefresh(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
wallet->pauseRefresh();
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_Wallet_refresh(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_refresh(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return static_cast<jboolean>(wallet->refresh());
}
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_Wallet_refreshAsync(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_refreshAsync(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
wallet->refreshAsync();
}
@ -1154,7 +1154,7 @@ Java_net_mynero_wallet_model_Wallet_refreshAsync(JNIEnv *env, jobject instance)
//virtual void rescanBlockchainAsync() = 0;
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_Wallet_rescanBlockchainAsyncJ(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_rescanBlockchainAsyncJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
wallet->rescanBlockchainAsync();
}
@ -1164,7 +1164,7 @@ Java_net_mynero_wallet_model_Wallet_rescanBlockchainAsyncJ(JNIEnv *env, jobject
//TODO virtual int autoRefreshInterval() const = 0;
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_createTransactionJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_createTransactionJ(JNIEnv *env, jobject instance,
jstring dst_addr, jstring payment_id,
jlong amount, jint mixin_count,
jint priority,
@ -1188,7 +1188,7 @@ Java_net_mynero_wallet_model_Wallet_createTransactionJ(JNIEnv *env, jobject inst
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_createTransactionMultDestJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_createTransactionMultDestJ(JNIEnv *env, jobject instance,
jobject dst_addrs,
jstring payment_id,
jlongArray amounts, jint mixin_count,
@ -1215,7 +1215,7 @@ Java_net_mynero_wallet_model_Wallet_createTransactionMultDestJ(JNIEnv *env, jobj
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_estimateTransactionFee(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_estimateTransactionFee(JNIEnv *env, jobject instance,
jobject destinations, jint priority) {
std::vector<std::pair<std::string, uint64_t>> dest_vector = java2cpp_pairvector(env,
destinations);
@ -1226,7 +1226,7 @@ Java_net_mynero_wallet_model_Wallet_estimateTransactionFee(JNIEnv *env, jobject
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_createSweepTransaction(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_createSweepTransaction(JNIEnv *env, jobject instance,
jstring dst_addr, jstring payment_id,
jint mixin_count,
jint priority,
@ -1252,7 +1252,7 @@ Java_net_mynero_wallet_model_Wallet_createSweepTransaction(JNIEnv *env, jobject
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_createSweepUnmixableTransactionJ(JNIEnv *env,
Java_org_monfluo_wallet_model_Wallet_createSweepUnmixableTransactionJ(JNIEnv *env,
jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
Monero::PendingTransaction *tx = wallet->createSweepUnmixableTransaction();
@ -1263,7 +1263,7 @@ Java_net_mynero_wallet_model_Wallet_createSweepUnmixableTransactionJ(JNIEnv *env
//virtual bool submitTransaction(const std::string &fileName) = 0;
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_Wallet_disposeTransaction(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_disposeTransaction(JNIEnv *env, jobject instance,
jobject pendingTransaction) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
Monero::PendingTransaction *_pendingTransaction =
@ -1320,27 +1320,27 @@ jobject coins_cpp2java(JNIEnv *env, const std::vector<Monero::Enote>& vector) {
}
JNIEXPORT jobject JNICALL
Java_net_mynero_wallet_model_Wallet_getEnotesJ(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getEnotesJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
std::vector<Monero::Enote> enotes = wallet->enotes();
return coins_cpp2java(env, enotes);
}
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_Wallet_freeze(JNIEnv *env, jobject instance, jlong idx) {
Java_org_monfluo_wallet_model_Wallet_freeze(JNIEnv *env, jobject instance, jlong idx) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
wallet->freeze(static_cast<ssize_t>(idx));
}
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_Wallet_thaw(JNIEnv *env, jobject instance, jlong idx) {
Java_org_monfluo_wallet_model_Wallet_thaw(JNIEnv *env, jobject instance, jlong idx) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
wallet->thaw(static_cast<ssize_t>(idx));
}
//virtual TransactionHistory * history() const = 0;
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_getHistoryJ(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getHistoryJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return reinterpret_cast<jlong>(wallet->history());
}
@ -1348,7 +1348,7 @@ Java_net_mynero_wallet_model_Wallet_getHistoryJ(JNIEnv *env, jobject instance) {
//virtual AddressBook * addressBook() const = 0;
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_Wallet_setListenerJ(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_setListenerJ(JNIEnv *env, jobject instance,
jobject javaListener) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
wallet->setListener(nullptr); // clear old listener
@ -1370,19 +1370,19 @@ Java_net_mynero_wallet_model_Wallet_setListenerJ(JNIEnv *env, jobject instance,
}
JNIEXPORT jint JNICALL
Java_net_mynero_wallet_model_Wallet_getDefaultMixin(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getDefaultMixin(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->defaultMixin();
}
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_Wallet_setDefaultMixin(JNIEnv *env, jobject instance, jint mixin) {
Java_org_monfluo_wallet_model_Wallet_setDefaultMixin(JNIEnv *env, jobject instance, jint mixin) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->setDefaultMixin(mixin);
}
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_Wallet_setUserNote(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_setUserNote(JNIEnv *env, jobject instance,
jstring txid, jstring note) {
const char *_txid = env->GetStringUTFChars(txid, nullptr);
@ -1399,7 +1399,7 @@ Java_net_mynero_wallet_model_Wallet_setUserNote(JNIEnv *env, jobject instance,
}
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_getUserNote(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_getUserNote(JNIEnv *env, jobject instance,
jstring txid) {
const char *_txid = env->GetStringUTFChars(txid, nullptr);
@ -1413,7 +1413,7 @@ Java_net_mynero_wallet_model_Wallet_getUserNote(JNIEnv *env, jobject instance,
}
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_getTxKey(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_getTxKey(JNIEnv *env, jobject instance,
jstring txid) {
const char *_txid = env->GetStringUTFChars(txid, nullptr);
@ -1428,7 +1428,7 @@ Java_net_mynero_wallet_model_Wallet_getTxKey(JNIEnv *env, jobject instance,
//virtual void addSubaddressAccount(const std::string& label) = 0;
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_Wallet_addAccount(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_addAccount(JNIEnv *env, jobject instance,
jstring label) {
const char *_label = env->GetStringUTFChars(label, nullptr);
@ -1441,7 +1441,7 @@ Java_net_mynero_wallet_model_Wallet_addAccount(JNIEnv *env, jobject instance,
//virtual std::string getSubaddressLabel(uint32_t accountIndex, uint32_t addressIndex) const = 0;
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_getSubaddressLabel(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_getSubaddressLabel(JNIEnv *env, jobject instance,
jint accountIndex, jint addressIndex) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -1454,7 +1454,7 @@ Java_net_mynero_wallet_model_Wallet_getSubaddressLabel(JNIEnv *env, jobject inst
//virtual void setSubaddressLabel(uint32_t accountIndex, uint32_t addressIndex, const std::string &label) = 0;
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_Wallet_setSubaddressLabel(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_setSubaddressLabel(JNIEnv *env, jobject instance,
jint accountIndex, jint addressIndex,
jstring label) {
@ -1468,14 +1468,14 @@ Java_net_mynero_wallet_model_Wallet_setSubaddressLabel(JNIEnv *env, jobject inst
// virtual size_t numSubaddressAccounts() const = 0;
JNIEXPORT jint JNICALL
Java_net_mynero_wallet_model_Wallet_getNumAccounts(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_Wallet_getNumAccounts(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return static_cast<jint>(wallet->numSubaddressAccounts());
}
//virtual size_t numSubaddresses(uint32_t accountIndex) const = 0;
JNIEXPORT jint JNICALL
Java_net_mynero_wallet_model_Wallet_getNumSubaddresses(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_getNumSubaddresses(JNIEnv *env, jobject instance,
jint accountIndex) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return static_cast<jint>(wallet->numSubaddresses(accountIndex));
@ -1483,7 +1483,7 @@ Java_net_mynero_wallet_model_Wallet_getNumSubaddresses(JNIEnv *env, jobject inst
//virtual void addSubaddress(uint32_t accountIndex, const std::string &label) = 0;
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_Wallet_addSubaddress(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_addSubaddress(JNIEnv *env, jobject instance,
jint accountIndex,
jstring label) {
@ -1494,7 +1494,7 @@ Java_net_mynero_wallet_model_Wallet_addSubaddress(JNIEnv *env, jobject instance,
}
/*JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_Wallet_getLastSubaddress(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_Wallet_getLastSubaddress(JNIEnv *env, jobject instance,
jint accountIndex) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -1515,7 +1515,7 @@ Java_net_mynero_wallet_model_Wallet_getLastSubaddress(JNIEnv *env, jobject insta
// TransactionHistory
JNIEXPORT jint JNICALL
Java_net_mynero_wallet_model_TransactionHistory_getCount(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_TransactionHistory_getCount(JNIEnv *env, jobject instance) {
Monero::TransactionHistory *history = getHandle<Monero::TransactionHistory>(env,
instance);
return history->count();
@ -1601,7 +1601,7 @@ jobject cpp2java(JNIEnv *env, const std::vector<Monero::TransactionInfo *> &vect
}
JNIEXPORT jobject JNICALL
Java_net_mynero_wallet_model_TransactionHistory_refreshJ(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_TransactionHistory_refreshJ(JNIEnv *env, jobject instance) {
Monero::TransactionHistory *history = getHandle<Monero::TransactionHistory>(env,
instance);
history->refresh();
@ -1609,7 +1609,7 @@ Java_net_mynero_wallet_model_TransactionHistory_refreshJ(JNIEnv *env, jobject in
}
JNIEXPORT jobject JNICALL
Java_net_mynero_wallet_model_TransactionHistory_getAllJ(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_TransactionHistory_getAllJ(JNIEnv *env, jobject instance) {
Monero::TransactionHistory *history = getHandle<Monero::TransactionHistory>(env,
instance);
return cpp2java(env, history->getAll());
@ -1618,20 +1618,20 @@ Java_net_mynero_wallet_model_TransactionHistory_getAllJ(JNIEnv *env, jobject ins
// TransactionInfo is implemented in Java - no need here
JNIEXPORT jint JNICALL
Java_net_mynero_wallet_model_PendingTransaction_getStatusJ(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_PendingTransaction_getStatusJ(JNIEnv *env, jobject instance) {
Monero::PendingTransaction *tx = getHandle<Monero::PendingTransaction>(env, instance);
return tx->status();
}
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_PendingTransaction_getErrorString(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_PendingTransaction_getErrorString(JNIEnv *env, jobject instance) {
Monero::PendingTransaction *tx = getHandle<Monero::PendingTransaction>(env, instance);
return env->NewStringUTF(tx->errorString().c_str());
}
// commit transaction or save to file if filename is provided.
JNIEXPORT jboolean JNICALL
Java_net_mynero_wallet_model_PendingTransaction_commit(JNIEnv *env, jobject instance,
Java_org_monfluo_wallet_model_PendingTransaction_commit(JNIEnv *env, jobject instance,
jstring filename, jboolean overwrite) {
const char *_filename = env->GetStringUTFChars(filename, nullptr);
@ -1645,26 +1645,26 @@ Java_net_mynero_wallet_model_PendingTransaction_commit(JNIEnv *env, jobject inst
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_PendingTransaction_getAmount(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_PendingTransaction_getAmount(JNIEnv *env, jobject instance) {
Monero::PendingTransaction *tx = getHandle<Monero::PendingTransaction>(env, instance);
return tx->amount();
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_PendingTransaction_getDust(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_PendingTransaction_getDust(JNIEnv *env, jobject instance) {
Monero::PendingTransaction *tx = getHandle<Monero::PendingTransaction>(env, instance);
return tx->dust();
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_PendingTransaction_getFee(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_PendingTransaction_getFee(JNIEnv *env, jobject instance) {
Monero::PendingTransaction *tx = getHandle<Monero::PendingTransaction>(env, instance);
return tx->fee();
}
// TODO this returns a vector of strings - deal with this later - for now return first one
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_PendingTransaction_getFirstTxIdJ(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_PendingTransaction_getFirstTxIdJ(JNIEnv *env, jobject instance) {
Monero::PendingTransaction *tx = getHandle<Monero::PendingTransaction>(env, instance);
std::vector<std::string> txids = tx->txid();
if (!txids.empty())
@ -1674,7 +1674,7 @@ Java_net_mynero_wallet_model_PendingTransaction_getFirstTxIdJ(JNIEnv *env, jobje
}
JNIEXPORT jlong JNICALL
Java_net_mynero_wallet_model_PendingTransaction_getTxCount(JNIEnv *env, jobject instance) {
Java_org_monfluo_wallet_model_PendingTransaction_getTxCount(JNIEnv *env, jobject instance) {
Monero::PendingTransaction *tx = getHandle<Monero::PendingTransaction>(env, instance);
return tx->txCount();
}
@ -1687,7 +1687,7 @@ Java_net_mynero_wallet_model_PendingTransaction_getTxCount(JNIEnv *env, jobject
//static void warning(const std::string &category, const std::string &str);
//static void error(const std::string &category, const std::string &str);
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_WalletManager_initLogger(JNIEnv *env, jclass clazz,
Java_org_monfluo_wallet_model_WalletManager_initLogger(JNIEnv *env, jclass clazz,
jstring argv0,
jstring default_log_base_name) {
@ -1701,7 +1701,7 @@ Java_net_mynero_wallet_model_WalletManager_initLogger(JNIEnv *env, jclass clazz,
}
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_WalletManager_logDebug(JNIEnv *env, jclass clazz,
Java_org_monfluo_wallet_model_WalletManager_logDebug(JNIEnv *env, jclass clazz,
jstring category, jstring message) {
const char *_category = env->GetStringUTFChars(category, nullptr);
@ -1714,7 +1714,7 @@ Java_net_mynero_wallet_model_WalletManager_logDebug(JNIEnv *env, jclass clazz,
}
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_WalletManager_logInfo(JNIEnv *env, jclass clazz,
Java_org_monfluo_wallet_model_WalletManager_logInfo(JNIEnv *env, jclass clazz,
jstring category, jstring message) {
const char *_category = env->GetStringUTFChars(category, nullptr);
@ -1727,7 +1727,7 @@ Java_net_mynero_wallet_model_WalletManager_logInfo(JNIEnv *env, jclass clazz,
}
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_WalletManager_logWarning(JNIEnv *env, jclass clazz,
Java_org_monfluo_wallet_model_WalletManager_logWarning(JNIEnv *env, jclass clazz,
jstring category, jstring message) {
const char *_category = env->GetStringUTFChars(category, nullptr);
@ -1740,7 +1740,7 @@ Java_net_mynero_wallet_model_WalletManager_logWarning(JNIEnv *env, jclass clazz,
}
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_WalletManager_logError(JNIEnv *env, jclass clazz,
Java_org_monfluo_wallet_model_WalletManager_logError(JNIEnv *env, jclass clazz,
jstring category, jstring message) {
const char *_category = env->GetStringUTFChars(category, nullptr);
@ -1753,13 +1753,13 @@ Java_net_mynero_wallet_model_WalletManager_logError(JNIEnv *env, jclass clazz,
}
JNIEXPORT void JNICALL
Java_net_mynero_wallet_model_WalletManager_setLogLevel(JNIEnv *env, jclass clazz,
Java_org_monfluo_wallet_model_WalletManager_setLogLevel(JNIEnv *env, jclass clazz,
jint level) {
Monero::WalletManagerFactory::setLogLevel(level);
}
JNIEXPORT jstring JNICALL
Java_net_mynero_wallet_model_WalletManager_moneroVersion(JNIEnv *env, jclass clazz) {
Java_org_monfluo_wallet_model_WalletManager_moneroVersion(JNIEnv *env, jclass clazz) {
return env->NewStringUTF(MONERO_VERSION);
}

View File

@ -1,4 +1,4 @@
package net.mynero.wallet
package org.monfluo.wallet
import android.content.Intent
import android.os.Bundle
@ -11,14 +11,13 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import net.mynero.wallet.adapter.EnotesAdapter
import net.mynero.wallet.model.Balance
import net.mynero.wallet.model.Enote
import net.mynero.wallet.model.Wallet
import net.mynero.wallet.service.wallet.WalletService
import net.mynero.wallet.util.Constants
import net.mynero.wallet.util.PreferenceUtils
import net.mynero.wallet.util.acitivity.MoneroActivity
import org.monfluo.wallet.adapter.EnotesAdapter
import org.monfluo.wallet.model.Enote
import org.monfluo.wallet.model.Wallet
import org.monfluo.wallet.service.wallet.WalletService
import org.monfluo.wallet.util.Constants
import org.monfluo.wallet.util.PreferenceUtils
import org.monfluo.wallet.util.acitivity.MoneroActivity
class EnotesActivity : MoneroActivity() {

View File

@ -1,4 +1,4 @@
package net.mynero.wallet
package org.monfluo.wallet
import android.content.Intent
import android.os.Bundle
@ -14,15 +14,15 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import net.mynero.wallet.adapter.TransactionInfoAdapter
import net.mynero.wallet.livedata.combineLiveDatas
import net.mynero.wallet.model.Balance
import net.mynero.wallet.model.TransactionInfo
import net.mynero.wallet.model.Wallet
import net.mynero.wallet.service.wallet.WalletService
import net.mynero.wallet.util.Constants
import net.mynero.wallet.util.PreferenceUtils
import net.mynero.wallet.util.acitivity.MoneroActivity
import org.monfluo.wallet.adapter.TransactionInfoAdapter
import org.monfluo.wallet.livedata.combineLiveDatas
import org.monfluo.wallet.model.Balance
import org.monfluo.wallet.model.TransactionInfo
import org.monfluo.wallet.model.Wallet
import org.monfluo.wallet.service.wallet.WalletService
import org.monfluo.wallet.util.Constants
import org.monfluo.wallet.util.PreferenceUtils
import org.monfluo.wallet.util.acitivity.MoneroActivity
import timber.log.Timber
class HomeActivity : MoneroActivity() {

View File

@ -1,14 +1,14 @@
package net.mynero.wallet
package org.monfluo.wallet
import android.app.Application
import net.mynero.wallet.util.NightmodeHelper
import org.monfluo.wallet.util.NightmodeHelper
import timber.log.Timber
class MoneroApplication : Application() {
companion object {
init {
System.loadLibrary("monerujo")
System.loadLibrary("monfluo")
}
}

View File

@ -1,6 +1,5 @@
package net.mynero.wallet
package org.monfluo.wallet
import android.app.Activity
import android.os.Bundle
import android.text.Editable
import android.text.TextWatcher
@ -22,18 +21,17 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.lifecycleScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import net.mynero.wallet.data.DefaultNode
import net.mynero.wallet.data.Node
import net.mynero.wallet.fragment.dialog.NodeSelectionBottomSheetDialog
import net.mynero.wallet.listener.NodeSelectionDialogListenerAdapter
import net.mynero.wallet.livedata.combineLiveDatas
import net.mynero.wallet.model.Wallet
import net.mynero.wallet.model.WalletManager
import net.mynero.wallet.util.Constants
import net.mynero.wallet.util.Helper
import net.mynero.wallet.util.PreferenceUtils
import net.mynero.wallet.util.RestoreHeight
import net.mynero.wallet.util.acitivity.WalletOpeningActivity
import org.monfluo.wallet.data.DefaultNode
import org.monfluo.wallet.data.Node
import org.monfluo.wallet.fragment.dialog.NodeSelectionBottomSheetDialog
import org.monfluo.wallet.listener.NodeSelectionDialogListenerAdapter
import org.monfluo.wallet.livedata.combineLiveDatas
import org.monfluo.wallet.model.Wallet
import org.monfluo.wallet.util.Constants
import org.monfluo.wallet.util.Helper
import org.monfluo.wallet.util.PreferenceUtils
import org.monfluo.wallet.util.RestoreHeight
import org.monfluo.wallet.util.acitivity.WalletOpeningActivity
import timber.log.Timber
import java.io.File
import java.util.Calendar
@ -350,7 +348,7 @@ internal class OnboardingViewModel : ViewModel() {
}
return
} else {
WalletManager.instance.createWalletPolyseed(
org.monfluo.wallet.model.WalletManager.instance.createWalletPolyseed(
walletFile,
passphrase,
offset,
@ -361,7 +359,7 @@ internal class OnboardingViewModel : ViewModel() {
val tmpWalletFile =
File(activity.applicationInfo.dataDir, walletName + "_tmp")
val tmpWallet = createTempWallet(tmpWalletFile) //we do this to get seed, then recover wallet so we can use seed offset
wallet = WalletManager.instance.recoveryWallet(
wallet = org.monfluo.wallet.model.WalletManager.instance.recoveryWallet(
walletFile,
passphrase,
tmpWallet.getSeed(""),
@ -386,14 +384,14 @@ internal class OnboardingViewModel : ViewModel() {
restoreHeight = restoreHeightText.toLong()
}
if (seedTypeValue == SeedType.POLYSEED) {
wallet = WalletManager.instance.recoveryWalletPolyseed(
wallet = org.monfluo.wallet.model.WalletManager.instance.recoveryWalletPolyseed(
walletFile,
passphrase,
walletSeed,
offset
)
} else if (seedTypeValue == SeedType.LEGACY) {
wallet = WalletManager.instance.recoveryWallet(
wallet = org.monfluo.wallet.model.WalletManager.instance.recoveryWallet(
walletFile,
passphrase,
walletSeed,
@ -443,7 +441,7 @@ internal class OnboardingViewModel : ViewModel() {
}
private fun createTempWallet(tmpWalletFile: File): Wallet {
return WalletManager.instance.createWallet(
return org.monfluo.wallet.model.WalletManager.instance.createWallet(
tmpWalletFile,
"",
Constants.MNEMONIC_LANGUAGE,

View File

@ -1,4 +1,4 @@
package net.mynero.wallet
package org.monfluo.wallet
import android.graphics.Bitmap
import android.os.Bundle
@ -20,16 +20,16 @@ import kotlinx.coroutines.Job
import kotlinx.coroutines.isActive
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import net.mynero.wallet.adapter.SubaddressAdapter
import net.mynero.wallet.adapter.SubaddressAdapter.SubaddressAdapterListener
import net.mynero.wallet.data.Subaddress
import net.mynero.wallet.fragment.dialog.EditAddressLabelBottomSheetDialog
import net.mynero.wallet.model.Wallet
import net.mynero.wallet.service.wallet.WalletService
import net.mynero.wallet.util.Helper.clipBoardCopy
import net.mynero.wallet.util.PreferenceUtils
import net.mynero.wallet.util.QrCodeHelper
import net.mynero.wallet.util.acitivity.MoneroActivity
import org.monfluo.wallet.adapter.SubaddressAdapter
import org.monfluo.wallet.adapter.SubaddressAdapter.SubaddressAdapterListener
import org.monfluo.wallet.data.Subaddress
import org.monfluo.wallet.fragment.dialog.EditAddressLabelBottomSheetDialog
import org.monfluo.wallet.model.Wallet
import org.monfluo.wallet.service.wallet.WalletService
import org.monfluo.wallet.util.Helper.clipBoardCopy
import org.monfluo.wallet.util.PreferenceUtils
import org.monfluo.wallet.util.QrCodeHelper
import org.monfluo.wallet.util.acitivity.MoneroActivity
import timber.log.Timber
import kotlin.time.DurationUnit
import kotlin.time.measureTimedValue

View File

@ -1,4 +1,4 @@
package net.mynero.wallet
package org.monfluo.wallet
import android.os.Bundle
import android.text.Editable
@ -25,15 +25,15 @@ import com.journeyapps.barcodescanner.ScanIntentResult
import com.journeyapps.barcodescanner.ScanOptions
import com.ncorti.slidetoact.SlideToActView
import com.ncorti.slidetoact.SlideToActView.OnSlideCompleteListener
import net.mynero.wallet.model.PendingTransaction
import net.mynero.wallet.model.Wallet
import net.mynero.wallet.service.wallet.WalletService
import net.mynero.wallet.util.Constants
import net.mynero.wallet.util.Helper
import net.mynero.wallet.util.PreferenceUtils
import net.mynero.wallet.util.TransactionDestination
import net.mynero.wallet.util.UriData
import net.mynero.wallet.util.acitivity.MoneroActivity
import org.monfluo.wallet.model.PendingTransaction
import org.monfluo.wallet.model.Wallet
import org.monfluo.wallet.service.wallet.WalletService
import org.monfluo.wallet.util.Constants
import org.monfluo.wallet.util.Helper
import org.monfluo.wallet.util.PreferenceUtils
import org.monfluo.wallet.util.TransactionDestination
import org.monfluo.wallet.util.UriData
import org.monfluo.wallet.util.acitivity.MoneroActivity
class SendActivity : MoneroActivity() {

View File

@ -1,4 +1,4 @@
package net.mynero.wallet
package org.monfluo.wallet
import android.content.Intent
import android.os.Bundle
@ -11,19 +11,19 @@ import androidx.appcompat.widget.SwitchCompat
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import net.mynero.wallet.adapter.AccountAdapter
import net.mynero.wallet.data.DefaultNode
import net.mynero.wallet.data.Node
import net.mynero.wallet.fragment.dialog.EditAccountLabelBottomSheetDialog
import net.mynero.wallet.fragment.dialog.NodeSelectionBottomSheetDialog
import net.mynero.wallet.fragment.dialog.PasswordBottomSheetDialog
import net.mynero.wallet.fragment.dialog.WalletKeysBottomSheetDialog
import net.mynero.wallet.listener.NodeSelectionDialogListenerAdapter
import net.mynero.wallet.model.Account
import net.mynero.wallet.model.Balance
import net.mynero.wallet.service.wallet.WalletService
import net.mynero.wallet.util.PreferenceUtils
import net.mynero.wallet.util.acitivity.MoneroActivity
import org.monfluo.wallet.adapter.AccountAdapter
import org.monfluo.wallet.data.DefaultNode
import org.monfluo.wallet.data.Node
import org.monfluo.wallet.fragment.dialog.EditAccountLabelBottomSheetDialog
import org.monfluo.wallet.fragment.dialog.NodeSelectionBottomSheetDialog
import org.monfluo.wallet.fragment.dialog.PasswordBottomSheetDialog
import org.monfluo.wallet.fragment.dialog.WalletKeysBottomSheetDialog
import org.monfluo.wallet.listener.NodeSelectionDialogListenerAdapter
import org.monfluo.wallet.model.Account
import org.monfluo.wallet.model.Balance
import org.monfluo.wallet.service.wallet.WalletService
import org.monfluo.wallet.util.PreferenceUtils
import org.monfluo.wallet.util.acitivity.MoneroActivity
import timber.log.Timber
class SettingsActivity : MoneroActivity() {

View File

@ -1,13 +1,12 @@
package net.mynero.wallet
package org.monfluo.wallet
import android.content.Intent
import android.os.Bundle
import net.mynero.wallet.fragment.dialog.PasswordBottomSheetDialog
import net.mynero.wallet.model.WalletManager
import net.mynero.wallet.util.Constants
import net.mynero.wallet.util.Helper
import net.mynero.wallet.util.PreferenceUtils
import net.mynero.wallet.util.acitivity.WalletOpeningActivity
import org.monfluo.wallet.fragment.dialog.PasswordBottomSheetDialog
import org.monfluo.wallet.util.Constants
import org.monfluo.wallet.util.Helper
import org.monfluo.wallet.util.PreferenceUtils
import org.monfluo.wallet.util.acitivity.WalletOpeningActivity
import timber.log.Timber
class StartActivity : WalletOpeningActivity() {
@ -17,7 +16,7 @@ class StartActivity : WalletOpeningActivity() {
setVisible(false)
val isMultiWalletMode = PreferenceUtils.isMultiWalletMode(this)
val walletPaths = WalletManager.instance.findWallets(Helper.getWalletRoot(this).absolutePath)
val walletPaths = org.monfluo.wallet.model.WalletManager.instance.findWallets(Helper.getWalletRoot(this).absolutePath)
if (walletPaths.isEmpty()) {
Timber.d("No wallets found, launching onboarding activity")
val onboardingActivityIntent = Intent(this, OnboardingActivity::class.java)

View File

@ -1,4 +1,4 @@
package net.mynero.wallet
package org.monfluo.wallet
import android.os.Bundle
import android.view.View
@ -9,14 +9,14 @@ import androidx.core.content.ContextCompat
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import net.mynero.wallet.model.TransactionInfo
import net.mynero.wallet.model.Wallet
import net.mynero.wallet.service.wallet.WalletService
import net.mynero.wallet.util.Constants
import net.mynero.wallet.util.DateHelper
import net.mynero.wallet.util.Helper
import net.mynero.wallet.util.PreferenceUtils
import net.mynero.wallet.util.acitivity.MoneroActivity
import org.monfluo.wallet.model.TransactionInfo
import org.monfluo.wallet.model.Wallet
import org.monfluo.wallet.service.wallet.WalletService
import org.monfluo.wallet.util.Constants
import org.monfluo.wallet.util.DateHelper
import org.monfluo.wallet.util.Helper
import org.monfluo.wallet.util.PreferenceUtils
import org.monfluo.wallet.util.acitivity.MoneroActivity
import java.util.Calendar
import java.util.Date
import java.util.Objects

View File

@ -1,4 +1,4 @@
package net.mynero.wallet
package org.monfluo.wallet
import WalletAdapter
import android.content.Intent
@ -6,10 +6,9 @@ import android.os.Bundle
import android.widget.Button
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import net.mynero.wallet.fragment.dialog.PasswordBottomSheetDialog
import net.mynero.wallet.model.WalletManager
import net.mynero.wallet.util.Helper
import net.mynero.wallet.util.acitivity.WalletOpeningActivity
import org.monfluo.wallet.fragment.dialog.PasswordBottomSheetDialog
import org.monfluo.wallet.util.Helper
import org.monfluo.wallet.util.acitivity.WalletOpeningActivity
class WalletActivity : WalletOpeningActivity() {
@ -24,7 +23,7 @@ class WalletActivity : WalletOpeningActivity() {
createWalletButton = findViewById(R.id.create_or_import_wallet)
walletRecyclerView = findViewById(R.id.wallet_list_recyclerview)
val walletPaths = WalletManager.instance.findWallets(Helper.getWalletRoot(this).absolutePath)
val walletPaths = org.monfluo.wallet.model.WalletManager.instance.findWallets(Helper.getWalletRoot(this).absolutePath)
adapter = WalletAdapter(walletPaths, object : WalletAdapter.AccountAdapterListener {
override fun onWalletSelected(walletPath: String) {
val passwordDialog = PasswordBottomSheetDialog(walletPath, object : PasswordBottomSheetDialog.Listener {

View File

@ -1,4 +1,4 @@
package net.mynero.wallet.adapter
package org.monfluo.wallet.adapter
import android.graphics.Typeface
import android.view.LayoutInflater
@ -6,8 +6,8 @@ import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import net.mynero.wallet.R
import net.mynero.wallet.model.Account
import org.monfluo.wallet.R
import org.monfluo.wallet.model.Account
class AccountAdapter(
private var accounts: List<Account>,

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.adapter
package org.monfluo.wallet.adapter
import android.view.LayoutInflater
import android.view.View
@ -22,10 +22,10 @@ import android.view.ViewGroup
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import net.mynero.wallet.R
import net.mynero.wallet.model.Enote
import net.mynero.wallet.model.Wallet
import net.mynero.wallet.util.Constants
import org.monfluo.wallet.R
import org.monfluo.wallet.model.Enote
import org.monfluo.wallet.model.Wallet
import org.monfluo.wallet.util.Constants
class EnotesAdapter(
private var enotes: List<Enote>,

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.adapter
package org.monfluo.wallet.adapter
import android.annotation.SuppressLint
import android.view.LayoutInflater
@ -23,8 +23,8 @@ import android.widget.ImageView
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import net.mynero.wallet.R
import net.mynero.wallet.data.Node
import org.monfluo.wallet.R
import org.monfluo.wallet.data.Node
class NodeSelectionAdapter(
private var nodes: List<Node>,

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.adapter
package org.monfluo.wallet.adapter
import android.graphics.Typeface
import android.view.LayoutInflater
@ -21,10 +21,10 @@ import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import net.mynero.wallet.R
import net.mynero.wallet.data.Subaddress
import net.mynero.wallet.util.Constants
import net.mynero.wallet.util.Helper
import org.monfluo.wallet.R
import org.monfluo.wallet.data.Subaddress
import org.monfluo.wallet.util.Constants
import org.monfluo.wallet.util.Helper
class SubaddressAdapter(
private var addresses: List<Subaddress>,

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.adapter
package org.monfluo.wallet.adapter
import android.view.LayoutInflater
import android.view.View
@ -21,12 +21,12 @@ import android.view.ViewGroup
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.progressindicator.CircularProgressIndicator
import net.mynero.wallet.R
import net.mynero.wallet.model.TransactionInfo
import net.mynero.wallet.util.Constants
import net.mynero.wallet.util.DateHelper
import net.mynero.wallet.util.Helper
import net.mynero.wallet.util.ThemeHelper
import org.monfluo.wallet.R
import org.monfluo.wallet.model.TransactionInfo
import org.monfluo.wallet.util.Constants
import org.monfluo.wallet.util.DateHelper
import org.monfluo.wallet.util.Helper
import org.monfluo.wallet.util.ThemeHelper
import java.util.Calendar
import java.util.Date

View File

@ -3,7 +3,7 @@ import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import net.mynero.wallet.R
import org.monfluo.wallet.R
import kotlin.io.path.Path
import kotlin.io.path.name

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.data
package org.monfluo.wallet.data
enum class DefaultNode(val value: Node) {

View File

@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.data
package org.monfluo.wallet.data
import net.mynero.wallet.model.NetworkType
import org.monfluo.wallet.model.NetworkType
import org.json.JSONObject
data class Node(

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.data
package org.monfluo.wallet.data
import java.util.regex.Pattern

View File

@ -1,4 +1,4 @@
package net.mynero.wallet.fragment.dialog
package org.monfluo.wallet.fragment.dialog
import android.os.Bundle
import android.text.Editable
@ -12,10 +12,10 @@ import android.widget.EditText
import android.widget.ImageButton
import android.widget.Toast
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import net.mynero.wallet.R
import net.mynero.wallet.data.Node
import net.mynero.wallet.model.NetworkType
import net.mynero.wallet.util.Helper.getClipBoardText
import org.monfluo.wallet.R
import org.monfluo.wallet.data.Node
import org.monfluo.wallet.model.NetworkType
import org.monfluo.wallet.util.Helper.getClipBoardText
class AddNodeBottomSheetDialog(val listener: AddNodeListener) : BottomSheetDialogFragment() {

View File

@ -1,4 +1,4 @@
package net.mynero.wallet.fragment.dialog
package org.monfluo.wallet.fragment.dialog
import android.os.Bundle
import android.view.LayoutInflater
@ -8,8 +8,8 @@ import android.widget.Button
import android.widget.EditText
import android.widget.ImageButton
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import net.mynero.wallet.R
import net.mynero.wallet.util.Helper.getClipBoardText
import org.monfluo.wallet.R
import org.monfluo.wallet.util.Helper.getClipBoardText
class EditAccountLabelBottomSheetDialog(
private val currentLabel: String,

View File

@ -1,4 +1,4 @@
package net.mynero.wallet.fragment.dialog
package org.monfluo.wallet.fragment.dialog
import android.os.Bundle
import android.view.LayoutInflater
@ -8,8 +8,8 @@ import android.widget.Button
import android.widget.EditText
import android.widget.ImageButton
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import net.mynero.wallet.R
import net.mynero.wallet.util.Helper.getClipBoardText
import org.monfluo.wallet.R
import org.monfluo.wallet.util.Helper.getClipBoardText
class EditAddressLabelBottomSheetDialog(
private val currentLabel: String,

View File

@ -1,4 +1,4 @@
package net.mynero.wallet.fragment.dialog
package org.monfluo.wallet.fragment.dialog
import android.os.Bundle
import android.text.Editable
@ -12,10 +12,10 @@ import android.widget.EditText
import android.widget.ImageButton
import android.widget.Toast
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import net.mynero.wallet.R
import net.mynero.wallet.data.Node
import net.mynero.wallet.model.NetworkType
import net.mynero.wallet.util.Helper.getClipBoardText
import org.monfluo.wallet.R
import org.monfluo.wallet.data.Node
import org.monfluo.wallet.model.NetworkType
import org.monfluo.wallet.util.Helper.getClipBoardText
class EditNodeBottomSheetDialog(val listener: EditNodeListener, val node: Node) : BottomSheetDialogFragment() {

View File

@ -1,4 +1,4 @@
package net.mynero.wallet.fragment.dialog
package org.monfluo.wallet.fragment.dialog
import android.os.Bundle
import android.view.LayoutInflater
@ -8,10 +8,10 @@ import android.widget.Button
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import net.mynero.wallet.R
import net.mynero.wallet.adapter.NodeSelectionAdapter
import net.mynero.wallet.adapter.NodeSelectionAdapter.NodeSelectionAdapterListener
import net.mynero.wallet.data.Node
import org.monfluo.wallet.R
import org.monfluo.wallet.adapter.NodeSelectionAdapter
import org.monfluo.wallet.adapter.NodeSelectionAdapter.NodeSelectionAdapterListener
import org.monfluo.wallet.data.Node
class NodeSelectionBottomSheetDialog(
private var nodes: List<Node>,

View File

@ -1,4 +1,4 @@
package net.mynero.wallet.fragment.dialog
package org.monfluo.wallet.fragment.dialog
import android.os.Bundle
import android.view.LayoutInflater
@ -9,9 +9,8 @@ import android.widget.EditText
import android.widget.ImageButton
import android.widget.Toast
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import net.mynero.wallet.R
import net.mynero.wallet.model.WalletManager
import net.mynero.wallet.util.Helper.getClipBoardText
import org.monfluo.wallet.R
import org.monfluo.wallet.util.Helper.getClipBoardText
class PasswordBottomSheetDialog(
private val walletPath: String,
@ -56,7 +55,7 @@ class PasswordBottomSheetDialog(
}
private fun checkPassword(walletPassword: String): Boolean {
return WalletManager.instance.verifyWalletPasswordOnly(
return org.monfluo.wallet.model.WalletManager.instance.verifyWalletPasswordOnly(
"$walletPath.keys",
walletPassword
)

View File

@ -1,4 +1,4 @@
package net.mynero.wallet.fragment.dialog
package org.monfluo.wallet.fragment.dialog
import android.os.Bundle
import android.view.LayoutInflater
@ -12,9 +12,9 @@ import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import net.mynero.wallet.R
import net.mynero.wallet.model.Wallet
import net.mynero.wallet.util.Helper.clipBoardCopy
import org.monfluo.wallet.R
import org.monfluo.wallet.model.Wallet
import org.monfluo.wallet.util.Helper.clipBoardCopy
class WalletKeysBottomSheetDialog(
private val wallet: Wallet,

View File

@ -1,12 +1,12 @@
package net.mynero.wallet.listener
package org.monfluo.wallet.listener
import android.widget.Toast
import androidx.fragment.app.FragmentActivity
import net.mynero.wallet.data.Node
import net.mynero.wallet.fragment.dialog.AddNodeBottomSheetDialog
import net.mynero.wallet.fragment.dialog.EditNodeBottomSheetDialog
import net.mynero.wallet.fragment.dialog.NodeSelectionBottomSheetDialog
import net.mynero.wallet.util.PreferenceUtils
import org.monfluo.wallet.data.Node
import org.monfluo.wallet.fragment.dialog.AddNodeBottomSheetDialog
import org.monfluo.wallet.fragment.dialog.EditNodeBottomSheetDialog
import org.monfluo.wallet.fragment.dialog.NodeSelectionBottomSheetDialog
import org.monfluo.wallet.util.PreferenceUtils
import timber.log.Timber
abstract class NodeSelectionDialogListenerAdapter(

View File

@ -1,4 +1,4 @@
package net.mynero.wallet.livedata
package org.monfluo.wallet.livedata
import androidx.lifecycle.LiveData
import androidx.lifecycle.MediatorLiveData

View File

@ -1,3 +1,3 @@
package net.mynero.wallet.model
package org.monfluo.wallet.model
data class Account(val index: Int, val label: String, val balance: Balance)

View File

@ -1,3 +1,3 @@
package net.mynero.wallet.model
package org.monfluo.wallet.model
data class Balance(var total: Long, var unlocked: Long, var frozen: Long, var pending: Long)

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.model
package org.monfluo.wallet.model
data class Enote(
val idx: Long,

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.model
package org.monfluo.wallet.model
enum class NetworkType(val value: Int, val string: String) {

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.model
package org.monfluo.wallet.model
class PendingTransaction internal constructor(var handle: Long) {
val status: Status

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.model
package org.monfluo.wallet.model
class TransactionHistory(private val handle: Long) {
var all: List<TransactionInfo> = ArrayList()

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.model
package org.monfluo.wallet.model
data class TransactionInfo(
var direction: Direction,

View File

@ -13,6 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.model
package org.monfluo.wallet.model
data class Transfer(val amount: Long, val address: String?)

View File

@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.model
package org.monfluo.wallet.model
import android.util.Log
import android.util.Pair
import net.mynero.wallet.data.Subaddress
import net.mynero.wallet.util.TransactionDestination
import org.monfluo.wallet.data.Subaddress
import org.monfluo.wallet.util.TransactionDestination
import java.io.File
class Wallet(private val handle: Long, val info: WalletInfo, private var accountIndex: Int = 0) {
@ -206,7 +206,7 @@ class Wallet(private val handle: Long, val info: WalletInfo, private var account
external fun store(path: String?): Boolean
fun close(): Boolean {
disposePendingTransaction()
return WalletManager.instance.closeJ(this)
return org.monfluo.wallet.model.WalletManager.instance.closeJ(this)
}
external fun getFilename(): String
@ -469,7 +469,7 @@ class Wallet(private val handle: Long, val info: WalletInfo, private var account
external fun isPaymentIdValid(payment_id: String): Boolean
fun isAddressValid(address: String): Boolean {
return WalletManager.instance.networkType.value.let {
return org.monfluo.wallet.model.WalletManager.instance.networkType.value.let {
isAddressValid(
address,
it

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.model
package org.monfluo.wallet.model
interface WalletListener {
/**

View File

@ -13,22 +13,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.model
package org.monfluo.wallet.model
import android.util.Log
import net.mynero.wallet.data.Node
import net.mynero.wallet.util.RestoreHeight
import timber.log.Timber
import org.monfluo.wallet.util.RestoreHeight
import java.io.File
import java.util.Calendar
import java.util.Locale
class WalletManager {
val networkType = NetworkType.NetworkType_Mainnet
val networkType = org.monfluo.wallet.model.NetworkType.NetworkType_Mainnet
fun createWallet(aFile: File, password: String, language: String, height: Long): Wallet {
fun createWallet(aFile: File, password: String, language: String, height: Long): org.monfluo.wallet.model.Wallet {
val walletHandle = createWalletJ(aFile.absolutePath, password, language, networkType.value)
val wallet = Wallet(walletHandle, WalletInfo(aFile, password))
val wallet = org.monfluo.wallet.model.Wallet(
walletHandle,
org.monfluo.wallet.model.WalletInfo(aFile, password)
)
if (wallet.status.isOk) {
// (Re-)Estimate restore height based on what we know
val oldHeight = wallet.getRestoreHeight()
@ -59,7 +60,7 @@ class WalletManager {
password: String,
passphrase: String,
language: String
): Wallet {
): org.monfluo.wallet.model.Wallet {
val walletHandle = createWalletPolyseedJ(
aFile.absolutePath,
password,
@ -67,7 +68,10 @@ class WalletManager {
language,
networkType.value
)
val wallet = Wallet(walletHandle, WalletInfo(aFile, password))
val wallet = org.monfluo.wallet.model.Wallet(
walletHandle,
org.monfluo.wallet.model.WalletInfo(aFile, password)
)
if (wallet.status.isOk) {
wallet.setPassword(password) // this rewrites the keys file (which contains the restore height)
} else Log.e("WalletManager.kt", wallet.status.toString())
@ -83,9 +87,12 @@ class WalletManager {
): Long
//TODO virtual bool checkPayment(const std::string &address, const std::string &txid, const std::string &txkey, const std::string &daemon_address, uint64_t &received, uint64_t &height, std::string &error) const = 0;
fun openWallet(path: String, password: String): Wallet {
fun openWallet(path: String, password: String): org.monfluo.wallet.model.Wallet {
val walletHandle = openWalletJ(path, password, networkType.value)
val wallet = Wallet(walletHandle, WalletInfo(File(path), password))
val wallet = org.monfluo.wallet.model.Wallet(
walletHandle,
org.monfluo.wallet.model.WalletInfo(File(path), password)
)
return wallet
}
@ -94,13 +101,16 @@ class WalletManager {
aFile: File, password: String,
mnemonic: String, offset: String,
restoreHeight: Long
): Wallet {
): org.monfluo.wallet.model.Wallet {
val walletHandle = recoveryWalletJ(
aFile.absolutePath, password,
mnemonic, offset,
networkType.value, restoreHeight
)
val wallet = Wallet(walletHandle, WalletInfo(aFile, password))
val wallet = org.monfluo.wallet.model.Wallet(
walletHandle,
org.monfluo.wallet.model.WalletInfo(aFile, password)
)
return wallet
}
@ -113,13 +123,16 @@ class WalletManager {
fun recoveryWalletPolyseed(
aFile: File, password: String,
mnemonic: String, offset: String
): Wallet {
): org.monfluo.wallet.model.Wallet {
val walletHandle = recoveryWalletPolyseedJ(
aFile.absolutePath, password,
mnemonic, offset,
networkType.value
)
val wallet = Wallet(walletHandle, WalletInfo(aFile, password))
val wallet = org.monfluo.wallet.model.Wallet(
walletHandle,
org.monfluo.wallet.model.WalletInfo(aFile, password)
)
return wallet
}
@ -132,13 +145,16 @@ class WalletManager {
fun createWalletWithKeys(
aFile: File, password: String, language: String, restoreHeight: Long,
addressString: String, viewKeyString: String, spendKeyString: String
): Wallet {
): org.monfluo.wallet.model.Wallet {
val walletHandle = createWalletFromKeysJ(
aFile.absolutePath, password,
language, networkType.value, restoreHeight,
addressString, viewKeyString, spendKeyString
)
val wallet = Wallet(walletHandle, WalletInfo(aFile, password))
val wallet = org.monfluo.wallet.model.Wallet(
walletHandle,
org.monfluo.wallet.model.WalletInfo(aFile, password)
)
return wallet
}
@ -160,7 +176,7 @@ class WalletManager {
subaddressLookahead: String
): Long
external fun closeJ(wallet: Wallet?): Boolean
external fun closeJ(wallet: org.monfluo.wallet.model.Wallet?): Boolean
fun walletExists(aFile: File): Boolean {
return walletExists(aFile.absolutePath)
@ -198,7 +214,7 @@ class WalletManager {
external fun resolveOpenAlias(address: String?, dnssec_valid: Boolean): String?
external fun setProxyJ(address: String?): Boolean
inner class WalletInfo(wallet: File) : Comparable<WalletInfo> {
inner class WalletInfo(wallet: File) : Comparable<org.monfluo.wallet.model.WalletManager.WalletInfo> {
private val path: File
private val name: String
@ -207,7 +223,7 @@ class WalletManager {
name = wallet.name
}
override fun compareTo(other: WalletInfo): Int {
override fun compareTo(other: org.monfluo.wallet.model.WalletManager.WalletInfo): Int {
return name.lowercase(Locale.getDefault())
.compareTo(other.name.lowercase(Locale.getDefault()))
}
@ -222,16 +238,16 @@ class WalletManager {
var LOGLEVEL_TRACE = 3
var LOGLEVEL_MAX = 4
val instance: WalletManager
get() = synchronized(WalletManager::class.java) {
return@synchronized WalletManager()
val instance: org.monfluo.wallet.model.WalletManager
get() = synchronized(org.monfluo.wallet.model.WalletManager::class.java) {
return@synchronized org.monfluo.wallet.model.WalletManager()
}
fun addressPrefix(networkType: NetworkType): String {
fun addressPrefix(networkType: org.monfluo.wallet.model.NetworkType): String {
return when (networkType) {
NetworkType.NetworkType_Testnet -> "9A-"
NetworkType.NetworkType_Mainnet -> "4-"
NetworkType.NetworkType_Stagenet -> "5-"
org.monfluo.wallet.model.NetworkType.NetworkType_Testnet -> "9A-"
org.monfluo.wallet.model.NetworkType.NetworkType_Mainnet -> "4-"
org.monfluo.wallet.model.NetworkType.NetworkType_Stagenet -> "5-"
}
}

View File

@ -1,4 +1,4 @@
package net.mynero.wallet.service.wallet
package org.monfluo.wallet.service.wallet
import android.os.Looper

View File

@ -1,4 +1,4 @@
package net.mynero.wallet.service.wallet
package org.monfluo.wallet.service.wallet
import android.app.Service
import android.content.Intent
@ -10,14 +10,11 @@ import android.os.Message
import androidx.lifecycle.AtomicReference
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.LifecycleOwner
import net.mynero.wallet.model.Enote
import net.mynero.wallet.model.PendingTransaction
import net.mynero.wallet.model.Wallet
import net.mynero.wallet.model.Wallet.Companion.NEW_ACCOUNT_NAME
import net.mynero.wallet.model.WalletListener
import net.mynero.wallet.model.WalletManager
import net.mynero.wallet.util.Constants
import net.mynero.wallet.util.TransactionDestination
import org.monfluo.wallet.model.PendingTransaction
import org.monfluo.wallet.model.Wallet
import org.monfluo.wallet.model.Wallet.Companion.NEW_ACCOUNT_NAME
import org.monfluo.wallet.model.WalletListener
import org.monfluo.wallet.util.TransactionDestination
import timber.log.Timber
import java.util.concurrent.ArrayBlockingQueue
import java.util.concurrent.atomic.AtomicBoolean
@ -164,9 +161,9 @@ class WalletService : Service(), WalletListener, DefaultLifecycleObserver {
daemonTrusted: Boolean,
proxy: String
) {
WalletManager.instance.setProxyJ(proxy)
WalletManager.instance.setDaemonAddressJ(daemonAddress)
val wallet = WalletManager.instance.openWallet(walletName, walletPassword)
org.monfluo.wallet.model.WalletManager.instance.setProxyJ(proxy)
org.monfluo.wallet.model.WalletManager.instance.setDaemonAddressJ(daemonAddress)
val wallet = org.monfluo.wallet.model.WalletManager.instance.openWallet(walletName, walletPassword)
Timber.i("Initializing wallet with daemon address = $daemonAddress, daemon username = $daemonUsername, daemon password = ${"*".repeat(daemonPassword.length)}, proxy = $proxy")
wallet.initJ(daemonAddress, 0, daemonUsername, daemonPassword, proxy)
wallet.setTrustedDaemon(daemonTrusted)
@ -194,8 +191,8 @@ class WalletService : Service(), WalletListener, DefaultLifecycleObserver {
daemonTrusted: Boolean,
proxy: String
) {
WalletManager.instance.setProxyJ(proxy)
WalletManager.instance.setDaemonAddressJ(daemonAddress)
org.monfluo.wallet.model.WalletManager.instance.setProxyJ(proxy)
org.monfluo.wallet.model.WalletManager.instance.setDaemonAddressJ(daemonAddress)
walletRef.get()?.let { wallet ->
Timber.i("Re-initializing wallet with daemon address = $daemonAddress, daemon username = $daemonUsername, daemon password = ${"*".repeat(daemonPassword.length)}, proxy = $proxy")
wallet.initJ(daemonAddress, 0, daemonUsername, daemonPassword, proxy)
@ -208,7 +205,7 @@ class WalletService : Service(), WalletListener, DefaultLifecycleObserver {
}
private fun handleFetchDaemonHeight() {
val newHeight = WalletManager.instance.getBlockchainHeight()
val newHeight = org.monfluo.wallet.model.WalletManager.instance.getBlockchainHeight()
if (newHeight > 0) {
daemonHeight.set(newHeight)
}
@ -268,7 +265,7 @@ class WalletService : Service(), WalletListener, DefaultLifecycleObserver {
}
private fun handleSetProxy(value: String) {
val success = WalletManager.instance.setProxyJ(value)
val success = org.monfluo.wallet.model.WalletManager.instance.setProxyJ(value)
// we assume that if setting proxy for daemon was successful,
// then setting proxy for wallet must have been successful as well
walletRef.get()?.setProxy(value)

View File

@ -1,9 +1,7 @@
package net.mynero.wallet.util
package org.monfluo.wallet.util
object Constants {
// TODO: change this when new wallet name is decided
// Also change native filenames
const val PREFERENCES_KEY = "mysu"
const val PREFERENCES_KEY = "monfluo"
const val DEFAULT_WALLET_NAME = "xmr_wallet"
const val MNEMONIC_LANGUAGE = "English"
@ -30,6 +28,5 @@ object Constants {
const val EXTRA_SEND_ENOTES = "send_enotes"
// Donation address is also specified in strings.xml, it is used as a tooltip in address fields
const val DONATE_ADDRESS =
"87BqQYkugEzh6Tuyotm2uc3DzJzKM6MuZaC161e6u1TsQxxPmXVPHpdNRyK47JY4d1hhbe25YVz4e9vTXCLDxvHkRXEAeBC"
const val DONATE_ADDRESS = "48KqWkaWd8KcJKkakWfknJEo16scc8YkycfKpb8JYchiKJfukY1ompX9eQ9n3CfEBU1ADGj3P5FLAb731J2UghQt142LwHQ"
}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.util
package org.monfluo.wallet.util
import java.text.ParseException
import java.text.SimpleDateFormat

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.util
package org.monfluo.wallet.util
import androidx.appcompat.app.AppCompatDelegate

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.util
package org.monfluo.wallet.util
import android.Manifest
import android.app.Activity
@ -22,7 +22,6 @@ import android.content.ClipData
import android.content.ClipDescription
import android.content.ClipboardManager
import android.content.Context
import android.content.SharedPreferences
import android.content.pm.PackageManager
import android.graphics.Bitmap
import android.graphics.BitmapFactory
@ -37,8 +36,7 @@ import android.view.inputmethod.InputMethodManager
import android.widget.Toast
import androidx.activity.result.ActivityResultLauncher
import androidx.core.content.ContextCompat
import net.mynero.wallet.R
import timber.log.Timber
import org.monfluo.wallet.R
import java.io.File
import java.io.IOException
import java.io.InputStreamReader

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.util
package org.monfluo.wallet.util
import android.annotation.SuppressLint
import androidx.appcompat.app.AppCompatDelegate

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.util
package org.monfluo.wallet.util
object OnionHelper {
fun isOnionHost(hostname: String): Boolean {

View File

@ -1,8 +1,8 @@
package net.mynero.wallet.util
package org.monfluo.wallet.util
import android.content.Context
import android.content.SharedPreferences
import net.mynero.wallet.data.Node
import org.monfluo.wallet.data.Node
import org.json.JSONArray
import org.json.JSONObject
import timber.log.Timber

View File

@ -1,4 +1,4 @@
package net.mynero.wallet.util
package org.monfluo.wallet.util
import android.graphics.Bitmap
import com.google.zxing.BarcodeFormat

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.util
package org.monfluo.wallet.util
import java.text.ParseException
import java.text.SimpleDateFormat

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.mynero.wallet.util
package org.monfluo.wallet.util
import android.app.Activity
import android.content.Context
@ -21,7 +21,7 @@ import android.graphics.Color
import android.preference.PreferenceManager
import android.util.TypedValue
import androidx.annotation.ColorInt
import net.mynero.wallet.R
import org.monfluo.wallet.R
object ThemeHelper {
fun getThemedResourceId(ctx: Context, attrId: Int): Int {

View File

@ -1,4 +1,4 @@
package net.mynero.wallet.util
package org.monfluo.wallet.util
import android.os.Parcel
import android.os.Parcelable

View File

@ -1,8 +1,8 @@
package net.mynero.wallet.util
package org.monfluo.wallet.util
import net.mynero.wallet.model.NetworkType
import net.mynero.wallet.model.Wallet.Companion.getPaymentIdFromAddress
import net.mynero.wallet.model.Wallet.Companion.isAddressValid
import org.monfluo.wallet.model.NetworkType
import org.monfluo.wallet.model.Wallet.Companion.getPaymentIdFromAddress
import org.monfluo.wallet.model.Wallet.Companion.isAddressValid
class UriData(val address: String, val params: HashMap<String, String>) {

View File

@ -1,4 +1,4 @@
package net.mynero.wallet.util.acitivity
package org.monfluo.wallet.util.acitivity
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity

View File

@ -1,12 +1,12 @@
package net.mynero.wallet.util.acitivity
package org.monfluo.wallet.util.acitivity
import android.content.ComponentName
import android.content.Intent
import android.content.ServiceConnection
import android.os.Bundle
import android.os.IBinder
import net.mynero.wallet.service.wallet.WalletService
import net.mynero.wallet.service.wallet.WalletServiceObserver
import org.monfluo.wallet.service.wallet.WalletService
import org.monfluo.wallet.service.wallet.WalletServiceObserver
import timber.log.Timber
abstract class MoneroActivity : LoggingActivity(), WalletServiceObserver {

View File

@ -1,16 +1,16 @@
package net.mynero.wallet.util.acitivity
package org.monfluo.wallet.util.acitivity
import android.content.ComponentName
import android.content.Intent
import android.content.ServiceConnection
import android.os.IBinder
import net.mynero.wallet.HomeActivity
import net.mynero.wallet.SendActivity
import net.mynero.wallet.data.DefaultNode
import net.mynero.wallet.service.wallet.WalletService
import net.mynero.wallet.util.Constants
import net.mynero.wallet.util.PreferenceUtils
import net.mynero.wallet.util.UriData
import org.monfluo.wallet.HomeActivity
import org.monfluo.wallet.SendActivity
import org.monfluo.wallet.data.DefaultNode
import org.monfluo.wallet.service.wallet.WalletService
import org.monfluo.wallet.util.Constants
import org.monfluo.wallet.util.PreferenceUtils
import org.monfluo.wallet.util.UriData
import timber.log.Timber
open class WalletOpeningActivity : LoggingActivity() {

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="net.mynero.wallet.EnotesActivity">
tools:context="org.monfluo.wallet.EnotesActivity">
<TextView
android:id="@+id/view_utxos_textview"

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="net.mynero.wallet.HomeActivity">
tools:context="org.monfluo.wallet.HomeActivity">
<TextView
android:id="@+id/wallet_and_account_textview"

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="net.mynero.wallet.OnboardingActivity">
tools:context="org.monfluo.wallet.OnboardingActivity">
<ScrollView
android:layout_width="match_parent"

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="net.mynero.wallet.PasswordActivity">
tools:context="org.monfluo.wallet.PasswordActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"

View File

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="24dp"
tools:context="net.mynero.wallet.ReceiveActivity">
tools:context="org.monfluo.wallet.ReceiveActivity">
<TextView
android:id="@+id/recv_monero_textview"

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="net.mynero.wallet.SendActivity">
tools:context="org.monfluo.wallet.SendActivity">
<TextView
android:id="@+id/send_monero_textview"

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="net.mynero.wallet.SettingsActivity">
tools:context="org.monfluo.wallet.SettingsActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"

View File

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="24dp"
tools:context="net.mynero.wallet.TransactionActivity">
tools:context="org.monfluo.wallet.TransactionActivity">
<TextView
android:id="@+id/transaction_action_textview"

View File

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="24dp"
tools:context="net.mynero.wallet.ReceiveActivity">
tools:context="org.monfluo.wallet.ReceiveActivity">
<Button
@ -27,7 +27,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:text="Mysu"
android:text="@string/app_name"
android:textAlignment="center"
android:textSize="32sp"
android:textStyle="bold"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE resources [<!ENTITY nbsp "&#160;">]>
<resources xmlns:tools="http://schemas.android.com/tools" tools:locale="en">
<string name="app_name" translatable="false">Mysu</string>
<string name="app_name" translatable="false">Monfluo</string>
<string name="bad_password">Incorrect passphrase!</string>
@ -40,7 +40,7 @@
<string name="add_account">Add account</string>
<string name="tor_switch_label">SOCKS Proxy</string>
<string name="connection_failed">Failed to connect. Retrying…</string>
<string name="address">87BqQYkugEzh6Tuyotm2uc3DzJzKM6MuZaC161e6u1TsQxxPmXVPHpdNRyK47JY4d1hhbe25YVz4e9vTXCLDxvHkRXEAeBC</string>
<string name="address">48KqWkaWd8KcJKkakWfknJEo16scc8YkycfKpb8JYchiKJfukY1ompX9eQ9n3CfEBU1ADGj3P5FLAb731J2UghQt142LwHQ</string>
<string name="amount">0.00</string>
<string name="sending_all">SENDING ALL</string>
<string name="send">Send</string>
@ -127,11 +127,10 @@
<string name="wallet_restore_height_label">Restore height</string>
<string name="use_password_as_seed_offset">Use passphrase as seed offset</string>
<string name="trusted_daemon">Trusted daemon</string>
<string name="use_bundled_tor">Let Mysu start and manage a Tor daemon</string>
<string name="subbaddress_info_subtitle" translatable="false">#%1$d: %2$s</string>
<string name="all_addresses">All addresses</string>
<string name="donate_label">Donate to Mysu</string>
<string name="donating_label">Donating to Mysu. Thank you!</string>
<string name="donate_label">Donate to Monfluo</string>
<string name="donating_label">Donating to Monfluo. Thank you!</string>
<string name="transactions">Transactions</string>
<string name="auth">[ auth ]</string>
<string name="trusted">[ trusted ]</string>
@ -150,8 +149,8 @@
<string name="scan_qr_code_for_address_field">Scan QR code for address field</string>
<string name="copy_transaction_hash">Copy transaction hash</string>
<string name="copy_transaction_addr">Copy transaction address</string>
<string name="seed_desc_polyseed">16 words instead of 25; just as secure, but not supported in as many wallets right now. In Mysu, seed passphrase is enforced for these wallets.</string>
<string name="seed_desc_legacy">Older, 25 word seed; supported in all Monero wallets. In Mysu, seed passphrase is not enforced for these wallets.</string>
<string name="seed_desc_polyseed">16 words instead of 25; just as secure, but not supported in as many wallets right now. In Monfluo, seed passphrase is enforced for these wallets.</string>
<string name="seed_desc_legacy">Older, 25 word seed; supported in all Monero wallets. In Monfluo, seed passphrase is not enforced for these wallets.</string>
<string name="approve_the_transaction">Send transaction</string>
<string name="paste_clipboard_into_passphrase_field">Paste clipboard into passphrase field</string>
<string name="slide_to_send_transaction">Slide to send transaction</string>

View File

@ -25,5 +25,5 @@ tasks.register('clean', Delete) {
}
ext {
apkName = 'mynero'
apkName = 'monfluo'
}

View File

@ -10,6 +10,6 @@
## Building:
1. Clone mysu repo including submodules: `git clone --recurse-submodules https://codeberg.org/anoncontributorxmr/mysu.git`
1. Clone Monfluo repo including submodules: `git clone --recurse-submodules https://codeberg.org/anoncontributorxmr/monfluo.git`
2. Run `make` in `external-libs` directory