<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Talkera</title>
	<atom:link href="/wpTalkera/feed/" rel="self" type="application/rss+xml" />
	<link>https://talkera.org/wpTalkera</link>
	<description>Just me talking.</description>
	<lastBuildDate>Sun, 07 Dec 2014 15:23:42 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0.1</generator>
	<item>
		<title>The Blockchain.info API and Python</title>
		<link>https://talkera.org/wpTalkera/the-blockchain-info-api-and-python/</link>
		<comments>https://talkera.org/wpTalkera/the-blockchain-info-api-and-python/#comments</comments>
		<pubDate>Sun, 07 Dec 2014 15:23:42 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Bitcoin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[blockchain]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=272</guid>
		<description><![CDATA[We decided to play around with the Blockchain.info API.  We wrote a small Python program that gets a random bitcoin address and prints the sent and received bitcoins, and can explore the blockchain. [crayon-5485fde3d22b7667786141/] Save the file as example.py and run [crayon-5485fde3d22d2943715526/] The total_received and total_sent are shown in Satoshi (the smallest unit).  Thus the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>We decided to play around with the Blockchain.info API.  We wrote a small Python program that gets a random bitcoin address and prints the sent and received bitcoins, and can explore the blockchain.</p><pre class="crayon-plain-tag">import urllib2
import json
import numpy as np
import matplotlib.pyplot as plt
from pprint import pprint


def showInfo(address):
  response = urllib2.urlopen('https://blockchain.info/address/' + address + '?format=json')
  data = response.read()

  val = []
  data = json.loads(data)

  print data['address']
  print data['total_received']
  print data['total_sent']

showInfo("1E6dum2sxdctc9hMV1Dk1xd8Vang3u9EA2")</pre><p>Save the file as example.py and run</p><pre class="crayon-plain-tag">python example.py</pre><p>The total_received and total_sent are shown in Satoshi (the smallest unit).  Thus the output 2456674  means 0.02456674 BTC</p>
<p>We then extend it to display information of a block:</p><pre class="crayon-plain-tag">import urllib2
import json
import numpy as np
import matplotlib.pyplot as plt
from pprint import pprint
 

def showInfo(address): 
  response = urllib2.urlopen('https://blockchain.info/address/' + address + '?format=json')
  data = response.read()

  val = []
  data = json.loads(data)

  print data['address']
  print data['total_received']
  print data['total_sent'] 

def showBlock(block):

  response = urllib2.urlopen('https://blockchain.info/rawblock/' + block + '?format=json')
  data = response.read()

  val = []
  data = json.loads(data)

  print '-----------------------------'
  print 'Block index: \t\t',
  print data['block_index']

  print 'Previous block:\t\t',
  print data['prev_block']

  print 'Time:\t\t\t',
  print data['time']
 
  print 'Nr. Transactions:\t',
  print data['n_tx']


  print '------------------------------'
showBlock('00000000000009fdb874661ff1c08f0a2d082aa788a5b90fbd428ce3622e121c')
#showInfo("1E6dum2sxdctc9hMV1Dk1xd8Vang3u9EA2")</pre><p>This will output:</p><pre class="crayon-plain-tag">-----------------------------
Block index: 		169563
Previous block:		0000000000000753b0a49656f0105c317851f7c2b3945eea0c272499547af433
Time:			1322128192
Nr. Transactions:	27
------------------------------</pre><p>If you want to see the Genisis block, the id is 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f</p>
<p>Further reading: <a href="https://blockchain.info/api/blockchain_api" target="_blank">https://blockchain.info/api/blockchain_api</a></p>
]]></content:encoded>
			<wfw:commentRss>https://talkera.org/wpTalkera/the-blockchain-info-api-and-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cryptocurrency &amp; Big Data</title>
		<link>https://talkera.org/wpTalkera/cryptocurrency-big-data/</link>
		<comments>https://talkera.org/wpTalkera/cryptocurrency-big-data/#comments</comments>
		<pubDate>Sun, 07 Dec 2014 12:19:23 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Altcoin]]></category>
		<category><![CDATA[Bitcoin]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[darkcoin]]></category>
		<category><![CDATA[dogecoin]]></category>
		<category><![CDATA[litecoin]]></category>
		<category><![CDATA[nxt]]></category>
		<category><![CDATA[peercoin]]></category>
		<category><![CDATA[ripple]]></category>

		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=256</guid>
		<description><![CDATA[Coin Market Capitalization can be seen on coinmarketcap.com for all cryptocurrencies.  All kinds of data can be observed : market price, capitalization, available supply and so on. It&#8217;s a great site, but you may want to do some more with the data.  This little script draws the entire history of a market price for a distinct [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Coin Market Capitalization can be seen on <a title="https://coinmarketcap.com" href="https://coinmarketcap.com" target="_blank">coinmarketcap.com</a> for all cryptocurrencies.  All kinds of data can be observed : market price, capitalization, available supply and so on. It&#8217;s a great site, but you may want to do some more with the data.  This little script draws the entire history of a market price for a distinct coin:</p><pre class="crayon-plain-tag">import json
import numpy as np
import matplotlib.pyplot as plt
from pprint import pprint


def getPrices(filename):
  val = []

  with open(filename) as data_file:
    data = json.load(data_file)

  for v in data["price_usd_data"]:
    print v[1]
    val.append(v[1])

  return val

btc = getPrices("bitcoin.json")
plt.plot(btc)
plt.show()</pre><p>Simply get the JSON data <a href="http://coinmarketcap.com/static/generated_pages/currencies/datapoints/bitcoin-365d.json" target="_blank">http://coinmarketcap.com/static/generated_pages/currencies/datapoints/bitcoin-365d.json</a></p>
<p>You can plot multiple charts in one using this little trick:</p><pre class="crayon-plain-tag">btc = getPrices("bitcoin-365.json")
btc = getPrices("litecoin-365.json")
plt.plot(btc)
plt.plot(ltc)
plt.show()</pre><p>The program outputs graphs like this:</p>
<div id="attachment_262" style="width: 822px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/figure_2.png"><img class="size-full wp-image-262" src="/wpTalkera/wp-content/uploads/2014/12/figure_2.png" alt="litecoin vs darkcoin" width="812" height="612" /></a><p class="wp-caption-text">litecoin vs darkcoin</p></div>
<p>If the market price data is too far apart, you will get strange plots.  Furthermore, you are not limited to this kind of plots <img src="/wpTalkera/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
]]></content:encoded>
			<wfw:commentRss>https://talkera.org/wpTalkera/cryptocurrency-big-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arbitrage opportunity detector</title>
		<link>https://talkera.org/wpTalkera/arbitrage-opportunity-detector/</link>
		<comments>https://talkera.org/wpTalkera/arbitrage-opportunity-detector/#comments</comments>
		<pubDate>Sat, 06 Dec 2014 17:05:02 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Bitcoin]]></category>
		<category><![CDATA[arbitage]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[Bitfinex]]></category>
		<category><![CDATA[bitstamp]]></category>
		<category><![CDATA[BTC-e]]></category>
		<category><![CDATA[CampBX]]></category>
		<category><![CDATA[Kraken]]></category>
		<category><![CDATA[OkCoin]]></category>
		<category><![CDATA[paymium]]></category>
		<category><![CDATA[trading]]></category>

		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=247</guid>
		<description><![CDATA[I found a neat little tool called bitcoin-arbitage thats downloads data from bitcoin exchanges and tries to find arbitage opportunities. The tool has a warning:  &#8220;Real trading bots are included. Don&#8217;t put your API keys in config.py if you don&#8217;t know what you are doing&#8221;.  It supports only two exchanges for automatic trading.  For this [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I found a neat little tool called bitcoin-arbitage thats downloads data from bitcoin exchanges and tries to find arbitage opportunities. The tool has a warning:  &#8220;Real trading bots are included. Don&#8217;t put your API keys in config.py if you don&#8217;t know what you are doing&#8221;.  It supports only two exchanges for automatic trading.  For this reason, the best use is as a notification tool for your trading opportunities. The user interface is still very tech like but it could be a good tool for traders.</p>
<p>Currently supported exchanges are:</p>
<ul class="task-list">
<li>Bitstamp (USD)</li>
<li>Bitcoin24 (EUR)</li>
<li>Paymium (USD, EUR)</li>
<li>BTC-e (USD, EUR)</li>
<li>Bitfinex (USD)</li>
<li>Kraken (USD, EUR)</li>
<li>OkCoin (CNY)</li>
<li>CampBX (USD)</li>
</ul>
<p>To install and run:</p><pre class="crayon-plain-tag">git clone https://github.com/maxme/bitcoin-arbitrage.git
cd bitcoin-arbitrage/
cp arbitrage/config.py-example arbitrage/config.py
python3 arbitrage.py </pre><p>It could give some errors, but nothing important.  The program will automatically output opportunities; At the time of running, we got these:</p><pre class="crayon-plain-tag">2014-12-06 17:52:39,729 [INFO] profit: 17.555133 USD with volume: 10.000000 BTC - buy from KrakenEUR sell to PaymiumEUR ~0.46%
2014-12-06 17:52:39,731 [INFO] profit: 0.511115 USD with volume: 4.195000 BTC - buy from KrakenEUR sell to BitfinexUSD ~0.03%
2014-12-06 17:52:49,831 [INFO] profit: 30.132266 USD with volume: 10.000000 BTC - buy from BtceUSD sell to KrakenEUR ~0.81%
2014-12-06 17:52:49,854 [INFO] profit: 70.126539 USD with volume: 10.000000 BTC - buy from BtceUSD sell to PaymiumEUR ~1.88%
2014-12-06 17:52:49,878 [INFO] profit: 6.898993 USD with volume: 10.000000 BTC - buy from BtceUSD sell to KrakenUSD ~0.19%
2014-12-06 17:52:50,245 [INFO] profit: 34.493657 USD with volume: 10.000000 BTC - buy from BtceUSD sell to BitstampUSD ~0.92%
2014-12-06 17:52:51,636 [INFO] profit: 53.063079 USD with volume: 10.000000 BTC - buy from BtceUSD sell to BitfinexUSD ~1.42%
2014-12-06 17:52:51,638 [INFO] profit: 26.339595 USD with volume: 10.000000 BTC - buy from BitstampUSD sell to PaymiumEUR ~0.70%
2014-12-06 17:52:51,643 [INFO] profit: 9.276136 USD with volume: 10.000000 BTC - buy from BitstampUSD sell to BitfinexUSD ~0.25%
2014-12-06 17:52:51,643 [INFO] profit: 9.831532 USD with volume: 10.000000 BTC - buy from BitfinexUSD sell to PaymiumEUR ~0.26%</pre><p>Profits are anywhere between 0.50 $ and 70.00 $ with a trade volume of 10 BTC ( 3699.64 $ currently )</p>
]]></content:encoded>
			<wfw:commentRss>https://talkera.org/wpTalkera/arbitrage-opportunity-detector/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Generating an all in one wallet</title>
		<link>https://talkera.org/wpTalkera/all-in-one-wallet/</link>
		<comments>https://talkera.org/wpTalkera/all-in-one-wallet/#comments</comments>
		<pubDate>Sat, 06 Dec 2014 01:02:04 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Bitcoin]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[dogecoin]]></category>
		<category><![CDATA[litecoin]]></category>
		<category><![CDATA[namecoin]]></category>
		<category><![CDATA[peercoin]]></category>
		<category><![CDATA[vanitygen]]></category>
		<category><![CDATA[wallet]]></category>

		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=234</guid>
		<description><![CDATA[In this experimental tutorial we will investigate methods to create a set of wallets for cryptocoins. Each wallet is a receival address (you can receive coins on this address) and a private key.  To send coins, you have to import the private key to a desktop wallet. We will explore coinkit, a python library to [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In this experimental tutorial we will investigate methods to create a set of wallets for cryptocoins. Each wallet is a receival address (you can receive coins on this address) and a private key.  To send coins, you have to import the private key to a desktop wallet. We will explore coinkit, a python library to generate addresses.  The other method is using vanitygen.  <em>Use at your own risk. Please comment about any mistakes or recommendations.</em></p>
<p>&nbsp;<br />
<strong>Coinkit script</strong><br />
Coinkit is a Python library with tools for Bitcoin and other cryptocurrencies. It is currently in Beta but it aims to support Bitcoin, Litecoin, Namecoin, Peercoin, Primecoin, Testnet, Worldcoin, Megacoin, Feathercoin, Terracoin, Novacoin, Dogecoin, Anoncoin, Protoshares, Ixcoin, Memorycoin, Infinitecoin, Cryptogenic Bullion, Quarkcoin, Netcoin, Earthcoin, Reddcoin,</p><pre class="crayon-plain-tag">sudo pip install coinkit</pre><p>Open up your favourite text editor and paste this code:</p><pre class="crayon-plain-tag">from coinkit import *

priv = BitcoinPrivateKey()
bitcoin_pub = priv.public_key()
bitcoin_address = bitcoin_pub.address()

litecoin_priv = LitecoinPrivateKey(priv.to_hex())
litecoin_pub = litecoin_priv.public_key()
litecoin_address = litecoin_pub.address()

namecoin_priv = NamecoinPrivateKey(priv.to_hex())
namecoin_pub = namecoin_priv.public_key()
namecoin_address = namecoin_pub.address()

print ""
print "Receiving address"
print "bitcoin  : " + bitcoin_address
print "litecoin : " + litecoin_address
print "namecoin : " + namecoin_address

print ""
print "Private keys "
print "bitcoin  : " + priv.to_wif()
print "litecoin : " + litecoin_priv.to_wif()
print "namecoin : " + namecoin_priv.to_wif()
print ""</pre><p>Save it as create.py and run</p><pre class="crayon-plain-tag">python create.py</pre><p>The output should be something like this:</p><pre class="crayon-plain-tag">Receiving address
bitcoin  : 1AyPpKpsraPA2DVbne6atxB5ExC1k435ea
litecoin : LVCM5Y8hwEdDH2Bkxn5tAyEqTAZHp7FPzX
namecoin : N6Ym1yKrmxUiYkk74TRA7UKyyBb4djTozU

Private keys 
bitcoin  : ************************************
litecoin : ************************************
namecoin : ************************************</pre><p>You can create a QR code for an address using this command:</p><pre class="crayon-plain-tag">qrencode YOUR_RECEIVAL_ADDRESS -o image.png</pre><p>&nbsp;</p>
<p><strong>Vanitygen</strong><br />
Vanitygen can generate regular bitcoin addresses, namecoin addresses, and testnet addresses. Using some tricks we can generate other addresses too. Install vanitygen using:</p><pre class="crayon-plain-tag"># git clone https://github.com/samr7/vanitygen
# cd vanitygen
# make</pre><p>Once compilation has finished, copy this script:</p><pre class="crayon-plain-tag">#!/bin/bash

echo "-----------------------------------"
echo "Bitcoin"
echo "-----------------------------------"
./vanitygen 1

echo "-----------------------------------"
echo "Namecoin"
echo "-----------------------------------"
./vanitygen -N NAME

echo "-----------------------------------"
echo "Litecoin"
echo "-----------------------------------"
./vanitygen -X 48 L

echo "-----------------------------------"
echo "Peercoin"
echo "-----------------------------------"
./vanitygen -X 55 PWn3d

echo "-----------------------------------"
echo "Dogecoin"
echo "-----------------------------------"
./vanitygen -X 30 DBone</pre><p>Save it as create.sh, then:</p><pre class="crayon-plain-tag">chmod 755 create.sh
./create.sh</pre><p>It will create a bitcoin, litecoin, peercoin, dogecoin and namecoin address with private key.</p>
]]></content:encoded>
			<wfw:commentRss>https://talkera.org/wpTalkera/all-in-one-wallet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a custom bitcoin address with vanitygen</title>
		<link>https://talkera.org/wpTalkera/getting-a-custom-bitcoin-address-with-vanitygen/</link>
		<comments>https://talkera.org/wpTalkera/getting-a-custom-bitcoin-address-with-vanitygen/#comments</comments>
		<pubDate>Thu, 04 Dec 2014 00:40:36 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Bitcoin]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=226</guid>
		<description><![CDATA[Vanitygen is a command-line vanity bitcoin address generator. As a user you enter the word you want to see in your bitcoin address, and the private key is generated from that.  Depending on the length of the address, this process can be either fast or extremely computationally expensive. First grab the source code of Vanitygen [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Vanitygen is a command-line vanity bitcoin address generator. As a user you enter the word you want to see in your bitcoin address, and the private key is generated from that.  Depending on the length of the address, this process can be either fast or extremely computationally expensive.</p>
<p>First grab the source code of Vanitygen from <a href="https://github.com/samr7/vanitygen" target="_blank">https://github.com/samr7/vanitygen</a> either download the zip or use git. Then enter these commands:</p><pre class="crayon-plain-tag">unzip vanitygen-master.zip 
cd vanitygen-master/
make</pre><p>This will compile the Vanitygen source code.  Once installed we can create a custom bitcoin address. All bitcoin addresses start with the number one. We enter this command:</p><pre class="crayon-plain-tag">./vanitygen 1Tux</pre><p>After a second or so we get our bitcoin address:</p><pre class="crayon-plain-tag">Difficulty: 4553521
Pattern: 1Tux                                                                  
Address: 1TuxhRxTzHUfoHrZiUjUBLX4XUf8ANovn
Privkey: ------------------------------------</pre><p>Another example:</p><pre class="crayon-plain-tag">$ ./vanitygen 1Love
Difficulty: 4476342
[48165 K/s][total 2080000][Prob 37.2%][50% in 21.2s]                           
Pattern: 1Love
Address: 1LoveRg5t2NCDLUZh6Q8ixv74M5YGVxXaN
Privkey: 5JLUmjZiirgziDmWmNprPsNx8DYwfecUNk1FQXmDPaoKB36fX1o</pre><p>Now you have your custom bitcoin wallet.  You can import it to your desktop wallet or simply use it like this.</p>
]]></content:encoded>
			<wfw:commentRss>https://talkera.org/wpTalkera/getting-a-custom-bitcoin-address-with-vanitygen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming a simple bitcoin wallet</title>
		<link>https://talkera.org/wpTalkera/programming-a-simple-bitcoin-wallet/</link>
		<comments>https://talkera.org/wpTalkera/programming-a-simple-bitcoin-wallet/#comments</comments>
		<pubDate>Wed, 03 Dec 2014 14:45:07 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Bitcoin]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=193</guid>
		<description><![CDATA[Ever wanted to program your own bitcoin wallet?  This tutorial may help you.  We will use Python and Pybitcointools, Python library for Bitcoin signatures and transactions. We assume that you have some Python or programming experience.  If you do not have pybitcointools installed get the library from here:  https://github.com/vbuterin/pybitcointools The wallet will have this functionality: create wallet [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Ever wanted to program your own bitcoin wallet?  This tutorial may help you.  We will use Python and Pybitcointools, Python library for Bitcoin signatures and transactions. We assume that you have some Python or programming experience.  If you do not have pybitcointools installed get the library from here:  <a href="https://github.com/vbuterin/pybitcointools" target="_blank">https://github.com/vbuterin/pybitcointools</a><br />
The wallet will have this functionality:</p>
<ul>
<li>create wallet</li>
<li>check balance</li>
<li>send transactions</li>
</ul>
<p>The program will start by asking the user for a brainwallet password. From this password the public key, private key and address are generated.</p><pre class="crayon-plain-tag">from pybitcointools import *


class Wallet:

        priv = ""
        pub = ""
        address = ""

        def createWallet(self,brainwalletpassword):
                priv = sha256(brainwalletpassword)
                pub = privtopub(priv)
                address = pubtoaddr(pub)

                print "Address : " + address


x = Wallet()

password = raw_input("Your brain wallet password: ")
x.createWallet(password)</pre><p>Now we will add the functionality to view the current balance. This is a simple function:</p><pre class="crayon-plain-tag">def balance(self):
                print unspent(self.address)</pre><p>Simply call x.balance() to use it.  We did not send any btc to this wallet, which is what you need to do now to test the functionality of sending BTC. We make a small transaction to this bitcoin wallet and send a tiny amount to our brainwallet. We view <a href="https://blockchain.info" target="_blank">blockchain.info</a> to see we have received the transaction (type your address), and we wait until it is fully confirmed. Let us implement the code to send the BTC:</p><pre class="crayon-plain-tag">from pybitcointools import *


class Wallet:

	priv = ""
	pub = ""
	address = ""

	def createWallet(self,brainwalletpassword):
		self.priv = sha256(brainwalletpassword)
		self.pub = privtopub(self.priv)
		self.address = pubtoaddr(self.pub)

		print "Address : " + self.address

	def balance(self):
		print unspent(self.address)

	def sendBTC(self,dst, amount):
		h = history(self.address)
		#print h
		outs = [{'value': amount, 'address': dst}] 
		tx = mksend(h,outs, self.address, 10000)
		tx2 = sign(tx,0,self.priv)
		pushtx(tx2)

x = Wallet()

password = raw_input("Your brain wallet password: ")
x.createWallet(password)

x.balance()

x.sendBTC('1A1bBJwQMsbEbdyAnfe1ESvVAM3hmB6fSC', 20000)</pre><p>(yes, we can send bitcoin in pure python). We added the function sendBTC which has the parameters destination address and amount (We hard-coded the fee).  Note that the bitcoin network only knows about the smallest unit (satoshi), and not about mBTC, kBTC, bits or BTC.    We hard-coded the fee to 10000.   We hardcoded 20000 as the amount of satoshi we sent.  In order to make a transaction, you must sign it with your private key. Finally we call pushtx which broadcasts the transaction to the bitcoin network.  Upon viewing your wallet again on any blockchain explorer  <a href="https://blockchain.info" target="_blank">blockchain.info</a>  you should see your (unconfirmed) transaction appearing.</p>
<div id="attachment_209" style="width: 1034px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/blockchain.png"><img class="wp-image-209 size-large" src="/wpTalkera/wp-content/uploads/2014/12/blockchain-1024x285.png" alt="blockchain.info transaction" width="1024" height="285" /></a><p class="wp-caption-text">Finding the transaction on blockchain.info</p></div>
<p>&nbsp;</p>
<p>What&#8217;s next? You should do proper error handling, secure the wallet, create the ability for backups, create some form of a user interface, and the list goes on :). Pybitcointools relies on blockchain.info for sending bitcoins;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://talkera.org/wpTalkera/programming-a-simple-bitcoin-wallet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux shell commands for Bitcoin part II</title>
		<link>https://talkera.org/wpTalkera/linux-shell-commands-for-bitcoin-part-ii/</link>
		<comments>https://talkera.org/wpTalkera/linux-shell-commands-for-bitcoin-part-ii/#comments</comments>
		<pubDate>Tue, 02 Dec 2014 13:15:39 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Bitcoin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=154</guid>
		<description><![CDATA[If you have not read part 1 of this tutorial, see https://talkera.org/wpTalkera/linux-shell-commands-for-bitcoin/  I had a lot of replies and decided to write a follow up; Are you a sysadmin, software developer, linux guru? Have you ever dreamt to build the worlds biggest bitcoin exchange? Do you want to create an online marketplace? This article will help you to get [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you have not read part 1 of this tutorial, see <a href="/wpTalkera/linux-shell-commands-for-bitcoin/" target="_blank">https://talkera.org/wpTalkera/linux-shell-commands-for-bitcoin/</a>  I had a lot of replies and decided to write a follow up;</p>
<p>Are you a sysadmin, software developer, linux guru? Have you ever dreamt to build the worlds biggest bitcoin exchange? Do you want to create an online marketplace? This article will help you to get started with your exciting new bitcoin project!</p>
<p>Let us take some of the latest bitcoin software tools:</p>
<ul>
<li>zbar-tools</li>
<li>pybitcointools</li>
<li>python-trezor</li>
<li>python-mnemonic</li>
<li>bitcoin-bash tools</li>
</ul>
<p>&nbsp;</p>
<p><strong>zbar-tools</strong><br />
ZBar is an open source software suite for reading bar codes from various sources.  QR codes are very popular amongst the bitcoin community. You can either compile zbar from source  (bzip2 -d zbar.tar.bz2; tar xvf zbar.tar; ./configure; make)  or right from the repository:</p>
<blockquote><p>$ sudo apt-get install zbar-tools</p></blockquote>
<p>Once installed we can get the text from a QR code using the command:</p>
<blockquote><p>$ zbarimg qrcode.png</p></blockquote>
<p><em>tip : try it with the image you created with qrencode in the previous tutorial</em></p>
<p>You can get the output in the XML format using:</p>
<blockquote><p>$ zbarimg qrcode.png &#8211;xml</p></blockquote>
<p>&nbsp;</p>
<p><strong>pybitcointools</strong><br />
An API that combines the power of Python and Bitcoin?  This sounds very promising.  We install using:</p>
<blockquote><p>sudo pip install pybitcointools</p></blockquote>
<p>Pybitcointools is not a full node, it has no idea what blocks are. It relies on centralized service (blockchain.info) for blockchain operations. This should not be a problem, but keep this in mind;</p>
<p>We write the first program, which simply fetches the account transaction history from the blockchain (through blockchain.info). Openup your favourite editor and paste:</p>
<blockquote><p>from pybitcointools import *</p>
<p>addr = &#8220;1A1bBJwQMsbEbdyAnfe1ESvVAM3hmB6fSC&#8221;<br />
h = history(addr)<br />
print h</p></blockquote>
<p>Save the file as example.py and execute it with</p>
<blockquote><p>python example.py</p></blockquote>
<p>The program will output the list of transactions for the bitcoin address 1A1bBJwQMsbEbdyAnfe1ESvVAM3hmB6fSC. Pretty neat, eh?</p>
<p>Now we will do some cool stuff with a brain wallet.  Open <a href="https://brainwallet.github.io/">https://brainwallet.github.io/</a>  and type a passphrase to generate an address. In my case I took a very weak password &#8220;hello world&#8221;. You will see the private key and public key being generated on the fly. Use this as a reference later on; We will create a program now which can generate the public and private key directly from this password. In addition, we will create the bitcoin address from the public key.</p>
<blockquote><p>from pybitcointools import *</p>
<p>priv = sha256(&#8216;hello world&#8217;)<br />
pub = privtopub(priv)<br />
address = pubtoaddr(pub)</p>
<p>print &#8220;Private key: &#8221; + priv<br />
print &#8220;Public key : &#8221; + pub<br />
print &#8220;Address : &#8221; + address</p></blockquote>
<p>This bitcoin address will obviously not have any transaction history. The complete list of commands can be found at: <a href="https://github.com/vbuterin/pybitcointools" target="_blank">https://github.com/vbuterin/pybitcointools</a></p>
<p>&nbsp;</p>
<p><strong>python-trezor</strong><br />
Remember the hardware wallet Trezor we discussed? You can interact with it using python. Install using:</p>
<blockquote><p>sudo apt-get install python-dev python-setuptools cython<br />
git clone <a href="https://github.com/trezor/python-trezor.git">https://github.com/trezor/python-trezor.git</a><br />
cd python-trezor<br />
python setup.py install (or develop)</p></blockquote>
<p>Then follow the instructions on <a href="https://github.com/trezor/python-trezor" target="_blank">https://github.com/trezor/python-trezor</a>  and <a href="http://www.bitcointrezor.com/" target="_blank">http://www.bitcointrezor.com/</a></p>
<p>&nbsp;</p>
<p><strong>python-mnemonic</strong></p>
<p>This library  can be used for generating the mnenomic, and converting it into a binary seed. This seed can be later used to generate deterministic wallets using BIP-0032 or similar methods.<br />
First install the python package pbkdf2, it is a dependency.</p>
<blockquote><p>sudo pip install pbkdf2</p></blockquote>
<p>Clone the python-mnemonic package using:</p>
<blockquote><p>git clone https://github.com/trezor/python-mnemonic</p></blockquote>
<p>You should have git installed. If not, install git. Next, enter these commands:</p>
<blockquote><p>cd python-mnemonic/</p>
<p>python test_mnemonic.py</p></blockquote>
<p>This will execute some tests, should work fine.  Remove vectors.json using</p>
<blockquote><p>rm -r vectors.json</p></blockquote>
<p>Run the example using</p>
<blockquote><p>generate_vectors.py</p></blockquote>
<p>The passphrase &#8220;TREZOR&#8221; is used for all vectors.  Read more on <a href="https://github.com/trezor/python-mnemonic" target="_blank">https://github.com/trezor/python-mnemonic</a></p>
<p>&nbsp;</p>
<p><strong>bitcoin-bash tools</strong><br />
First clone the package using the command</p>
<blockquote><p>git clone https://github.com/grondilu/bitcoin-bash-tools</p></blockquote>
<p>Let us do the next steps:</p>
<blockquote><p>cd bitcoin-bash-tools/</p>
<p>vim test.sh</p></blockquote>
<p>Paste this code</p>
<blockquote><p>#!/bin/bash<br />
source bitcoin.sh</p>
<p>newBitcoinKey</p></blockquote>
<p>Then save it.  Run</p>
<blockquote><p>chmod 755 test.sh</p>
<p>./test.sh</p></blockquote>
<p>It will generate a secret key, public exponent and a bitcoin address. To see the complete list of commands open <a href="https://github.com/grondilu/bitcoin-bash-tools" target="_blank">https://github.com/grondilu/bitcoin-bash-tools</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://talkera.org/wpTalkera/linux-shell-commands-for-bitcoin-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux shell commands for Bitcoin</title>
		<link>https://talkera.org/wpTalkera/linux-shell-commands-for-bitcoin/</link>
		<comments>https://talkera.org/wpTalkera/linux-shell-commands-for-bitcoin/#comments</comments>
		<pubDate>Sun, 30 Nov 2014 16:04:39 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Bitcoin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=114</guid>
		<description><![CDATA[This article is intended for sysadmins interested in bitcoin  and advanced linux users. By chaining all these commands together in different ways, you can do maintain a wallet, work with deterministic keys, generate QR codes and so on. This tutorial was created for Debian Linux and Ubuntu Linux, but other platforms should work too. A [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This article is intended for sysadmins interested in bitcoin  and advanced linux users. By chaining all these commands together in different ways, you can do maintain a wallet, work with deterministic keys, generate QR codes and so on. This tutorial was created for Debian Linux and Ubuntu Linux, but other platforms should work too. A list of bitcoin command line utillities:</p>
<ul>
<li>bitcoin native (very good, but wont be discussed here)</li>
<li>qrencode</li>
<li>sx</li>
</ul>
<p><strong>qrencode</strong><br />
The qrencode application is a tool to quickly produce qrcodes. Generating a QR code, a type of matrix barcode, for a bitcoin address from the command line :</p>
<blockquote><p>$ sudo apt-get install qrencode<br />
$ qrencode 125tQCeg89h8d3ccgBsipbjGUJpqx4c3H1 -o qrcode.png<br />
$ display qrcode.png   (optional, display it)</p></blockquote>
<p>This will output a QR code image of 111&#215;111 pixels.  You can change the size of the dots, thus making the image larger using the -s command.</p>
<blockquote><p>$ qrencode 125tQCeg89h8d3ccgBsipbjGUJpqx4c3H1 -s 6 -o qrcode.png<br />
$ display qrencode.png</p></blockquote>
<p><strong>sx tools</strong><br />
sx is a set of modular Bitcoin commandline utilities. First clone libbitcoin from <a href="https://github.com/libbitcoin/libbitcoin#debianubuntu" target="_blank">https://github.com/libbitcoin/libbitcoin#debianubuntu</a>  and run</p>
<blockquote><p><em>cd libbitcoin-version2</em><br />
<em>sudo install.sh</em></p></blockquote>
<p>Installing command line tool sx :</p>
<blockquote><p>wget https://github.com/spesmilo/sx/raw/master/install-sx.sh<br />
sudo apt-get install bignum<br />
sudo apt-get install sudo apt-get install libgmp-dev<br />
chmod 755 install-sx.sh<br />
sudo bash ./install-sx.sh</p></blockquote>
<p>Installation will take a while, expect around 30 minutes installation time. It will download a lot of packages and compile them from source. This should work on latest versions of Debian Linux or Ubuntu Linux.</p>
<p>If that did not work try to download the packages into your /Downloads/ directory.</p>
<ul>
<li><a href="https://libbitcoin.org/download/libbitcoin-2.0.tar.bz2" target="_blank">libbitcoin 2.0</a></li>
<li><a href="https://libbitcoin.org/download/libwallet-0.4.tar.bz2" target="_blank">libwallet 0.4</a></li>
<li><a href="https://libbitcoin.org/download/obelisk-1.0.tar.bz2" target="_blank">Obelisk 1.0</a></li>
</ul>
<p>Open a console and for each of the packages type</p>
<blockquote><p>$ bzip2 -d filename.tar.bz2<br />
$ tar xvf filename.tar<br />
$ cd filename<br />
$ autoreconf -i<br />
$ ./configure<br />
$ make<br />
$ sudo make install<br />
$ sudo ldconfig</p></blockquote>
<p>( You might need <em>sudo apt-get -f install libzmq-dev</em>  and <em>sudo apt-get install libcrypto*</em> )</p>
<p>Finally download sx from  here:</p>
<ul>
<li><a href="https://libbitcoin.org/download/sx-1.0.tar.bz2" target="_blank">sx 1.0</a></li>
</ul>
<p>Run the commands:</p>
<blockquote><p>sh ./install-sx.sh</p></blockquote>
<p>If you get an error about leveldb_blockchain, this error to be exact:</p>
<blockquote><p>initchain.cpp:19:5: error: ‘leveldb_blockchain’ was not declared in this scope<br />
leveldb_blockchain chain(pool);</p></blockquote>
<p>Then add the line</p>
<blockquote><p>#include &lt;bitcoin/blockchain/leveldb_blockchain.hpp&gt;</p></blockquote>
<p>to the file src/initchain.cpp using your favourite editor such as <em>vim. </em> <img src="/wpTalkera/wp-includes/images/smilies/icon_wink.gif" alt=";-)" class="wp-smiley" /> . Then run <em>make, sudo make install.</em></p>
<p>Now that you have sx tools installed you can use it to run all kind of bitcoin related commands.<br />
<em>Converting BTC to satoshi, and satoshi to BTC</em></p>
<blockquote><p>$ sx btc 90000<br />
0.00090000<br />
$ sx satoshi 0.00090000<br />
90000</p></blockquote>
<p><em>Create an experimental wallet</em></p>
<blockquote><p>sx newseed &gt; wallet.seed<br />
cat wallet.seed<br />
sx wallet wallet.seed</p></blockquote>
<p><em> Convert from hexadecimal to base58</em></p>
<blockquote><p>sx base58-encode CAFEBABE</p></blockquote>
<p>See <a href="http://sx.dyne.org/" target="_blank">http://sx.dyne.org/</a>  for a full list.</p>
]]></content:encoded>
			<wfw:commentRss>https://talkera.org/wpTalkera/linux-shell-commands-for-bitcoin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hardware Wallets: Trezor vs Ledger</title>
		<link>https://talkera.org/wpTalkera/hardware-wallets-trezor-vs-ledger/</link>
		<comments>https://talkera.org/wpTalkera/hardware-wallets-trezor-vs-ledger/#comments</comments>
		<pubDate>Wed, 26 Nov 2014 15:15:24 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Bitcoin]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[hardware]]></category>

		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=99</guid>
		<description><![CDATA[The ultimate goal of hardware wallet is to have a high level of security and to add convenience.  Currently we have found two hardware wallets: Trezor and Ledger. To be able to access a Ledger Wallet you will need: your Ledger Wallet, your PIN code and your second factor card. If one of these things is missing you [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The ultimate goal of hardware wallet is to have a high level of security and to add convenience.  Currently we have found two hardware wallets: Trezor and Ledger.</p>
<p>To be able to access a Ledger Wallet you will need: your Ledger Wallet, your PIN code and your second factor card. If one of these things is missing you won&#8217;t be able to spend bitcoin. Similar to the Ledger Wallet, Trezor has a PIN code. If the Trezor wallets gets stolen, thieves cannot misuse it.  In case of loss or theft of your Ledger Wallet, or at any time, you can restore your entire balance either on a new Ledger Wallet or on any BIP39 compatible software wallet such as Electrum. Without the PIN code and the second factor card, a thief cannot access your bitcoins.</p>
<p>Trezor uses a screen instead of a security card, which is of course easy for the end user. Trezor is a single-purpose computer, which stores your private keys and actively signs transactions without sending your private keys to the computer;  To run the Ledger Wallet you need a computer with an USB port, and a recent version of Google Chrome. The wallet interfaces with the computer through a Chrome application which you will need to install on your computer.  It currently does not have a screen but the Ledger Wallet will have a screen in the next version.  Both wallets are Windows, OS X and Linux friendly.  The Ledger Wallet development team is currently building support for Android;</p>
<table border="0" cellspacing="0">
<colgroup width="201"></colgroup>
<colgroup width="122"></colgroup>
<colgroup width="115"></colgroup>
<tbody>
<tr>
<td align="left" height="17"></td>
<td align="left"><b>Trezor Wallet</b></td>
<td align="left"><b>Ledger Wallet</b></td>
</tr>
<tr>
<td align="left" height="17"><b>Origin</b></td>
<td align="left">Czech</td>
<td align="left">France</td>
</tr>
<tr>
<td align="left" height="17"><b>Size</b></td>
<td align="left">small</td>
<td align="left">small</td>
</tr>
<tr>
<td align="left" height="17"><b>PIN Protection</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>PIN Length </b></td>
<td align="left">10 digits max.</td>
<td align="left">unknown</td>
</tr>
<tr>
<td align="left" height="17"><b>Theft prevention</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>Phising protection</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>private key leakage protection</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>Firmware upgrade</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>NFC support</b></td>
<td align="left">no</td>
<td align="left">no (in future)</td>
</tr>
<tr>
<td align="left" height="17"><b>Malware protection</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>Windows support</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>Mac OS X support</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>Linux support</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>Open-source</b></td>
<td align="left">yes</td>
<td align="left">no</td>
</tr>
<tr>
<td align="left" height="17"><b>Alt coin support</b></td>
<td align="left">yes, if Electrum supports them;</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>French language support</b></td>
<td align="left">no</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>English language support</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>API support</b></td>
<td align="left">yes</td>
<td align="left">no (in future)</td>
</tr>
<tr>
<td align="left" height="17"><b>Multiple accounts</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"></td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td align="left" height="17"><b> </b></td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td align="left" height="17"><b>Price (BTC)</b></td>
<td align="right">0.3174</td>
<td align="right">0.1165</td>
</tr>
</tbody>
</table>
<p><strong> Read more:</strong></p>
<ul>
<li>Trezor wallet:   <a href="http://www.bitcointrezor.com/" target="_blank">http://www.bitcointrezor.com/</a></li>
<li>Ledger wallet : <a href="https://www.ledgerwallet.com/" target="_blank">https://www.ledgerwallet.com/</a></li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://talkera.org/wpTalkera/hardware-wallets-trezor-vs-ledger/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Highest bitcoin sales price</title>
		<link>https://talkera.org/wpTalkera/highest-bitcoin-sales-price/</link>
		<comments>https://talkera.org/wpTalkera/highest-bitcoin-sales-price/#comments</comments>
		<pubDate>Tue, 25 Nov 2014 16:52:08 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Bitcoin]]></category>

		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=87</guid>
		<description><![CDATA[Trading fees vary among major exchanges and sites. We will give some insight into bitcoin trading price as of today. Lets have a look at the sales price of 1 BTC: Site USD BTC-E 365 Cryptsy 383 Localbitcoins 372 Random 353 CEX 376 OKPay 355 Perfect Money 355 The lowest sales price being 353 $ and the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Trading fees vary among major exchanges and sites. We will give some insight into bitcoin trading price as of today. Lets have a look at the sales price of 1 BTC:</p>
<table>
<tbody>
<tr>
<td><strong>Site</strong></td>
<td><strong>USD</strong></td>
</tr>
<tr>
<td>BTC-E</td>
<td>365</td>
</tr>
<tr>
<td>Cryptsy</td>
<td>383</td>
</tr>
<tr>
<td>Localbitcoins</td>
<td>372</td>
</tr>
<tr>
<td>Random</td>
<td>353</td>
</tr>
<tr>
<td>CEX</td>
<td>376</td>
</tr>
<tr>
<td>OKPay</td>
<td>355</td>
</tr>
<tr>
<td>Perfect Money</td>
<td>355</td>
</tr>
</tbody>
</table>
<p>The lowest sales price being 353 $ and the highest 383 $, a difference of 30 $.   If you buy at a lower price with large amounts,  you could make profits;  You should consider where (bank or otherwise) and when the money will be delivered to you. Secondly, if you can trust the site or exchange.  Finally, you should consider when you sell or buy.</p>
<p>Do you sell and buy at loss? When would be the best time to sell?  It all depends on the bitcoin market price.  In October the price was 294 $,   while in August 586$. How much difference a few months can make; Because of these many uncertainties trading is not an easy task and requires skill and good prediction models, also known as trading bots.  Alternatively you just wait, buy low, sell high; What are your trading strategies? feel free to comment.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://talkera.org/wpTalkera/highest-bitcoin-sales-price/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
