Questions tagged [bitcoinj]

A Java library for processing Bitcoin, stores blockchain headers only

Filter by
Sorted by
Tagged with
0
votes
2answers
352 views

Transaction history with bitcoinj

I am new to bitcoinj. I want to print out the list of transactions like as follow for a wallet: 1- Sent 1 BTC to Adress1 on 'A' Time 2- Received 5 BTC from Adress2 on 'B' time 3- Sent 2 BTC to ...
0
votes
1answer
166 views

How to size in bytes for a transaction using BitcoinJ

The calculation of a transaction fee uses fee/kb. So how do I get the size in bytes for a transaction using BitcoinJ? SendRequest req = SendRequest.to(address, value); req.feePerKb = Coin.parseCoin("...
0
votes
1answer
517 views

How can i switch from BIP32 to BIP44 using bitcoinj

i am working on a wallet that is using BIP32 for creating Accounts, addresses, xpub, public keys, transaction and etc. but now i want to switch from BIP32 to BIP 44. how can i do this using bitcoinj i ...
1
vote
1answer
480 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 ...
2
votes
1answer
672 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 ...
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....
0
votes
1answer
134 views

how to convert URI into Bip21

i am trying to convert the URI into BIP21 currently i am generating URI from bitcoinj library, but i want it to be on BIP21 Standard. i have read many articles but didn't found any solution
1
vote
1answer
258 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 ...
0
votes
0answers
48 views

How it is possible to wrap with BitcoinJ a Bitcoin Core RPC interface and drives regtest mode

Despite the fact that I have already create an address in regtest network which has Bitcoins I can not import correctly this address to my BitcoinJ app in order to execute certain functions(OP_CODE tx,...
0
votes
1answer
353 views

Java: bitcoinj; how to download a full block?

I would like to download a full block using Java and bitcoinj and then parse it to an array to be able to work with it. Here is some (very basic) pseudocode: connect to network; download ...
1
vote
2answers
815 views

Is there any way to listen to all transactions using bitcoind api?

I understand that using json-rpc to listen for all transactions is a bad idea due to performance, but bitcoinj is able to do it. In reality bitcoind is parsing all transactions under the hood when it ...
0
votes
2answers
94 views

I have over 130addresses and I have never sent nor received any bitcoin. How is that

How do I know the amount of bitcoins in an address. My addresses are so many and my wallet says that no bitcoins sent. How is this
0
votes
2answers
794 views

Sign transaction with multiple inputs using bitcoinj/peercoinj libraries

Good day for everyone! I have some troubles with adding signed Input to the transaction. Currently, I'm working with altCoin (fork peercoin) currency. I'm trying build the transaction in the ...
0
votes
1answer
629 views

Create an OP_RETURN tx and validate it's existence in Regtest

A part of my MSc thesis is storing the hash of a string with OP_RETURN tx in the Blockchain to exist as a proof. My main concerns are: -how can i send this tx successfully to my regtest network -...
0
votes
1answer
227 views

Hunting missing Bitcoin from Multibit Classic

I've spent days trying tons of things but hope someone can give a bit of direction. So I purchased bitcoins, only a few in 2010, early. Then end of the year I imported them in to Multibit Classic 0.5....
0
votes
1answer
254 views

Which branch of bitcoinj should I sync to?

I am experimenting with Bitcoinj to design a stable node that is synced. Older versions of bitcoinj seem to drop connections and stop syncing. I currently see the following branches (see screenshots)...
2
votes
2answers
336 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 ...
1
vote
1answer
202 views

OP_ADD operation in bitcoin script for integers greater than 128 in java

I want to execute a simple series of instructions to implement a bitcoin script in java using bitcoinj API. All I am looking for is performing arithmetic operations for negative integers or integers ...
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....
3
votes
1answer
1k views

How to develop with the Bitcoin cash?

I have a simple wallet created with the BitcoinJ. I can create the address, track the transactions, check account balance etc with the wallet. I would like to extend the wallet for the Bitcoin cash ...
0
votes
1answer
1k views

HD wallet implementation

I want to create public addresses in offline browser from master public key so that owner of master private can access the funds available in child address. but I am not able to understand how to use ...
0
votes
2answers
287 views

Sync too low when using BitCoinJ to create and host own wallet

I need to use BitcoinJ to create and host wallet on my own website. However, it keeps downloading blocks and the sync seems taking forever. I need to be able to create a wallet within a few seconds. ...
0
votes
1answer
291 views

Getting Hash160 of bitcoin address

How to get hash160 address in string using bitcoinj ,I tried the following code NetworkParameters params = TestNet3Params.get(); String ads = "n1XZMMm3ikh97Mr8JVnnahfugad2DRcVrB"; Address address = ...
1
vote
2answers
96 views

How companies are accepting bitcoin for their products or services?

I am new to the crypto currency world and fascinated by its growth. I looked at some of the companies that accept bitcoins for their products. companies accepting bitcoin Lets say i buy an Xbox from ...
0
votes
2answers
407 views

How to get unspent bitcoins using bitcoinj

I'm trying to get unspent transaction using bitcoinj like here without using api calls. How can I do this?
2
votes
1answer
762 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( ...
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?
0
votes
1answer
349 views

WalletAppKit creates an address every time Bitcoinj gets initialized

I'm implementing an app using BitcoinJ, but every time I run the code, a new address is created. Is there any way to work with the very first address that was created and stop creating new addresses? ...
5
votes
1answer
341 views

Do we have to trust at least one DNS seed?

If I understand correctly, when new bitcoin node wants to join the network, it must be introduced by guiding nodes -- DNS seeds. DNS seeds can thereafter help new node discover more existing nodes. ...
0
votes
1answer
351 views

I'm working to add multiwallet support to Bitcoin Wallet App, but now the balance is no longer updating

I work with a bitcoin wallet app and the UI looks, When I select an address from the dropdown menu and would press the balance or the transaction buttons, they should open in the new page and show ...
0
votes
0answers
104 views

blockChainDownloadLocked ignoring the duplicate request error

I work with a bitcoin wallet app using the Java/BitcoinJ. The app has custom features such as showing balance, transactions, address and sending option. It was running fine and suddenly, I get the ...
0
votes
1answer
77 views

How to get the last executed transaction?

I work with a Wallet app and using the BitcoinJ for programming. I need to find the last executed transaction from the wallet. In the org.bitcoinj.core.Wallet class, I see there is a method ...
0
votes
2answers
346 views

Cannot build circuits because we don't have enough directory information

I'm developing a bitcoin wallet app using BitcoinJ framework. While deploying the app using Tomcat 8, I get the following stack of errors, 12-Jun-2017 14:18:12.511 INFO [PeerGroup Thread] com....
0
votes
1answer
846 views

How to convert Satoshi to BTC in Java?

I get the value of money in Satoshi and I would like to have it in BTC. I develop the app in Java/Maven/JSP and use BitcoinJ for the framework. I use the code, public Coin getBalance() { ...
2
votes
2answers
1k views

The BTC shows 10^8 times more than what is received in the account

I work with Java/Maven/JSP app with BitcoinJ and I have transfer about 0.0048 BTC from a testnet faucet. However, after receiving, I see that my account has balance of 480000.00 BTC. This is the ...
3
votes
1answer
942 views

Why the bitcoin address is not valid in any of the testNet faucet

I develop a simple Java/Maven/JSP app for bitcoin and generated the address 167Bqf3Mi3gnfhw5DhCfoYNTMxqANt3Zky I would like to send some money to this address from a bitcoin testnet faucet. I ...
2
votes
3answers
763 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 ...
1
vote
0answers
109 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
2answers
443 views

bitcoinj get raw block

I'm trying to get the raw blocks with bitcoinj. I use Block.bitcoinSerialize() to get the bytes of each block when it is downloaded, but does not include transactions. How can I get the full raw block?...
0
votes
1answer
244 views

Is there a way to get the address of associated with a transaction input with bitcoinj?

If I was not mistaken, with transactioninput.getConnectedOutput(), the output which is used for the input is obtained. But what to do later? There seem to be two relevant methods: ...
1
vote
2answers
194 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 ...
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....
1
vote
1answer
667 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 ...
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 ...
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 = ...
5
votes
1answer
3k views

How to sign raw transaction given a private key and SHA hash (in java)

I have followed the instructions here to build my own bitcoin transaction. Redeeming a raw transaction step by step example required Currently my code can create a transaction and compute the SHA ...
8
votes
2answers
2k views

How to retrieve the from and to wallet addresses of a transaction?

Given a transaction's inputs and outputs, I'd like to be able to extract the wallet address (or addresses) which sent the transaction, and also the address/addresses that will receive the transaction. ...
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
1answer
973 views

Spending transaction with custom output

I've recently entered the bitcoin arena, and bitcoinj was my tool choice. Experimenting on regression test mode, I was able to create the following custom transaction. It has a modified locking script ...
0
votes
1answer
178 views

Should signature verification by key recovery ignore compression status?

The bitcoinj library's API offers a signMessage method of the ECKey class which returns a signature (r,s) as 65 bytes encoded as a Base64 string. The crunch of the encoding lies in the additional ...