Hot answers tagged

24 votes
Accepted

What Ports Does Monero Use? (RPC, P2P, etc.)

On the daemon side (bitmonerod) P2P Port is the one used to connect with the other nodes on the network (or locally in some cases). RPC port (Remote Procedure Call) is used to let other applications ...
user avatar
  • 3,339
11 votes
Accepted

Why was 0MQ selected to replace the current RPC system?

I cannot speak to all of the pros/cons of using zmq, as it was decided upon before I started work on it. So far, I'd say that if you use it well it gets out of your way, but does all the networking ...
user avatar
9 votes
Accepted

Calculate fee before sending while using RPC calls

Knowing the transaction fee in advance is not possible [1], due to two reasons: the output selection is randomized, so sending, eg, 100 monero several times will potentially need different fees, for ...
user avatar
  • 34.6k
9 votes

What Ports Does Monero Use? (RPC, P2P, etc.)

You can run Monero without an open port but others will not be able to connect to your node in order to help synchronize their nodes. Open port 18080 to allow incoming P2P connections. The RPC port ...
user avatar
  • 4,546
8 votes
Accepted

Can someone give me an example of doing a json-rpc call such as getbalance in java

Ok i managed to do it, here is the code: String curlCode ="./getBalance"; System.out.println(curlCode); ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(...
user avatar
7 votes

Why was 0MQ selected to replace the current RPC system?

In addition to efficiency improvements over the current RPC system, OMQ will enable walletnotify and blocknotify functionality. After OMQ is merged, the new RPC API notification can be made ...
user avatar
  • 4,546
7 votes
Accepted

TLS and authentication for RPC

The dev branch has been canned, and the 0MQ effort is being refactored / partially rewritten by tewinget. Unfortunately the net_skeleton licensing issue isn't one we can work around, as far as we can ...
user avatar
  • 5,079
7 votes

What Ports Does Monero Use? (RPC, P2P, etc.)

The bitmonerod defaults are: Mainnet: P2P: 18080 RPC:18081 Testnet: P2P: 28080 RPC: 28081 The wallet's RPC port has no default. Wallet and daemon may use 53 for DNS, which is optional. It is ...
user avatar
  • 34.6k
7 votes

RPC method to translate key_offsets

The method is get_outs. Here is an example of a query: curl -X POST http://127.0.0.1:18081/get_outs \ -d '{"outputs" : [{"amount":500000000000, "index":154735}]}' \ -H 'Content-Type: ...
user avatar
6 votes
Accepted

How do I use a computer with a wallet to access a headless node at my home?

Yep! That can totally work. We'll call your headless node the Monerodo for simplicities sake (Monerodo = Monero Node). On the Monerodo you want to launch monero with the following flag: monerod --...
user avatar
  • 5,656
6 votes
Accepted

Protecting myself from myself

This isn't available in the wallet software yet, but it is technically possible to set an "unlock_time" on a transaction: How to use unlock_time? The idea being that you could pass a future date in ...
user avatar
  • 1,257
6 votes
Accepted

Difference between --rpc-bind-ip 0.0.0.0, or loopback, or actual IP

This is a basic networking question, not specific to Monero. 0.0.0.0 means "any address" - it will bind to every network interface on the machine. So it will listen to requests from anywhere. Using ...
user avatar
  • 4,203
6 votes
Accepted

How to get the entire block blob for submission after mining nonce

The getbklocktemplate RPC returns a blockhashing_blob and a blocktemplate_blob. You can either try to find a nonce (4 bytes) by mining using the blockhashing_blob, or you can try to find two nonces (...
user avatar
  • 3,304
6 votes
Accepted

How to get network hashrate from monero daemon via RPC?

You can call the getinfo RPC, which contains the two values you want: difficulty (the threshold a hash must meet to be a valid block) and target (the number of seconds the monero network attempts to ...
user avatar
  • 34.6k
5 votes
Accepted

C# simplewallet RPC calls

I think you should have a look at Monero's official Wallet RPC documentation. There's an example for each command. Update: Those examples use the curl utility to send the HTTP request. The meaning of ...
user avatar
  • 4,489
5 votes
Accepted

As of 0.10.1.0, how do you use monero-wallet-rpc?

If you previously ran simplewallet in CLI mode (or 0.10's monero-wallet-cli in RPC mode) then you would simply transition to using monero-wallet-rpc with the same flags. As always, running the binary ...
user avatar
  • 5,079
5 votes
Accepted

How to extract data from local blockchain

Run a local daemon, and then use the daemon RPC API to query it for blocks: https://getmonero.org/knowledge-base/developer-guides/daemon-rpc
user avatar
  • 8,398
5 votes
Accepted

getbalance json-rpc call just gives one big integer

The "human friendly" amounts have a decimal place at 12 digits, so in this case, 140000000000 atomic units would be 0.140000000000 monero.
user avatar
  • 34.6k
5 votes

How do the new rpc-payment... options for monerod work?

Quoting the relevant commit message: daemon, wallet: new pay for RPC use system Daemons intended for public use can be set up to require payment in the form of hashes in exchange for RPC service. ...
user avatar
  • 17.4k
4 votes

Can't request balance using RPC

Here's the curl command I use: curl -X POST http://127.0.0.1:5000/json_rpc -d '{"jsonrpc":"2.0","method":"getbalance","id":"test"}' -H "Content-Type: application/json" Your JSON seems to be ...
user avatar
  • 1,058
4 votes
Accepted

How to convert curl to http url

The HTTP url is: http://127.0.0.1:18082/json_rpc When you mean with HTTP url, a url that you can type into your browser, than its not possible to achieve the same request with only the HTTP url. ...
user avatar
  • 975
4 votes
Accepted

How do I set the user agent in simplewallet?

To set the user agent, when you are launching simplewallet you want to do something like the following: ./simplewallet --wallet-file <filename> --password <password> --user-agent <user-...
user avatar
4 votes
Accepted

Multiple Users Per Node Via JSON RPC

A "node" is the monerod daemon. It can support arbitrarily many wallets connecting to it concurrently. A wallet generally supports only one user at a time.
user avatar
  • 4,203
4 votes
Accepted

Error when launching (--rpc-bind-ip) monerod with external IP address: Failed to bind server

It looks like you are attempting to bind to your public internet address, which is the address of your router. This will not work, because you need to bind to an IP address that is actually attached ...
user avatar
  • 8,398
4 votes

Which part of the daemon RPC is restricted?

When running monerod with restricted-rpc which of the rpc methods will not be allowed? The following changes occur when Monerod daemon runs in Restricted Mode via restricted-rpc and/or rpc-...
user avatar
  • 1,611
4 votes
Accepted

Where can I find Monero public RPC nodes I can connect to?

Since Monero 0.15.0.0, you can use the public_nodes command in monero-wallet-cli. It will query your daemon, as the list is now shared over the P2P network. This can be used in tandem with the ...
user avatar
  • 34.6k
3 votes
Accepted

Monero RPC over SSL for client and server

Once you have setup the tunnel, it is equivalent to having monerod running in localhost. It is transparent for monero-wallet-cli and monero-wallet-gui. The only difference, that i noticed so far, is ...
user avatar
3 votes

Help me with digest authentication using java

I took a look over here: https://en.wikipedia.org/wiki/Digest_access_authentication and from how I understand it you must do the following Get the nonce and realm from that first message: ...
user avatar
3 votes
Accepted

How to query the memory pool?

monerod has a get_transaction_pool RPC call: curl -X POST http://127.0.0.1:18081/get_transaction_pool -d '{}' -H 'Content-Type: application/json' This will return the current state of the tx pool. ...
user avatar
  • 34.6k
3 votes
Accepted

Wallet RPC API wallet creation

There is no RPC to create an address. If there would be one, it would be one that would also "forget" the current one, so it would have limited usefulness. If you want to have your own code to create ...
user avatar
  • 34.6k

Only top scored, non community-wiki answers of a minimum length are eligible