Questions tagged [bitcoinj]

A Java library for processing Bitcoin, stores blockchain headers only

Filter by
Sorted by
Tagged with
2
votes
2answers
685 views

Even if transaction fee is set to BTC 0.00001, transactions remain unconfirmed

I'm testing an application based on bitcoinj so I've been sending small amounts for days and it worked fine – transaction fees are set by default to BTC 0.00001. As of yesterday, these small ...
2
votes
1answer
660 views

How do we verify the signature on a raw transaction using Bitcoinj?

I managed to create a raw tx using Bitcoinj but not able to figure out how to verify its signatures. Assuming I know the addresses corresponding to the (supposedly) unspent outputs used as inputs to ...
2
votes
2answers
1k views

How to build a bitcoinj checkpoint file

How can I build a bitcoinj checkpoint file like the Bitcoin-wallet checkpoints?
2
votes
1answer
87 views

Handling fees and setting them

Im trying to get the estimation of how much the fees will be when a final amount is decided on. I would say im getting familiar with bitcoinj but not completely with java so im still learning how to ...
2
votes
1answer
519 views

how to create Watching Address from available xPub key

Watch-only wallet can only receive payments but not spend the available coins. I am using bitcoinj (in Java). Can anyone please tell me that How to create watching addresses from available xPub key? ...
2
votes
2answers
342 views

How do I import an Electrum wallet into BitcoinJ?

I'm trying to create a BitcoinJ-based app that watches an existing wallet (created in Electrum) and does things when transactions come through against that wallet. As I understand it, I need to ...
2
votes
1answer
285 views

Get transaction details using bitcoinj library

I am trying to develop an application using bitcoinj library. I want to get the bitcoin transaction details. The details, that I want to extract from a transaction includes the following. 1) Who ...
2
votes
1answer
172 views

Differences between MemoryBlockStore and SPVBlockStore

What are differences between MemoryBlockStore and SPVBlockStore in bitcoinj? Which should be used for downloading the blockchain and why? Can I use same SPVChain format file for all wallets?
2
votes
1answer
909 views

Bitcoinj always gets 0 balance

I am trying to use Bitcoinj for my app. I am using regtest mode. I have a balance of 42 BTC on my account: bitcoin-cli -regtest getbalance mirko3 -> 42.00000000 My code follows: public class ...
2
votes
3answers
636 views

How to check if user sent me the BTC?

I am developing JSP web. User will be redirected to another page only if he sends the certain amount of BTC, is there any listener which could check if money arrived to my wallet from the certain ...
2
votes
1answer
264 views

Why do my futures keep getting cancelled using BitcoinJ?

I am trying to write an application that queries bitcoin nodes for the results of a particular transaction. I am attempting to imitate FetchTransactions.java, one of the examples that comes with ...
2
votes
1answer
570 views

How to get destination address from bitcoinj TransactionOutput?

I believe TransactionOutput represents one of the outputs of a transaction. I have a list of such output objects, and a String that represents my own address. I would like to check that this output ...
2
votes
1answer
677 views

How to create an offline wallet on Android only to sign transaction

I am new to bitcoins, I want to create an offline wallet on Android, to scan transaction QR code from online Desktop wallet, Sign that transaction with private key on my offline wallet. 1 Creating ...
2
votes
3answers
787 views

What is the best way to download a “recent” UTXO set snapshot?

I am using bitcoinj to listen for payments. I need a way to maintain the entire UTXO set in a local database. Can bitcoinj be used to download every block (I think it downloads only recent blocks ...
2
votes
1answer
808 views

How do you create a transaction from a UTXO in BitcoinJ?

Is there a way to construct and send a transaction in BitcoinJ without a wallet? I just want to build my transaction from a utxo and broadcast it.
2
votes
1answer
435 views

How to get fee in a transaction with unconfirmed inputs in bitcoinj?

I am trying to get the fee of incoming transactions in a wallet with bitcoinj. At times it was the commission using Transaction.getFee(), but this was throwing NullPointerException. I got to do a ...
2
votes
1answer
164 views

Bitcoin transactions reserve more coins than needed

I have a JavaWebApp wich uses bitcoinj 0.13.2 for sending bitcoins from a wallet to a particular address in a TimerTask. When the job starts, every minute I send 10000 satoshis to the address. The fee ...
2
votes
1answer
648 views

Bitcoinj: How to get notified when coins are received

I need to know when my local wallet receives coins... but onCoinsReceived is invoked as soon as a transaction on my wallet is visible. How do I get notified when coins have been received and are ...
2
votes
1answer
697 views

How can I get the input addresses of a transaction in Java?

I am trying to obtain the addresses of entry of a transaction when I receive money, but I have not found the way. I have tried to create an address with the bytes obtained by calling TransactionInput....
2
votes
1answer
933 views

How to synchronize with the bitcoin blockchain via bitcoinJ

I'am writing my very first application using bitcoinJ api and I got a bit stuck. Maybe somebody can tell me what I am missing. My practice app wants to write a sample contract in the bitcoin ...
2
votes
1answer
944 views

Connecting to a bitcoind in “-regtest daemon” mode remotely from another node (e.g. BitCoinJ)

Anyone knows how to connect to (or even possible) a remote "-regtest" server? I have managed to setup the -regtest daemon, but still trying to figure out how to connect to it using BitCoinJ client. ==...
2
votes
1answer
3k views

How to find a block containing a transaction using transaction hash only?

Well, the title says it all. I have a transaction hash and I want to find this transaction in the blockchain. I am working with bitcoinj. I am probably missing something very obvious here, but I ...
2
votes
1answer
396 views

Get private-keys from wallet using bitcoinj

I'm using bitcoinj for transferring bitcoin. Now I want to export private key of my wallet. So how can I get the private key from bitcoinj?
2
votes
0answers
238 views

Broadcasting signed transaction from Watching wallet using bitcoinj

I am working with watching wallet and Offline wallet using bitcoinj, I created Watching Wallet using tpub key of Offline Wallet I am receiving payment on watching wallet Fine, now I want to ...
2
votes
0answers
49 views

Broadcast a transaction, issue with Context missing from thread created by BitcoinJ

In this code i receive an already signed transaction in the form of a byte array and i would like to broadcast it to the Bitcoin network. override fun onHandleIntent(intent: Intent?) { org....
2
votes
1answer
768 views

getting balance from my address using bitcoinj [duplicate]

I can get my bitcoin balance from private key but when i tried retrieving from my address its not possible posted below my code can any one tell me what i'm doing wrong public static void main( ...
2
votes
0answers
76 views

Why is my node being flooded with bitcoinj clients from 138.197.0.0/16?

I'm not the only one to have noticed this (discussions on reddit here and here): out of 70 or 80 incoming connections on my bitcoin core full node, about 50 are from just one single network (138.197.0....
2
votes
0answers
139 views

Specific fee in transaction

Is there any possible way to send transaction with specific fee (not fee per kb) from wallet in bitcoinj? Where should I look to find a solution :)? My code: Address address = Address.fromBase58(...
2
votes
0answers
124 views

Java bitcoinj: Failure of getPrivateKeyEncoded or getKey?

I have the feeling something is not right with the method getPrivateKeyEncoded (which returns a DumpedPrivateKey object) of the ECKey class. If I attempt to recover the orginal key from the ...
2
votes
0answers
225 views

Editing bitcoinJ for Android Altcoin App

So there is an altcoin created by another party and i want to edit the bitcoin-wallet app for android so that it connects to the new network. Is it enough to edit core/params/MainNetParams.java in ...
2
votes
1answer
173 views

Not receving Bitcoins to my testnet wallet

I am running the bitcoinj wallettemplate on testnet3. I have this address miAKWcmebJ7TYyZCYUx54djHsatVGdNZA8 , I tried out some websites which sends me testnet coins (Faucet). But I am not receiving ...
2
votes
0answers
93 views

Why does bitcoinj need block headers and how it gets transactions

From log files and database it's obvious, that bitcoinj downloads block headers for whole blockchain history. If I'm not mistaken, it's only 80bytes hash. Why do we need to do this. I understand ...
2
votes
0answers
136 views

Send BTC with attachment using BitcoinJ

is there an example of how using BitcoinJ send BTC with an attachment? Lets say I want to write to blockchain "Vaclav Bilek Born 1991". If I understand it correctly, its just about sending minimum ...
2
votes
0answers
334 views

Creation of <20-byte hash of redeem Script> in a P2SH Transaction

According to this example: Redeem Script: 2 PubKey1 PubKey2 PubKey3 PubKey4 PubKey5 5 OP_CHECKMULTISIG Locking Script: OP_HASH160 <20-byte hash of redeem script> OP_EQUAL Unlocking Script: Sig1 ...
2
votes
0answers
100 views

Problem while trying to set up bitcoinj

I'm fairly new to programming and have only built some basic java applications, so bear with me. I'm trying to run the basic wallet application from the bitcoinj repository (using intellij and maven). ...
2
votes
0answers
123 views

Bitcoinj Multisignature Address

In multisignature address contract, how to set multisigoutput while sending bitcoin back to the client? I tried this, byte[] bytes = Utils.HEX.decode("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");...
2
votes
1answer
569 views

How to sign a transaction using BitcoinJ

I am having problem signing the transaction using BitcoinJ library without the Wallet instance, I only have the Transaction class instance and the ECKey in order to sign the transaction. Is there a ...
2
votes
0answers
188 views

DnsDiscovery vs SeedPeers in bitcoinj

First look in screenshot number one of davlik debug monitor server after running Bitcoin Wallet: http://piccy.info/view3/5090102/7074a1d99a96e67bdbea36a04073c21f/orig/ I suppose, that is normal work ...
2
votes
0answers
248 views

Bitcoin-qt database for BitcoinJ downloadBlockChain()

I am using bitcoinJ to develop a bitcoin based payment module for my project. I have the complete block chain downloaded/in sync with the network on the bitcoin-qt client. Is there a way I can use ...
1
vote
2answers
198 views

What is the difference between transactioninput.getFromAddress() and transactioninput.getConnectedOutput().getAddressFromP2SH(networkparameter))?

I was expecting that, in the case when getFromAddress() returns an address, transactioninput.getConnectedOutput().getAddressFromP2SH(networkparameter)) should return the same address. But, sometimes ...
1
vote
1answer
354 views

What is the difference between bitcoin core vs bitcoinj vs bitcoind vs bitcoinqt?

What is the difference between bitcoin-core vs bitcoinj vs bitcoind vs bitcoin-tx vs bitcoin-cli vs bitcoinqt? There are many github repo with different names around bitcoin. Can someone really help ...
1
vote
1answer
677 views

Problem with full node

I've found serious problem with bitcoinj's fullnode. I started downloading blockchain two days ago with bitcoin-qt and today it's complete. With bitcoinj I started downloading block chain about 4 ...
1
vote
1answer
371 views

Verifing the given R/S pair (signature) against a hash using the public key

According to this function: public boolean verify(Sha256Hash sigHash, ECDSASignature signature) { return ECKey.verify(sigHash.getBytes(), signature, getPubKey()); } I do not understand ...
1
vote
1answer
261 views

bitcoinj java library not decoding input addresses for some transactions

I'm trying to "extract" sender's addresses from OP_RETURN Bitcoin transactions, but my code is not working properly. getWalletAddressOfSender(final Transaction tx) public static Address ...
1
vote
1answer
622 views

How do I sign and send a raw transaction using BitcoinJ?

Transaction transaction = new Transaction(params); // 遍历未花费列表,组装合适的item double sum = 0; String address = null; List<Unspent> unspents = new ArrayList<>(); Map<...
1
vote
1answer
85 views

Does wallet support multi account/user?

Does bitcoinj wallet support multiple accounts/users? It seems BIP44 is not supported and found multiple threads indicating lack of support. Just wanna get a definitely answer. If not yet, any plan ...
1
vote
3answers
1k views

How to get compressed public key with ECKey

Here some java code. What i need to change to get compressed public address in getPublicAddress? import com.google.bitcoin.core.Address; import com.google.bitcoin.core.ECKey; import com.google....
1
vote
1answer
626 views

Decrypt my private key using KeyCrypter

I am trying to decrypt my private key bytes using the KeyCrypter interface. But i do not know how to implement and call the decrypt() function. Initially i encrypt the bytes of my Private Key of my ...
1
vote
2answers
314 views

Does there exist a SPV-client in another language than Java?

The only (active) project I know that implements a full SPV client is BitcoinJ, which is written in Java. Does somebody know if there are any SPV implementations in other languages (like C) too?
1
vote
1answer
91 views

Errors when building/sending multisig transactions

Going by the example here: https://bitcoinj.github.io/working-with-contracts I believe I've done everything correctly. Yet my program fails either to propagate correctly or because of a tx error and ...