Questions tagged [bitcoinj]

A Java library for processing Bitcoin, stores blockchain headers only

67 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
506 views

Test Network Genesis Block

I am using BitcoinJ for my java application which fetches the test network's genesis block. I referred to the basics mentioned at JavaWorld and BitcoinJ's Google Code wiki. I am able to get it ...
4
votes
1answer
327 views

Which RPC may I use to query bitcoind for raw transactions coming through?

I need to capture and store the raw transactions coming through my local full-node bitcoin instance. I read here that it is possible, but there is no mention of the particular RPC calls. I also see ...
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 ...
3
votes
4answers
929 views

How to set fee in bitcoinj

Is any possible way to set fee to specific value in bitcoinj wallet? Right now I have something like this and I don't know when to set fee: Address address = Address.fromBase58(params, ...
3
votes
0answers
478 views

Creation of P2SH MultiSig Input Script

In the createP2SHMultiSigInputScript() function of BitcoinJ according to this: public static Script createP2SHMultiSigInputScript(@NullableList signatures,Script multisigProgram) Create a program ...
3
votes
0answers
136 views

Does a bitcoinj SPV node forward transactions for itself?

The bitcoinj library offers a rather convenient WalletAppKit class, which I'd like to accept payments from customers. In order to facilitate the payments I'd offer the customers to send the ...
2
votes
0answers
237 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
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
121 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
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
327 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
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");...
2
votes
1answer
557 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
186 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
0answers
31 views

What to pass in Transaction Input using Bitcoinj library

URGENT - Need help with setting up Transaction Input and Output objects Transaction rawTransaction = new Transaction(params); txnAmount = Coin.valueOf(50000000); rawTransaction.addOutput(txnAmount, ...
1
vote
0answers
46 views

Bitcoinj Spend from a address directly without wallet

I am stuck trying to send coins from arbitary privateKey in bitcoinj. How can I make the following function work without using the Kit or Wallet classes? @Override public String transferCoin( ECKey ...
1
vote
0answers
41 views

Send funds from a specific address with bitcoinj

I have two addresses in my wallet. I use one of them as a buffer and clients can receive money only from that address. How can I send money from a specific address?
1
vote
1answer
41 views

Trying to run the Main file of the wallet template from bitcoinj but JavaFX not found

Trying to run the Main file of the wallet template from bitcoinj but JavaFX not found. When I run the main file of the wallettemplate I get multiple errors of javafx packages not found. When I try to ...
1
vote
0answers
155 views

how to create unsigned transaction by hot wallet which is retrieved from watchingKey

via Bitcoinj , i am trying to create hot wallet as front used to get balance , create unsigned transaction (corresponding , i have cold wallet forever be offline used to sign transaction only) My ...
1
vote
1answer
479 views

can i use one Mnemonic Code to create both(TestNet and MainNet) wallets

currently i am using bitcoinj library to create wallet for both Main-net and Test-net using Mnemonic code(Mnemonic Code is different for both), my question is can i create both Wallets(Test-net and ...
1
vote
1answer
257 views

Is there anything I can do to speed up the synchronization of litecoinj?

I am using litecoinj which is forked from bitcoinj but compared to bitcoinj, the wallet creation and block synching is slow when using litecoinj. So, I searched for a solution and found a post that ...
1
vote
0answers
38 views

Get filtered block for a given transaction using bitcoinj

I am currently working with bitcoinj to interact with bitcoin node. I am trying to obtain a filtered block for a given transaction or public key. Is it possible?
1
vote
0answers
108 views

Bitcoinj stuck after chain split

I am using LevelDBFullPrunedBlockStore as a BlockChain. once in every 2-3 chainsplit in the network my bitcoinJ node stops to download new block. The scenario is always the same 1)My node get block ...
1
vote
0answers
326 views

Decrypting BitcoinJ/MultiBit key (scrypt/aes-256) from protobuf with NodeJS

I'm trying to decrypt an encrypted private key from an encrypted Multibit Classic .wallet file but the resulting public key / wif doesn't match the original. Here is my code: 'use strict' var fs = ...
1
vote
0answers
28 views

Java bitcoinj: equals override for LazyECPoint, how should it be done?

In a drive to improve performance, the bitcoinj library defines the class LazyECPoint whose instances are ECPoint which may not have yet been initialized. Hence because an ECPoint (say point) is ...
1
vote
0answers
83 views

Java bitcoinj: semantics of 'decompress' on encrypted key

Calling the decompress method on an encrypted ECKey object yields an ECKey object which has no private key (only public). I personally would have expected to get the same encrypted key in uncompressed ...
1
vote
0answers
60 views

Reorganize chain

BitcoinJ: Is is possible to get somehow transactions from ReorganizeListener in block chain? I'm able to get list of new blocks which are represented by StoredBlock but from StoredBlock I can't get ...
1
vote
0answers
403 views

Can I quickly check the cofactor of secp256k1 is 1

I was wondering if there was a quick way to check that the group underlying the elliptic curve secp256k1 was indeed cyclic with the usual point G a generator. I am given the prime number underlying ...
1
vote
0answers
135 views

BitcoinJ - Master Key from 12 word

Is there any posibilities to: 1. Create deterministic seed from 12 or 24 word 2. Create Private Master key from this deterministic seed 3. Create deterministic wallet using private master key in ...
1
vote
0answers
78 views

C++ Proofofworklimit to bitcoinj util.DecodeCompactBits

What is equivalent bitcoinj util.DecodeCompactBits for below c++. Cbignum(~uint256(0) >>32) Cbignum(~uint256(0) >>20) Cbignum(~uint256(0) >>23) Cbignum(~uint256(0) >>22)
1
vote
0answers
59 views

check if transaction is spendable in bitcoinj

Is there some kind of check if incoming transaction is normally spendable by the bitcoinj wallet? I mean to check if there is no time lock and it's not multisig or whatever can prevent receiver from ...
1
vote
0answers
244 views

How can you make bitcoinj not use change addresses?

My question is related to bitcoinj library but not limited by it. bitcoinj will create new change address after every transaction. It will manage them transparently, but let say I want to use this ...
1
vote
0answers
57 views

transaction limits with bitcoinj library

After brief look into bitcoinj library, I found out that wallet class keeps all transactions in one big hash map. That make me think about transaction limits of this library. How many transaction can ...
1
vote
0answers
206 views

How to use MySQLFullPrunedBlockStore with bitcoinj-core-0.13-bundled.jar

Initailly i am using bitcoinj-core-0.12.2.jar and bitcoinj-tools-0.12.2.jar on my project.Now i updated it with bitcoinj-core-0.13-bundled.jar because i am assuming that bitcoinj-core-0.13-bundled is ...
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", "...
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 ...
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(...
1
vote
0answers
220 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
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 ...
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 ...
0
votes
0answers
36 views

Create P2SH address is not same as address saved on rpc node

I have a private key and trying to create P2SH address on testnet like my node created but they're not same. Please help me a bit, thanks so much. PrivateKey: ...
0
votes
0answers
31 views

How to rebuild the balance of a Bitcoin address using bitcoin

As from the title of the question. I'm using these biconij 0.15.2 and following jar libraries: guava 0.28 bcprov-ext-jdk15on slf4j-2.0 and have downloaded all the full node blockchain Bitcoins. I ...
0
votes
0answers
49 views

spend founds from p2wsh address,non-mandatory-script-verify-flag (Signature must be zero for failed CHECK(MULTI)SIG operation) (code 64)

i want spent coin from p2wsh address on btc testnet3 network, i use bitcoinj 0.15.2 build transaction and sign it, use 2/3 multiSig when i send raw transaction by bitcoin core 0.17.0 command line by ...
0
votes
0answers
39 views

Importing the keys Issue

I imported the private keys into my wallet and they appear to be added: This is the result when i run getImportedKeys(): [ECKey{pub HEX=...