We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [bitcoinj]

A Java library for processing Bitcoin, stores blockchain headers only

Filter by
Sorted by
Tagged with
5
votes
2answers
476 views

SPV Bloom filter construction, are false positives taken from the blockchain or just due to matching with other addresses

It is my understanding that the false positive addresses generated by an SPV bloom filter do not need to necessarily be on the blockchain (ie. be addresses that have been used already). Is that a ...
4
votes
0answers
458 views

Bitcoinj: How to fix error “You should use Context.propagate() or a ContextPropagatingThreadFactory”

I'm using bitcoinj from a Scala application... and when I start it, I always get the following errors: [error] o.b.c.Context - Performing thread fixup: you are accessing bitcoinj via a thread that ...
1
vote
0answers
543 views

Transaction still pending after 12 hours

About 12 hours ago I sent BTC 0.06304568 to my test wallet... and the transactions is still pending: { "receiveAddress": "1KU9VwJ992UisoAYiPbRdSXDRVUCq4wdW1", "balance": 0, "net": "prod", "...
2
votes
1answer
646 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 ...
1
vote
0answers
221 views

Why I can't see the balance increasing in my wallet?

I wrote this function using bitcoinJ public Wallet getWallet(ECKey ecKey) { Wallet wallet = walletAppKit.wallet(); wallet.importKey(ecKey); wallet.addEventListener(new ...
2
votes
1answer
691 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
920 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
2answers
681 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 ...
3
votes
1answer
924 views

How do I check if an address belongs to my wallet using bitcoinJ?

I'm using bitcoinJ and I want to verify if some of the destination addresses in a transaction belongs to my wallet when I receive a amount of bitcoin. How can I verify it?
1
vote
1answer
242 views

How fast is BitcoinJ for getting UTXOs(/UnspentTXOuts)?

I'm making an app where I need to be able to get unspent TX outs very quickly for addresses I do not know beforehand. Now this is supported by Bitcoins architecture in that you can have a pruned ...
8
votes
2answers
3k views

How to get balance from a specific address in bitcoinj?

I'm trying to get the balance of a specific address in a wallet by using bitcoinj, but I don't know how. Can someone help me? Thanks in advance!!
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). ...
1
vote
1answer
483 views

How to get pending balance in with bitcoinj?

I'm try get pending balance from wallet, but results do not match with pending transactions? Thanks for advice!
2
votes
1answer
925 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. ==...
1
vote
0answers
487 views

How to create HD Wallet using bitcoinj

Married/multi-signature wallets and pluggable signers How to create Hd Wallet using bitcoinj I have tried but not understand i got the error in this wallet.addFollowingAccountKeys(Lists.newArrayList(...
2
votes
0answers
120 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");...
4
votes
2answers
2k views

Bitcoinj How to create multi-signature address using bitcoinj

Can somebody help me with step-by-step list of how to create a multi signature 2-of-3 transaction using bitcoinj api?
4
votes
2answers
384 views

Are public keys and their corresponding hash values both added to a BitcoinJ Bloom filter?

The paper, On the Privacy Provisions of Bloom Filters in Lightweight Bitcoin Clients has this to say about Bloom filters in SPV: ...Indeed, in current implementations of SPV clients [BitcoinJ], ...
4
votes
1answer
196 views

Do all implementation of Deterministic RFC6979-compliant ECDSA signatures generate the same signed transaction given the same data?

So if I were to create the same transaction using bitcoinjs and bitcoinj, the end result of the signed transaction would be the same with both libraries, is that correct?
4
votes
1answer
1k views

Creating a Deterministic Keychain from BIP32 master public key

I'm trying to create a bitcoinj determinstic key chain from a BIP32 master public key. This is the code that I have written so far: val xpub = "...
0
votes
0answers
122 views

Extract all public keys from blockchain [duplicate]

I want to extract all public keys from the blockchain. Those will probably mostly be keys that have been used to sign transactions. How would I do this?
-3
votes
1answer
181 views

How can I mine bitcoin faster? [closed]

I'm curios what kind of PC, I need to mine bitcoins. What OS system, what GPU, CPU, etc... my current specification are: CPU: Xeon e3-1230v3 GPU: GTX 780 RAM: 24gb OS: Windows 8.1(64bits) So what ...
1
vote
1answer
337 views

How do I get the address that received a payment?

I am using BitcoinJ and wondering who user that I should credit, all users have their own receiving addresses. Please post an example also, if you have time. :) Current code: wallet....
2
votes
1answer
560 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 ...
1
vote
1answer
356 views

Can you generate a url from a payment request?

I am writing a java webserver that can use bitcoin as a payment method. Thanks to the helpful advice in this question, I am able to generate payment addresses for various signed up vendors. I am now ...
3
votes
2answers
203 views

Accept payments on someone else's behalf without being able to spend them

TL;DR I wish to store some sort of key in my application for each vendor account that allows for my application to generate a receiving address for clients to make payments to. I am writing some ...
0
votes
1answer
386 views

My altcoin bitcoinj fork is failing when trying to compile an Android wallet

I've been sent a bitcoinj fork which is meant to work for the android wallet I'm building. Unfortunately it seems to be causing a failure when tests are run during the wallet compile. I get the ...
1
vote
1answer
279 views

How to extract the signature of a transaction using bitcoinj

I am trying to extract the signatures from a transaction. What is the best way to do this given a com.google.bitcoin.core.Transaction object I just received from the network?
1
vote
1answer
393 views

How to manually disconnect a peer from peergroup?

Here is my code. params = TestNet3Params.get(); blockStore = new MemoryBlockStore(params); chain = new BlockChain(params, blockStore); chain.addWallet(newwallet); final ...
2
votes
1answer
648 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 ...
0
votes
1answer
207 views

In BitcoinJ, do I need to run downloadBlockChain() again after adding a new key?

I added a Wallet instance to PeerGroup instance and executed downloadBlockChain() method. Now if I add a key(s) to that wallet, do I have to execute downloadBlockChain() again to get a current balance ...
3
votes
1answer
4k views

Sending bitcoins to same address

I am using the BitcoinJ API to create my wallet. When I create a transaction, I provide the change address to which change should be sent. For example: let there be 1 bitcoin at address A; then I ...
1
vote
0answers
221 views

BitcoinJ seems to be calculating balance incorrectly

My application is using bitcoinj-0.11.3. I am using Wallet.getBalance(balanceType) to read wallet balance. For AVAILABLE I get 8.94106037 This is supposed to include all confirmed transactions. For ...
1
vote
1answer
165 views

In BitcoinJ, what is the purpose of Peer?

In BitcoinJ, there is PeerGroup and Peer. I understand there are differences such as one is related to a group of peers while other is related to a single peer. When should I use which construct? ...
2
votes
1answer
904 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 ...
1
vote
1answer
258 views

Key exported from BitcoinJ is different from the key shown by bitcoind

I am quite new to Bitcoin. I am trying to use Bitcoinj with regtest mode. I have created the following application: public class TestBitcoinj { private final static BigInteger ONE = new ...
1
vote
1answer
248 views

How to export bitcoinj wallet

I am working on an app which uses bitcoinj. I want to implement export/import functionality to a standard format which can be shared with as many as possible wallet apps. Is there a standard format ...
1
vote
0answers
194 views

bitcoinj, unknown confidence level

I've got a bitcoin address A with its relative encrypted key K stored in a persistence storage. I am launching bitcoinj through the WalletAppKit class and calling awaitRunning to wait for the ...
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 ...
3
votes
2answers
1k views

How to get senders address with bitcoinj (no duplicate)?

I am using bitcoinj (java implementation). I have read many answers here but none of them answers my question. How to get senders address using bitcoinj? I have transaction variable tx. I can get it'...
2
votes
3answers
628 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 ...
4
votes
1answer
509 views

What is proofOfWorkLimit?

Look at the code below from android bitcoin wallet: proofOfWorkLimit = Utils.decodeCompactBits(0x1d00ffffL); And look at the code from bitcoin qt wallet: static CBigNum bnProofOfWorkLimit(~uint256(...
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?
3
votes
1answer
2k views

Using bitcoinj to discover peers and download the block chain

I'm sorry everyone, I have looked and stared at the API and I'm coming up with nothing. I've got a public static void main (naturally), but have no idea how to: Connect to the network Download the ...
1
vote
0answers
108 views

BitcoinJ without PeerNetwork

I am writing a system which generates wallets on a per user basis. It must be capable to receive and send payments. So I have to keep the private keys encrypted on the system. Generating the ...
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?
2
votes
1answer
262 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 ...
11
votes
6answers
1k views

Accepting Bitcoin payments on my website using bitcoind? Many questions… no apparent answers

I am trying to design a system that lets me accept Bitcoins on my website. I would like to use bitcoind, or bitcoinj. However, I have many questions regarding this setup. FYI, I already read similar ...
0
votes
2answers
444 views

BitcoinJ encrypt message

I came across this in the source code for ECKey.java: "Represents an elliptic curve public and (optionally) private key, usable for digital signatures but not encryption." Why can you not encrypt ...
1
vote
1answer
582 views

BitCoinJ custom transaction

I'm trying to learn a few things about the API. I've managed to send coins on testnet via wallet.sendCoins(Peergroup,Address,BigInteger) so I don't think I have a network problem. Here's what I'm ...