Questions tagged [json-rpc]

This tag should be used for questions relating to the Bitcoin Core/bitcoind JSON-RPC interface.

Filter by
Sorted by
Tagged with
2
votes
1answer
289 views

Bitcoin-cli createrawtransaction with 3 outputs example

Is this possible to do? I am trying to create a transaction with 1 input that will have 3 outputs. I tried: bitcoin-cli createrawtransaction "[{\"txid\":\"...
2
votes
2answers
2k views

Connection Refused

I am running bitcoind in unbuntu 16.04. And a web server running in docker container. When I excuted curl in container bash curl --user user:pass --data-binary '{"jsonrpc":"1.0","method":"...
1
vote
0answers
43 views

In which file node rpc details stored in Insight-api

Bitpay insight api https://github.com/bitpay/insight-api allows blockchain epxlore functionality I cant find the files in which insight-api store the rpc details ?
1
vote
0answers
65 views

How can I set the rpc user credentials in Insight to connect to a custom node?

Bitpay has done brilliant work in creating the bitcore libraries pack. I am stuck trying to find the file in which we can add the rpc user name and password for connecting to a custom node inside the ...
0
votes
0answers
300 views

CPU Miner return Internal Server Error for getblocktemplate request

I was developing an altcoin using bitcoin v 0.17. I am using CPU miner for mining purposes. I started the miner using this command: ./minerd -a sha256d -o http://localhost:19230 -O adreno:adreno@123 -...
0
votes
1answer
127 views

Web wallet making direct RPC calls to bitcoin node

Is it good idea to make direct RPC call's to node computer to generate web wallet addresses here is what i am trying to implement i want to create new web wallet based on bitcoin and want to allow ...
0
votes
1answer
445 views

Please help - Bitcoin Conf file in the wrong directory

I am running a full node using Bitcoin Core GUI on Windows 10. The conf file is in my bitcoin data directory, instead of being in the appdata/roaming folder. But Bitcoin-qt points to it by default and ...
2
votes
1answer
45 views

Does my segwit node only have segwit blocks?

My segwit node makes a gettxout RPC query and checks the scriptPubKey.type is "witness_v0_keyhash" and does things accordingly. To my understanding old nodes have different blocks and if I happened ...
1
vote
2answers
737 views

How to use electrum RPC to get address balance on windows

$ ./electrum-3.2.3.exe --testnet setconfig rpcport 7777 true $ ./electrum-3.2.3.exe --testnet setconfig rpcuser blah true $ ./electrum-3.2.3.exe --testnet setconfig rpcpassword blah true $ ./electrum-...
0
votes
1answer
35 views

In the basic Wallet based in QT, How can i get by RPC the stored addresses and labels?

this question is for you to ask about the QT wallet, in the section to send coins, there is an address window, and it has the list of the stored addresses we save along the time. So using RPC, do you ...
1
vote
1answer
291 views

0.17 Specify Wallet with RPC/curl

In core 0.17 they allow a user to dynamically specify wallets for things like getbalance. So with bitcoin-cli --wallaet='foo' getbalance But I can't actually figure out how to do this with JSON RPC/ ...
1
vote
1answer
35 views

Why is there an addrlocal field in the output of the RPC call getPeerInfo, and how SPVs handle it?

According to the Bitcoin core developer reference, the RPC call getPeerInfo has in its output a field called "addrlocal" which holds our IP from the worldview of the peer. Why is this output there? ...
0
votes
2answers
151 views

How to use “lockunspent” in bitcoin core wallet console?

Try to use the Lockunspend RPC in bitcoin core wallet console. But always get wrong, and google it can't find answer. My input is: lockunspent false "[{"txid":"...
1
vote
1answer
213 views

Fixing “Block not found on disk” rpc error

I have a full node with txindex enabled that I've been trying to use for an electrum server. However, whether I use ElectrumX or Electrs, I hit the same error on initial indexing of "Block not found ...
1
vote
1answer
199 views

How to get staking balance using RPC commands [closed]

I enabled staking on my wallet. I want to know the staking rewards I got. Is there any rpc command exist to get staking reward balance? Thanks
1
vote
1answer
453 views

RPC Command to send from multiple accounts to one account (default - “”) in same wallet

I have small amounts in multiple accounts in the same wallet. I want to send all of them to default account (usually named as ""). Is their any RPC command available for this scenario? Thanks in ...
0
votes
1answer
198 views

RPC command sendfrom is giving Transaction too large error

I made discord bot for fun with tips, soak and rains of altcoin. When I try to send large amount through the same bot. It is giving me "Transaction too large" error. I found the reason here: ...
2
votes
1answer
2k views

How do I interact with Bitcoin Core from NodeJS? [closed]

I am new to the Bitcoin world. I have installed Bitcoin Core on a Windows machine and am running the full node. I want to develop a nodejs app that would be running on the same machine interacting ...
0
votes
1answer
72 views

RPC get free address

Always when i need free address (not labled) i use: getAccountAddress('') And i want to know: Can it give me an already occupied address (by label) I'm worried that I can get an already address in ...
0
votes
1answer
481 views

Bitcoin core RPC FEE

I want to use BitcoinCore for the RPC requests from the site. But I could not find anywhere else how to ask a commission for withdrawal. In the instruction there is only: sendtoaddress: ...
0
votes
1answer
297 views

what is the Difference between ./bitcoind and $ ./bitcoind -daemon?

I was trying to interact with bitcoin network with JSON RPC commands, So I referred to the bitcoin wiki page https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#Java it shows to run the bitcoin using '...
0
votes
1answer
527 views

bitcoin rpc api createrawtransaction with python returns -3: Expected type array, got object

experimenting with JSON RPC API using bitcoinrpc.authproxy for python. so far it works in all instances accept when i try to create a raw transaction. somewhere along the way im passing parameters in ...
0
votes
1answer
32 views

How can I get whole info about tranasaction whose outputs are spent?

I use RPC method getrawtransaction to get whole info about transaction. But if I rigth understood It works only for transaction whose contains at least one unspent output. How can I get whole info ...
0
votes
1answer
78 views

Cryptocurrency: check if transaction is viable masternode output

I'm developing a tool for masternode automization similar to https://gincoin.io . I'm trying to figure out how to decode if transaction is viable for a masternode. From what I know the ...
1
vote
1answer
139 views

Deposit flow, user balances

I am a working on website where people should be able to deposit BTC to thier account balances and then do something with these balances. I figured out that I need deterministic wallet and generate ...
0
votes
1answer
158 views

json-rpc api works locally but getting “Connection Refused” remotely

code: from bitcoinrpc.authproxy import AuthServiceProxy class ProxyService: def getProxy(self) -> AuthServiceProxy: return AuthServiceProxy("http://%s:%s@xx.xx.xx.xx:8332" % ("xx", "...
2
votes
1answer
48 views

Should I keep my RPC credentials private?

I am wondering if there are any security issues with other's knowing my RPC credentials. I'm not familiar with RPC and how it works or anything. Reason I'm asking... I make youtube videos. Right ...
0
votes
1answer
27 views

How to figure out litecoind has finished synching the chain?

I’d like to know what is the latest block number, with bitcoind i’m using the rpc blockchaininfo and can read the inititalblockdownload that tells me if it’s synched, and the block number is also in ...
1
vote
2answers
148 views

Is there any RPC Java library using which I can call lite coin methods? [closed]

In case of bitcoin there is bitcoinj. but in Litecoin what will I use?
0
votes
1answer
162 views

How to Curl into Bitcoin node with Swift?

I am running a full node which accepts incoming connections. Here is my config file: rpcuser=bitcoinrpc rpcpassword=somePassword server=1 rest=1 daemon=1 Here is my swift code to curl to the node: ...
2
votes
1answer
297 views

How to edit the label of an existing address exactly like in bitcoin-qt but instead using RPC calls?

I am trying to edit the label of a bitcoin address in my wallet outside of bitcoin-qt. Currently I only know of 'setaccount' but it results in two addresses after editing one, it assigns a new address ...
1
vote
1answer
305 views

How to create wallet in Electrum programmatically?

I want to create new wallet using Electrum-apis. I have gone through the documentation given here but didn't found any method to create a new wallet or an address. Can someone please clarify how I ...
1
vote
1answer
125 views

Is it required to have an electrum account for electrum api usage?

Is it necessary to have an account on electrum in order to build a custom BTC wallet interface using electrum-apis where user can create multiple wallets, address, send/receive transactions? Or, ...
1
vote
1answer
347 views

Can't connect to rpc.blockchain.info with bitcoin-cli

I'm trying to, given a bitcoin address, retrieve the last X transactions to this address. After researches, I found this to be an interesting solution, as I don't want to download and validate the ...
1
vote
1answer
623 views

Import private key ripple

Is there a way to import private key with rippled? Same as bitcoin core impoertprivkey with RPC calls? Tnx
0
votes
2answers
208 views

How does createrawtransaction get the pubkey hash from the provided address?

The createrawtransaction RPC takes as parameters the source TX ID and the UTXO index (to create the new unsigned input) and the destination address and amount of bitcoins (to create the new output). ...
0
votes
1answer
80 views

How to unset fee rate after setting with RPC `settxfee`

After setting the fee rate with settxfee -- how do I re-allow bitcoind to set the fee automatically again? Or does the settxfee command only apply to the next outgoing transaction?
1
vote
1answer
381 views

Bitcoin RPC returning 401

I am using node-bitcoin-rpc to do some api calls to bitcoind, but I am getting 401 error. I know this simply means unauthorized, but I have no authorization enable in my config file. Howerver I can ...
1
vote
1answer
56 views

Why is the output address a list in RPC/console?

Vout contains a list of addresses, which I noticed to be always with size = 1, if it exists. The following is an example from Bitcoin Testnet: { "value": 0.91840581, "n": 2, "...
1
vote
1answer
409 views

How to specify testnet via curl against json-rpc?

The testnet=1 option can be (not) specified in the bitcoin.conf file (thus causing it to be on mainnet by default), and this can be over-ridden in bitcoin-cli with the -testnet command-line option. ...
2
votes
1answer
262 views

Which approach is better to interract with Bitcoin node : Rpc call or Library?

I think library like BitcoinJ or python-bitcoin does the same (rpc call in the background). If that is true is there any reason behind using such libries in place of rpc call For example: (in case ...
5
votes
2answers
347 views

RPC call to bitcoin node on local machine respond back with code: 401

I am trying RPC request to bitcoind node,using Kotlin. My code looks like import khttp.delete as httpDelete val node_url = "http://rpcusr:rpcpass@127.0.0.1:18443" val json_resp = khttp.post(url = ...
0
votes
1answer
38 views

“comment” and “to” of malleated transactions

I'm using the bitcoin core wallet and trying to build some programs around it. I see that comment and to can be added to transactions locally. If I understand it correctly, both are stored in local ...
1
vote
0answers
32 views

“label” field in the transaction list

Looking at this dev reference guide I found a returned field called label. Is this the same label specified to each key when using importmulti?
0
votes
1answer
241 views

building a multisig transaction using RPC

I´m trying to build a multisig transaction using RPC. Till now my code looks similar to this: At first I get the unspend outputs calling listunspend() With those UTXOs I´ll try to create the ...
1
vote
1answer
519 views

Bitcoind estimatesmartfee

I am trying to get transaction fee for sending all btc to another account. I use estimatesmartfee to get tx fee, I have total btc amount of 0.0195btc, so I pass 0.0195, but I get JSON integer out of ...
2
votes
1answer
150 views

Does running a full node make rpc calls faster?

Hello I am running a pruning node on my VPS, and some of the RPC calls such as get balance take minutes to load. I need to check the balance every time the users access the website. I was wondering if ...
1
vote
1answer
226 views

Bitcoind Cannot assign requested address

I'm trying to run a regtest bitcoind node but I'm always receiving the following error connect() to [2a05:d01c:a35:2902:6e18:7290:ff27:e9aa]:18444 failed: Cannot assign requested address (99) ...
1
vote
2answers
243 views

How to sweep a Bitcoin Core wallet?

I have created an account in a bitcoind wallet which has got some 1.055btc which has to be wiped out to 0.00BTC to another account. so the actual BTC has to be sent is 1.055 - transaction fee. Is ...
0
votes
1answer
246 views

Handling change addresses without using rawtransactions?

Since I'm using the wonderful accounts feature which is soon to be deprecated (shame on me, i know - but i simply didn't have resources and time as a single person to do an internal accounting system ...