Questions tagged [bitcoinj]

A Java library for processing Bitcoin, stores blockchain headers only

Filter by
Sorted by
Tagged with
1
vote
1answer
137 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
397 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
537 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
830 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
203 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
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 ...
1
vote
2answers
449 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
976 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
317 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
557 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 I get ...
1
vote
1answer
125 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
287 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
1answer
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
402 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
69 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
244 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
338 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
359 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
285 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
394 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
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? ...
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
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 ...
1
vote
1answer
18k 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
978 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
53 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 ...
1
vote
0answers
33 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
44 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
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
2answers
45 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
138 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
229 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
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
481 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
260 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
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
0answers
331 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
61 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
409 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
137 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
247 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 ...