We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [java]

Java is a programming language.

Filter by
Sorted by
Tagged with
12
votes
2answers
4k views

Java library for Bitcoin Client Application

are there Java libraries for Bitcoin available to develop client applications?
7
votes
8answers
6k views

How to communicate between Java and bitcoind?

I am having problems communicating between Java and bitcoind - every JSON RPC library I try has some issues. Can anyone provide a working implementation of even the most basic JSON RPC communication ...
7
votes
3answers
3k views

Can I send message inside the transactions script?

I would like to send transactions with messages as described in the wiki. In Transaction with slightly changed script is never relayed, someone answered that non-standard transactions are not relaid ...
6
votes
1answer
668 views

How do I generate offline transactions in Java?

I'd like to develop a Java binding to the Stratum Overlay Network (a server for thin clients). This requires signing on offline transactions. Can I directly use bitcoinj's API to do this? Can I copy-...
5
votes
2answers
4k views

How do I create an offline transaction in java to broadcast via blockchain.info?

Blockchain.info has a PushTX API. How do I create & sign a raw transaction in Java for use in this API? Should I use bitcoinj? Are there any code samples?
5
votes
1answer
3k 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 ...
5
votes
1answer
2k views

How to run Bitcoinj on Heroku?

Does anyone know where I might find a tutorial on how to deploy a bitcoinj server (essentially a replica of a bitcoind server with an rpc API) on Heroku?
5
votes
1answer
720 views

Load a transaction with bitcoinj

I am developing simple Bitcoin application using the bitcoinj library: The user enters the hash of a transaction and my application should return detailed information about that transaction. How can ...
5
votes
1answer
506 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 ...
4
votes
2answers
2k views

Library for trading on major exchanges

Is there a library which exposes order-book and trading functionality of major exchanges like BTC-e, Bitfinex, Cryptsy etc. ? I know these site have their own API but I wanted to re-use the code, if ...
4
votes
1answer
422 views

Bitcoin ZeroMQ and Scala application

I'm trying to connect to Bitcoin's ZeroMQ queue, having no success and don't even know where my problem is. Here is what I did so far on my Ubuntu 14.04: Installed Bitcoin via sudo apt-get install ...
4
votes
1answer
266 views

How to build Merkle root from merkle branches?

Is there any help/tutorial on how to build the Merkle root from stratum data? The Slushpool's stratum protocol has an example of a mining job but it does not contain any Merkle branches and I don't ...
3
votes
1answer
1k views

Bruteforce bitcoin address - I know the words + public address but not the order

I have a long list of 1million+ permutations of a 12 word BIP39 seed. How can I try them all on a bitcoin address? edit: I know the address and the 12 words but i don't know the order of the words
3
votes
1answer
125 views

ECDSA signature with r value of 31?

occasionally on Android we are generating an ECDSA signature. This turns out to have a "r" length of 31 bytes. Is that valid? For reference here is a nice diagram outlining the ASN.1 structure of ...
3
votes
1answer
1k views

How to develop with the Bitcoin cash?

I have a simple wallet created with the BitcoinJ. I can create the address, track the transactions, check account balance etc with the wallet. I would like to extend the wallet for the Bitcoin cash ...
3
votes
1answer
927 views

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

I develop a simple Java/Maven/JSP app for bitcoin and generated the address 167Bqf3Mi3gnfhw5DhCfoYNTMxqANt3Zky I would like to send some money to this address from a bitcoin testnet faucet. I ...
3
votes
1answer
1k views

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

How can I create a raw transaction when I'm given the input scripts, input indexes, input txids, output script, output address and output amount? The method below works but it requires the method ...
3
votes
2answers
203 views

Accept payments on someone else's behalf without being able to spend them

TL;DR I wish to store some sort of key in my application for each vendor account that allows for my application to generate a receiving address for clients to make payments to. I am writing some ...
3
votes
1answer
2k views

Generating private keys in Java

I'm looking for a way to generate private keys in Java. I'd like to make this a standalone program, so I'd rather not use a library like bitcoinj. From my research I've only seen people recommend ...
3
votes
1answer
2k views

Creating Base58 public key & private key in Java?

How can I create a base58 private key and public key in Java? I'm pretty familiar with Java and I have the bitcoinj-minimal code, but it's not clear to me how I can generate a base58 key pair from the ...
3
votes
2answers
227 views

BitCoinJ for Cloud based application

I am currently working on a cloud based project that will be accepting payments using bitcoins. I intend to use BitCoinJ to handle the payment. Unfortunately the only help I am able to get is from the ...
3
votes
1answer
2k views

Get Historical Bitcoin Prices on GDAX in CSV Format

I'm looking for minute by minute historical Bitcoin price data for the past year in format: time, open, high, low etc. I code in Java and I'm not familiar with other programming languages (such as ...
3
votes
1answer
5k views

Generating an address from a private key in Java?

I'd like to write a function in Java that takes a private key and generates the address to use in a QR code. I'd like to make this , but I'm not very good with the hashing algorithms. I've checked ...
3
votes
3answers
1k views

Check Bitcoin address balance from blockchain

I am a merchant that accepts bitcoins, and I'm building my own desktop client for receiving them in Java. When I receive a transaction, I would like to be able to see in my client how much bitcoin is ...
3
votes
1answer
1k views

Bitcoind returning “Invalid JSON-RPC 2.0 response”?

I am starting to use a basic implementation of Bitcoin JSON RPC (dzhuvinov library), and I am getting a strange result. Here is my code: public static void main(String[] args) { URL serverURL = ...
3
votes
1answer
965 views

Building Signed Bitcoin Transaction in Java

I have been attempting to build my own raw transaction generator in Java which I can then broadcast on the testnet network. The problem is when I attempt to broadcast the transaction it says there is ...
2
votes
2answers
1k views

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

I work with Java/Maven/JSP app with BitcoinJ and I have transfer about 0.0048 BTC from a testnet faucet. However, after receiving, I see that my account has balance of 480000.00 BTC. This is the ...
2
votes
1answer
32 views

How to convert from Ardor time to Unix time?

What is the best approach to convert from Ardor time to Unix time?
2
votes
3answers
1k views

Convert between String/Hex/Byte in Java for sha256 - wrong format?

I am trying to convert a bitcoin address and have the following code from here (Calculate Segwit address from public address, 2nd answer): Step1: $ printf 1L88S26C5oyjL1gkXsBeYwHHjvGvCcidr9 > adr....
2
votes
1answer
84 views

Handling fees and setting them

Im trying to get the estimation of how much the fees will be when a final amount is decided on. I would say im getting familiar with bitcoinj but not completely with java so im still learning how to ...
2
votes
1answer
508 views

how to create Watching Address from available xPub key

Watch-only wallet can only receive payments but not spend the available coins. I am using bitcoinj (in Java). Can anyone please tell me that How to create watching addresses from available xPub key? ...
2
votes
2answers
670 views

How to find ripple faucet coin for development

I'm developing an app with ripple. I need some faucet coin for ripple. How can I find it?
2
votes
1answer
371 views

Does the MultiBit linux jar file run in windows?

A windows system has a standalone java and is not recognized by the installer. A jar file can be run on the command line. Is the MultiBit linux jar and the windows installed one the same?
2
votes
1answer
668 views

How to create an offline wallet on Android only to sign transaction

I am new to bitcoins, I want to create an offline wallet on Android, to scan transaction QR code from online Desktop wallet, Sign that transaction with private key on my offline wallet. 1 Creating ...
2
votes
1answer
164 views

Bitcoin transactions reserve more coins than needed

I have a JavaWebApp wich uses bitcoinj 0.13.2 for sending bitcoins from a wallet to a particular address in a TimerTask. When the job starts, every minute I send 10000 satoshis to the address. The fee ...
2
votes
1answer
920 views

How to synchronize with the bitcoin blockchain via bitcoinJ

I'am writing my very first application using bitcoinJ api and I got a bit stuck. Maybe somebody can tell me what I am missing. My practice app wants to write a sample contract in the bitcoin ...
2
votes
0answers
238 views

Broadcasting signed transaction from Watching wallet using bitcoinj

I am working with watching wallet and Offline wallet using bitcoinj, I created Watching Wallet using tpub key of Offline Wallet I am receiving payment on watching wallet Fine, now I want to ...
2
votes
1answer
559 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 ...
1
vote
2answers
17k views

Java code for Bitcoin Mining?

I am a student and doing research on Bitcoin. I wanted to know how mining is done but I wanted it see the some basic java code. Can some one provide me with resources? I would appreciate if some one ...
1
vote
2answers
193 views

What is the difference between transactioninput.getFromAddress() and transactioninput.getConnectedOutput().getAddressFromP2SH(networkparameter))?

I was expecting that, in the case when getFromAddress() returns an address, transactioninput.getConnectedOutput().getAddressFromP2SH(networkparameter)) should return the same address. But, sometimes ...
1
vote
3answers
2k views

Get uncompressed public key from compressed form

A similar question has an answer in Python which links to the bitcointalk forum: How can I get the uncompressed public key from the compressed public key in openssl? https://bitcointalk.org/index.php?...
1
vote
2answers
670 views

How do i parse the zeroMQ messages in java?

This is the code that i have. I receive messages from the zeroMQ however a hashtx message for example looks like this --> "hashtx �����v����|(8d �!��v��&�-�k�". Any help in turning that into a ...
1
vote
2answers
98 views

Unable to execute getwork logic in java

I was going through this post in stack exchange How can I code a Bitcoin JSON-RPC “getwork” request in Java? I tried to write a simple snippet for just the getwork json rpc. public static void ...
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
1k views

Java: Base58-encode String

I would like to Base58-encode this String: 56379c7bcd6b41188854e74169f844e8676cf8b8 My current Java code looks like this: String test9 = "56379c7bcd6b41188854e74169f844e8676cf8b8"; byte[...
1
vote
2answers
939 views

JAVA JSON-RPC for Litecoin

I am looking for Java Json-Rpc for Litecoin or any implementation for Litecoin
1
vote
1answer
1k views

Java: way to convert a 256-bit private key to WIF?

I have a question concerning Java and sha-256. I try to do these steps discribed here to create a WIF key: https://en.bitcoin.it/wiki/Wallet_import_format step: String string = "...
1
vote
2answers
1k views

Get address balance in Java

I'm a merchant that is currently developing program that I will use for receiving transactions for my business. I would like my program to be able to check how much Bitcoin the address sending to me ...
1
vote
1answer
88 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
386 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, ...