Questions tagged [bitcoinj]

A Java library for processing Bitcoin, stores blockchain headers only

Filter by
Sorted by
Tagged with
1
vote
2answers
320 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
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
164 views

Changed address

My address has changed but I'm showing 0.00mbtc. when I lookup the information on Blockchain it confirms 0.00 but then States the address has yet to be used on the network. I'm confused, please help.
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
3answers
701 views

How to derive segwit addresses from an extended public key?

I tried to use the following code: DeterministicKey key = DeterministicKey.deserializeB58(null , "xpub...", MAINNET); DeterministicHierarchy hierarchy = new DeterministicHierarchy(key) ; ...
1
vote
2answers
1k 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 ...
1
vote
1answer
210 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 ...
1
vote
2answers
98 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 ...
1
vote
2answers
479 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?...
1
vote
1answer
995 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 ...
1
vote
1answer
332 views

How long does it take for a SPV to intermittently sync (order of magnitude)?

Say I have a device that is mostly offline, with a SPV on it. Say once in a while (for instance once a week) I go online for about 20 minutes, and make a large number of transactions (which are ...
1
vote
1answer
578 views

Bitcoin mining algorithm - target - Java

Default share difficulty is 1 (big-endian target for difficulty 1 is 0x00000000ffff0000000000000000000000000000000000000000000000000000) How to calculate this? How it look like on Java code? What ...
1
vote
2answers
2k views

how can I hardcode a private key in bitcoinJ - ECKey constructor?

Can someone please explain how to use the following constructor (listed here): ECKey(BigInteger priv, org.spongycastle.math.ec.ECPoint pub) Say my private key is: priv = "L4...5". How do ...
1
vote
1answer
132 views

micropayment channels, n-m addresses, interoperability

I just read bitcoinJ's working with contracts tutorial and I am puzzled as: it seems to me that n-m addresses are implemented in Bitcoinj using plain multisig (as defined in this bit of the developer'...
1
vote
1answer
1k views

How to use the BIP-32 keys

I am trying to built an application that uses the BIP-32. But I am not sure on how to use it. I have a passphrase with which I generate the Derived Private Key and Derived Public Key. If I share my ...
1
vote
1answer
303 views

Connect to regnet from my WalletAppKit Android app

I'm developing a simple app to learn how to use the bitcoinj library. I'm using the WalletAppKit object to simplify the process and I'm following the official documentation. When developing I prefer ...
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
vote
1answer
435 views

ECKey.ECDSASignature creation

I have my ECKey key. In order to create an ECDSASignature object with BitcoinJ, we have to call ECDSASignature mySignature = key.sign(Sha256Hash input). Is the Sha256Hash input my message? Or is it ...
1
vote
1answer
74 views

How is a transaction verified in a micropayment channel?

Let's say Alice opens a micropayment channel with Bob and sends $10 into the multi sig transaction. How do we know that Alice has those $10? Or are we taking the risk of her double spending it?
1
vote
1answer
250 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 ...
1
vote
1answer
348 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....
1
vote
1answer
379 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 ...
1
vote
1answer
302 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
401 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 ...
1
vote
1answer
170 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? ...
1
vote
1answer
261 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
2answers
467 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
593 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 ...
1
vote
1answer
19k views

How to use my own web hosting server to mine a bitcoin? [duplicate]

I have a web hosting with unlimited bandwidth and unlimited disk space, Cpanel and much more. Can anyone guide me. How to mine a bitcoin by using my own web hosting?. Then there is any mining software ...
1
vote
2answers
2k views

Security advise on setting up a gambling Bitcoin site

I have written a Bitcoin gambling site and am planning on the best approach to host it/manage it securely. The site is implemented in Java using the BitcoinJ API and servlets etc are handled via the ...
1
vote
1answer
983 views

How to receive transaction in bitcoinj wallet

I am a real noob with bitcoin and bitcoin. I have a lot of questions and I don't know where to start. Let me try. I have a bitcoin-qt client and I downloaded the chain (took me one day) and now I am ...
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 ...
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
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 ...
1
vote
0answers
34 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
47 views

library for light-weight wallet : btcsuite or BitcoinJ [closed]

Do btcsuite + Neutrino(Lightning-lab) together provide sufficient foundation for light client capable to service onchain transactions (not multisig & not related to Payment Channels)? Or is it ...
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 ...
1
vote
0answers
44 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
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 ...
1
vote
2answers
167 views

Is there any RPC Java library using which I can call lite coin methods? [closed]

In case of bitcoin there is bitcoinj. but in Litecoin what will I use?
1
vote
2answers
266 views

BitcoinJ how to understand receive Address?

I need to receive bitcoins from the customers, and then add to theirs virtual account some credits. I use BitcoinJ wallet and I want to give each customer the unique Address created by walletAppKit....
1
vote
0answers
167 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
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 ...
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 ...
1
vote
0answers
41 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
118 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
354 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
29 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
90 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
63 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 ...