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 ...
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).
Your output is correct given the input that you used.
However, If you are expecting to get an output address of 39YteymR86cG7V3Kijg8Gm2ST1r4nTeM1b, it looks like your input is incorrect. It's missing the first byte and the last 4 bytes (encoded as hex):
Your Input: --56379c7bcd6b41188854e74169f844e8676cf8b8--------
Proper Input: ...
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 the same problem and while trying to find a solution I found many people suggesting to install the x86 version of Java which is stupid if you actually run a x64 operating system. Others suggested to try out MultiBit HD which isn't officially released yet, that's probably not a good idea either. Took me quite a while but I figured out how to get it ...
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 ...
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 ...
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 ...
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 ...
It is not specified what to subscribe.
# if you need raw data or block data, to add->
Yes, you can convert a 33-byte compressed public key into a 65-byte uncompressed public key in Java.
Here is the code to perform the operation. It is correct, robust, and only requires Java SE classes (no other libraries) - but I apologize for the implementation length.
static final BigInteger MODULUS =...