The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

7

I just added sendtoaddress to bitcoin.rpc.Proxy: from bitcoin.core import COIN, b2lx import bitcoin.wallet import bitcoin.rpc try: # This moved between versions from bitcoin.base58 import CBitcoinAddress except: from bitcoin.wallet import CBitcoinAddress rpc = bitcoin.rpc.Proxy() addr = CBitcoinAddress('1JwSSubhmg6iPtRjtyqhUYYH7bZg3Lfy1T') ...


6

In addition to microsecond time, Bitcoin seeds the random number generator with GUI events, /dev/urandom on Unix, and HKEY_PERFORMANCE_DATA on Windows (very random, constantly-changing data).


6

There isn't yet a complete implementation AFAIK, but there are different libraries that implement bitcoin features (wallets, keys, utilities, Depends on whether you want an implementation of bitcoin network protocol or wallet or just an overlay on top of the JSON-RPC interface of bitcoind. Useful code on github: https://github.com/jgarzik/python-...


5

Assumptions: Your current folder for your bitcoin data is here: "~/Library/Application Support/Bitcoin" or here "/Users//Library/Application Support/Bitcoin" Your current folder for your bitcoin-qt application is here: /Applications/Bitcoin-qt.app You have an external drive named "My Passport" and your Finder, Preferences setting are set to display ...


5

It uses a cryptographically-secure random number generator, specifically the one included in OpenSSL. Generating a key from a source with less entropy than the equivalent bit strength of the key would be an inexcusable rookie coder error. It wouldn't survive in any popular open source program for more than a few days.


5

The Bouncy Castle project allows for this and it runs on the Java VM (as was mentioned earlier) as well as the .NET Runtime. An example of using it in C# is shown in this blog post. You can use the .NET version from Visual Basic .NET (as well as any of the other languages on the CLR as well, obviously). For C++, look at the Crypto++ library which supports ...


5

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


4

You probably make the right decision to not use one of the centralized API (blockchain.com, etc.). Run you own bitcoin-core fullnode(s) and connect to the RPC or REST interface. You could connect via python with things like http://laanwj.github.io/bitcoin-python/doc/examples.html or any other RPC client. If you need blocks / headers / chaininfos and ...


3

Bitcoinj is based on Java and allows you to send transactions to the network. Its an implementation of the Bitcoin Protocol. However, it doesn't provide any way to visualize the blockchain (it only stores 646kb of the blockchain, not all 30gbs). You should improve the question to descrbe what exactly ou want to do!


3

Ripple labs have created a number of GitHub repositories relating to Ripple, including ripple-lib for JavaScript and a work in progress ripple-lib-java for Java. Rubble Labs have released their ripple library for Golang CodeShark has released a C++ library for communicating with Ripple through a websocket


3

In addition to aantonop's links, there is also for python: PyCoin https://github.com/richardkiss/pycoin Utilities for transactions signing and verification, and creation of deterministic wallets according to the BIP0032 standard. PyWallet https://github.com/jackjack-jj/pywallet bitcoin wallet importer/exporter


3

Code sample from 04/2014 is out of date with current python-bitcoinlib. Slight modification here: from bitcoin.core import COIN, b2lx import bitcoin.wallet import bitcoin.rpc rpc = bitcoin.rpc.Proxy() addr = bitcoin.wallet.CBitcoinAddress('1JwSSubhmg6iPtRjtyqhUYYH7bZg3Lfy1T') txid = rpc.sendtoaddress(addr, 0.001 * COIN) print(b2lx(txid)) Tested on v0.3.0+...


3

The Bouncy Castle library provides support for all languages on the Java VM This library (and now a derivative library called Spongy Castle) is used in the BitCoinJ library. The Bouncy Castle library was unfortunately implemented badly in Android which lead to code conflicts that required complex workarounds. Spongy Castle solved those problems making the ...


3

There is a fixed rate for how many bitcoins are mined each block. The block reward halves every 210,000 blocks, see Controlled Supply. Here is a short term bitcoin distribution projection from the Bitcoin Wiki: To calculate the total coins for a given block, try: coins.py block = 210000 * 10 totalCoins = 0 subsidy = 50.0 for i in range(1,block): if(...


3

This is unrelated to segregated witness. Since Bitcoin Core version v0.17, signatures have low R signatures. The signing operating is repeated until an R value is constructed that's below 2255. On average this only takes 2 attempts, but it makes all signatures equally long (71 bytes; rather than 50% 71 bytes and 50% 72 bytes), making them more predictable ...


2

I've modified a library for Google Go to support a few of the Koblitz Curves, including secp256k1. It is available here.


2

I really don't think it's needed. Bitcoin is a complicated project, it's better to have one canonical JVM-based library than a library in each JVM language. AFAIK there is currently no Scala library, and I'm betting there won't be for some time (unless perhaps as a wrapper to bitcoinj?)


2

NBitcoin is the most complete lib to date, here are links and articles about it. NBitcoin Github : https://github.com/NicolasDorier/NBitcoin NBitcoin Nuget : https://www.nuget.org/packages/NBitcoin/ Intro : http://www.codeproject.com/Articles/768412/NBitcoin-The-most-complete-Bitcoin-port-Part-Crypt Stealth Payment, and BIP38 : http://www.codeproject.com/...


2

There's a dedicated C-library for this curve. This is probably the most widely scrutinized library, and it probably has the best performance. Wrappers for other languages are available. https://github.com/bitcoin/secp256k1


2

It's probably not in there right now; look at the code in bitcoin/rpc.py and add it! Basically you just need to follow the same pattern as other RPC calls. When you're done send me a pull-req on github.


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

There is a Dart library as well. Even though it's not 100% finished yet, it works quite well. https://github.com/stevenroose/ripple-lib-dart


2

Actually python library pycoin seems to be sufficient for both testnet and mainnet address. I had just missed it the first time I checked the library. It also provides a powerful command line tool.


2

Take a look at Peter Todd's python-bitcoinlib. From the github repo: This Python2/3 library provides an easy interface to the bitcoin data structures and protocol. The approach is low-level and "ground up", with a focus on providing tools to manipulate the internals of how Bitcoin works.


2

I think library like BitcoinJ or python-bitcoin does the same (rpc call in the background) No, they do not. BitcoinJ is an implementation of a Bitcoin client. It connects directly to the Bitcoin network and speaks the Bitcoin Peer-to-Peer protocol. It does not call RPCs for a node. f that is true is there any reason behind using such libries in place of ...


2

There are a few problems, you are passing mnemonic_secret incorrectly resulting in the API call getting a NULL pointer hence returning WALLY_EINVAL. Here is a corrected version, although note that your myArray is still the wrong size: #include <stdio.h> #include <wally_bip39.h> int main() { /* Note that this array is 34 elements long which ...


2

What you are talking about is the table used for constant time operations w/ secret values, e.g. for signing and key generation (see the heading "Point multiplication for signing"). To prevent leaking secret key data the entire column must be processed for each digit. More bits in the column increases this work exponentially. From memory, I believe that 5 ...


1

Not necessarily interoperable. Firstly, libraries have to agree on what kind of parameters to exchange and how they are exchanged. There's no guarantee that the parameters required by bitcoinj and libbitcoin are the same. Secondly, it is now considered standard practice to create P2SH transactions regardless of what kind of transaction you're setting up, ...


1

I feel stupid... https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md#berkeley-db I followed that to the T and I got it working. Now I'm struggling with OpenSSL issues :/


1

Most likely, you need to change permissions on those files: $ chown apache config.php database.php bitcoin.php $ chmod g+w config.php database.php bitcoin.php Of course, if you're not using apache or the groupid of the webserver you're using is different, you might need to change "apache" to something else. Read up on linux file permissions to understand ...


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