Questions tagged [bitcoinj]

Bitcoinj is a Java implementation of the Bitcoin protocol, which allows it to maintain a wallet and send/receive transactions without needing a local copy of Bitcoin Core.

bitcoinj is a implementation of the protocol, which allows it to maintain a wallet and send/receive transactions without needing a local copy of Bitcoin Core. It comes with full documentation and some example apps showing how to use the library.

Features:

  • Connect to the P2P network and download/parse/verify the block chain.
  • Highly optimised lightweight simplified payment verification (SPV) mode. In this mode, only a small part of the block chain is downloaded and verified, making bitcoinj suitable for usage on constrained devices like laptops, smartphones or cheap virtual private servers.
  • SPV wallets can sync with the blockchain in seconds, even from a cold start.
  • Experimental full verification mode, which does the same verification work as Bitcoin Core. In this mode, the unspent transaction output set (UTXO set) is calculated and, thanks to a PostgreSQL store, can be indexed into a database allowing for fast lookup of balance by address.
  • A wallet class with encryption, fee calculation, pluggable coin selection/coin control policies, extensions support and event listeners that let you stay up to date with changes in your balance.
  • Easily implement apps that use Bitcoin's contracts features.
  • Support for micropayment channels that let you set up a multi-signature contract between client and server, and then negotiate over how much value is sent on the channel, allowing rapid and fast micropayments that avoid miner fees.
  • Provides both async and thread-per-connection for network IO, allowing you to choose between scalability and blocking-only features like / proxying.
  • Strong BitcoinStandards support.
  • Command line tool for working with wallet and chain files.
  • Example apps, thorough API documentation and articles explaining the design and layout of the library.

Home Page: https://code.google.com/p/bitcoinj/

GitHub: https://github.com/bitcoinj/bitcoinj

86 questions
0
votes
0 answers

Building old schildbach wallet (android bitcoin-wallet) version on a modern java/maven environment

The problem I'm currently facing is that as far as I understand, for example, the com.google.bitcoin.core package belongs to is the same as the com.google.bitcoinj.core package but this one is not being accessible or understanding that both are the…
RicardoPHP
  • 492
  • 3
  • 10
0
votes
1 answer

Two Android Dependencies have same dependency, and duplicate class Error

I use xrpl-core and bitcoinj libs, and both use bouncycastle version 1.72. I got the above error (screenshot) when building my andriod app. I tried excluding bcprov from the package, but it's still not working. dependencies { implementation…
Mohamadamin
  • 564
  • 5
  • 16
0
votes
1 answer

Get compressed public key and the bitcoin address using only the private key in BitcoinJ

I already know to get the public key from base58 encoded private key using an ECKey object in BitcoinJ. See the example code. String base58PrivateKeyString = "---------------------private key here---------------------"; NetworkParameters params =…
Lakshitha Kanchana
  • 844
  • 2
  • 12
  • 32
0
votes
1 answer

bitcoinj-core failed to parse blockchain

I downloaded bitcoin synchronization: https://bitcoin.org/bin/bitcoin-core-0.21.0/bitcoin-0.21.0-x86_64-linux-gnu.tar.gz In Java I use the newest bitcoinj-core: org.bitcoinj
Hollow.Quincy
  • 547
  • 1
  • 7
  • 14
0
votes
1 answer

Is there a way to get block through the block number(height) using bitcoinj?

I looked up the api document, and I can only find a way to get the block by a block hash. Is there a way to get block through the block number(height) using bitcoinj?
Rung K
  • 23
  • 4
0
votes
2 answers

How to create bitcoin wallet from mnemonics using bitcoinj (walletappkit) in android

I am creating a wallet from mnemonics,for ethereum i have used web3j library for generating mnemonics,address and its private key and now for bitcoin i want to use the same generated mnemonics to generate bitcoin address and its private key for…
kim jot
  • 74
  • 2
  • 12
0
votes
0 answers

What do these elements in Android Build.Gradle (Module:App) do?

I tried to add this BitcoinJ library 'org.bitcoinj:bitcoinj-core:0.15' dependencies but it fail every time I ran it. Then I found a solution from here. I needed to add these elements in the module, which are dataBinding { enabled…
TheKOM
  • 3
  • 2
0
votes
0 answers

missing binaries for apk to install on device

I have looked at this article [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113] But i was unable to get any resolution. right now this is my code. apply plugin: 'com.android.application' android { compileSdkVersion…
Chris
  • 5
  • 4
0
votes
1 answer

Bitcoinj library on android hung on installing APK

I am trying to get a basic running app that would use the bitcoinj library to create a wallet and sync. Very basic. I used bitcoinj library for my desktop application with no problems. When i try to make one for android it hangs on "...Installing…
Chris
  • 5
  • 4
0
votes
0 answers

Trying to send a raw transaction bitoinj

Transaction transaction = new Transaction(params); // 遍历未花费列表,组装合适的item double sum = 0; String address = null; List unspents = new ArrayList<>(); Map keysMap = new HashMap<>(); for (Unspent utxo : unSpentBTCList) { /* …
0
votes
1 answer

Bitcoinj get transactions from blockchain

I am readying the documentation at https://bitcoinj.github.io/working-with-the-wallet and I am not sure what I am missing. Suppose I create a wallet, get its receive address and save wallet using saveToFileStream(OutputStream). Then I send bitcoins…
aiguy
  • 671
  • 5
  • 20
0
votes
1 answer

bitcoinj testnet transaction decode problem

I'm trying to decode testnet transaction using bitcoinj 0.14.7. This is HEX of the transaction I'm trying to…
reaktor_2004
  • 49
  • 1
  • 1
  • 6
0
votes
0 answers

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 and Bitcoin, I was getting blockchain of Bitcoin…
Sid009
  • 421
  • 5
  • 16
0
votes
1 answer

com.android.builder.merge.DuplicateRelativeFileException

When I implement these two dependencies in my project: For BTC implementation 'org.bitcoinj:bitcoinj-core:0.14.7' For BCH implementation 'cash.bitcoinj:bitcoincashj-examples:0.14.5.2' This error will occur: Caused by:…
Sid009
  • 421
  • 5
  • 16
0
votes
1 answer

Bitcoinj send payment from a wallet

I want to make a send payment from my wallet. public static Transaction send(Wallet wallet,String destinationAddress,long satoshis, NetworkParameters parameters) throws Exception { Address dest = Address.fromBase58(parameters,…