Giter VIP home page Giter VIP logo

monero-java's People

Contributors

carvalholeonardo avatar dependabot[bot] avatar erciccione avatar ozgunawesome avatar sylvyrfysh avatar woodser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monero-java's Issues

Authentication (--rpc-login) Not Working

Changes to make in MoneroRpcConnection for it to work:

public Map<String, Object> sendJsonRequest(String method, Object params)

      URI uriObject = URI.create(uri);
      HttpHost targetHost = new HttpHost(uriObject.getHost(), uriObject.getPort());
      AuthCache authCache = new BasicAuthCache();
      DigestScheme digestScheme = new DigestScheme();
      authCache.put(targetHost, digestScheme);
      HttpClientContext context = HttpClientContext.create();
      context.setCredentialsProvider(creds);
      context.setAuthCache(authCache);

...

     HttpResponse resp = client.execute(targetHost, post, context);

Exception in example

I tried to run the following code:

        MoneroWalletRpc walletRpc = new MoneroWalletRpc("xmr-node.cakewallet.com:18081");
        walletRpc.openWallet("name", "pass");
        String primaryAddress = walletRpc.getPrimaryAddress(); 
        BigInteger balance = walletRpc.getBalance();           
        List<MoneroTxWallet> txs = walletRpc.getTxs();         

,And get the following error:

Exception in thread "main" -32601: Method not found
RPC request: 'open_wallet' with params: {"password":"pass","filename":"name"}
	at monero.common.MoneroRpcConnection.validateRpcResponse(MoneroRpcConnection.java:603)
	at monero.common.MoneroRpcConnection.sendJsonRequest(MoneroRpcConnection.java:363)
	at monero.common.MoneroRpcConnection.sendJsonRequest(MoneroRpcConnection.java:305)
	at monero.wallet.MoneroWalletRpc.openWallet(MoneroWalletRpc.java:299)
	at monero.wallet.MoneroWalletRpc.openWallet(MoneroWalletRpc.java:258)
	at org.example.Main.main(Main.java:23)

Build problems

The first problem occurs at the 6th step of the building cpp-lib.
I am getting an error in the picture. If you need a more detailed description, then I will reproduce the error and give details. For some reason, the project is built after deleting the build folder and restarting the build.
image
2)The second problem arises already at the stage of building the Java library itself. I am getting the following error:

[100%] Built target monero-cpp
-- MONERO_CPP:/home/user/Desktop/monero/monero-java/external/monero-cpp:/home/user/Desktop/monero/monero-java/external/monero-cpp
CMake Error at CMakeLists.txt:28 (include_directories):
  include_directories given empty-string as include directory.

Ubuntu 23.04

when rpc wallet is connect console of rpc is throwing errors

console of the monero rpc wallet is throwing these errors randomly
this only when used with monero-java

2022-03-31 04:35:10.942	E !boost::string_ref{sig_str}.starts_with(header_v1) && !boost::string_ref{sig_str}.starts_with(header_v2). THROW EXCEPTION: error::wallet_internal_error
2022-03-31 04:35:30.941	E !boost::string_ref{sig_str}.starts_with(header_v1) && !boost::string_ref{sig_str}.starts_with(header_v2). THROW EXCEPTION: error::wallet_internal_error
2022-03-31 04:35:50.941	E !boost::string_ref{sig_str}.starts_with(header_v1) && !boost::string_ref{sig_str}.starts_with(header_v2). THROW EXCEPTION: error::wallet_internal_error
2022-03-31 04:36:10.941	E !boost::string_ref{sig_str}.starts_with(header_v1) && !boost::string_ref{sig_str}.starts_with(header_v2). THROW EXCEPTION: error::wallet_internal_error
2022-03-31 04:36:30.941	E !boost::string_ref{sig_str}.starts_with(header_v1) && !boost::string_ref{sig_str}.starts_with(header_v2). THROW EXCEPTION: error::wallet_internal_error
2022-03-31 04:36:50.941	E !boost::string_ref{sig_str}.starts_with(header_v1) && !boost::string_ref{sig_str}.starts_with(header_v2). THROW EXCEPTION: error::wallet_internal_error
2022-03-31 04:37:10.942	E !boost::string_ref{sig_str}.starts_with(header_v1) && !boost::string_ref{sig_str}.starts_with(header_v2). THROW EXCEPTION: error::wallet_internal_error
2022-03-31 04:37:30.941	E !boost::string_ref{sig_str}.starts_with(header_v1) && !boost::string_ref{sig_str}.starts_with(header_v2). THROW EXCEPTION: error::wallet_internal_error
2022-03-31 04:37:50.941	E !boost::string_ref{sig_str}.starts_with(header_v1) && !boost::string_ref{sig_str}.starts_with(header_v2). THROW EXCEPTION: error::wallet_internal_error
2022-03-31 04:38:10.941	E !boost::string_ref{sig_str}.starts_with(header_v1) && !boost::string_ref{sig_str}.starts_with(header_v2). THROW EXCEPTION: error::wallet_internal_error
2022-03-31 04:38:30.941	E !boost::string_ref{sig_str}.starts_with(header_v1) && !boost::string_ref{sig_str}.starts_with(header_v2). THROW EXCEPTION: error::wallet_internal_error
2022-03-31 04:38:50.941	E !boost::string_ref{sig_str}.starts_with(header_v1) && !boost::string_ref{sig_str}.starts_with(header_v2). THROW EXCEPTION: error::wallet_internal_error

Build problem

Ubuntu 23.04
`
[100%] Built target monero-cpp
-- The C compiler identification is GNU 12.3.0
-- The CXX compiler identification is GNU 12.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- MONERO_CPP:/home/user/Desktop/lib/monero-java/external/monero-cpp:/home/user/Desktop/lib/monero-java/external/monero-cpp
CMake Error at CMakeLists.txt:28 (include_directories):
include_directories given empty-string as include directory.

-- EXTRA_LIBRARIES:
-- Using Boost include dir at /usr/include
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.8")
-- Using OpenSSL include dir at /usr/include
-- Configuring incomplete, errors occurred!
See also "/home/user/Desktop/lib/monero-java/build/CMakeFiles/CMakeOutput.log".

`

Build issues linking libicuuc.a?

I'm trying to build the project which works fine right up until the end where I get the error:
output.txt

/usr/bin/ld: (.text+0x4b): undefined reference to `icu_74::UnicodeString::UnicodeString(char const*)'
/usr/bin/ld: (.text+0x54): undefined reference to `icu_74::TimeZone::createTimeZone(icu_74::UnicodeString const&)'
/usr/bin/ld: (.text+0x60): undefined reference to `icu_74::UnicodeString::~UnicodeString()'
/usr/bin/ld: /usr/lib/libboost_locale.a(time_zone.o): in function `boost::locale::impl_icu::get_time_zone(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) [clone .cold]':
(.text.unlikely+0x5): undefined reference to `icu_74::UnicodeString::~UnicodeString()'
collect2: error: ld returned 1 exit status
make[3]: *** [src/simplewallet/CMakeFiles/simplewallet.dir/build.make:156: bin/monero-wallet-cli] Error 1
make[2]: *** [CMakeFiles/Makefile2:3328: src/simplewallet/CMakeFiles/simplewallet.dir/all] Error 2
make[1]: *** [Makefile:146: all] Error 2

With many similar icu_74 errors preceeding it.
I built the monero project just fine last time I remember, so wondering if this is an issue on my end or in the CMake files.

Arch Linux x86_64
6.6.10-arch1-1

Monero Wallet RPC: createSubaddress returns same value (on linux)

Hello there,

i am not sure if it's a problem of this library.
First of all, i've tried monero version v0.17.0.1 and v0.17.1.1
Magically, when i call the WalletRPC on a windows machine, i'll retrieve a new value each time i call createSubaddress(accIdx).
Using the same code on a linux machine (ubuntu/debian with openjdk) it returns each time the first address which have been generated through code.

I'm starting the wallet-rpc on both achines as follows

Windows:
monero-wallet-rpc.exe --wallet-dir D:\00_disk_e\coins\monero-wallet\testwallet --rpc-bind-port 4711 --prompt-for-password --rpc-login admin:password

Linux:
./monero-wallet-rpc --wallet-dir /media/shopsrv/42ECF9B9ECF9A777/monero-wallet/testwallet2 --rpc-bind-port 4711 --prompt-for-password --rpc-login admin:password

Of course, the rpc-login is just for testing at the moment.

My call code calls are as follows:

final MoneroWalletRpc walletRpc = new MoneroWalletRpc(url, walletConfig.getWalletConfig().getUsername(), walletConfig.getWalletConfig().getPassword());
walletRpc.openWallet(walletConfig.getWalletConfig().getWUsername(),    
walletConfig.getWalletConfig().getWPassword());
final String primaryAddress = walletRpc.getPrimaryAddress();
final MoneroSubaddress moneroSubaddress = walletRpc.getAddressIndex(primaryAddress);
newMoneroAdress = walletRpc.createSubaddress(moneroSubaddress.getAccountIndex());

all you see at the getters are simple data-objects containing the information and such.
Do you have an idea or hint where there's a difference on two Operating Systems? I strongly suspect the monero implemenations, but i am not sure about this. maybe you have an idea?

Trying to use your library with Windows

Hello thank you very much for this library, i have been able to use it with the rpc, but I want to generate some wallets client side and i followed the instructions for building JNI shared libraries from source, but your commands are for linux. I installed ubuntu and tried with that but I can't get it to work. How could I do it on windows ?

Fee set not working

Hi,
I am sending coin with a custom fee per kb. Below is a log of it. But specified fee not applied.

Request:
"{"method":"transfer","id":"0","jsonrpc":"2.0","params":{"mixin":6,"get_tx_key":true,"payment_id":"15185133731099999704f545bb408bcf4ab1aac2c378bb857a2bdc5bb6340481","destinations":[{"amount":100000000000,"address":"A21zd4EhPcjgW32xZ8RXdmhWA1oZePhMbLaJZTtdAGhL92qDJyLMkqYje7bA11AssMetTDSmqvr1uFH3mRFCsMhoS64dkPF"}],"unlockTime":0,"fee":180000000}}"

Response:
{"id":"0","jsonrpc":"2.0","result":{"amount":100000000000,"fee":941550000,"multisig_txset":"","tx_blob":"","tx_hash":"7a119e7d966a91e6f57fa4f2075d6af9f847c814b7d2ec5c66585d0672075fd2","tx_key":"34f506225427e839767dc805e2c2925f4607d11a24082f5a98742ca51c68fd03","tx_metadata":""}}

What I missed ?

MoneroWalletRpc Get tx not working

Verion: 0.1.3-SNAPSHOT
Java code:

MoneroWalletRpc walletRpc = new MoneroWalletRpc(DOMAIN,USERNAME,PASSWORD);
MoneroTxWallet txWallet = walletRpc.getTx("b390d693542417cb2ab55de60536028104ae1358776db24ae7d84a19d105f101");
System.out.println(txWallet.getPaymentId());

Error Log:

Exception in thread "main" java.lang.AssertionError: value asserted as true but was false
	at common.utils.GenUtils.assertTrue(GenUtils.java:17)
	at monero.wallet.MoneroWalletRpc.convertRpcTxWithTransfer(MoneroWalletRpc.java:1944)
	at monero.wallet.MoneroWalletRpc.getTransfers(MoneroWalletRpc.java:719)
	at monero.wallet.MoneroWalletRpc.getTxs(MoneroWalletRpc.java:581)
	at monero.wallet.MoneroWalletDefault.getTxs(MoneroWalletDefault.java:138)
	at monero.wallet.MoneroWalletDefault.getTx(MoneroWalletDefault.java:129)

Support a MyMonero wallet adapter in addition to RPC and JNI

This issue requests support to manage a Monero wallet using a MyMonero-compatible server, which shares the wallet's view key with a third party in order to offload synchronization of incoming transfers.

The wallet should implement the MoneroWallet.java interface in order to conform with this library's wallet specification and be tested with existing tests.

Compilation error

Hi,

I am trying to compile the code but I getting those errors.
I am using netbeans 9.1 with jdk 1.8.0.66.
Can you please tell me if I am doing something wrong or it is a issue in the code ?

COMPILATION ERROR :

monero/utils/MoneroUtils.java:[185,59] incompatible types: T cannot be converted to int
monero/utils/MoneroUtils.java:[185,71] incompatible types: T cannot be converted to int
monero/utils/MoneroUtils.java:[185,94] incompatible types: T cannot be converted to int
monero/utils/MoneroUtils.java:[185,106] incompatible types: T cannot be converted to int
monero/utils/MoneroUtils.java:[190,57] incompatible types: T cannot be converted to long
monero/utils/MoneroUtils.java:[190,70] incompatible types: T cannot be converted to long
monero/utils/MoneroUtils.java:[190,94] incompatible types: T cannot be converted to long
monero/utils/MoneroUtils.java:[190,107] incompatible types: T cannot be converted to long

BR,
Martin

convert MoneroTx extra to string

I saw this in the todo.txt, wondering if this is still on the radar?
I'd like to complete it, but will need some direction. Not sure what to do with the int array. I thought it was hex, but hex has more than just integers.
Also what are your guys's thoughts on adding a function to add a string to the TX_EXTRA_TAG_PADDING field within tx extra?

Some dependence libraries deprecated on Android

Recently I implement this into an Android device.

I found out some dependence libraries are be deprecated on Android.
That cause this library couldn't work fine unless change dependence libraries.
eg. org.apache.commons.codec.binary.Hex and org.apache.httpcomponents.httpclient

Has any chance to change the dependence?

Embed Dynamic Libraries for Different Operating System [2 XMR]

It's worth investigating how one might build the dynamic library for different platforms and distribute that through Maven. Projects like lmdbjava and native platform all include significant native libraries but this is transparent to Java applications which need only declare dependencies on the Maven artifacts. Ideally, I think, there would be separate projects to build the publish the native library to Maven. Developers could use pre-built artifacts in Maven central or build their own. All these would then get sucked into the classpath by the core monero-java dependency and at runtime, depending on the OS, the right library would be loaded.

Changing the remote wallet.

Hello.

I'm testing an architecture to use in a escrow-like solution, and missed the open_wallet call.

I've forked and created it, is working on an private testnet.
Would you like a pull request for it ?

Regards

Native libraries failing on Windows with `UnsatisfiedLinkError` [2 XMR]

Currently, native libraries are built for Windows, producing these files:

  • libmonero-cpp.dll
  • libmonero-cpp.dll.a
  • libmonero-java.dll
  • libmonero-java.dll.a

However, using the native libraries results in an error when using JNI functions: "UnsatisfiedLinkError".

To reproduce the failure in a test:

  1. On Windows, download Visual Studio Code and install Java extensions.
  2. Import the monero-java project into workspace.
  3. Build or download the Windows native libraries to the ./build folder.
  4. Open TestMoneroUtils.java and click the button to run testGetIntegratedAddresses().
  5. The test should succeed, but instead fails with UnsatisfiedLinkError:

image

Sanity check failed when submitting TX.

Hi, I'm using a view-only wallet to create a transaction then sign it with an offline wallet after importing outputs. I'm intermittently getting this error when broadcasting: transaction was rejected by daemon when using the submitTxs method. When using submitTxHex()it says Sanity check failed. I'm not sure how to prevent this, I'm on the latest node/library version (0.18.1.2). Corresponding logs on the node:

2023-01-19 16:02:56.357 [RPC0] WARNING wallet.wallet2 src/wallet/wallet2.cpp:7043 }

2023-01-19 16:02:56.366 E daemon_send_resp.status != CORE_RPC_STATUS_OK. THROW EXCEPTION: error::tx_rejected

2023-01-19 16:02:56.366 [RPC0] ERROR wallet.wallet2 src/wallet/wallet2.cpp:6527 daemon_send_resp.status != CORE_RPC_STATUS_OK. THROW EXCEPTION: error::tx_rejected

2023-01-19 16:02:56.366 [RPC0] INFO stacktrace src/common/stack_trace.cpp:133 Exception: tools::error::tx_rejected

Also note we only have a few UTXOs available on this wallet. I'm wondering if it's required to import key images to the view only wallet to create the transaction?

Transfer taking more time when RPC to remote node

Hi,
I setup XMR node on my aws machine. Now on local I did ./monero-wallet-rpc to that node.
Now when I try to send some coin from my local wallet, It take more than 8-9 minutes(If I run XMR node on local then do RPC to it then transfer is faster). But in case of "get transfer" its quick.
What can be issue ?

Support building static libraries with shared library wrapper [2 XMR]

This issue requests building monero-java and monero-cpp to static libraries so all dependencies are self-contained, with a shared library wrapper to access libmonero-java in JNI.

For example: libmonero-cpp.a, libmonero-java.a, and libmonero-java.so.

This will allow the libraries to run on Windows without MSYS2 dependency.

The libraries should build on x86_64 and ARM64 for Linux, macOS, and Windows, using proper configuration in CMakeLists.txt.

Failed to run monero-wallet-rpc

Hi,
As per instruction I tried to run below command,
$ sudo ./monero-v0.12.0.0/monero-wallet-rpc --testnet --daemon-address http://node.xmrlab.com:28081 --rpc-bind-port 28082 --wallet-file my-xmr-testnet --rpc-login rpc_user:abc123 --prompt-for-password

But im getting below error,

Monero 'Lithium Luna' (v0.12.0.0-master-release)
Logging to ./monero-wallet-rpc.log
2018-04-24 06:29:18.480     7f7f686ea740  WARN  wallet.rpc  src/wallet/wallet_rpc_server.cpp:2948 Loading wallet...
Wallet password: 
2018-04-24 06:29:22.960     7f7f686ea740  WARN  wallet.wallet2  src/wallet/wallet2.cpp:3718 Loaded wallet keys file, with public address: A21zd4EhPcjgW32xZ8RXdmhWA1oZePhMbLaJZTtdAGhL92qDJyLMkqYje7bA11AssMetTDSmqvr1uFH3mRFCsMhoS64dkPF
2018-04-24 06:29:23.127     7f7f686ea740  ERROR wallet.wallet2  src/wallet/wallet2.cpp:5610 !r. THROW EXCEPTION: error::no_connection_to_daemon
2018-04-24 06:29:23.127     7f7f686ea740  WARN  net.http  src/wallet/wallet_errors.h:794  /DISTRIBUTION-BUILD/src/wallet/wallet2.cpp:5610:N5tools5error23no_connection_to_daemonE: no connection to daemon, request = gettransactions
2018-04-24 06:29:23.129     7f7f686ea740  ERROR wallet.wallet2  src/wallet/wallet2.cpp:3827 Failed to save rings, will try again next time
2018-04-24 06:29:23.267     7f7f686ea740  ERROR wallet.wallet2  src/wallet/wallet2.cpp:1681 !r. THROW EXCEPTION: error::no_connection_to_daemon
2018-04-24 06:29:23.267     7f7f686ea740  WARN  net.http  src/wallet/wallet_errors.h:794  /DISTRIBUTION-BUILD/src/wallet/wallet2.cpp:1681:N5tools5error23no_connection_to_daemonE: no connection to daemon, request = gethashes.bin
2018-04-24 06:29:23.270     7f7f686ea740  ERROR wallet.rpc  src/wallet/wallet_rpc_server.cpp:2990 Wallet initialization failed: no connection to daemon

Implement remaining binary calls in MoneroDaemonRpc.java

The Java client to daemon RPC already supports a number of binary calls. For example, getBlocksByHeight() uses the binary RPC call get_blocks_by_height.bin.

This issue requests support for the remaining binary calls in MoneroDaemonRpc.java. Their implementation should follow the patterns of the already implemented binary calls, but may require additional processing like de-serializing some of the response fields which are also binary.

Last checked, these were the remaining binary calls to be implemented in MoneroDaemonRpc.java. This list was generated from the failures of running TestMoneroDaemonRpc.java as a JUnit test and from the unimplemented methods in MoneroDaemonRpc.java.

  • getBlocksById()
  • getBlockIds() (get_hashes.bin)
  • getTxPoolIds() (get_transaction_pool_hashes.bin)
  • getTxPoolBacklog() (get_txpool_backlog)
  • getOutputs()
  • getOutputDistribution() (response distribution field is binary)

Move todo's here? (Issues section)

I just noticed this repository and I'm astounded by the work done so far - but I noticed the rather odd method of having todo's listed in todo.txt. To help organize workflow, I was curious on the maintainer(s) thoughts on me translating this todo list into a set of issues instead.

Not able to specify exact unspent outputs to use for a transaction.

Hello, I've recently been using the monero-java library and upon creating a transaction using the createTx method I realized we cannot specify our own unspent outputs to spend from. So I'm wondering if there is another way to accomplish this same functionality. I couldn't find anything from poking around the library. Thanks!

windows msys2 构建失败

我该如何解决,没有接触过Cmake
-- Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR)
-- Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR)
-- Protobuf lib: Protobuf_LIBRARY-NOTFOUND, inc: Protobuf_INCLUDE_DIR-NOTFOUND, protoc: Protobuf_PRO
TOC_EXECUTABLE-NOTFOUND
CMake Warning at D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1384 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:2118 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:83 (find_package)

CMake Warning at D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1384 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:2118 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:83 (find_package)

CMake Warning at D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1384 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:2118 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:83 (find_package)

CMake Warning at D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1384 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:2118 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:83 (find_package)

CMake Warning at D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1384 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:2118 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:83 (find_package)

CMake Warning at D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1384 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:2118 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:83 (find_package)

CMake Warning at D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1384 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:2118 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:83 (find_package)

CMake Warning at D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1384 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:2118 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:83 (find_package)

CMake Warning at D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1384 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:2118 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:83 (find_package)

CMake Warning at D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1384 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
D:/msys2/mingw64/share/cmake/Modules/FindBoost.cmake:2118 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:83 (find_package)

-- Using Boost include dir at D:/msys2/mingw64/include
-- Found OpenSSL: C:/Program Files/OpenSSL-Win64/lib/libcrypto.lib (found version "1.1.1s")
-- Using OpenSSL include dir at C:/Program Files/OpenSSL-Win64/include
-- Using libsodium library at D:/msys2/mingw64/lib/libsodium.dll.a
-- Found HIDAPI: D:/msys2/mingw64/lib/libhidapi.dll.a
-- Using HIDAPI include dir at D:/msys2/mingw64/include/hidapi
-- Using monero-project build:D:/msys2/home/yangys/monero-java/external/monero-cpp/external/monero-p
roject/build/release
-- Looking for libunbound
-- Using libunbound: D:/msys2/mingw64/lib/libunbound.dll.a
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Protobuf_INCLUDE_DIR (ADVANCED)
used as include directory in directory D:/msys2/home/yangys/monero-java/external/monero-cpp
used as include directory in directory D:/msys2/home/yangys/monero-java/external/monero-cpp
used as include directory in directory D:/msys2/home/yangys/monero-java/external/monero-cpp
used as include directory in directory D:/msys2/home/yangys/monero-java/external/monero-cpp
used as include directory in directory D:/msys2/home/yangys/monero-java/external/monero-cpp
used as include directory in directory D:/msys2/home/yangys/monero-java/external/monero-cpp
used as include directory in directory D:/msys2/home/yangys/monero-java/external/monero-cpp
used as include directory in directory D:/msys2/home/yangys/monero-java/external/monero-cpp
used as include directory in directory D:/msys2/home/yangys/monero-java/external/monero-cpp
Protobuf_LIBRARY
linked by target "scratchpad" in directory D:/msys2/home/yangys/monero-java/external/monero-cpp
linked by target "sample_code" in directory D:/msys2/home/yangys/monero-java/external/monero-cpp

linked by target "monero-cpp" in directory D:/msys2/home/yangys/monero-java/external/monero-cpp

usb_LIBRARY
linked by target "scratchpad" in directory D:/msys2/home/yangys/monero-java/external/monero-cpp
linked by target "sample_code" in directory D:/msys2/home/yangys/monero-java/external/monero-cpp

linked by target "monero-cpp" in directory D:/msys2/home/yangys/monero-java/external/monero-cpp

CMake Error in CMakeLists.txt:
Found relative path while evaluating include directories of "monero-cpp":

"Protobuf_INCLUDE_DIR-NOTFOUND"

CMake Warning (dev) in CMakeLists.txt:
Policy CMP0111 is not set: An imported target missing its location property
fails during generation. Run "cmake --help-policy CMP0111" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

IMPORTED_IMPLIB not set for imported target "unbound".
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error in CMakeLists.txt:
Found relative path while evaluating include directories of "sample_code":

"Protobuf_INCLUDE_DIR-NOTFOUND"

CMake Error in CMakeLists.txt:
Found relative path while evaluating include directories of "scratchpad":

"Protobuf_INCLUDE_DIR-NOTFOUND"

-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.

Error when I relay a transaction with walletRpc

Sending an unique transaction is fine, but if i try to send a few in a row, if i don't put a TimeUnit.SECONDS.sleep(10) before and after the relay function I get this error: Exception in thread "main" -4: Failed to commit tx. RPC request: 'relay_tx' with params: {"hex":"the transaction hex"}.
in the command prompt i get this multiple lines with this: "2022-04-15 06:56:19.730 E daemon_send_resp.status != CORE_RPC_STATUS_OK. THROW EXCEPTION: error::tx_rejected
2022-04-15 06:56:19.741 E !boost::string_ref{sig_str}.starts_with(header_v1) && !boost::string_ref{sig_str}.starts_with(header_v2). THROW EXCEPTION: error::wallet_internal_error
"

Even with the delay, sometimes randomly the transaction fails and i get this error, it is very random. How should i fix it ?
I also check the fee before relaying the Tx, and to send multiple transactions on Stagenet I also have multiple funded wallets that i switch after there are no more unlocked funds. I use walletRpc.openWallet() and walletRpc.close()

MoneroTxWallet createdTx = walletRpc.createTx(new MoneroTxConfig()
.setAccountIndex(0)
.setAddress("some_address")
.setAmount("some_amount").setRelay(false));

TimeUnit.SECONDS.sleep(10);
walletRpc.relayTx(createdTx);
TimeUnit.SECONDS.sleep(10);

Build universal shared libraries for macOS [2 XMR]

Currently, the .dylib shared libraries built on macOS are platform-dependent, so they need generated for both x86_64 and ARM64.

This issue requests building the libmonero-cpp.dylib and libmonero-java.dylib as universal shared libraries which work on either architecture.

See the build instructions to build the dylibs.

How to monitor receive coins on wallet

Hi,
I am checking this library. I can see service to get a transaction. But is there any service like callback when we receive coins on wallet address?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.