Questions tagged [java]

Java is a programming language.

Filter by
Sorted by
Tagged with
1
vote
1answer
2k 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
0answers
375 views

Block chain receive payment api not working

I am building a little online app to accept bitcoin payments in my website. I have a blockchain.info wallet and I am following their Receive Payments Api, which can be visited here: http://blockchain....
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 ...
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 ...
1
vote
0answers
120 views

How return transaction hash from wallet to android app after payment?

Scenario: I have my android app where customers can pay by bitcoins. For this I created intent with uri like: bitcoin:[address]?amount=.. and using startActivityForResult it opens wallet with ...
0
votes
1answer
1k views

Wallet: how to generate public extended key?

As far as I understand, when I want to create an HD Wallet, do I need a private key that is derived into an extended public key? So, my question is, if I am coding a portfolio of bitcoin in java, how ...
0
votes
1answer
389 views

WalletAppKit creates an address every time Bitcoinj gets initialized

I'm implementing an app using BitcoinJ, but every time I run the code, a new address is created. Is there any way to work with the very first address that was created and stop creating new addresses? ...
0
votes
1answer
389 views

I'm working to add multiwallet support to Bitcoin Wallet App, but now the balance is no longer updating

I work with a bitcoin wallet app and the UI looks, When I select an address from the dropdown menu and would press the balance or the transaction buttons, they should open in the new page and show ...
0
votes
0answers
108 views

blockChainDownloadLocked ignoring the duplicate request error

I work with a bitcoin wallet app using the Java/BitcoinJ. The app has custom features such as showing balance, transactions, address and sending option. It was running fine and suddenly, I get the ...
0
votes
1answer
80 views

How to get the last executed transaction?

I work with a Wallet app and using the BitcoinJ for programming. I need to find the last executed transaction from the wallet. In the org.bitcoinj.core.Wallet class, I see there is a method ...
0
votes
2answers
373 views

Cannot build circuits because we don't have enough directory information

I'm developing a bitcoin wallet app using BitcoinJ framework. While deploying the app using Tomcat 8, I get the following stack of errors, 12-Jun-2017 14:18:12.511 INFO [PeerGroup Thread] com....
0
votes
1answer
947 views

How to convert Satoshi to BTC in Java?

I get the value of money in Satoshi and I would like to have it in BTC. I develop the app in Java/Maven/JSP and use BitcoinJ for the framework. I use the code, public Coin getBalance() { ...
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 ...
3
votes
1answer
1k 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 ...
0
votes
1answer
1k views

Bitfinex api v2 not returning candles

I am using bitfinex websockets v2 api in a Java application, to get the candles from a market. But I don't get any message back from the socket(not even an error). I wonder what I am doing wrong. Also ...
0
votes
1answer
46 views

I need a bitcoin or usd payment for my site

Just service with simple API. I want to allow clients to pay usd or bitcoin. Then after payment complete i need to add my custom value on my site client purse. Is there simple system for it? Back end ...
1
vote
2answers
480 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
0answers
38 views

Is there a java library which could extract the first seen date and the last seen date of an address over a bitcoin network?

Apparently the bitcoinj does not provide such feature.
3
votes
1answer
1k 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 ...
1
vote
2answers
212 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 ...
0
votes
1answer
63 views

How to obtain the content of the field “addr_tag_link” and “addr_tag” without using the api of blockchain.info?

This is an output item of JSON result obtained by the API of blockchain.info: { "addr_tag_link":"https:\/\/bitcointalk.org\/index.php?action=profile;u=47767", "addr_tag":"...
1
vote
0answers
137 views

API request of blockchain.info over Java stops spontaneously

In my java class, I extract the hash of transactions from the files of blk...dat, then obtain the data of the corresponding transactions via reading from the URL: https://blockchain.info/rawtx/+ hash. ...
1
vote
0answers
122 views

Payment Transaction Validation

I want to build a app which takes transaction id, source and destination address as input and need to validate the transaction (the specified amount is sent from address1 to address2. What is the ...
6
votes
1answer
4k 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
343 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 ...
0
votes
1answer
1k views

How to generate bitcoin target from difficulty?

Reading the slushpool's manual for the Stratum protocol I found that : "Default share difficulty is 1 (big-endian target for difficulty 1 is ...
3
votes
1answer
2k 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 ...
1
vote
0answers
46 views

Verification exception : Unexpected

i have cloned litecoin wallet and edit it connect to the network we have created. I disabled checkoints, changed params and the block syncs for 32 blocks. Then i get the following error 05-26 13:07:...
1
vote
3answers
3k 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?...
4
votes
1answer
432 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 ...
1
vote
1answer
441 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 ...
0
votes
0answers
193 views

Library ZMQ to Java does not work

I am trying to connect to a bitcoin node using the ZMQ library for Java. the problem is that when I try to receive a response the code remains frozen. Returns nothing. This is my code: public class ...
0
votes
1answer
42 views

International Bitcoin Payment Platform [duplicate]

I need to integrate bitcoins payments in my web application. I was about to use Stripe platform for accepting bitcoins (works exactly the same than for accepting credit cards) but I realized they ...
2
votes
1answer
169 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 ...
1
vote
0answers
223 views

Why I can't see the balance increasing in my wallet?

I wrote this function using bitcoinJ public Wallet getWallet(ECKey ecKey) { Wallet wallet = walletAppKit.wallet(); wallet.importKey(ecKey); wallet.addEventListener(new ...
2
votes
1answer
998 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 ...
-1
votes
1answer
3k views

Wouldn't it be better to have used Java for Bitcoin Core? Is there a good cryptocurrency that went with Java from scratch? [closed]

Java is sooooooo much easier than C++. Wondering why in 2008 people decided to go with C++ instead. Was it because Satoshi only knew C++? And to compliment this question, is there a noticeable ...
2
votes
1answer
613 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 ...
0
votes
1answer
209 views

Xemian Xchange Api for Java, returning a default of 100 market orders

For sometime I am using this java API http://xeiam.com/xchange/ for building bitcoin trading robots. Today I got a bit stuck and I wanted to see if somebody had the same issue before. I call the ...
3
votes
2answers
213 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 ...
1
vote
2answers
18k 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 ...
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 ...
0
votes
0answers
2k views

blockchain.info websocket: Error code = 1006, Unexpected end of stream

I am using javax.websockets to have a webSocket connection with Blockchain.info, except that it closes down after random intervals, and I can see the close reason as: 'Unexpected end of stream', ...
0
votes
1answer
295 views

NoClassDefFoundError when using Java Coinbase API

I've simply downloaded an API .jar file of a Coinbase. I've created a project dynamic web project. I added successfully into a reference library that API. Here is my simple program: import com....
0
votes
1answer
2k views

java.lang.NoClassDefFoundError: org/spongycastle/util/encoders/Hex in Java when dealing with Bitcoin addresses

I have a private key bigInt of type bigInteger and I would like to generate the address corresponding to this private key. I implemented the following function public String get_address () { Address ...
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 ...
0
votes
1answer
67 views

Can I create a public address for Bitcoin without the private address appearing on the screen?

Is there JavaScript which will do this? I would generate a 256 bit password using 99 dice throws, enter it into JavaScript on an offline computer (like using bitaddress.org) and get an address to ...
1
vote
0answers
203 views

bitcoinj, unknown confidence level

I've got a bitcoin address A with its relative encrypted key K stored in a persistence storage. I am launching bitcoinj through the WalletAppKit class and calling awaitRunning to wait for the ...
0
votes
1answer
894 views

http post via java to bitcoind does not work

I am using Ubuntu Server 12.04. My *.conf file: ... # Enable RPC server=1 # Uncomment to allow localhost to use RPC rpcallowip=127.0.0.1 # RPC information # THIS MUST BE CHANGED FOR YOUR SECURITY ...
0
votes
4answers
3k views

MultiBit won't open, says “Java not installed”

My MultiBit wallet won't open, because "Java is not installed", though I have Java 8, 7u51, and 6u49 installed... Which version of Java should I have installed?