bitcoin core – The target of a particular wallet when sending commands to bitcoind using RPC commands

I am very new to Bitcoin development and use the RPC API.

I have created a wallet with

{
    "method": "createwallet",
    "params": {
        "wallet_name": "/wallets/walletA"
    }
}

Now I want to get information about this wallet. I try to use that getwalletinfo Command.

However, you can not specify the wallet Surname/path when executing this command? You must first "load" the wallet (with loadwallet)?

This is the part that I do not understand. Suppose I made 10 wallets and tried to start one getwalletinfo Command in a multithreaded environment … How can I make sure I target the right wallet? Do I really have to send one? loadwallet Are you requesting to specify the wallet I would like to work on before receiving any information?

What happens if I want to get information about "walletA" for me to walk? loadwallet walletAbut before I can run getwalletinfo to get his information, a loadwallet walletB Request made?

bitcoind – Bitcoin RPC estimates that smartfee ‚Äč‚Äčargument keys are required?

I am trying to connect to Bitcoind for RPC API calls with a PHP RPC wrapper, more specifically EstimatesMartfee.

My question is, do I have to specify the argument keys or just the values?

The following example refers only to the values

public function getSmartFeeEstimate($blocks)
{
    $command = new NbobtcCommandCommand('estimatesmartfee', ($blocks, 'CONSERVATIVE'));
    $response = $this->client->sendCommand($command);
    $contents = $response->getBody()->getContents();

    return $contents;
}

or do I have to enter the keys, for example …

public function getSmartFeeEstimate($blocks)
{
    $command = new NbobtcCommandCommand('estimatesmartfee', ('conf_target' => $blocks, 'estimate_mode' => 'CONSERVATIVE'));
    $response = $this->client->sendCommand($command);
    $contents = $response->getBody()->getContents();

    return $contents;
}

Normally, I would just try each and see what the functions return, but I'm in trial mode, and it gives back the same to both, making me believe it ignores the arguments and just tells me it's not working. ,

{"result":{"errors":("Insufficient data or no feerate found"),"blocks":2},"error":null,"id":null}

Bitcoin Core – Create P2SH address does not match the address stored on the RPC node

I have a private key and I'm trying to create a P2SH address on testnet how my node was created, but they are not identical. Please help me a bit, thank you.

Private key: c5964e19634e473e9c8fed3b149c4d44b6d62d62724035aad3eb911a1495ae27

P2SH Address of 1 Threshold and 1 Pubkey:
2N4GriyLchUgwwCBonzYHgsCHNhYRHW45w7

P2WPKH address: 2NGA8uGdnaQ21phNpVyV5uye5cbUtudxBWh || tb1qld2fzw9gj30wxjamsz73fug62das7cyq0em4mn

Address from the node: 2N8qKVKuR3QAy2cA5fF2QbuCpBGfGCmbUHx

Here's more detail from getaddressinfo:

{
    "result": {
        "address": "2N8qKVKuR3QAy2cA5fF2QbuCpBGfGCmbUHx",
        "scriptPubKey": "a914aafc9f09b99cbb1ba46001ec4868ba4fb32543ca87",
        "ismine": true,
        "solvable": true,
        "desc": "sh(wpkh((a1696bdc/0'/0'/375509')02a7065a210c28d27a591e55ac6be092111349fc4b23927bb4d13c46a683bcfff7))#hrgzj3gs",
        "iswatchonly": false,
        "isscript": true,
        "iswitness": false,
        "script": "witness_v0_keyhash",
        "hex": "00146da71bc5de0c0b59bbf73520df7e7d4048d02594",
        "pubkey": "02a7065a210c28d27a591e55ac6be092111349fc4b23927bb4d13c46a683bcfff7",
        "embedded": {
            "isscript": false,
            "iswitness": true,
            "witness_version": 0,
            "witness_program": "6da71bc5de0c0b59bbf73520df7e7d4048d02594",
            "pubkey": "02a7065a210c28d27a591e55ac6be092111349fc4b23927bb4d13c46a683bcfff7",
            "address": "tb1qdkn3h3w7ps94nwlhx5sd7lnagpydqfv5pyqurf",
            "scriptPubKey": "00146da71bc5de0c0b59bbf73520df7e7d4048d02594"
        },
        "label": "test",
        "ischange": false,
        "timestamp": 1561438016,
        "hdkeypath": "m/0'/0'/375509'",
        "hdseedid": "e2e9dd17501f967b789c28c4be1dbf64897ad8d2",
        "hdmasterfingerprint": "a1696bdc",
        "labels": (
            {
                "name": "test",
                "purpose": "receive"
            }
        )
    },
    "error": null,
    "id": 1
}

json rpc – BIP67 + importmulti + multisig descriptors

I'm trying to set up a Bitcoin Core wallet just for the clock importmulti and a sh(multi(m,xpub1/*,...,xpubn/*)) Remote descriptor, and then use deriveaddresses Get addresses.

Is it somehow possible to import only BIP-67-compliant addresses? With a ranging descriptor, I can not manually order the Multisig script pubkeys from my site, as suggested in this abandoned PR, since my client only touches the xpubs account.

I could manually check and skip addresses until I get ordered pubkeys, but that's really ugly and fragile.

bitcoind – Can not connect to Bitcoin RPC on the DigitalOcean server

I'm using Bitcoind on a DigitalOcean droplet with a public IP address, e.g. 1.1.1.1.

I would like to connect via RPC from another DigitalOcean droplet with a public IP address, e.g. 2.2.2.2.

Ubuntu Linux 18.04 is running on both droplets.

~/.bitcoin/bitcoin.conf at 1.1.1.1:

datadir=/mnt/vol1
disablewallet=1
rpcuser=x
rpcpassword=x
rpcallowip=2.2.2.2/32
server=1

netstat -ln | grep 8332 at 1.1.1.1 gives:

tcp        0      0 127.0.0.1:8332          0.0.0.0:*               LISTEN
tcp6       0      0 ::1:8332                :::*                    LISTEN

RPC commands under 1.1.1.1 like ./bitcoin-cli -rpcuser=x -rpcpassword=x -rpcconnect=localhost -rpcport=8332 getnetworkinfo return normally.

However, on machine 2.2.2.2, if I run ./bitcoin-cli -rpcuser=x -rpcpassword=x -rpcconnect=1.1.1.1 -rpcport=8332 getnetworkinfo I get:

error: Could not connect to the server 1.1.1.1:8332

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.

In Computer 1.1.1.1, the following firewall rules apply in DigitalOcean:

Type        Protocol        Port Range      Sources
SSH         TCP             22              2.2.2.2/32
Custom      TCP             8332            2.2.2.2/32

Note that SSH works correctly in 1.1.1.1 of 2.2.2.2.

sudo iptables -L at 1.1.1.1 there are:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination   

Is something wrong with my configuration or setup?

To run curl -v 1.1.1.1:8332 at 2.2.2.2 returns immediately with:

* Rebuilt URL to: 1.1.1.1:8332/
*   Trying 1.1.1.1...
* connect to 1.1.1.1 port 8332 failed: Connection refused
* Failed to connect to 1.1.1.1 port 8332: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 1.1.1.1 port 8332: Connection refused

which probably shows a firewall problem from what I've read.

Using the Scantxouset method for Bitcoind JSON RPC

BitcoinRPC class from here (Ruby): https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)

btc = BitcoinRPC.new ("http: // rpcuser: rpcpassword@127.0.0.1: 18332")

btc.getaddress => "2NCixvAERq3eDt31jM7eYATGiHdTEcizQkj" THIS FACTORY

arguments = {action: & # 39; start & # 39 ;, scanobjects: ("addr (mfskMRWntcPYdDgTJRJdwzdKiiHJikfvH4)")} .to_json

btc.scantxoutset (arguments) => BitcoinRPC :: JSONRPCError: {"code" => – 8, "message" => "Invalid command"} Does not work …

bitcoin cli – How to use RPC to get the total number of transactions on the network

I'm pretty sure this is not shown by the RPC API.

You could analyze debug.log and search for lines like:

2019-08-20T12:17:58Z UpdateTip: new best=0000000000000000000e6c402b311740e21f79a42ed84ecf69a3ae4fe88ce882 height=590956 version=0x20000000 log2_work=90.9855 tx=446914655 date='2019-08-20T12:17:55Z' progress=1.000000 cache=277.1MiB(321228txo)

From where tx=num Specifies the total number of transactions. I assume that most explorers maintain a separate database of transactions and simply run a query instead of retrieving such data from a node or log.