json rpc – windows rpc connect failure

Good afternoon! I am trying to remotely connect via rpc to the windows server where bitcoin core is running

my config

listen=1
maxconnections=15
server=1
daemon=1
rpcuser=rootrr
rpcpassword=1213
rpcallowip=(ip_remote, not local)
rpcport=8332

through the browser of the local server with bitcoin core installed, everything starts, and on the remote connection error with the host, the firewall is disabled

help me, plz =(

bitcoin core – The listunspent rpc / cli command does not appear to list unspent transactions for clock-only addresses

I can't list undeclared transactions for clock-only addresses. As soon as the transaction has received at least 1 confirmation, it will be included in the returned result.

This is the command I am executing (divided into several lines for easy commenting):

bitcoin-cli
   -rpcwallet=*** # redacted wallet name
   listunspent 0 # minconf
   99999 # maxconf
   () # addresses - empty seems to mean all
   true # include_unsafe

Documentation of include_unsafe::

Whether this edition is considered safe. Unconfirmed transactions keys are taken into account from the outside uncertain and are not eligible for Fundraw transaction and Sendto address spending.

This statement makes me think that this is an actual mistake. It is worth noting that for addresses generated from a wallet (not just monitored), unconfirmed transactions are fine …

json rpc – Bitcoin Core 0.19.1 RPC, & # 39; sendtoaddress & # 39; it does not work!

Assume this scenario:

There are 2 wallets mentioned wallet1 and wallet1 on the same node in testnet Blockchain.

wallet1 Balance: 0.001 BTC

wallet2 Balance: 0 BTC

I am trying to send 0.001 BTCs from wallet1 to wallet2;; so I use that sendtoaddress Command as follows:

bitcoin-cli -testnet -rpcwallet=wallet1 sendtoaddress 0.001 "" "" true.

That gives me one txid which none of the blockchain explorers like live.blockcypher.com/btc-testnet cannot recognize!

It pulls out the coin wallet1 and i don't know where to go !?

To solve this, I tried to get the transaction hex to send it over some other platforms to check if the raw transaction is correct and in order. After sending via the other platform, blockchain explorers were able to recognize the transaction ID.

Here is my question:

  1. Don't just use sendtoaddress enough to send coins?
  2. Why is my node not sending?

Here is my bitcoin.conf::

[test]
prune=600
blocksonly=1
maxconnections=15
testnet=1
regtest=0

deprecatedrpc=accounts
deprecatedrpc=addwitnessaddress
deprecatedrpc=signrawtransaction
deprecatedrpc=validateaddress

minrelaytxfee=0.0001
maxmempool=200
maxreceiverbuffer=2500
maxsendbuffer=500
dbcache=16000

rpcbind=0.0.0.0
rpcallowip=--

rpcuser=--
rpcpassword=--

server=1
rest=1
daemon=1

Create, sign and send a transaction with Electrum Wallet RPC

How do I create, sign and send a transaction with Electrum Wallet RPC?

I have experience creating / signing / sending a transaction with Bitcoind Wallet as I only need to use Bitcoind RPC. But with Electrum, I couldn't find the RPC command to do that.

The only thing I want is to send Bitcoin out of the Electrum wallet, but from certain addresses.

rest – API Design (RPC – RESTful)

I am new to API design. I've read numerous threads of RESTful vs RPC patterns for API design, but I feel that none of them addressed my specific use case directly, so I just wanted to get a second opinion.

Suppose I want to create a web app that recommends neighborhoods for living according to two criteria:

  • Your income (i.e. what you can afford to rent)
  • Where your office is located (i.e. commuting times)

I can think of three ways to do this:

  1. RPC: probably the easiest of the three. I define a method on the server called "getNeighbourhoods" that uses the user's income / office location as input, the neighborhoods within the price range (by querying the database) and within the commuting distance (e.g. by calling an external API) determined Determine the travel time between two locations and return a list of the permitted districts with their details. All logic is on the server side. My customer only sends the criteria via POST and receives a list of recommended neighborhoods or a single best neighborhood.
    POST /getNeighbourhoods { office_location: foo, income: bar }
    One problem with this is that it is closely connected to the client and I have to take precautions to send confidential information to the server.
  2. CALM: I define a "neighborhood" resource and make a GET request.
    a) GET /neighbourhoods/ would return all neighborhoods from the database.
    b) GET /neighbourhoods/?office_location=foo&max_cost=bar would filter by the recommended neighborhoods. I would basically apply server-side logic similar to the RPC example based on the query string parameters I get.
    A big problem with this system is that I would be quite concerned about sending this data in the query string, even if it were obscured by something like "max_cost =". What if I have to use more confidential information in the future?
  3. client: The other solution that comes to my mind is to implement two RESTful resources, one of which returns all neighborhoods from the database and the other makes API calls and returns commute times. For example:
    a) GET /neighbourhoods/ Returns neighborhoods from the database.
    b) GET /directions// Calls the external API to get the commute times
    Then I apply the complex logic on the client side and check which neighborhoods returned by the API are within budget and which are within a 30 minute commute.

The final method seems the best since it is the most decoupled. I don't make direct API calls from the client (for example, to make my API key unavailable) and I don't send sensitive user information over the network. Much of the logic, however, is on the client side. Do you see any other disadvantages of this method?

Thank you so much!

json rpc – Get address credit that is not in my wallet

You can use the command bitcoin-cli importaddress to see addresses that your wallet doesn't control. This command generally requires a re-scan of the chain, which may take some time depending on your computing resources.

Note that if you happen to know which blocks contain transactions related to the address in question, you can disable the re-scan when the address is imported and then run a separately rescanblockchain Command to search only the required blocks. That can very Reduce the rescan time.

Here is a dump from bitcoin-cli help importaddress, with Bitcoin core v0.17.0.1.

importaddress "address" ( "label" rescan p2sh )

Adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.

Arguments:
1. "address"          (string, required) The Bitcoin address (or hex-encoded script)
2. "label"            (string, optional, default="") An optional label
3. rescan               (boolean, optional, default=true) Rescan the wallet for transactions
4. p2sh                 (boolean, optional, default=false) Add the P2SH version of the script as well

Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls
may report that the imported address exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.
If you have the full public key, you should call importpubkey instead of this.

Note: If you import a non-standard raw script in hex form, outputs sending to it will be treated
as change, and not show up in many RPCs.

Examples:

Import an address with rescan
> bitcoin-cli importaddress "myaddress"

Import using a label without rescan
> bitcoin-cli importaddress "myaddress" "testing" false

As a JSON-RPC call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importaddress", "params": ("myaddress", "testing", false) }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

How to make a transaction in btc rpc

I was probably asked a lot, but I can't find an answer. I wanted to ask how I can send from btc rpc to another address inside or outside of rpc. I looked at these calls sendtoaddress , createrawtransaction , signrawtransaction and sendrawtransaction and I'm a bit clueless … Also, how do I get the amount of fee I have to pay in the transaction? Many thanks

json rpc – Calculation of the tx fee rate returned by Fundraw transaction

I pass a tx and feeRate parameter to fundrawtransaction, which returns the hex of the signed tx and its fee. I am not passing a conf_target or estimation mode. I pass the resulting hex to the decoderaw transaction to get the size / vsize of the TX.

I am trying to check the actual rate of the signed sender by calculation fee * 1000 / vsize but it doesn't seem to match the rate I passed as a parameter.

I tried a few different values, but the actual rate always seems to be a factor of about 1.59 higher than the requested rate. Give or take a little.

So am I wrongly calculating the observed rate? Is it even possible that the resulting fee rate exactly matches the one provided by the feeRate parameter?