Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Hot answers tagged

7

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), ...


7

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, ...


6

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 ...


5

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


5

You will find that non-standard transactions are very hard to get into the block chain. Instead, encode the additional information as accounts and send a single satoshi to each account needed to convey your message. That way, you can use standard transactions. Transaction 28ccf29cfcc9f82d42793db770e7c7894d61ccf3d18299f34bda2e54415da287 is a particularly ...


5

Check out xchange on github:: https://github.com/timmolter/XChange It works on multiple exchanges, and is written in Java.


4

You can, but you shouldn't. Bitcoin transactions should only contain the information needed for the world to verify your transaction. Anything else is essentially private information between the sender and the receiver, and would be useless bloat to the block chain (making it more expensive to maintain for everyone). That doesn't mean you can't have ...


4

You are also very welcome to try out https://github.com/clanie/bitcoind-client - it is in early development, but already supports almost all the methods provided by bitcoind.


4

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 ...


4

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: ...


4

There is a bitcoinj.cash project currently being put together. The code is not ready for use but should be by next week: https://github.com/bitcoinj-cash/bitcoinj


4

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 ...


3

Define a JAVA_HOME environment variable with the path to your jre/jdk installation in it. That worked for me.


3

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.


3

Because this seems like a collection of links, I will just add another one: https://github.com/priiduneemre/btcd-cli4j


3

I had the same issue and created an implementation here: https://github.com/johannbarbie/BitcoindClient4J


3

One of the very fist GPU miners was in java using OpenCL. It was called DiabloMiner and you can find the source here;- https://github.com/Diablo-D3/DiabloMiner It hasn't been updated the the past two years but it is still fully functional.


3

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 ...


3

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).


3

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 ...


3

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:...


2

Yes, you can now store up to 80 bytes via an additional, special output: https://bitcoinfoundation.org/blog/?p=290


2

BitCoinJ is a Simplified Payment Verification (SPV) client library This means that it only downloads the headers for transactions, and only those that are relevant to the private keys contained in its wallet only. This greatly reduces the blockchain download (very quick to get started), but at the cost of not seeing all the other transactions (reduced ...


2

https://github.com/nitinsurana/Litecoin-Bitcoin-RPC-Java-Connector 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.


2

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 ...


2

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 ...


2

Library under Apache Licence: https://github.com/SulacoSoft/BitcoindConnector4J


2

com.google.bitcoin.core.ECKey key = new com.google.bitcoin.core.ECKey(); // keypair byte[] pub = key.getPublicKey(); // byte array String prv; prv = key.getPrivateKeyEncoded(com.google.bitcoin.core.NetworkParameters.prodNet());


2

You may also want to take a look at my ccxt library on GitHub: https://github.com/kroitor/ccxt It is a JavaScript / Python / PHP library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs. The library is used to connect and trade with cryptocurrency / altcoin exchanges and payment ...


2

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 ...


Only top voted, non community-wiki answers of a minimum length are eligible