Hacker Beach Episode #4

You might have heard the news on twitter or on the hackerbeach blog: Hacker Beach #4 is a go and will take place in Ecuador this year. Râu Cao has written a post with the basic facts. But if you want to join you should hang out in IRC in #hackerbeach on freenode where most of the chat is tacking place. 
So, see you in Canoa. (but make sure to keep an eye on El Niño)

Some explanation about the Bitcoin-Telegram bot

A few days ago I blogged about a little bot that I have been working on. The demo shows how m-pesa works in Kenya and how to request Bitcoin through a messenger application like whatsapp or telegram. Surprisingly it got way more attention than I expected and some for wrong reasons.

In my post I emphasised that this is a technical demonstration on how something like this could work. It is not a product and not something that anyone can use. 

It shows what is technically possible by combining some existent tools and how the user experience could look like. Which is pretty amazing in my point of view and probably also the reason for the attention the blog post got. Providing technical ideas is often easy but making a real world product is complicated on so many levels. 

Sadly it seems many people either did not read the article or interpreted things that are simply not true without validating or asking. - even people from the same industry who I expected to have more background knowledge.
And because I am dealing with money I should have been a bit more careful. 

Here are a few things I would like to clarify again:

This app is not a product or service! It is not something you can use. 
It was simply an experiment that I did myself and wrote a blog post with a video about it. It is a simple blog post by a random dude on the internet. Please do not treat it as a product or a service that launched or is about to launch. 

There is NO actual Bitcoin to Shilling / m-pesa conversion taking place. Actually I thought this would be obvious enough but I should have emphasised it better in the video. It seems people got a wrong idea that someone got paid through an exchange. I am sorry for this confusion.
If I have apples I can not simply give you bananas. If I have Bitcoin I can not magically convert them to Kenyan Shilling on an m-pesa account. This is a complicated forex task and it is also regulated and I have way to little knowledge about that. As mentioned in the post I would not be allowed to do that.
In my example I had Bitcoin AND some money on my own m-pesa account. No third party or forex was involved. No conversion took place. 

It is simply using existing tools out there. There is actually nothing that I have invented whatsoever. It is simply using existing tools that are either publicly available, Open Source or services operating for years. And imho no special knowledge is required to do something like this. I am simply standing on the shoulders of giants.

It is not showing how it can be done. The post only shows how something like this could look like. Even though I wish I could show more code. 

There are a lot of companies that actually allow sending money to m-pesa. Maybe they do not have a bot running in telegram or other messenger services, but it is nothing special. I could have probably also integrated with any of these companies. Give me a few hours and I’ll do that. 
The same goes for airtime. To send airtime to a phone you simply integrate a reseller of airtime and that’s it. 

Also to send automated m-pesa payments you can easily use a normal Android phone. For example I’ve simply automated what you would do manually to send a P2P payment. A script navigates through the menu, enters the recipient and amount, and confirms the transaction.
This might not scale that well, but is perfectly fine for such an app and a demo.

I could have done the same with Paypal or credit cards. You can also request credit card or paypal payments through a messenger and do the exact same thing. With using the Stripe API maybe this would have been even easier. 
Bitcoin here is used as an online payment method. It might work a bit faster and better and most importantly Bitcoin is where my interest lies. 
Btw. Worldremit has similar ideas, and probably not only them.


Maybe I should have known better and emphasised the points more clearly, but I simply did not expect that many people do not read and think about what they see. (and actually also not that it is very interesting in the first place.)
Please note that all this has been the work of a single person in about 2-3 days. 

If you have questions or if something is unclear, please contact me: hello@michaelbumann.com

Remote control an android app from a web app

When a service does not provide an API but you want to automate repetitive manual tasks you tend to use screen scrapping. You write a program that simply executes the same tasks that one would do manually. There are even great hosted tools out there to get structured data from websites that do not offer an API, for example have a look at mozenda or kimonolabs

For a demo that I have been doing lately I needed the same thing but for a mobile application, actually not even a regular mobile app but a SIM application. After first being stuck with the idea to use some kind of automated testing tools to do that I thought there must be some kind of solution to simulate user input - in this case touch inputs. 
`adb shell` to the rescue. When you have the debug mode enabled on your android phone and if you have the android developer tools installed you can use the adb command to send inputs to the phone. And because it is a command line utility you can simply automate it. It will not allow you to read the content on the screen, but I did not need that. 

So I’ve made a little ruby script that executes the touch inputs by calling adb and a little sinatra HTTP wrapper to connect everything to a web app.
A publicly accessible web app sends a HTTP request to a computer that has a connected android and executes the touch inputs.

So as long as you do not need to read what is on the screen this allows you to automate everything on your andorid phone.I could imagine there is a better way to do this, but it worked great for my case.

Here is some example code:

Sending Bitcoin to a Kenyan mobile money account using the telegram messenger

Update: This post was about a technical prototype application that I've developed which allowed you to use bitcoin to send money to an m-pesa mobile money account. I've made a demo video about the app here. The demo got great attention and but sadly I had to remove the post and replace it with this clearification. If you have questions, please contact me

Update (August 2016): KenyaInsights article: "Revealed: How A Worried Safaricom Used Backdoor To Shutdown Bitcoin Which Was Set To Neutralize Mpesa Dominance In Kenya"


You might have seen the demo of a little hack that I have done while visiting Nairobi. The demo shows how it could look like to request money (in my case Bitcoin) through a messenger like whatsapp or telegram and how the m-mesa agents work.

Surprisingly the post got some attention but it seems quite some people have miss interpreted it (or haven't read my blog post at all). That's why I had to decide to remove the post.

If you have seen the demo you find some more explanation about it here: Some explanation about the Bitcoin-Telegram bot - some things that I should have probably emphasised more in the first place...lession learned.

My sole interest was to experiment with possible user experience ideas and integrations. Again: it is not a product that is usable now and no currency conversion whatsoever took place. Also in most cases m-pesa is used through a hack from an android phone. Nothing that would work besides from such a demo.


Oh and when you read stuff on the internet... do not forget: it is THE INTERNET and here is some cat content: image here is more: there is a whole blog about cats and money: cashcats.biz

chainbook.bit - a decentralized social network

One of my projects for the 2015 Chaos Communication Camp has been chainbook.bit A decentralized address book, or let’s call it social network, using the namecoin blockchain and remotestorage.

The goal was to build an address book application that stores absolutely no user data and loads the contact information from a decentralized source managed by the contact itself.

Components:

 Namecoin is a decentralized open source information registration system. It is the first and imho the most interesting fork of Bitcoin. It is basically a key-value store and uses the bitcoin blockchain technology to make sure that each key can only be used once and updated only by the rightful owner - without any central authority!
One of the most discussed use cases is a decentralized domain registration system.  

Another use case is the storage of identity information - the blockchainID. It describes a standard schema for identity/profile information stored as JSON in the blockchain. 
chainbook.bit uses this information and renders a nice website. 

 Remotestorage is a great solution for web applications to allow the user to store application data independently from the application. The user can choose the storage provider or even run his own storage provider. The user owns his the data - not the application. chainbook.bit uses remotestorage to store the user’s contact connections. 


So, everybody manages their own profiles in namecoin and user specific connections are stored in remotestorage. No data is stored in the app, the contact has full control of the profile information which is securely stored in the namecoin blockchain. 

With these two great tools at hand we only need a simple single page HTML/JavaScript app that connects the two and the decentralized address book is done. The JS app has no dependencies and runs completely in the browser.

Have a look at the source code and the README on GitHub and try the app here deployed on 5apps and under chainbook.bit. - this is my profile u/bumi

The implementation currently is pretty rough (I used it to teach me some react.js) and the design is pretty much not existent (want to help out with that?) - but I hope you get the idea. 

architecture sketch:

image

Money, Currency and Payments in the I.R. Iran

I got a chance to visit Iran and I could learn a bit about their banking and payment system. In the following I’ve collected some notes about the currency/money and its use in Iran.

Currency in the I.R. Iran
The official currency of I.R. Iran is Rial (﷼). In one of uncountable exchange places in Tehran 1 EUR is currently traded for ~37.000 Rial. This apparently makes the Rial one of the least valued currencies in the world.
In the current (Imam Khomeini) series of bank notes issued by the central bank the highest value is 100.000 rial. However there are Iran Cheques in 500.000 and 1.000.000 denominations in circulation. These have been initially issued by major state banks (not the central bank) and are treated like cash. Supposedly the Central Bank initially refused to print larger notes in the fear of inflation and counterfeiting. But it allowed banks to print those cheques. Today these cheques are also printed by the Central Bank. But still they are cheques and no legal tender bank notes - but treated equally.
Also from what I have heard there have been plans of a  redenomination and to remove 3 or 4 zeros from the notes. 

 
Rial? no Toman?!
And now the confusion for me started. I knew about the Rial and most prices in fact are written in Rial. BUT people are using toman. Toman is a superunit of the official rial and 1 toman equals 10 rials.
So if somebody says it costs 2.000 she actually means 2.000 toman and thus 20.000 rials. But written prices are pretty much always rials. 

For me this was super confusing in the beginning. Especially when I was not used to the amounts and did not know the general price level.

Debit Cards
Unfortunately I could not test the card system myself. Debit cards are widely used. Pretty much every small shop seems to accept debit cards and on every corner of the major cities you will find ATMs.
Similar as you know it from any other country, except it is not connected to any international banking system and you will not see any VISA, MasterCard, etc. logo. Cards have been introduced in 2006 with the Shetab interbanking communication system. Before that, I was told, everything was pretty much cash based.
Surprising for me was that the POS devices are, for whatever reason, under sanction and thus scarce. I will next time try to get a debit card. 


Bitcoin
One of my interests was obviously to see if people know or use Bitcoin. A while back a shoeshop from Esfahan got a lot of attention in the Bitcoin media for accepting Bitcoin. They say, they want people to be able to get their amazing shoes but due to the sanctions people can not pay them, thus they accept Bitcoin payments. Unfortunately I could not meet or visit the shop this time. But I could talk to a lot of people about Bitcoin. Some have heard about it but have very little understanding of what it is and how it works. Others are researching but could not get bitcoin yet. So I could not find much happening yet, but there is a lot of interest. I hope websites like will continue to educate people.

Yo! - the most exciting application of 2014

Yo! is probably one of the most exciting and strangest apps of 2014.
What started on April Fools Day was suddenly a company valued at between $5 and $10 million in July and passed a million users just three months after its launch.

So what is Yo!?

The download page describes the app as the following:

The simplest & most efficient communication tool in the world.
Yo is a single-tap zero character communication tool.


So you can subscribe to a list of users and send them a Yo! – for sure the simplest and most efficient communication tool. Wanna say "good morning"? just Yo.
Instead of sending your friends a text message you can now simply send a Yo! – And if you've never heard of Yo! before you probably now think "WTF?" and if you've tried Yo! it is likely that you think "ok, that's fun … but WTF?!"
It took me a while to understand Yo! and maybe the vision behind it.

"Yo is everything and anything, it all depends on you, the recipient and the time of the Yo." (also from the app description)

Think about that you can Yo! with not only people but things. Anything. Think of the services and websites you use. Think of the electronic devises around you.
What could you do if you can send and receive a Yo! from them?!

But before we look into the use cases and problems that could be solved with Yo! we think about notifications for a moment.
With notifications I mean those little push notifications that get sent to your mobile. Those little messages want your attention and notify you of some event that happend. Maybe an e-mail. Maybe some news. Maybe that you left the lights on when you leave your house.
Notifications are the prime time of your mobile device. It's displayed on your home screen and you pretty sure see it.
That is highly valuable for any service or company. It is valueable to be able to notify the user of some event and get her attention and get her to use the service again.

And this is where Yo! comes in.

How can a service directly notify a user on his phone? and How can a user interact with a service by pressing a single button?
Yo provides an answer to that.

Use cases

OK, what use cases can we think of. Have a look at the YOindex. That is an index of applications that integrate with Yo!.
Here are some examples:

  • YOMYPACKAGE sends you a YO! when a package has arrived and maybe is ready for pick up. 
  • YOYOUTUBE get a YO! when your favorit YouTube star has uploaded a new video.
  • FLIGHTYOGURT set a target price for a flight and get notified when it reaches the price.
  • STARBUCKSMAP tap and it sends you the location of the nearest startbucks.
  • Need a reminder that you have to take some medication? Or that you have taken your medication? – Just Yo!

And this is just a short list of simple applications. Send a Yo to your house to turn of the lights, or send a Yo to track the cups of coffee you drink.
A lot of these things you already can do with IFTT. Have a look at the recipes that integrate with Yo!

The concept of the application is so simple, but your imagination is the limit to what you can do with it.

YO! API
And for us developers the best thing is Yo! has amazingly simple API (suprise! :)
All you need to basically do is to send and receive simple HTTP requests.
We have played for not more than 1 hour with the API and build two little apps:

Yo-to-all broadcasts your Yo! to all subscribers.
https://github.com/bumi/yo-to-all

TODAYILEARNED sends you a daily link with some interesting facts and wikipedia article.
https://github.com/bumi/today-i-learned


I hope this gives you a little bit of understanding of what Yo! is and inspires you to think how you can use or integrate Yo! in your applications.

How to develop Bitcoin applications - an overview

At Railslove we have developed our first Bitcoin application that went into production early this year and if you are following the Bitcoin ecosystem you might have heard of it:
BitPesa is a remittance product based on Bitcoin for Kenyan diaspora.

That means people can send money to there relatives in Kenya using Bitcoin. Because of the digital nature of Bitcoin it is perfect for cross-border transactions that are slow and expensive with existing payment solution.
Read more about BitPesa for example here on CoinDesk 

In this post I want to give you a brief introduction on how to write applications that integrate with the Bitcoin network and look into different options.

Using a Payment Service Provider

Like for traditional payment methods there are Payment Service Providers (PSP) for Bitcoin. These companies make it super easy for you to accept Bitcoin payments.
You basically just add a little snippet to your website and you are good to go. For companies that do not want to hold Bitcoins or want to instantly exchange parts of it to fiat currency these service provides settle your account in your currency.
That means you can request your amount in fiat currency, the customer pays in Bitcoin and the service provider transfers fiat currency to your traditional bank account.

There are several companies out there that you can use. Some big players and some smaller ones that often are specialised on local markets:

* Bitpay: probably the most famous Bitcoin PSP. Provides an extensive API and tools to integrate into your application. no transaction fees
* Coinbase: provides a hosted wallet as well as merchant services to accept Bitcoin. No transaction fees for the first 1Mio USD.
* Coinify: provides a Bitcoin exchange and merchant services.
* Yellowpay: a company providing specialized services for the Middle East.


Using a service providing Bitcoin API

The second type of services provide try to make Bitcoin network more accessible for developers.
They focus on providing a secure Bitcoin infrastructure that the developers do not need to care about when integrating Bitcoin features. Restful HTTP APIs are provided to access data like addresses, blocks, transaction, etc.
Besides using a hosted service there are also tools like insight.is or toshi.io that provide similar services but self hosted. They sit behind a full bitcoin core installation and expose a similar HTTP interface to built upon.

* helloblock.io: extensive API for addresses, transactions, blocks, wallets.
* gem.co: currently in private beta
* toshi.io: the newly open sourced ruby application written by Coinbase. It is a full bitcoin node and exposes a HTTP and Websocket API
* insight.is: an open source node.js application by bitpay. Integrates with the bitcoin code RPC interface and exposes a complete HTTP and Websocket API.

Writing your own integration

And then you of course can directly integrate with the Bitcoin network.
Here you can either call the RPC interface of the bitcoin core daemon or fully integrate Bitcoin into your application for example using the bitcoinj library.
This means you manually handle the Bitcoin keys and transactions in your application and you deal with your wallet.
For sure this allows the most exciting application to be built and I highly recommend looking into the bitcoinj library. It makes working with the network pretty easy.
The upcoming v0.12 release will also support hirarchicaly deterministic wallets that will allow easier backups and more security.

* bitcoin core RPC: the core bitcoin application can be run as a daemon and expose a RPC interface to all its functionality
* bitcoinj: the Java library that powers a lot of bitcoin wallets (like the Android Bitcoin wallet). It lets you deeply integrate Bitcoin into your application. Have a look at the examples to get started.
* toshi.io: Toshi is a full Bitcoin node so you not only can use its APIs but also integrate build on top of it and integrate it into your application.


I hope this gives you some overview of how you can build apps for the Bitcoin ecosystem. Let me know you have questions or need help.

Help making AfricaHackTrip - The Movie

tl;dr: Please support our indiegogo campaign to make the AfricaHackTrip movie. Click here.


From our tour to explore the vibrant East African tech scene in Kenya, Uganda, Rwanda and Tanzania we have collected more than 30 hour of video footage and thousands of pictures. Our goal now is to turn this into a movie - a documentary about East African tech hubs and about what we have found visiting some very inspiring places

Our goal is to to share the information and experiences with the communities in Europe and make more people aware of the fast growing tech scene in East Africa. - Something that I was not aware of prior to the trip. 

To achieve this we need your help! It is a lot of work to go through all the material and turn it in a documentary. And we need to hire someone for cutting the material and the post production. For that we are looking to  raise 7000 USD

If you like what we are doing and if you are interested in the movie please head over to our indiegogo campaign and support us. - Did I mention that we have some great perks to say thank you? 

Also please consider spreading the word? Know anybody who might be interested, please let them know and share the link to the campaign and our website: 

https://www.indiegogo.com/projects/africahacktrip-the-movie/x/1586873
http://africahacktrip.org

Did I mention we have some awesome perks for you? 

Stickers, T-Shirts, Previews, ... check them out... ;)

image 

Happy Happiness day!

Today we are celebrating the International Day of Happiness. - A day established in 2012 by the United Nations General Assembly. The pursuit of happiness is a fundamental human goal. 

So pass it on and give lots of hugs, love and high-5s to everyone!