Questions tagged [bitcoinj]

A Java library for processing Bitcoin, stores blockchain headers only

Filter by
Sorted by
Tagged with
4
votes
4answers
1k 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, ...
0
votes
1answer
575 views

BitcoinJ : Balance and Transaction are not showing in wallet after restoring wallet from MnemonicCode

I have created a wallet with the help of WalletAppKit on Android and did some transaction in it. Now what I try to do is, restoring that wallet from mnemonic code (BIP39). It also returns the Wallet ...
2
votes
1answer
610 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 ...
0
votes
1answer
53 views

spend from p2sh with bitcoinj

i am try to spend the coins on a p2sh first, i generate p2sh and send coins to that p2sh ECKey clientKey = new ECKey(); ECKey serverKey = new ECKey(); ECKey thirdPartyKey = new ECKey(); List<...
0
votes
1answer
244 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....
5
votes
1answer
533 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 ...
1
vote
2answers
59 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 ...
0
votes
2answers
452 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?
0
votes
1answer
605 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 ...
0
votes
1answer
228 views

Issue with the BitcoinJ for Litecoin. Which dependency can be used for Litecoin?

I've created a crypto-currency wallet for Bitcoin using BitcoinJ. Now I want to add Litecoin in this wallet. How to implement BitcoinJ dependency for Litecoin? While using BitcoinJ for both Litecoin ...
0
votes
1answer
128 views

Change derive path

I've used bitcoinj wallet and used derive path as below. public static final ImmutableList<ChildNumber> ACCOUNT_ZERO_PATH = ImmutableList.of(ChildNumber.ZERO_HARDENED); But I made changes in ...
1
vote
1answer
538 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 ...
0
votes
1answer
37 views

Error message still returned after transaction was indeed broadcast

I use bitcoinj to create the following method to broadcast a raw transacion in testnet, and I did see on bitcoin explorer that it has been broadcast. But even the transaction has been already ...
1
vote
1answer
267 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
2answers
419 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
0answers
45 views

Bad witness error in P2SH-P2WSH

I've managed to build a P2SH 2-of-3 multisig contract that works, ie I can create addresses, send coins to them, and spend the outputs. Now I'd like to transition that solution to a P2SH-P2WSH, but I'...
0
votes
1answer
149 views

Restore from 24 words seed

I have used bitcoinj for createting wallet. I made some changes and try to generate 24 words seed instead of 12 words seed. When I try to restore from 24 words seed, at that time I am using 3 method ...
0
votes
1answer
449 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 ...
0
votes
2answers
225 views

how to get the sender's address in bitcoinj

I'm trying to modify the simple wallettemplate to get the sender's address in the transaction list. However since TransactionInput.getFromAddress() doesn't exist now and getConnectedOutput()....
0
votes
1answer
30 views

BITCOINJ: how to make my wallet aware again about change of my transaction status after my server restart?

Using bitcoinj, my server created a transaction and it was broadcasted on the blockchain. I can get its history using: walletAppKit.wallet().getTransaction(txHash) It is in Pending state. Then I ...
4
votes
2answers
359 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 ...
0
votes
0answers
12 views

Fail to sign the Segwit Transaction's input in bitcoinj

I want to spend from a segwit address and it has a P2WPH script, I created this transaction just like creating a normal P2PKH transaction, but just changed the address of the input to the segwit ...
1
vote
0answers
26 views

How to sign a 2-of-2 multisig address?

I want to implement 2-of-2 multisig in bitcoinj, and I implement the methods which are used to sign the first time and the second time. But there is a bug that using the same key for the first signing ...
0
votes
1answer
45 views

How can I create the input of raw transaction through the previous UTXO hash and the unspent index in bitcoinj?

I want to create a raw transaction’s input and output, and sign it then broadcast to testnet. Now I know how to create the output, but I want to refer the transaction that I can input the UTXO hash ...
0
votes
1answer
53 views

When downloading the blockchain my application is become unusable, is there an issue with my code or am I using the BitcoinJ library incorrectly?

I am building a Bitcoin wallet with the BitcoinJ Library, after looking at the example of fetching a transaction that they have shown on their github it shows that you need to download the blockchain ...
1
vote
0answers
59 views

Missing input returned from sendrawtransaction on P2SH multisig?

I'm playing around on regtest to build a flow for P2SH multisig. I'm getting "missing inputs" back from the sendrawtransaction RPC call, but I see inputs when I put it in a decoder. They each have a ...
1
vote
2answers
1k views

How to get list of all transactions in bitcoinj wallet?

I configured bitcoinj library so I can connect to network, replay blockchain, create addresses, receive and send bitcoins. I using FullPrunedDatabase as block store. I'm still missing how to find ...
-1
votes
1answer
135 views

Transaction not broadcasting on peer network(Blockchain)

I am using Bitcoinj and doing the transaction and I am getting the TX hash but the hash is not showing in any explorer site SendRequest finalReq = SendRequest.to(toAddress, Coin.parseCoin(ammount)....
1
vote
1answer
146 views

How to verify a signed message in Java?

I want to verify, in Java, a signature produced with bitcoin core's signmessagewithprivkey (equivalent to the verifymessage). I noticed a bitcoinj method similar to the bitcoin core's verifymessage - ...
1
vote
0answers
41 views

How to implement 2/2 multi-signature transactions with bitcoinj

I am using bitcoinj to implement a 2/2 multi-signature transaction. Now I want to use bitcoinj to generate a 2/2 multi-signature address and its corresponding Redeem Script through the public keys of ...
0
votes
0answers
95 views

How to communicate with Bitcoin core 0.17 using bitcoinj for hd wallet creation?

Hi am building one hobby project and i want to perform some operations in my own bitcoin core 0.17 by using bitcoinj lib. so is there any way by which we can use bitcoin-core 0.17,bitcoinj for hd ...
0
votes
1answer
38 views

could'nt run wallettemplate project in bitcoinJ

I just forked bitcoinj and took the wallettemplate folder outside the bitcoinj folder to run it i've followed the steps in "getting started" docs now im stuck in trying to run the wallettemplate i ...
0
votes
0answers
58 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
1answer
427 views

Does exist some library for decode/encode raw transaction?

I want to parse raw transaction into JSON then change some values and encode back to hex. JSON like this: { "addresses": [ "346vcZZ6QV4nr68fybMEuA7qxxQeyKWoPS" ], "block_height": -1, "...
0
votes
0answers
44 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
1answer
111 views

How to sign Bitcoin transactions using JCE?

I need to sign Bitcoin transactions using JCE primitives(no bitcoinj), but my signatures are not considered valid by bitcoinj. I tried to simulate this process. I created a random hash and signed it ...
2
votes
0answers
77 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 ...
2
votes
3answers
928 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
1answer
990 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<...
0
votes
0answers
45 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=...
0
votes
1answer
279 views

Bitcoinj unable to load wallet

So I want to load a wallet and get its balance also sending some funds with the corresponding wallet, here is my code public class DumpWallet { public static void main(String[] args) throws Exception ...
2
votes
2answers
369 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 ...
0
votes
0answers
188 views

How can I generate public address from an xpub key in Java?

I have an xpub key with which I want to generate all addresses which have been used or will be used and then find out the keys which have balance. Here's a sample xpubkey with balance- ...
6
votes
1answer
4k 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 ...
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
117 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 ...
1
vote
1answer
412 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
463 views

Bitcoinj wallet can't receive coins in Testnet3

I have a problem with bitcoinj. I have created a wallet and than trying to send coins to it in Testnet3 using this faucet: https://coinfaucet.eu/en/btc-testnet/ Coins sended, transaction confirmed, ...
1
vote
0answers
51 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 ...
0
votes
1answer
58 views

How to protect bitcoinj wallet?

I am a new BitcoinJ user, I have few questions related about its wallet, can anyone please help: Is there any way to encrypt the .wallet file? will anyone obtain a copy of the file be able to spend ...

1
2 3 4 5