7 votes
Accepted

With Mike Hearn quitting Bitcoin, what seems to be the future of bitcoinj?

Hopefully, bitcoinj will now be maintained by other people that based projects on it. From what I've read and the commit list it seems that Andreas Schildbach, who also initiated the Bitcoin Wallet ...
Murch's user avatar
  • 72.8k
7 votes
Accepted

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

This answer does not attempt to sign a transaction, but simply focuses on successfully calling the sign method of the ECKey class, i.e. making your code work. I am not yet familiar with the ...
Sven Williamson's user avatar
6 votes
Accepted

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

Which part / field of the input refers to the hash of the output? The outpoint contains a txid (32 bytes) and vout (4 bytes), which specify the output you're spending. This is not the sending ...
Nick ODell's user avatar
  • 29.3k
5 votes
Accepted

Encoding my Bitcoin Address with Base58 encoding

Yes. ECKey key = ...; String addr = key.toAddress(MainNetParams.get()).toString(); https://bitcoinj.github.io/javadoc/0.12/org/bitcoinj/core/ECKey.html#toAddress-org.bitcoinj.core.NetworkParameters-
Nick ODell's user avatar
  • 29.3k
5 votes

SPV Bloom filter construction, are false positives taken from the blockchain or just due to matching with other addresses

Bloom filters are probabilistic, each attempted match you make with it has a specific chance of being a false positive. The rate of false positives is determined by the construction of the filter (how ...
Claris's user avatar
  • 15.4k
5 votes
Accepted

How are Lightning network, duplex channels, and micropayment channels related?

Both lightning channels and duplex micropayment channels (DMC) are proposals to create bidirectional micropayment channels, that is, micropayment channels that can be used in both directions (a user A ...
cpsola's user avatar
  • 1,598
5 votes

How do I sign and send a raw transaction using BitcoinJ?

I'm not an expert in this field by any means (and my error message was different), but I spent last week trying to make Bitcoinj sign a transaction and send in raw form (i.e. without using transport ...
Oleg Kuznetsov's user avatar
4 votes

How to get senders address with bitcoinj (no duplicate)?

For future reference: In bitcoinJ (java version) the input/output addresses of transactions are located in TransactionInput and TransactionOutput objects. For example: for Transaction tx: List<...
kpurens's user avatar
  • 41
4 votes
Accepted

How to get balance from a specific address in bitcoinj?

I found the solution for this question. I used this class: /** * This class implements a {@link org.bitcoinj.wallet.CoinSelector} which attempts to select all outputs * from a designated address. ...
Ander Acosta's user avatar
4 votes

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

The scriptPubKey contains the public key used to synthesize the public address. Here are two pedantic approaches, not using bitcoinj, applying bx commands to synthesize the public address of interest ...
skaht's user avatar
  • 3,047
4 votes

Problem with full node

From my experience the process of syncing the blockchain is CPU bound, not IO bound (You can check this on Linux by running the top command). bitcoinj has two ways of verifying signatures, either ...
Sven Williamson's user avatar
4 votes
Accepted

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

Testnet uses a different address format than the main network. Testnet addresses start with an "m" or "n". The address you are using starts with a "1" and is therefore for the main network. This is ...
cpsola's user avatar
  • 1,598
4 votes
Accepted

How to develop with the Bitcoin cash?

There is a bitcoinj.cash project currently being put together. The code is not ready for use but should be by next week: https://github.com/bitcoinj-cash/bitcoinj
user3169736's user avatar
4 votes

What is the difference between bitcoin core vs bitcoinj vs bitcoind vs bitcoinqt?

bitcoind, and bitcoin-qt are all part of the same program. Bitcoind and bitcoin-qt are both Bitcoin Core and do the same thing except that bitcoind has no GUI. Both are part of the Bitcoin Core ...
Andrew Chow's user avatar
  • 68.5k
4 votes

convert 12 word seed into 24 word seed

This is not possible. The mnemonic words are an encoding of the entropy used in the seed, essentially. A 12 word seed has less entropy than a 24 word one, so you cannot get 24 words out of it. ...
Raghav Sood's user avatar
  • 16.9k
4 votes
Accepted

How can I determine the address from a private key?

Both "1LoVG.." and the other one are valid legacy (1...) addresses made using the same private key. They are different since one of them uses the compressed public key (you might want to ...
MCCCS's user avatar
  • 10.1k
3 votes
Accepted

Verifing the given R/S pair (signature) against a hash using the public key

I suppose you use the BitCoinJ library. You are not creating a signature the correct way; an ECDSASignature object should be initialized with the ECDSA signature parameters (r,s), not the actual ...
Kostas Kryptos's user avatar
3 votes
Accepted

Transaction with `OP_RETURN` to a particular address

You can't make an OP_RETURN-based output out to any specific address, since the OP_RETURN opcode marks an output as invalid (thus provably unspendable). In fact, an OP_RETURN-based output will not ...
jgm's user avatar
  • 758
3 votes
Accepted

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

Apparently the app shows the amount as Satoshi (the smallest unit) instead of BTC. For internal calculations that's ok because it avoids rounding errors, but for input and output you should scale by ...
Hans-Martin Mosner's user avatar
3 votes
Accepted

Sign transaction with multiple inputs using bitcoinj/peercoinj libraries

Good day! Finally I found a solution, I hope it will useful to someone. The problem was that I tried to sign inputs before adding outputs and other info into transaction. So now I add inputs with ...
Timur Panzhiev's user avatar
3 votes
Accepted

How to verify a signed message by bitcoin core?

The preimage used when signing messages with Bitcoin Core is a combination of the "Magic" phrase: Bitcoin Signed Message:\n and the Message you are signing. However there is one caveat, being you must ...
Septem151's user avatar
  • 657
2 votes

Bitcoinj How to create multi-signature address using bitcoinj

you have an exemple in bitcoinj documentation : https://bitcoinj.github.io/working-with-contracts Let’s see how to do it: // Create a random key. ECKey clientKey = new ECKey(); // We get the other ...
Badr Bellaj's user avatar
  • 1,141
2 votes

Differences between MemoryBlockStore and SPVBlockStore

MemoryBlockStore keeps StoredBlocks in memory and it is used primarily for unit testing. Whereas SPVBlockStore holds a limited number of block headers in a memory mapped ring buffer. With such a ...
m2pathan's user avatar
  • 146
2 votes
Accepted

Decrypt my private key using KeyCrypter

Attempting to implement the interface KeyCrypter is a worthy exercise but it seems to require more than a few simple lines of code. bitcoinj offers one implementation with the class KeyCrypterScrypt ...
Sven Williamson's user avatar
2 votes

how do I get list of all "used" addresses in bitcoinj

This seems to get change addresses: public List<String> getChangeAddresses() { List<String> ret = new ArrayList<>(); int issuedKeys = wallet.getActiveKeyChain()....
Pavel Niedoba's user avatar
2 votes

Get transaction details using bitcoinj library

maybe this helps private void txHistory() { List<Transaction> txx = kit.wallet().getTransactionsByTime(); if (!txx.isEmpty()) { int i ...
Zombie's user avatar
  • 548
2 votes
Accepted

Connect to regnet from my WalletAppKit Android app

If you're connecting to a bitcoind regtest node and you're trying to connect as an RPC client to it via bitcoinj, it's possible. Figure out what your Android's IP address is, say x.y.z.w and use the -...
Alin Tomescu's user avatar
  • 1,337
2 votes
Accepted

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

If all you are after is getting an ECKey object for that private key, then Bitcoinj has a DumpedPrivateKey class for just such an occasion. import org.bitcoinj.core.ECKey; import org.bitcoinj.core....
morsecoder's user avatar
2 votes
Accepted

How can I create a raw transaction in hex format with Bitcoinj?

Don't build the entire parent transaction, just build the outpoint, which is all that is relevant for encoding a transaction to hex. Specifically use this constructor EDIT: More specifically, cannot ...
Chris Stewart's user avatar
2 votes

How to create raw transaction

Sure :) My solution was pretty simple: //String to a private key DumpedPrivateKey dumpedPrivateKey = DumpedPrivateKey.fromBase58(params, privKey); ECKey key = dumpedPrivateKey.getKey(); //...
Dragomirus's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible