Here's an early experimental client I had played around with a while back. It supports getInfo, getBalance and getNewAddress, and can easily be expanded. In order to run it, the credentials for your local bitcoind have to match the values in the client class:
httpclient.getCredentialsProvider().setCredentials(new AuthScope("localhost", 8332),
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 Transaction API of bitcoinj so I cannot go further than that. Your post suggests that your private key is given as a WiF so I have taken this as an assumption. The main ...
Doing this requires three things:
Permutations of the seed words
The address you're trying to locate
The derivation path for that address.
In this specific case, the address is the one this puzzle on reddit leads to, so we will assume the derivation path is m/49'/0'/0'/0/0
This is a simple nodejs script using bitcoinjs-lib to read seeds from a file, ...
Check out https://github.com/ValleZ/Paper-Wallet - it is android lite project what does this task. Start with createTransaction method in https://github.com/ValleZ/Paper-Wallet/blob/master/app/src/main/java/ru/valle/btc/BTCUtils.java
Mike Hearn's WalletTool (included in the bitcoinj library) is a pretty good starting point.
If you have a look at the 'send' method in WalletTool you can see that it:
1) Creates a SendRequest
2) Decrypts the private key if necessary
3) Completes the tx to get the inputs and find the fee
4) Signs the tx
5) Starts up a PeerGroup
6) Broadcasts it
For an ...
One of the very fist GPU miners was in java using OpenCL. It was called DiabloMiner and you can find the source here;-
It hasn't been updated the the past two years but it is still fully functional.
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 why the testnet faucets say the address is invalid.
From the documentation of BitcoinJ, it seems that you can configure your code to use the testnet with:
This is valid, and there are even smaller types as well. Be aware that Bitcoin no longer really uses ASN.1 DER, but a even more restrictive subset of it. ASN.1 itself as it turns out is not deterministic or platform independent in many implementations, which is a source of consensus failure. For reference, here is how to encode signatures correctly in ...
The Linux installer is slightly different to the windows installer in that there are different scripts to get the host machine to recognise the bitcoin URIs.
What ARE very similar is the multibit-exe.jar (used on Linux and Mac) and the multibit.exe (used in Windows). The exe is basically a wrapped jar file.
On any operating system you can run MultiBit jar ...
You'd better ask it on the Apple SE, since apparently Bitcoin is not the core of this question, i.e. this could have happened with any software requiring Java.
That said, you could simply chose not to use Multibit: switch to another client, be it a desktop client or an online wallet.
There is at least one bitcoin implementation in Java. Not everybody "decided to go with C++", and the choice of implementation language has no bearing on the underlying network protocol. Anybody is free to implement the bitcoin algorithm in any programming language they choose.
Speculating on which programming languages Satoshi did or did not know is ...
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 an appropriate factor (10^8 for BTC, or 10^5 for mBTC).
The getwork RPC call was removed from Bitcoin Core. It was deprecated and then superceded by the getblocktemplate RPC call.
It looks like the pool that you are using uses an unspecified protocol. It's just a tcp connection where you are sending JSON formatted strings and receiving JSON formatted strings from the pool server. I figured this out by digging ...
Ardor time is measured in seconds since the Genesis block, represented as Java int. Currently there is no API which performs conversion to Unix time so you have to code it yourself.
If you are coding a server side contract in Java use the following code:
long EPOCH_BEGINNING = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(isTestnet ? "2017-12-26 14:...
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 have a VarInt prepended to both the "Magic" and the Message. The VarInt encodes the byte-length of the message (encoded in UTF-8). Since the "Magic" value ...
It uses Htmlunit instead of Apache Http Library, which makes it a bit easy to understand and extend.
I actually wrote & tested it for Litecoin for one of my projects. But it has been extended to support bitcoin and all the RPC methods are available.
I had a horrendus time doing this because of the fact that the jar is not available in a public site. Their docs to install it in a local repo and point maven at it seemed promising, but in the end I can tell you the best way:
Start by forking a Java Maven project. Instructions to do that are here: http://java.heroku.com/
Clone your project.
Clone bitcoinj ...
You may also want to take a look at my ccxt library on GitHub: https://github.com/kroitor/ccxt
The library is used to connect and trade with cryptocurrency / altcoin exchanges and payment ...
Most private keys are essentially just random numbers, so if all you want is a private key, you just need to use a high-entropy random function to generate your private key that's 256 bits.
Converting those bits into something a normal bitcoin wallet can understand (like WIF) is a little trickier, but the process is spelled out here. I'm recapping the ...
I'm not aware of any Java mining code existing, and I would not expect it to: mining needs to be as fast as possible, so you wouldn't want to write it in a language that runs on a virtual machine.
Since the reference implementation, Bitcoin Core, stands as the ultimate documentation of the protocol, and it is written in C++, I would say that anyone doing ...
This is entirely possible with an optional additon to Bitcoin called BIP32. Unfortunately, BIP32 is not implemented by the standard client, but there are other clients that do implement it.
Ask your customer to download the latest version of Electrum, then have them give you their extended public key.
(As I said above, there are multiple clients that can ...