<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Lewis Daly on Medium]]></title>
        <description><![CDATA[Stories by Lewis Daly on Medium]]></description>
        <link>https://medium.com/@lewdaly?source=rss-e6ce088cb029------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*07lQCkUBwXswgqclc8wc0Q.jpeg</url>
            <title>Stories by Lewis Daly on Medium</title>
            <link>https://medium.com/@lewdaly?source=rss-e6ce088cb029------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 00:26:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lewdaly/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[My One-Click Mojaloop Deployment: One Year Later]]></title>
            <link>https://medium.com/@lewdaly/my-one-click-mojaloop-deployment-one-year-later-6e7ba7ea4069?source=rss-e6ce088cb029------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e7ba7ea4069</guid>
            <category><![CDATA[vagrant]]></category>
            <category><![CDATA[mojaloop]]></category>
            <category><![CDATA[fintech]]></category>
            <dc:creator><![CDATA[Lewis Daly]]></dc:creator>
            <pubDate>Mon, 17 Aug 2020 05:16:48 GMT</pubDate>
            <atom:updated>2020-08-17T05:16:48.037Z</atom:updated>
            <content:encoded><![CDATA[<p>A year or so ago, I wanted to learn more about <a href="http://mojaloop.io/">Mojaloop,</a> and hopefully help others get up and running with their own test environment.</p><p>A year on, I’ve come back again with the help of none other than my Dad to make it even easier. This time, we’re swapping Terraform and GKS for Vagrant, Virtualbox and Ubuntu to hopefully make life even easier.</p><p><em>So, without further delay, I present to you </em><a href="https://github.com/tdaly61/mini-loop"><em>Mini-Loop</em></a><em>.</em></p><h3>Mini-Loop</h3><p>Mini-loop is an opinionated, batteries-included installation of Mojaloop, designed for newcomers to the Mojaloop Community who want to get a working example of Mojaloop without worrying about Kubernetes, Helm and our Postman tests.</p><h3>Motivation</h3><p>We noticed that a lot of newcomers to the Mojaloop Community struggled to get a local installation working through the <a href="https://docs.mojaloop.io/documentation/deployment-guide/">installation steps</a>, and the many different options presented for an installation (which OS, which Kubernetes environment ad version, which Helm version to name a few) was sometimes hard to understand, especially for newcomers to Kubernetes and Helm.</p><p>So we set out to make Mini-Loop, which can be installed in a few steps:</p><pre>git clone https://github.com/tdaly61/mini-loop.git<br>cd mini-loop/vbox-deploy<br>vagrant up</pre><p><em>Well, it’s not quite that easy, there are a few prerequisites you may need to install, namely VirtualBox and Vagrant.</em></p><p>Should everything work as expected, you will have:</p><ol><li>An Ubuntu virtual machine, with MicroK8s and Helm3</li><li>Mojaloop v10.1.0 installed on MicroK8s (yes, we know this is a little outdated — we’re working on it!)</li><li>Seeded databases, with configuration for 2x simulated DFSPs</li><li>Passing ‘Golden Path’ Mojaloop tests</li></ol><h3>Set Up</h3><h4>Hardware</h4><p>In order to run Mini-Loop successfully, we recommend the following hardware requirements:</p><ul><li>minimum 6GB ram available (8GB recommended)</li><li>minimum 32GB storage available</li><li>broadband internet connection (for downloading initial linux images in the form of vagrant boxes. if your internet connection is slow you may want to consider using the <a href="https://github.com/tdaly61/mini-loop#google-cloud-deployment">Google Cloud Version</a> instead)</li></ul><h4>Software</h4><p>Mini-loop uses Vagrant to manage the a Virtual Machine (VM), which in turn uses VirtualBox. Before proceeding, make sure you have installed:</p><ul><li><a href="https://www.vagrantup.com/">HashiCorp </a><a href="https://www.vagrantup.com/">vagrant</a></li><li><a href="https://www.virtualbox.org/wiki/Downloads">Virtualbox and accompanying Guest Additions</a></li></ul><blockquote><em>You may also find the following links helpful to get up and running with Vagrant and Virtualbox<br>- </em><a href="https://medium.com/@AnnaJS15/getting-started-with-virtualbox-and-vagrant-8d98aa271d2a">Getting Started with Virtualbox and Vagrant</a><br>- <a href="https://medium.com/@botdotcom/installing-virtualbox-and-vagrant-on-windows-10-2e5cbc6bd6ad">Installing VirtualBox and Vagrant on Windows 10</a></blockquote><h3>Installing Mojaloop</h3><pre>git clone https://github.com/tdaly61/mini-loop.git<br>cd mini-loop/deploy-vbox<br>vagrant up</pre><p>vagrant up is where the magic happens. This step does the following:</p><ol><li>Downloads an Ubuntu image and runs a virtualbox Virtual Machine (VM)</li><li>Boots and configures the VM</li><li>Installs Kubernetes, Helm and Postman</li><li>Downloads and installs the Mojaloop Helm Charts</li><li>Downloads and runs the Mojaloop Golden Path tests</li></ol><p>The first part should look something like the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zqopmI_shg1iXicX4Txpmg.png" /></figure><p>And when you see something like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZBxOdjJAgU6rB1xka_0ENg.png" /></figure><p>That is the end of the golden path tests, and your Mini-loop environment is up and running.</p><h3>Verifying Everything Works</h3><p>As a part of vagrant up, the Mojaloop environment is configured, and the golden path tests are run. So should your vagrant up command succeed, then you can be pretty confident that everything is working as expected. Make sure to read the console output however, just to be sure.</p><h3>Running an Example Transfer</h3><p>We also provide some shell scripts so you can run your own example Mojaloop transfer:</p><pre># log into the vagrant box<br>vagrant ssh</pre><pre># run an example transfer<br>/vagrant/scripts/_example_transfer.sh</pre><p>Which will look something like the following:</p><pre>$ /vagrant/scripts/_example_transfer.sh<br>Setting up environment<br>Creating the transfer (request from Payer -&gt; Payee)<br>Created a transfer with TRANSFER_ID: 9b9bd5dc-7ca6-84a8-da71-44e6f8c4472e</pre><pre>fulfilling the transfer (request from Payee -&gt; Payer)<br>Approved transfer: 9b9bd5dc-7ca6-84a8-da71-44e6f8c4472e</pre><pre>Get Payer Position<br>[{&quot;currency&quot;:&quot;USD&quot;,&quot;value&quot;:103.11,&quot;changedDate&quot;:&quot;2020-07-20T12:33:09.000Z&quot;}]<br>Success</pre><pre>Get Payee Position<br>[{&quot;currency&quot;:&quot;USD&quot;,&quot;value&quot;:-203.11,&quot;changedDate&quot;:&quot;2020-07-20T12:33:09.000Z&quot;}]<br>Success</pre><p>If you run the _example_transfer.sh script more than once, you should see the DFSP positions gradually change more and more over time.</p><h3>Troubleshooting</h3><p>If you run into any problems getting Mini-Loop set up, or have any other questions, you can:</p><ul><li>Reach out to @Tom Daly or @Lewis Daly on the <a href="https://mojaloop.io/slack">Mojaloop Slack</a></li><li>Post your question in the #help-mojaloop channel</li><li>Open an issue on the <a href="https://github.com/tdaly61/mini-loop.git">Mini-Loop GitHub Repo</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e7ba7ea4069" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My One-Click Mojaloop Deployment]]></title>
            <link>https://medium.com/@lewdaly/my-one-click-mojaloop-deployment-6a6cd599f370?source=rss-e6ce088cb029------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a6cd599f370</guid>
            <category><![CDATA[financial-inclusion]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[mojaloop]]></category>
            <dc:creator><![CDATA[Lewis Daly]]></dc:creator>
            <pubDate>Tue, 07 May 2019 07:26:22 GMT</pubDate>
            <atom:updated>2020-08-17T05:19:31.029Z</atom:updated>
            <content:encoded><![CDATA[<h4>A guide for a Mojaloop Deployment using Terraform, GKS, K8s, Helm and Make</h4><blockquote><strong>Update August 2020:</strong> This post is over a year old now, and while still good as a reference piece, you should check my latest (more supported) super simple Mojaloop deployment: <a href="https://medium.com/@lewdaly/my-one-click-mojaloop-deployment-one-year-later-6e7ba7ea4069">Mini-loop</a></blockquote><p>I’ve been wanting to start making contributions to the <a href="http://mojaloop.io/">Mojaloop</a> project after attending the <a href="https://medium.com/dfs-lab/heres-what-actually-went-down-at-the-2019-mojaloop-bootcamp-e40568b12cc4">Mojaloop bootcamp</a> earlier this year.</p><p>Since I don’t have the funds to leave instances running around the clock, I thought I’d make a simple tool for automating the deployment and configuration of a Mojaloop environment on Google Kubernetes Engine.</p><h3>Why GKS?</h3><p>The answer is quite simple really — I accidentally paid them $150 in advance (instead of $15), and hence have money to burn with Google. I actually already ran through a manual version of this demo using Digital Ocean’s managed Kubernetes service, and found the steps to be mostly the same.</p><p>Also, Amazon charges for their managed Kubernetes service, and Google does not.</p><h3>Initial Setup</h3><p>Before we get to the make commands, there&#39;s a few things you will need to set up first on your local machine.</p><p>I’m using <em>macOS</em>, so this guide will be tailored for my environment, but if you want to contribute instructions for Windows or Linux, feel free to help out in the comments below.</p><p>You will need to install the following things before this step. I’ll leave that up to you to figure out.</p><pre>- brew<br>- make<br>- node<br>- git</pre><p>Let’s start by installing <em>terraform</em> and the <em>kubernetes cli</em>:</p><pre># install terraform + kubernetes cli<br>brew install terraform<br>brew install kubernetes-cli<br>brew install kubernetes-helm</pre><h3>Google Cloud Config</h3><p>Then set up a new project in Google Cloud Console. I called mine moja-box. Then download the service.json file. I followed <a href="https://github.com/daaain/terraform-kubernetes-on-gcp/blob/master/docs/gcp.md">this</a> guide to help me set up the correct access key.</p><ul><li>Create a new service account key default@moja-box.iam.gserviceaccount.com Role: Project/Editor</li><li>Click “Create”</li><li>Save the .json file to ./config/default.json</li><li>run echo &#39;default.json&#39; &gt; ./config/.gitignore to make sure we don&#39;t add accidentally this to git.</li></ul><h3>Google Cloud Local</h3><pre>#Install `GCloud` and setup<br>brew tap caskroom/cask<br>brew cask install google-cloud-sdk</pre><pre>gcloud components update<br>gcloud auth application-default login</pre><pre>#set the region - I chose asia-southeast1-a as it&#39;s close to me<br>gcloud config set compute/location asia-southeast1-a<br>gcloud config set project moja-box #or your project name</pre><h3>The configuration</h3><p>To install the Terraform configuration and makefiles, check out my moja-box repo:</p><pre>git clone <a href="https://github.com/vessels-tech/moja-box.git">https://github.com/vessels-tech/moja-box.git</a></pre><p>Shout out to <a href="https://github.com/daaain/terraform-kubernetes-on-gcp/">https://github.com/daaain/terraform-kubernetes-on-gcp/</a> , where I got the initial Terraform configuration for the Kubernetes cluster.</p><p>Then we need to configure the terraform secrets:</p><pre>cp ./terraform/secrets.auto.tfvars.example ./terraform/secrets.auto.tfvars</pre><p>Edit this file to your desired username and password. Keep in mind that the password must be at least 16 digits long.</p><p>Then run make deploy-infra to perform a dry run with Terraform and verify the config before actually spinning up the Kubernetes cluster.</p><h3>Terraform, Kubernetes and Mojaloop:</h3><p>Once all this configuration is set up, it’s as easy as running:</p><pre>make deploy-infra-apply</pre><p>To deploy the kubernetes infrastructure, and</p><pre>make deploy-kube</pre><p>This will then download the kubernetes config to your local machine, set up Helm and install the following charts:</p><ul><li>mojaloop</li><li>nginx ingress</li><li>kubernetes dashboard</li></ul><blockquote><em>Note: I wouldn’t recommend these settings for a production system, this is really just for testing only. There are a few key security shortcuts we took, such as deploying the kubernetes-dashboard in insecure mode.</em></blockquote><p>Finally, run make print-hosts-settings to show how you can configure your /etc/hosts file to allow you to talk to the mojaloop deployment.</p><pre>$ make print-host-settings</pre><pre>#Make sure your /etc/hosts contains the following:<br>#<br>#  &lt;cluster_ip&gt;	interop-switch.local central-kms.local forensic-logging-sidecar.local #central-ledger.local central-end-user-registry.local central-directory.local #central-hub.local central-settlement.local ml-api-adapter.local</pre><p>After waiting a 5–10 minutes, the dashboard should be running. In a separate shell, run:</p><pre>make proxy-kube-dash</pre><p>and follow the printed link to log into the dashboard. You should see something similar to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cFkzXHvTejT_SLYRSCqZ_w.png" /><figcaption>Kubernetes Dashboard with Mojaloop half-running</figcaption></figure><p>After a few more minutes, everything should start to turn green, and Mojaloop will be available:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gvv-854e9XwHl0K10EapGQ.png" /><figcaption>The dashboard with all services running!</figcaption></figure><p>You can now check that everything is up and running using curl:</p><pre>curl -H Host:&#39;central-directory.local&#39; &lt;cluster_ip_address&gt;/health</pre><pre>#eg<br>curl -H Host:&#39;central-directory.local&#39; <a href="http://35.247.170.113/health">http://35.247.170.113/health</a><br>#should print {&quot;status&quot;:&quot;OK&quot;}</pre><p>You can also go to http://central-directory.local in your browser if your /etc/hosts file is set up correctly.</p><h3>Mojaloop Config:</h3><p>Once the mojaloop deployment is up and running, we can run a bunch of curl commands to configure the settlement accounts and demo DFSPs.</p><p>First we should set up the environment variables. copy ./config/mojaloop.private.example.sh to ./config/mojaloop.private.sh, and edit the fields there.</p><p>Next, edit the variables in ./config/mojaloop.public.sh.</p><p>Next, run the following:</p><pre>make config-all</pre><p>This will run through the scripts in the ./mojaloop_config directory, and set up the required Settlement accounts and DFSPs.</p><h3>Test Transfer</h3><p>Now that our DFSPs are set up, we can initiate a test transfer. Just run:</p><pre>make example-create-transfer</pre><p>and should everything be configured correctly, the bash script will create a transfer, accept it, and then print out the payer position.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uTcEBkW2mJdzkgV-RSuxvQ.png" /><figcaption>Running the example-create-transfer command</figcaption></figure><h3>You promised me one click!</h3><p>Now that this is all configured, you can now run:</p><pre>make deploy-infra-destroy</pre><p>To tear down the entire deployment (don’t worry, it will ask for confirmation first.)</p><p>And to redeploy the whole environment, you can run:</p><pre>make deploy<br>#wait for deployment and mojaloop to be up and running<br>make config-all</pre><p><strong>It’s that easy!</strong></p><blockquote>If you enjoyed this post, or have any suggestions or questions, let me know in the comments. If you liked this post, give it a ❤️ or a 👏, or whatever you crazy cats are calling it nowadays.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a6cd599f370" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Here’s what actually went down at the 2019 Mojaloop Bootcamp.]]></title>
            <link>https://medium.com/dfs-lab/heres-what-actually-went-down-at-the-2019-mojaloop-bootcamp-e40568b12cc4?source=rss-e6ce088cb029------2</link>
            <guid isPermaLink="false">https://medium.com/p/e40568b12cc4</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[interoperability]]></category>
            <dc:creator><![CDATA[Lewis Daly]]></dc:creator>
            <pubDate>Mon, 06 May 2019 20:15:28 GMT</pubDate>
            <atom:updated>2019-07-10T19:51:35.601Z</atom:updated>
            <content:encoded><![CDATA[<h4>Our experience building EastPay</h4><h3>Background</h3><p>In early April, myself from <a href="http://vesselstech.com/">Vessels Tech</a> along with Sid Garg from <a href="http://textteller.com/">Teller</a> were selected to take part in the very first Mojaloop Coding Bootamp in Dar es Salaam. The bootcamp was a hybrid of DFS Lab’s normal design sprint, with more of a focus on engineering — specifically on Mojaloop: a promising open source platform for interoperable banking championed by The Bill &amp; Melinda Gates Foundation.</p><p>Among attendance were some of the most successful fintechs from the African continent and the world, including Paystack and Carbon from Nigeria, Jumo from Kenya, GrameenPhone from Bangladesh to name a few. The bootcamp also boasted an experienced team of mentors guiding the teams through the process from BMGF, ModusBox, Beyonic, Caribou Digital and many more.</p><p>Of course, this was all headed up by the experienced team from DFS Lab, who have a good deal of experience running these bootcamps.</p><p>You may have read my previous post about our ideas for fintech products on top of mojaloop <a href="https://medium.com/vessels/spitballing-with-mojaloop-cdd41b199e09">here</a>, but if you haven’t that’s ok— over the course of the 4 days our idea took on many different forms, culminating in our live demo of EastPay. You can checkout the demo <a href="https://eastpay.vessels.tech/">here</a>.</p><p>I’m going to walk through each step of our experience at the bootcamp, and run through the process of taking our idea from a half-formed idea to execution. Some of these steps will be familiar if you have ever been through a design sprint before (lots of post-its, and copious amounts of dot stickers), combined with DFS Labs’ experience of running sprints in teams, focused on building new tools and services on top of Mojaloop.</p><h3>Monday: The idea (or lack thereof)</h3><p>Monday was by far the toughest day for us. We started by writing up our company’s goal and our goal for what Mojaloop might specifically be able to do (named a Mojaloop Goal). During the bootcamp, each team would take a definitive first step towards their own Mojaloop Goal.</p><p>So here they are:</p><blockquote><strong><em>Vessels Tech/Teller Goal</em></strong><em>: “Drive increased adoption of financial services by improving transparency”</em></blockquote><blockquote><strong><em>Mojaloop Goal:</em></strong><em> “Finding the cheapest/easiest way to get your money from A to B”</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ddYMyD6eBAbYF54bA6thuA.jpeg" /><figcaption><strong>Top Left:</strong> Our business goal and mojaloop goal, <strong>Bottom:</strong> our user journey map, <strong>Centre/Right:</strong> Our inspiration and a lot of dot stickers.</figcaption></figure><p>Our idea was really a hybrid between flights lookup services, such as <strong>Skyscanner</strong>, and a personal finance advice service, like <strong>Nerdwallet</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*XVyjMvdpxCKGYZWcp-T5Hw.png" /><figcaption>Skyscanner + Nerdwallet = EastPay</figcaption></figure><p>We came to this idea after diving into the Mojaloop API Specification, and seeing how the comprehensive <em>quotes</em> service worked, a service that informs users about the cost of a transfer before initiating a transfer. While this process took place just before sending a transfer, we had two questions:</p><ol><li>What if we could build upon the <em>quotes</em> to help users pick and choose which Bank or MMO to store their savings or make day to day transactions with?</li><li>What if there was a cheaper way for them to transfer money using a different service they might not yet know about? Could we help inform users and help them switch to a cheaper service?</li></ol><p>The trouble with our idea on Monday was that it was far too broad. We had no idea who or what A and B was. As the saying goes, “if you build something for everyone, you build it for no one”. Nevertheless, we pushed on with the sprint process, and by the end of the idea, we had picked our A and B; East African Entrepreneurs/SMEs, and Merchants on Alibaba.</p><h3>Tuesday: Too late to turn back</h3><p>At the start of the day, I was worried that our idea wasn’t really going to pan out. Our choice of an A and B for the prototype seemed too niche, and we chose it based on a few hunches.</p><p>We needed to validate the market, understand an actual problem to be solved, and figure out how exactly we would be able to use Mojaloop.</p><p>Without getting too technical, our initial proposed system wasn’t yet possible using Mojaloop. We wanted to expose a public endpoint (or endpoints) to look at each DFSP’s <em>Quote </em>service, something that we would have to build ourselves.</p><p>Luckily; we had an epiphany — instead of querying a common Mojaloop API to get all of the quotes for multiple DFSPs, we could just query each and every DFSP attached to a Mojaloop switch to look up the quotes. This method would take more work on our server’s side, but it meant we didn’t need to reinvent the wheel or convince DFSPs to condone a new extension of Mojaloop.</p><h3>Wednesday: Build, Build, Relax</h3><p>Wednesday saw us starting the code for our prototype. We built out a simple API, which talks to a Mojaloop deployment using a demo DFSP called Finteract and hacked together a website that talks to this API. Overall, it was quite straightforward technically. That means that either our idea was too simple, or maybe I’m just getting better as a developer.</p><p>We finished off the day by the beach sharing stories about anything from each other’s experiences in the Fintech space, to life in Kenyan boarding schools. Amazing things happen when you get people together from all around the world!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*HdtfeXa5msdr6q87QlD7jA.jpeg" /><figcaption>Lewis and Sid, hard at work.</figcaption></figure><h3>Thursday: Build, Build, Present</h3><p>With the code for our prototype well underway, we started Thursday with a comfortable amount of time. For the first time ever, we were to finish a hackathon by about lunch time, and had plenty of time to put together a reasonably slick presentation.</p><p>Here’s our deck:</p><iframe src="https://cdn.embedly.com/widgets/media.html?url=http%3A%2F%2Fdocs.google.com%2Fpresentation%2Fd%2F1lOSEH6LTfvBhdzQCX7IL0idRw7H3AMyTX43cca2aPKk%2Fedit&amp;src=https%3A%2F%2Fdocs.google.com%2Fpresentation%2Fembed%3Fid%3D1lOSEH6LTfvBhdzQCX7IL0idRw7H3AMyTX43cca2aPKk%26size%3Dl&amp;type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=google" width="700" height="559" frameborder="0" scrolling="no"><a href="https://medium.com/media/d00ff78cfc504858cf91edb29def2130/href">https://medium.com/media/d00ff78cfc504858cf91edb29def2130/href</a></iframe><p>And you can see a little video demo here in this tweet from DFS Lab:</p><h3>DFS Lab on Twitter</h3><p>In 2017 Kenyan imports from China made up an estimated USD 3.8 billion. Knowing this, one team at #MojaCamp set out help entrepreneurs and SMEs in East Africa find the cheapest way to pay for goods on Alibaba. They demoed EastPay - a platform that uses the Mojaloop quotes #API.</p><p>We ended the night dining at an Ethiopian restaurant. It’s not a bad way to end a busy week!</p><h3>Friday and Onwards</h3><p>On Friday morning, Sid and I planned ahead for EastPay. Both of us are big fans of the idea, and after just a little bit of desk research, we learned that the market for buying goods on Alibaba and shipping them to East Africa is growing, and the logistical challenges are not straightforward at all.</p><p>We’re going to continue our market research, and then turn EastPay into a valid project: by integrating 3rd party remittance/currency exchange services, and (for now) removing the Mojaloop integration until there’s a public Mojaloop deployment ready for us to talk to.</p><p>We are also going to work on a more formal report that will be helpful for presenting our concept at some upcoming events in the Mojaloop space.</p><p>Apart from that, we had some great conversations with people from the Gates Foundation and the DFS Lab team about how we might start contributing to the Mojaloop project, so we’ll start hunting around for a couple issues on Github that we can start with.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e40568b12cc4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dfs-lab/heres-what-actually-went-down-at-the-2019-mojaloop-bootcamp-e40568b12cc4">Here’s what actually went down at the 2019 Mojaloop Bootcamp.</a> was originally published in <a href="https://medium.com/dfs-lab">DFS Lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The case for Long Tail NLP]]></title>
            <link>https://medium.com/vessels/the-case-for-long-tail-nlp-3a0a603072f4?source=rss-e6ce088cb029------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a0a603072f4</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[emerging-markets]]></category>
            <dc:creator><![CDATA[Lewis Daly]]></dc:creator>
            <pubDate>Tue, 26 Mar 2019 04:14:40 GMT</pubDate>
            <atom:updated>2019-03-26T04:14:40.092Z</atom:updated>
            <content:encoded><![CDATA[<h4>A dive into some current use cases for low resource NLP</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OdNqyQAXimakdTFW2q7vdA.png" /></figure><p>In my <a href="https://medium.com/vessels/the-long-tail-of-nlp-9f4997149375">last post</a>, I talked about the gap between Natural Language Processing (NLP) tools for high vs low resource languages. I predict that as we see internet adoption continue to grow worldwide, the demand for NLP tools to support these low-resource languages, will grow as well. This represents an opportunity to build NLP tools to target so called “long tail languages”, languages which are too small for big consumers to take notice at the moment, but in aggregate make up a large number of consumers.</p><p>Indeed, we are seeing some of this technology appearing right before our eyes. Google recently announced beta support for 7 new Indian languages [1] as well as support for Voice typing on KaiOS phones (KaiOS is a new type of smart feature phone in emerging markets).</p><p>So it’s clear that Google has identified an opportunity to support low resource languages, but are there some other cases where we can already see NLP tools for such languages? In this post, I’m going to take a look at 3 use cases, where we are seeing NLP being applied to low-resource languages.</p><h3>1. UMATI — Monitoring Hate Speech In Kenya</h3><p>UMATI [2] is a platform which monitors hate speech in Kenya. Kenya has a violent past when it comes to hate speech inspired violence, dating back to 1992 [3].</p><p>UMATI started by collecting and categorizing forms of hate speech online across 7 different languages. The initial work, all performed manually, fed into some important insights into the different types of hate speech and its effect on violence in the most recent elections.</p><p>For the second phase of UMATI, the team will train machine learning models to automatically detect and classify hate speech scraped from social media and other sites. While it’s too early to see any results from this phase, it will be interesting to see how automated tools for such work can be used in Sub Saharan Africa, and what other opportunities this may open up.</p><h3>2. Well Told Story — Monitoring and Evaluation</h3><p>Using a variety of multimedia platforms, Well Told Story aims to engage youth in Kenya and Tanzania to think about modern day social and economic issues [4].</p><p>Their main outreach tool is though a platform called Shujaaz, which spans comic books, radio shows and social media campaigns. Their audience interacts with the platform through social media and SMS in Sheng; a English and Kiswahili slang language common among youth.</p><p>As engagements have grown, Well Told Story needed the ability to understand how users were engaging through their outreach to the tune of 100,000 messages a month. This led them to partner with Africa’s Voices to build a NLP platform that analyses these messages in real time, specifically with two approaches: (1) Classifying messages by topic, and (2) Performing sentiment analysis to see how their engagements are received.</p><p>From a joint blog post with Africa’s Voices [4]:</p><blockquote><em>“With these tools [Well Told Story] will be able to track SMS conversations in response to their media in near time and measure the sentiments in these conversations, allowing them to ascertain if increased engagement is leading to positive shifts in social norms.”</em></blockquote><p>Well Told Story also expanded on these tools with the help of BFA to help understand the Kenyan young entrepreneur culture [5], in order to tailor services and programmes to support them.</p><p>This included gathering data from their Facebook campaigns and communities, and running clustering algorithms, which grouped together user data based on the language they used and their interests. Using this analysis, Well Told Story was better able to identify young entrepreneurs, and design programmes to help support them.</p><h3>3. Bahasa.ai — NLP for Indonesia</h3><p>Bahasa.ai [6] is an NLP-as-a-Service company that specializes in understanding Indonesian languages. As the fourth most populous country in the world, Indonesia represents a great opportunity for a future powered by AI and NLP tools, and it seems that Bahasa.ai can already see its potential. Their key approach at this point is to power native Indonesian chatbots, but they are by no means stopping at chatbots alone.</p><p>They specialize in building their language models by crawling social media, in order to understand modern day Indonesian slang and messages that switch between Indonesian dialects.</p><p>While I haven’t been able to find any concrete use cases of Bahasa.ai powering a chatbot in the wild, in an interview with Reuters, a CTO Fathur Rachman Widhiantoko said:</p><blockquote>“A client of ours, who is a local distribution company, has consistently generated additional revenue of 600 million to 900 million rupiah monthly after implementing our chatbot strategy.” [6]</blockquote><p>It’s interesting to see such an approach here, and while it certainly makes sense for a country the size of Indonesia, it will be interesting to see if and how they might scale out this approach to other countries in South East Asia.</p><h3>In Summary</h3><p>While these are just 3 examples of where NLP has been used in low-resource languages, I hope they demonstrate the potential for building such NLP tools for low-resource languages in emerging markets.</p><p>Do you know of other use cases that might be interesting? Feel free to share in the comments below.</p><p>This post is part of my research on the potential for building natural language processing APIs in emerging markets. We at Vessels Tech are actively researching this topic and building out an initial prototype for NLP in low resource languages. If you are interested in working together, feel free to get in touch at lewis [at] vesselstech [dot] com. Cheers!</p><blockquote><em>If you enjoyed this post, or have any suggestions or questions, let me know in the comments. If you liked this post, give it a ❤️ or a 👏, or whatever you crazy cats are calling it nowadays.</em></blockquote><h4>References</h4><p>[1] <a href="https://www.firstpost.com/tech/news-analysis/google-assistant-on-kaios-to-receive-support-for-seven-indian-languages-actions-6150501.html">https://www.firstpost.com/tech/news-analysis/google-assistant-on-kaios-to-receive-support-for-seven-indian-languages-actions-6150501.html</a><br> [2] <a href="https://dangerousspeech.org/umati-monitoring-online-dangerous-speech/">https://dangerousspeech.org/umati-monitoring-online-dangerous-speech/</a><br> [3] <a href="https://issafrica.org/iss-today/hate-speech-and-ethnic-tension-ahead-of-kenyas-2017-elections">https://issafrica.org/iss-today/hate-speech-and-ethnic-tension-ahead-of-kenyas-2017-elections</a><br> [4] <a href="https://www.africasvoices.org/case-studies/well-told-story-nlp-of-conversations-in-swahili-slang-sheng/">https://www.africasvoices.org/case-studies/well-told-story-nlp-of-conversations-in-swahili-slang-sheng/</a><br> [5] <a href="http://www.welltoldstory.com/chai-chapatis-and-the-propensity-for-success/">http://www.welltoldstory.com/chai-chapatis-and-the-propensity-for-success/</a><br> [6] <a href="https://www.reuters.com/brandfeatures/venture-capital/article?id=48355">https://www.reuters.com/brandfeatures/venture-capital/article?id=48355</a></p><blockquote>Photo by <a href="https://unsplash.com/photos/jhtPCeQ2mMU?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Soner Eker</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a0a603072f4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vessels/the-case-for-long-tail-nlp-3a0a603072f4">The case for Long Tail NLP</a> was originally published in <a href="https://medium.com/vessels">vessels</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Long Tail of NLP]]></title>
            <link>https://medium.com/vessels/the-long-tail-of-nlp-9f4997149375?source=rss-e6ce088cb029------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f4997149375</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[dfs]]></category>
            <dc:creator><![CDATA[Lewis Daly]]></dc:creator>
            <pubDate>Tue, 19 Feb 2019 05:20:09 GMT</pubDate>
            <atom:updated>2019-02-19T14:43:53.352Z</atom:updated>
            <content:encoded><![CDATA[<h4>How can we make NLP technology more inclusive for the next billion?</h4><p>As more of the world comes online, there is a growing divide between languages that are commonly available and those that are not. This is evident in natural languages processing (NLP) technologies, which are enablers for new businesses and technologies, but only support a small amount of languages.</p><p>In this post, we will look at Natural Language Processing technologies and the long tail of language support for low-income countries. We will look at the potential for using these technologies in low-income countries, and the challenges and possible solutions to building such NLP models.</p><h3>The NLP Long Tail</h3><p>Farm.ink, along with DFS Lab recently published a survey of this field, where they outlined the challenges and opportunities in developing NLP technology for low-income countries. [1]</p><p>One stark observation was their observation of the major bot/NLP platforms’ support for languages spoken by low-income people.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RpyA89dws0nE_--r1MWfgA.png" /><figcaption>NLP support for low-income people on major Bot Platforms (2018) [1]</figcaption></figure><p>As more of these populations come online, the need to serve them grows, and the need for such NLP tools will grow accordingly. Currently, the lack of support for these long tail languages stifles growth and innovation to these populations.</p><p>From our own experience building chatbots in the Philippines, Tanzania and Senegal, tools that are readily available in English are simply non-existent in Tagalog, Bisaya, Swahili and Wolof. This led to technology decisions that made for bots with little-to-no NLP enabled, and much less promising user experiences for our users.</p><h3>NLP Research for the long tail</h3><p>From a research perspective, long-tail languages are most often also low-resource languages. As Yulia Tsvetkov from the Language Technologies Institute at CMU puts it:</p><blockquote><em>Low-resource languages [are] languages lacking large monolingual or parallel corpora and/or … linguistic resources sufficient for building statistical NLP applications [2].</em></blockquote><p>Of the estimated 7,000 languages in the world, only about 20 languages are considered high-resource languages [3].</p><h3>The Opportunity</h3><p>We see a growing opportunity to offer NLP tools in low-income markets, especially in markets where access to the internet is growing. Not only is there a potential business opportunity, but we believe there is a social need for such tools in helping bridge the digital divide and offer services.</p><p>Think of a banking chatbot in Madagascar, that you can comfortably message in Malagasy instead of French. Or maybe an emergency response system in the Philippines that can understand tweets for medical assistance not only in English and Tagalog, but also Bisaya.</p><p>In a presentation on the Opportunities and Challenges in Working with Low-Resource Languages, Tsvetkov highlights one such example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*knfPWC5g4Mpw_FGwOcHIDQ.png" /><figcaption>Twitter Analytics in English [2]</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9OyEJ8xI77coO_j1_5BEaw.png" /><figcaption>Twitter Analytics in Tagalog [2]</figcaption></figure><h3>The Challenge:</h3><p>Now if it were easy to build NLP engines for these long-tail languages, then it surely would have been done already. To build a model for a single language requires a large upfront investment, which is hard to justify in smaller markets. In addition, as DFS Lab and Farm.Ink puts it:</p><blockquote><em>Currently there appears to be a greater incentive for academics to improve the NLP technology that exists for English than there is to improve the resources available for lower-resource languages. [1]</em></blockquote><p>Modern NLP techniques rely on Machine Learning, which depend on a large amount of manually labelled training data. Older NLP older approaches, which can still be viable, rely on a heavy amount of linguistic expertise, and doesn’t scale well.</p><p>In addition, languages with non-standard spelling or in the extreme case, non-written languages (which is about 50% of the world’s languages by the way [3]) present a considerable challenge to NLP research, one that has little short term commercial value.</p><h3>Potential Solutions:</h3><p>While the challenges to building NLP tools for these long-tail languages make the situation sound bleak, there are some important developments that may just make it possible.</p><p>State of the art research described in [2] and [3] show methods for building models in a semi-supervised and unsupervised approach. Such methods include:</p><ul><li>Transfer Learning: Training a model using a high-resource language and apply it in a low-resource language</li><li>Polyglot Learning: combining datasets from multiple languages together, and apply the same NLP techniques</li><li>Using bilingual dictionaries to bootstrap NLP models</li></ul><p>In addition to the above techniques, we will still need to obtain a large amount text in these languages. Here’s two of my ideas for how that might happen:</p><ol><li>Build a human-in-the-loop chatbot, that relies on a human to manually parse and classify text. This approach would allow us to deploy a service, collect training data from actual humans speaking the language, and build up a training set gradually. This seems right in line with what <a href="https://www.figure-eight.com/">Figure Eight</a> is doing.</li><li>Encourage partnerships between research insitiutions and social platforms. Already mentioned in [1], this approach could see data sharing take place between social media platforms, which have a large amount of data in many different languages, which could be used to power development of NLP models in low-resource-languages.</li></ol><p>In fact, Facebook recently released the <a href="https://research.fb.com/publications/xnli-evaluating-cross-lingual-sentence-representations/">XLNI dataset</a>, which contains a corpus for 15 languages, including Urdu and Swahili.</p><h3>The way forward</h3><p>I’m really interested in how we can better build technology to serve low-income people, and the challenge of NLP for the long tail has rather captured me. I’m going to spend some more time researching this problem, and exploring the business opportunities. Afterwards, I’ll start working on building a framework for training, benchmarking, and using NLP for the long tail.</p><p>One day, I hope this could turn into an API or service that offers NLP tools for long-tail languages. If you’re building something that you think could make use of such a service, please get in touch at lewis <strong>at</strong> vesselstech <strong>dot</strong> com.</p><blockquote>If you enjoyed this post, or have any suggestions or questions, let me know in the comments. If you liked this post, give it a ❤️ or a 👏, or whatever you crazy cats are calling it nowadays.</blockquote><p>[1] Conversational interfaces and the long tail of languages in developing countries, Adam Wills, Georgia Barrie and Jake Kendall, <a href="https://dfslab.net/wp-content/uploads/2019/01/NLP-Language-Divide-Report-.pdf">https://dfslab.net/wp-content/uploads/2019/01/NLP-Language-Divide-Report-.pdf</a></p><p>[2] Opportunities and Challenges in Working with Low-Resource Languages — Yulia Tsvetkov, <a href="http://www.cs.cmu.edu/~ytsvetko/thesis/thesis.pdf">http://www.cs.cmu.edu/~ytsvetko/thesis/thesis.pdf</a></p><p>[3] Natural Language Processing for Resource-Poor Languages, A thesis presented by, Long Thanh Duong, <a href="https://minerva-access.unimelb.edu.au/handle/11343/192938">https://minerva-access.unimelb.edu.au/handle/11343/192938</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f4997149375" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vessels/the-long-tail-of-nlp-9f4997149375">The Long Tail of NLP</a> was originally published in <a href="https://medium.com/vessels">vessels</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spitballing with Mojaloop]]></title>
            <link>https://medium.com/vessels/spitballing-with-mojaloop-cdd41b199e09?source=rss-e6ce088cb029------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdd41b199e09</guid>
            <category><![CDATA[dfs]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[mojaloop]]></category>
            <dc:creator><![CDATA[Lewis Daly]]></dc:creator>
            <pubDate>Thu, 14 Feb 2019 08:08:13 GMT</pubDate>
            <atom:updated>2019-02-14T08:08:13.422Z</atom:updated>
            <content:encoded><![CDATA[<h4>3 ideas for fintech enabled by Mojaloop</h4><p>I first read about Mojaloop and the Level 1 project about a year ago. The tech world was knee deep in cryptocurrency hype, and I was looking for some concrete examples of crypto use to improve financial inclusion in low-income countries.</p><p>Mojaloop is one such implementation, which uses the Interledger protocol to settle funds between banks. I won’t go into all the details here (you can read about them <a href="http://mojaloop.io/">here</a> and <a href="https://github.com/mojaloop/docs">here</a> if you’d like.</p><p>Lately (and spurred on by DFS Lab’s upcoming <a href="https://dfslab.net/apply/">Mojaloop bootcamp</a>, I’ve been exploring ideas around Mojaloop and the opportunities it presents to fintech companies working in emerging markets.</p><p>I’m going to share three early stage ideas I’ve had for building on top of Mojaloop. My goal here is to really get these ideas out of my head and into a place they can be discussed. While I’m passionate about all things financial inclusion — especially where they intersect with tech — I’m much more experienced on the tech side than the financial side of things. Any thoughts, corrections and feedback would be greatly appreciated!</p><h3>A few things to note:</h3><p>Mojaloop is attempting to be the Linux of banking infrastructure: freely adopted, used, and improved as different players contribute back to the codebase. It also aims to spur on some valuable network effects: once enough banks are integrated using Mojaloop, other banks will want to be on Mojaloop in order to capture more value, which will continue on in a virtuous cycle.</p><p>Now as core banking infrastructure, Mojaloop isn’t a open access API for developers like myself to build applications upon.</p><p>I really liked Dan Kleinbaum’s (@danbabbles) illustration in <a href="https://medium.com/dfs-lab/what-the-fintech-a-primer-on-mojaloop-50ae1c0ccafb">this primer</a> on Mojaloop. He outlines three areas for innovation that Mojaloop can enable:</p><ol><li>On mojaloop itself, and will derive value from the wealth of centralized data on the platform</li><li>Between DFSP (digital financial service providers) and Mojaloop, in ways that make the integration easier, and</li><li>External to the Mojaloop/DFSP ecosystem, but enabled by Mojaloop nonetheless.</li></ol><p>So while I’m still getting my head around everything to do with Mojaloop myself, here’s three ideas that might inspire you, enrage you (after all, we are on the internet), or baffle you with their stupidity.</p><h3>1. A Mojaloop Powered Chatbot Platform</h3><p>Mojaloop aims to bring down some of the costs associated with banking, in hopes that this will increase the ability for banks and other financial service providers to serve low-income people.</p><p>For me, my bank in Australia doesn’t charge me an account fee on my savings account. This is because they hope that one day, I will purchase other products from them, such as a home loan or investment portfolio. My account fee is $0 because they cross-subsidise the cost of maintaining an account with the lifetime value that I will provide them as a customer.</p><p><em>(The joke is on them, because I’m a </em><a href="https://knowyourmeme.com/memes/avocado-toast"><em>millennial who is more interested in buying avocado toast</em></a><em> then a home).</em></p><p>In situations where banks provide services to low-income people, over the lifetime of a customer, there is much less potential value from a low-income customer, so banks typically need to charge fees.</p><p>In order to reduce banking fees, there are at least two potential solutions to this problem: (1) lower the cost of servicing an account, or (2) improve the lifetime value of a customer, by offering other products and services.</p><p>Chatbots have the potential to address #1 above, by automating common tasks and improving service delivery for low-income people without increasing the cost of servicing accounts. One such example is automating pin mobile money resets. Pin numbers are often forgotten by customers who rarely use their accounts, or juggle multiple accounts. By offering a pin reset service over a chatbot, we can automate the task and reduce the need for call centre operators.</p><p>For the last 18 months, I’ve been working on a variety of projects that use chatbots and other associated “conversational tech” to look at how service delivery can be improved for low income people. Each of these integrations and projects have been bespoke, but if Mojaloop somehow enabled a common interface for chatbots to interact with, then there is a great potential to offer a turnkey chatbot service that would work with any DFSP using Mojaloop.</p><p>I’m not really sure how such a Mojaloop/Chatbot integration would work (in fact, it might not even be possible), or if there would really be a way that a common API could be used and shared among banks, but there it is; idea number one.</p><h3>2. Credit scoring based on your Mojaloop transactions</h3><p>As more customers use Mojaloop, the data contained in it’s transaction logs become more and more valuable. Mojaloop has the potential to provide a common interface for companies wishing to credit score their customers.</p><p>If there was a way (somehow) of gaining access to the Mojaloop transaction data, we could envision a service which produces credit scores on customers based on their transactions in Mojaloop.</p><p>One of the challenges with this approach is identity fragmentation: customers typically have more than one mobile phone and more than one mobile money account.</p><p>The true benefit of this approach is that it’s rapidly scalable to other Mojaloop implementations around the world.</p><h3>3. Open Fee Comparison Service</h3><p>I’m currently staying in the Philippines for a while, and getting my Aussie dollars over here isn’t always straightforward. Transferwise for me has been a real lifesaver in being able to see transparently how much it costs for me to send $100 AUD to PHP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1pxVUMzCXCg8cAM1vYbmWQ.png" /><figcaption>Transferwise being all transparent about fees! Why don’t we have this everywhere?</figcaption></figure><p>With Mojaloop, there is the potential that fees for sending and receiving money become more transparent. This could also be integrated with a 3rd party service that calculates other associated fees (such as a cash-out fee) to give senders and receivers a better idea of the true cost of sending money. This would depend on different fees being available publicly in real time from Mojaloop (which I think is the case, but I’m not 100% sure).</p><p>This is probably the least-baked of my ideas, but I was greatly inspired by Transferwise, and truly wondered if this level of transparency is possible in other markets.</p><blockquote>If you enjoyed this post, or have any suggestions or questions, let me know in the comments. If you liked this post, give it a ❤️ or a 👏, or whatever the cool kids are doing nowadays.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdd41b199e09" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vessels/spitballing-with-mojaloop-cdd41b199e09">Spitballing with Mojaloop</a> was originally published in <a href="https://medium.com/vessels">vessels</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Twilio Usage Alerts using… Twilio]]></title>
            <link>https://medium.com/chat-bots/twilio-usage-alerts-using-twilio-baad20e9bb8c?source=rss-e6ce088cb029------2</link>
            <guid isPermaLink="false">https://medium.com/p/baad20e9bb8c</guid>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[curl]]></category>
            <category><![CDATA[sms]]></category>
            <category><![CDATA[twilio]]></category>
            <dc:creator><![CDATA[Lewis Daly]]></dc:creator>
            <pubDate>Wed, 12 Dec 2018 17:13:00 GMT</pubDate>
            <atom:updated>2018-12-12T17:13:00.099Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vWWzCjTOB7QSvD_CtZ9E0g.png" /><figcaption>Oh no! 75 whole cents!</figcaption></figure><p>Surprisingly, Twilio doesn’t make it easy to receive an SMS alert notifying you of your usage. Let’s fix that.</p><p>Over the last few months, I’ve been using Twilio <em>(a.k.a. the AWS of calls and sms)</em> extensively to build voice based chatbots here at <a href="https://vesselstech.com/">Vessels Tech</a>. I’ve been really impressed with the API, tooling, and general ease of use.</p><p>Unfortunately, like many other pay-as-you-go cloud service providers, Twilio doesn’t have any easy way to set a limit on your daily spend.(There is a way using <a href="https://support.twilio.com/hc/en-us/articles/223132387-Protect-your-Twilio-project-from-Fraud-with-Usage-Triggers">sub-accounts and circuit breakers</a>, but this felt like too much work for my afternoon). After enabling outbound calls to what they call “High Fraud Risk” countries, I got sufficiently spooked and decided to do something about it.</p><p>So here’s a few curl scripts and Zapier configuration you can copy to set up your own Twilio usage triggers like me.</p><h3>The Zap</h3><p>Let’s start with setting up Zapier to tell Twilio to send us an SMS.</p><ul><li>Login to Zapier &gt; “Make A Zap”</li><li>Create a new Webhook Zap, which listens for a POST</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BUO9MonTaaVNnvcZ.png" /></figure><ul><li>Leave the child keys blank, we won’t need them here</li><li>At the the “Test this Step” section, copy the webhook and paste it in the above scripts or as an environment variable in create_usage_trigger.sh. You can test this by skipping ahead and creating a usage trigger with a low threshold.</li><li>Next, add a “Twilio” Step, and select “Send SMS”</li><li>Connect your account using your Account SID and Auth Token</li><li>Edit your template with <strong>From</strong> and <strong>To</strong> numbers, and add your message. For reference, this is mine:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OHnYwPwu-SqfB1Ki.png" /></figure><ul><li>Hit continue and “Save”, and make sure to turn on your Zap!</li></ul><p>Now let’s look at the scripts to create and manage the usage triggers.</p><h3>The Scripts</h3><p>Twilio does have an API feature called <strong>Usage Triggers</strong> which you can use to trigger a postback to a URL. I was initially hoping I could use a Usage Trigger to send me an email or SMS message right within Twilio, but suprisingly, we have to implement that functionality ourselves. We also don’t get a pretty UI to look at, but with bash, who needs that?</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2b07a2fce4c0cd8d41d3168d16be163a/href">https://medium.com/media/2b07a2fce4c0cd8d41d3168d16be163a/href</a></iframe><p>This is a simple trigger that will call a given callback url (we’ll set that up in a second) whenever our daily spend goes above $5.00. I’ve also formatted a couple other commands you can use to get and delete existing triggers:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/af096bd8dff74658d85012319dacb955/href">https://medium.com/media/af096bd8dff74658d85012319dacb955/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d9adb6ca9eaaf951449afeaac1074c97/href">https://medium.com/media/d9adb6ca9eaaf951449afeaac1074c97/href</a></iframe><p>Pretty easy right? I also found that you can use get_usage_trigger to see where your currently daily spend is at, which is helpful for testing and making sure your configuration is working.</p><p>And that’s about it. Let me know if you got this working or got stuck at any stage. I’m happy to help.</p><p>If you’re looking for someone to design and build a chatbot solution for you — whether that be over voice, sms, ussd, messenger — you get the idea — feel <a href="http://vesselstech.com/">free to get in touch!</a></p><blockquote><em>If you enjoyed this post, or have any suggestions or questions, let me know in the comments. If you liked this post, give it a ❤️ or a 👏, or whatever the cool kids are doing nowadays.</em></blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fupscri.be%2F58521e%3Fas_embed%3Dtrue&amp;dntp=1&amp;url=https%3A%2F%2Fupscri.be%2F58521e%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=upscri" width="800" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/c90883b0516ddbe5c59960c12a04bc64/href">https://medium.com/media/c90883b0516ddbe5c59960c12a04bc64/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=baad20e9bb8c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chat-bots/twilio-usage-alerts-using-twilio-baad20e9bb8c">Twilio Usage Alerts using… Twilio</a> was originally published in <a href="https://medium.com/chat-bots">Chatbots Magazine</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Triggering Email alerts from the IOTA Tangle]]></title>
            <link>https://medium.com/coinmonks/triggering-email-alerts-from-the-iota-tangle-3362219d2846?source=rss-e6ce088cb029------2</link>
            <guid isPermaLink="false">https://medium.com/p/3362219d2846</guid>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[email]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[iota]]></category>
            <dc:creator><![CDATA[Lewis Daly]]></dc:creator>
            <pubDate>Tue, 12 Jun 2018 02:05:41 GMT</pubDate>
            <atom:updated>2018-06-12T02:46:27.180Z</atom:updated>
            <content:encoded><![CDATA[<h4>The DIY Guide</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UHn87J7D95gmE53k.png" /></figure><p>I recently came across a new project called <a href="https://totangle.com/">Totangle</a>. Totangle integrates the tangle with Zapier, which allows you to integrate things happening on the tangle to your existing APIs or workflows. The first use case they present is setting up an email alert when you get a payment on the tangle.</p><p>Inspired by this, and also needing this tool myself (I want to get alerts when I receive tips from my Medium articles, without having to constantly keep my wallet open), I thought I’d see if I could make an open source lambda function that copies this basic functionality.</p><h3>Here’s How It Works:</h3><ul><li>We write a lambda function that looks for an address or tag on the tangle every 30 minutes or so.</li><li>If the lambda function sees new transactions it hasn’t previously seen, it sends an email using SNS to my email address.</li><li>Once it has sent the email, it saves the recently seen transactions to some list somewhere — maybe S3 will work for now, or in the future we could use DynamoDB.</li></ul><h3>Part One: Setting up the lambda</h3><p>We’re going to use the excellent, albeit poorly named, serverless framework to manage our AWS lambdas and triggers for us.</p><p>Let’s start by creating a new project.</p><pre>$ npm install -g serverless<br>$ serverless create --template aws-nodejs --path tangle-trigger<br>$ cd tangle-trigger<br>$ npm init -y</pre><p>We also need to install the iota library, and set up some nice environment variables</p><pre>$ touch .env<br>$ npm install --save iota.lib.js</pre><p>Let’s edit the .env file first:</p><pre>export AWS_PROFILE=default<br>export IOTA_URL=&quot;http://localhost:14265&quot;<br>export IOTA_ADDRESS=&quot;9999&quot;</pre><p>We use the AWS_PROFILE environment variable to control which AWS account serverless deploys to. I quite often have to navigate between accounts, so this environment variable is very helpful.</p><p>The two IOTA_* environment variables are just placeholder, but I wanted to show you how to get them into the running lambda function.</p><p>Let’s add a deploy script to the package.json:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c07f4397cac5df6b8a74de9477833345/href">https://medium.com/media/c07f4397cac5df6b8a74de9477833345/href</a></iframe><p>Next up, we need to modify the Serverless.yml file to define the lambda function and the event triggering the function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/797517106283ed600c51f224f949ff28/href">https://medium.com/media/797517106283ed600c51f224f949ff28/href</a></iframe><p>For now, we are scheduling the lambda function every minute — just so we don’t have to wait 30 minutes to debug any problems. You can also see how we are passing through the IOTA_* environment variables, which will automatically get placed into the lambda runtime.</p><p>The last thing we need to do is actually write the lambda function! Here’s a placeholder handler.js</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8cdaebbb15fb5ca9811379379dfbc066/href">https://medium.com/media/8cdaebbb15fb5ca9811379379dfbc066/href</a></iframe><p>Pretty straightforward, right? But it lets us make sure our environment variables are being passed in correctly, and also ensures that our lambda is being packaged properly with the iota.lib.js dependency.</p><p>Let’s deploy it, and poke around the AWS console.</p><pre>$ npm run deploy</pre><p>You should see some terminal output like the following (I’m using yarn instead of npm btw).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sYGYTHNzad62dbrW.png" /></figure><p>Navigating to the AWS console, we should be able to see a Cloudformation stack:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*X7iRpsLZnNjnT_uP.png" /></figure><p>A Lambda Function:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UDnf8X1sntwoOAp5.png" /></figure><p>and some Cloudwatch logs, which are written every time the lambda is triggered:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6_ruOpPwzN9fbCnI.png" /></figure><h3>Part Two: Talking to the tangle</h3><p>Now that we have a basic lambda function running every <em>n</em> minutes, we need a way to check for transfers to the tangle of a specific address. We will do this using the findTransactionObjects() method on the iota js lib.</p><p>Before we implement this however, we should probably make a way to run the serverless function locally, otherwise debugging this function will be a real pain.</p><p>Make a new file called local.js:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e2cb29fdeb470fb075d8d355fcfa58d5/href">https://medium.com/media/e2cb29fdeb470fb075d8d355fcfa58d5/href</a></iframe><p>Now we can run local.js with the following:</p><pre>$ node local.js</pre><p>You should see something like the following:</p><pre>CHECKING ADDRESS: undefined</pre><p>Alright! It’s half working. We need to make sure to source our .env file first. We can put it all together in a npm script: package.json</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/26a5637ae7bfdd09fc3c72e2c213fc87/href">https://medium.com/media/26a5637ae7bfdd09fc3c72e2c213fc87/href</a></iframe><p>Now, when we run yarn run test (or npm run test), we get the following:</p><pre>yarn run v1.6.0<br>$ source .env &amp;&amp; node local.js<br>CHECKING ADDRESS: 9999<br>✨  Done in 0.22s.</pre><p>Our environment variables are getting passed in just fine. Let’s talk to the tangle</p><h3>Talk to the tangle</h3><p>First, let’s put some proper values in our .env file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f4790eccbf12e2a4a15d220a1fbf7dba/href">https://medium.com/media/f4790eccbf12e2a4a15d220a1fbf7dba/href</a></iframe><p>I’m currently in Singapore, so durian.iotasalad.org seems pretty fitting.</p><p>And let’s update our handler.js to call the api:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7009c8f4341b0289ae67f31e85e18c19/href">https://medium.com/media/7009c8f4341b0289ae67f31e85e18c19/href</a></iframe><p>Now when we run our test, we should get something like the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*suWbyb1tWAZ81OJd.png" /></figure><p>Great! We’re able to look up the transfers to a given address! Now we need to count the number of transfers, and make sure we filter out transfers we’ve already seen. For that, we’re going to use AWS S3.</p><p>Let’s install the aws-sdk:</p><pre>npm install --save aws-sdk</pre><p>And now we need to add a add an s3 bucket to our serverless.yml file, as well as a new environment variable:</p><p>serverless.yml</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/368c7b4e2258cd8726928aaebbe8d780/href">https://medium.com/media/368c7b4e2258cd8726928aaebbe8d780/href</a></iframe><p>.env</p><pre>...<br>export S3_BUCKET_NAME=&quot;tangletrigger&quot;</pre><p>Ok. Now we need to tidy up a little bit, and functions that read and write from s3. Here’s what I came up with.</p><p>handler.js</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/da92bab893299224768fa45502943415/href">https://medium.com/media/da92bab893299224768fa45502943415/href</a></iframe><p>Hopefully this is pretty self explanatory. In this case, we’re simply writing new files to our s3 bucket using the tx hash as the key. It’s a little lazy, and using database would work much better, but s3 is free and easier to get going with. I’ll leave it up to you to to set up a database.</p><p>Now when after running this locally again, we can check our aws bucket: (you need to have the aws cli installed, otherwise you can use the web console)</p><pre>$ aws s3 ls s3://tangletrigger/<br>2018-05-30 10:05:01          6 BGTXJCVKTJZR9GVZOVJOUPQTZSFRQYTWMNBWBDNUVHLTMLNLQBNBSJEINSRJFEEXOHUBNOGXMXKEA9999</pre><h3>Adding an Email Notification</h3><p>Finally, we need to send an email should we see any new transactions on the tangle. AWS makes this pretty easy with SNS, so first, let’s add a new SNS topic to our serverless.yml</p><p>Our serverless.yml section should now look like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/de7eb5db3e7c498e4d624122290e4cb4/href">https://medium.com/media/de7eb5db3e7c498e4d624122290e4cb4/href</a></iframe><p>Note that we’ve now defined a SNS topic which will send to an email defined in our .env file, and we set it as an environment variable using the Ref function, which then gets passed into our lambda. We&#39;ll use it below in publishSNSMessage().</p><p>Here’s our final handler.js, with the email settings added in.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0aa42c2988a1f5f1644c33e0c069a171/href">https://medium.com/media/0aa42c2988a1f5f1644c33e0c069a171/href</a></iframe><p>And here’s an email telling me I have new transactions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/0*Mw5Hs8dJCZLRxuwD.png" /></figure><p>Test email. It’s getting real now!</p><p>Now we just need to change the notification time back to 30 minutes and we can deploy it again.</p><p>I’m also going to send a transaction to this address, and see what happens!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4JiQob1-eO6cZfo7.png" /><figcaption>Sending myself 1 IOTA</figcaption></figure><p>Now all I need to do is wait around for an email.</p><p>After waiting around for an hour or so, this is what I found in my inbox:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*G8tAmPQrFXLvEUsu.png" /><figcaption>Nada. Nothing. Zip.</figcaption></figure><p>Let’s take a look at our Cloudwatch logs to see what is going on.</p><p>I navigated to CloudWatch &gt; Logs &gt; /aws/lambda/TangleTrigger-dev-checkAddress, and selected the latest log (the one at the top).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TErjAilA-IaMpB-5.png" /></figure><p>Hmm. Something seems to be wrong with S3.</p><p>Ok. To be honest, I half expected this. What’s happening is that the IAM Role that our Lambda function is using doesn’t have permission to talk to our S3 bucket, or to publish to the SNS topic we created earlier. It’s an easy fix:</p><p>Add the following to the provider section in serverless.yml:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/40e04c9e309dead147878987e1e9e273/href">https://medium.com/media/40e04c9e309dead147878987e1e9e273/href</a></iframe><p>This defines the IAM role permissions that our Lambda function executes with, and above we give it permission to read and write to the s3 bucket, and permission to publish to the SNS topic we created.</p><p>Let’s deploy one more time and see what happens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uud40f1UBjRJZF9X.png" /><figcaption>IT’S WORKING!</figcaption></figure><p>Aaaand it’s working. That wasn’t so hard, was it? You can check out the full code <a href="https://github.com/vessels-tech/tangletrigger">here</a>, and make sure you check the other branches for each of the steps we went through above.</p><p>Did you manage to get this working? Or got stuck? Let me know. I’d love to help. You can also reach me on twitter @lewdaly, or on the IOTA Discord at lwilld.</p><blockquote><em>If you enjoyed this post, or have any suggestions or questions, let me know in the comments. If you liked this post, give it a ❤️ or a 👏, or whatever you crazy cats are calling it nowadays.</em></blockquote><blockquote><em>Tips are always welcome 🙌🙌🙌 </em><em>BJSLSJNPWSM9QLO9JYJAG9A9LLAUKZAQJGYZLNN9YMBNPCUUS9E9EYE9PIKIKNYHXAPNFAMDGXVIPVKIWGDUVDALPD</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3362219d2846" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coinmonks/triggering-email-alerts-from-the-iota-tangle-3362219d2846">Triggering Email alerts from the IOTA Tangle</a> was originally published in <a href="https://medium.com/coinmonks">Coinmonks</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Unleash Experience in 6 Points.]]></title>
            <link>https://medium.com/unleash-lab/my-unleash-experience-in-6-points-18134e73c72e?source=rss-e6ce088cb029------2</link>
            <guid isPermaLink="false">https://medium.com/p/18134e73c72e</guid>
            <category><![CDATA[unleashlab]]></category>
            <category><![CDATA[design-sprint]]></category>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[sustainable-development]]></category>
            <dc:creator><![CDATA[Lewis Daly]]></dc:creator>
            <pubDate>Tue, 12 Jun 2018 00:22:22 GMT</pubDate>
            <atom:updated>2018-06-12T00:22:47.245Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*01ygW1zqF0bH992DcqEDRQ.jpeg" /><figcaption>Supertrees in Singapore. Just one of many innovations the city has to offer.</figcaption></figure><p>Last Friday (the 8th of June, 2018) I arrived home from the Unleash summit in Singapore. Exhausted from both flying, talking, and working, I crawled into bed and fell asleep for the best part of a day. How did it come to this?</p><p>As I wrote in my previous <a href="https://medium.com/unleash-lab/setting-goals-for-unleash-2018-2e8c120b5533">post</a>, I was lucky enough to be 1 of 1000 young talents selected to participate in Unleash’s 2018 global innovation summit in Singapore. <a href="https://unleash.org/">Unleash</a> brings together 1000 talents (their word, not mine) from around the world to build tangible businesses and innovations in pursuit of the UN’s Sustainable Development Goals (SDGs).</p><p>I’m going to break down my Unleash experience into 6 points:</p><ul><li><em>2 hard things,</em></li><li><em>2 fun things, and</em></li><li><em>2 tangible next steps</em> for myself to take in my career and vocation.</li></ul><h3>Hard Thing #1: Gate Checks.</h3><p>Ok. Let me back up for you non-unleashers. During unleash, we are divided up into smaller groups based on the Sustainable Development Goals which float your boat. I was in put in SDG #6, Clean Water &amp; Sanitation, based on my experiences with <a href="https://vesselstech.com/mywell.html">MyWell</a>, and then divided into smaller groups of 4–6 to work on a specific issue related to our SDG. My team were focussed on water scarcity, but more on that later.</p><p>Unleash uses an innovation process quite similar to Google Ventures Design Sprint — uniquely tailored to the SDGs. The process was made by Deloitte in partnership with Unleash, and came along with some experienced facilitators to guide us through the process. It involves a whole bunch of sticky notes, whiteboard markers and coffee (or tea in my case).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KLPKX8-NA_U4v7Iz.JPG" /><figcaption>So many post-it notes!</figcaption></figure><p>The process is broken down into 4 distinct phases, with each phase ending in a “Gate”. In order to pass a gate, you must complete the exercises within a phase, and stand up to an intense round of questioning from your facilitators.</p><p>Gate checks are kind of like fighting bosses in Zelda, you don’t strictly need to beat each boss in a defined order, you can move around from one to another, but you won’t finish the game unless you beat all of them.</p><p>So gate checks were hard. They forced us to give mini-pitches as we were going along, kept our team on track, and sometimes felt like we were jumping through hoops for the sake of the hoops. In hindsight however, most of these hoops were rather necessary.</p><h4>And the team?</h4><p>That’s right, before we go any further, I should introduce you briefly to my team, and the challenge we aimed to solve. Our team — a.k.a Fugee Water — was Steve <em>(Germany)</em>, Arielle (<em>USA)</em>, Naveed (<em>USA)</em>, Michael <em>(USA)</em>, and myself, from Australia.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ds67IAcJltWB_ycT.jpg" /><figcaption>The team minus Steve (sorry Steve)</figcaption></figure><p>Our team was looking at the water scarcity issues inside the Rohingya refugee camps in Bangladesh. I’m going to write more extensively about this issue in a later post (so please follow me to keep up to date!), but in summary:</p><ul><li>There are 1.3 million refugees living in camps in Bangladesh, who have fled from Myanmar. These camps lack a sustainable supply of water</li><li>Long term infrastructure, or relocation is not an option</li><li>Fugee Water aims to help this problem by giving families living in the camps the means to harvest rainwater themselves, which will reduce the dependence on groundwater and surface water in the monsoon season, freeing up groundwater for better use in the dry season.</li></ul><h3>Hard Thing #2: Pitching</h3><p>Pitching is hard. And I don’t just mean pitching to judges and our peers in water, but pitching to the greater Unleash community, and complete strangers at the Sustainable Solutions Expo.</p><p>On the penultimate day of Unleash, we had only a few hours (after completing our other deliverables) to throw together a coherent pitch that highlighted the problem we were aiming to solve, our solution, and its impact on the Rohingya refugees. This was not an easy task, and our whole team felt we could’ve done better. We should’ve focused more on the solution instead of the problem, and we came up with the idea of “Lego for rainwater harvesting” far too late. (I’ve teased this solution far too much now, you’re really going to want to read the next post).</p><p>The great thing was that we had a chance to set up an expo where we demonstrated our solution, and got to over and over again to complete strangers. It was like elevator pitching 101. (Side note, next time you’re in an elevator with me, watch out!).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aiI0A2-Osa6qGh-v.jpg" /><figcaption>Our stand at the expo. Complete with spinning bucket and stop motion video.</figcaption></figure><p>We also got to try out some cool engaging tactics — such as asking people what rainwater harvesting solution they might build if we gave them 4 bamboo sticks, a bucket and a tarp.</p><h3>Fun Thing #1: Meeting People</h3><p>Even before going through the innovation process, before hearing from inspiring leaders in the sustainable development space, or before playing with Lego on day 1; bringing together 1000 young people who are passionate about pursuing the sustainable development goals, and passionate about lifting up the lives of those in poverty had a net positive effect.</p><p>I was so encouraged and inspired by those who share a similar passion to mine, and the relationships forged (in the fire perhaps), over the last week will be more than just shallow “networking” to get ahead. They are the foundations of long running partnerships in pursuit of something bigger than anything any one of us could achieve alone.</p><h3>Fun Thing #2: Exploring Singapore</h3><p>It’s no lie. I love Singapore. From its sweeping vistas to its orderly queues; from its functioning MRT to its culinary delights; The Garden City feels like a home away from home to me (albeit a more humid home).</p><p>Singapore is also a world leader in many of the sustainable development goals. I was inspired when we visited the NeWater plant — a wastewater treatment plant which embodies Singapore’s commitment to sustainability. Singapore is also establishing itself as a home to businesses pursuing such goals, and we got to hear much from the National University of Singapore and Nanyang Technological University where much of this cutting-edge research seems to be happening.</p><h3>Next Step #1: Taking Unleash back to Vessels Tech</h3><p>At <a href="https://vesselstech.com/">Vessels Tech</a> (my tech 4 dev company), we are passionate about seeing technology used to lift up the lives of others. While we have always had a focus on sustainability, I’m now starting to see our projects in light of the sustainable development goals. Take just two of our projects for example:</p><ul><li><a href="https://vesselstech.com/mywell.html">MyWell</a>, for supports SDG6: Clean Water &amp; Sanitation for farmers and their families, as well as #1: No Poverty, #12: Responsible Consumption &amp; Production, and #13: Climate Action</li><li><a href="https://4pbot.com/">4PBot</a>, by pursuing financial inclusion supports #1, #3: Health and Well Being, and #10: on Reducing Inequality</li></ul><p>Unleash has helped me renew my focus on sustainability, and given me an extra burn for furthering these sustainable development goals at Vessels Tech.</p><h3>Next Step #2: Pursuing New Ventures</h3><p>Our team, Fugee Water, had a great time at Unleash. We came from a diverse set of backgrounds, and banded together to see how we might be able to help the Rohingya refugees.</p><p>The simple truth is this: The Rohingya refugee crisis one of the worst humanitarian crises in history. Plus it’s not the only crisis we face right now, nor will it be the last.</p><p>Instead of looking at these crises as a net negative, how can we change our perspective on the opportunities here? What are the opportunities for Bangladesh to become a hub for manufacturing products for disaster relief? Or how might we lift up these refugees into positions of power, where they might be able to build their own sustainable businesses?</p><p>This is what I’m going to be dedicating a considerable amount of effort into looking into. Can we get Fugee Water off the ground? I hope so. But what are the other ways we can prevent such crises, or enable people to bounce back from such situations? I’m not sure. If you want to brainstorm with me, leave a comment below or get in touch at lewis [at] vesselstech.com.</p><blockquote><em>“The business opportunity is enormous — after all, the market size for the SDGs is the population of the whole planet”</em></blockquote><p>As Garauv Gupta — director at Dalberg — put it, “The business opportunity is enormous — after all, the market size for the SDGs is the population of the whole planet” [1]. I sure want to be a part of these types of businesses.</p><h3>In Summary</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YNkYSx4Nz3shHLWb.jpg" /><figcaption>The closing ceremony. Look at all those beautiful LEDs!</figcaption></figure><p><em>“This is not the end, it’s the end of the beginning”</em>, said Chairman of Unleash, Flemming Besenbacher, at the closing ceremony of Unleash. And I agree with him. Unleash isn’t about going home with good stories, or a full belly — it’s about inspiring a generation of leaders in the Sustainable Development Goals, and them inspiring others in turn.</p><p>In these 6 points, I hope I captured some of the essence of Unleash, and I hope I encouraged you to pursue the Sustainable Development Goals — whether that’s inside of your existing work, as you study, or as you set out on new ventures.</p><p>Finally, I’d like to say thanks to just some of the sponsors who made Unleash possible:</p><ul><li><strong>DBS</strong>, for letting us blow off steam on the Marina Regatta</li><li><strong>NUS</strong>, for housing, feeding and clothing us</li><li><strong>Deloitte</strong>, for lending us your expert facilitators, and training us up in the innovation process</li><li><strong>Calsberg</strong>, for the beer (need I say more?)</li><li><strong>Lego</strong>, for inspiring us to keep on playing as we work!</li></ul><blockquote>Stay tuned for more from myself and Vessels Tech — I’d love to hear from you if you want to work with me, partner with team Fugee Water, or just have any feedback. Leave a comment below, or email me at lewis [at] vesselstech.com.</blockquote><p>[1] <a href="https://www.linkedin.com/pulse/singapore-silicon-valley-addressing-global-challenges-gaurav-gupta/?lipi=urn%3Ali%3Apage%3Ad_flagship3_profile_view_base%3BbTo%2FeYT7RIuCVirDXdU7og%3D%3D">Garauv Gupta on Unleash coming to Singapore</a></p><p>Photo by <a href="https://unsplash.com/photos/VCEtO55mz3I?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Esaias Tan</a> on <a href="https://unsplash.com/search/photos/singapore?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18134e73c72e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/unleash-lab/my-unleash-experience-in-6-points-18134e73c72e">My Unleash Experience in 6 Points.</a> was originally published in <a href="https://medium.com/unleash-lab">UNLEASH Lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running the IOTA C libs on Arduino]]></title>
            <link>https://medium.com/vessels/running-the-iota-c-libs-on-arduino-b02a9d7bd2a4?source=rss-e6ce088cb029------2</link>
            <guid isPermaLink="false">https://medium.com/p/b02a9d7bd2a4</guid>
            <category><![CDATA[esp8266]]></category>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[iota]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Lewis Daly]]></dc:creator>
            <pubDate>Tue, 29 May 2018 14:01:08 GMT</pubDate>
            <atom:updated>2018-05-29T14:06:21.055Z</atom:updated>
            <content:encoded><![CDATA[<h4>From novice to slightly less novice</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_pyzPOsjk6OXMvk1.png" /></figure><p>One of my ultimate goals with IOTA at the moment is getting it working on MCUs. In a <a href="https://medium.com/vessels/from-arduino-to-tangle-4728ddebf211">previous post</a>, we managed to get an Arduino sending messages over MAM using the Johnny-Five Javascript framework. This, I thought, was a good introduction, but still requires the Arduino to be connected to my computer, which is less than ideal.</p><p>So in order to make things harder for myself (and in the pursuit of learning and all that stuff), I set myself the challenge of getting the <a href="https://github.com/embedded-iota/iota-c-light-wallet">iota lightweight c library</a> working on my arduino.</p><p>In this post, we’re going to look at how to write an Arduino library that takes advantage of the lightweight arduino library. This will be the starting point for a series of blog posts, where we go from starting the library to (hopefully) sending MAM messages directly to the tangle from my D1Mini.</p><p><em>Note: A library of a library? Really? Well as far as I’ve been able to find, we can’t just include the iota library in our arduino code — arduino libraries are quite specific in their structure, and require a little bit of fiddling around to get working nicely. I’m happy to be proven wrong however!</em></p><p>And just a little disclaimer before we dive in. I originally wanted to get full transactions working (creating and signing bundles, transmitting to the tangle using HTTP requests) before I showed you how I got there, but unfortunately I’ve run into a few hurdles, and I didn’t want to wait to get this post out there and share my knowledge. I am by no means a C or Arduino expert (yet), so have likely made some mistakes that both of us can learn from.</p><h3>Prerequisites</h3><ul><li>ESP8266 MCU (I’m using a knockoff D1 Mini, which you can find <a href="https://www.amazon.com/gp/product/B01N3P763C/ref=as_li_ss_tl?ie=UTF8&amp;linkCode=ll1&amp;tag=&amp;linkId=22d141e17670471cc2c9abf820913f2d">here</a>)</li><li>Arduino IDE</li><li>git</li></ul><p>(Note: this guide is mostly written for *nix systems, but if you get it working on windows, let me know and I can update this guide!)</p><h3>Setting Up</h3><p><a href="https://www.arduino.cc/en/Hacking/LibraryTutorial">From what I’ve seen on writing arduino</a> libraries, it’s a pretty straighforward process. Libraries can be as simple as a .h and .cpp file, but for this library, we&#39;re going to put out code in a src directory, which means we need to define a library.properties file.</p><p>First of all, navigate to your libraries directory and create a dir for the new library. You can find yours by looking at your preferences &gt; SketchBook Location in the Arduino IDE. I changed mine from the default location as you can see.</p><pre>$ cd ~/developer/arduino/sketches/libraries/<br>$ mkdir iota_client<br>$ cd iota_client</pre><p>Next up, we need to set up some folder structure:</p><pre>$ mkdir -p ./src/external<br>$ touch ./src/IotaClient.c ./src/IotaClient.cpp library.properties</pre><h3>Writing the Library</h3><p>Now it’s time to write some sweet, sweet code. My experience with C++ is limited, so feedback is always welcome!</p><p>Open up your library.properties file, and put in the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e1ad6945f35d0389bebbf9d2cc1a5992/href">https://medium.com/media/e1ad6945f35d0389bebbf9d2cc1a5992/href</a></iframe><p>Or something to your liking.</p><p>Next up, we need to define our IotaClient.h file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d9a5af20f0972fcbf917dcb273c18d9e/href">https://medium.com/media/d9a5af20f0972fcbf917dcb273c18d9e/href</a></iframe><p>Hopefully for C++ novices (myself included), you can see what’s going on here. We’re including a bunch of required libraries, and wrap the iota-c-light-wallet libraries in an extern &quot;C&quot; block, so that the complier knows what to do with them.</p><p>After that, we define the IotaClient class with 2 public methods. Finally, everything is wrapped in a #ifndef iota_client_h and #endif, which stops the library from being included twice.</p><p>For now, we’re only going to implement 2 methods, a constructor and testAddress(). Eventually I would like to add some more methods, but we have to start somewhere right? I&#39;ll leave this up to you, or for another day.</p><p>Let’s go on to implement those 2 methods:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eccf598e8c9baab535fb7b155cca7365/href">https://medium.com/media/eccf598e8c9baab535fb7b155cca7365/href</a></iframe><p>Let’s walk it through section by section. We can ignore the includes at the top for now, we’ve already mentioned them in the header.</p><p>Here:</p><pre>IotaClient::IotaClient(String host, String port)<br>{<br>  _host = host;<br>  _port = port;<br>}</pre><p>Is a simple constructor, where we set some instance variables (which we’re not going to be using in this tutorial btw).</p><p>And the actual juicy bit is here:</p><p>First, we start by initializing an array of unsigned chars, with a length of 81, and setting a seed.</p><pre>unsigned char address[81];<br>char seedChars[] = &quot;DONTEVERUSETHISSEED999&quot;;</pre><p>We then convert the seed to an array of bytes:</p><pre>unsigned char seedBytes[48];<br>chars_to_bytes(seedChars, seedBytes, 81);</pre><p>Note that chars_to_bytes() doesn&#39;t return anything, but actually mutates the seedBytes char array that we gave it.</p><p>Next up, we generate an address. Like with above, this gives us a byte array, so we turn that byte array into a char array that humans can understand:</p><pre>get_public_addr(seedBytes, 0, 2, address);<br>char charAddress[81];<br>bytes_to_chars(address, charAddress, 48);</pre><p>Finally, we print it to the serial monitor! Note that the Serial class comes along when we include the Arduino library.</p><pre>Serial.print(&quot;charAddress is: &quot;);<br>Serial.println((char *)charAddress);</pre><h3>Dependencies</h3><p>Now I know what you’re thinking. What is external/iota-c-light-wallet? I haven&#39;t seen that before. That&#39;s the lightweight C library that a bunch of people (such as @citrullin) have been working on. I ended up making a fork of the repo, so I could get it compiling on the arduino. I&#39;ll go back and fix these issues later on. Promise.</p><pre>$ cd src/external<br>$ git clone <a href="https://github.com/vessels-tech/iota-c-light-wallet.git">https://github.com/vessels-tech/iota-c-light-wallet.git</a></pre><p>Alright. We’ve got a basic library written, and we’ve got our dependencies, so it’s time to dive into the Arduino IDE.</p><h3>The Sketch</h3><p>Open up your Arduino IDE, and make a new sketch. Now I should mention again that I’ve managed to get this working for a D1Mini. I have tried compiling the library on an Arduino UNO as well, but unfortunately I haven’t managed to get it working just yet. Get in touch if you’re having trouble — I’m happy to help out!</p><p>I’ve named my sketch test_d1_client.ino</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/83cd71a7bfe51d0ffa71b6168b74ebdd/href">https://medium.com/media/83cd71a7bfe51d0ffa71b6168b74ebdd/href</a></iframe><p>This should be pretty straight forward. There’s no magic here, we just include the IotaClient library, initialize it with a host and port, and then call testAddress(). Here&#39;s what it looks like running on my D1 mini:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*p328jR6QS8gOIU22.png" /></figure><p>And it’s working on the D1Mini.</p><p>That’s it! For reference, you can check out the library here. You could even skip all the above steps, and just include it as an Arduino library from <a href="https://github.com/vessels-tech/arduino_iota_client">my github repo</a>, but then you would miss out on all the fun, wouldn’t you!</p><h3>Disclaimer</h3><p>This is a demo only. Please don’t use the above seed with actual money. Please don’t send money to addresses made with this library. Just don’t.</p><h3>Acknowledgements</h3><ul><li>Thanks to @citrullin on Discord for your advice and help!</li><li>Thanks to you, my readers for liking and sharing this piece (now I’ve just guilt tripped you into doing it — right?)</li><li>Thanks to the people of the IOTA implementation of the Ledger Nano S, which was the basis for the IOTA lightweight C library</li></ul><p>As always, thanks for reading, and please let me know in the comments if you have any suggestions for my code, or are having trouble replicating this. I’d love to chat! You can also reach out to me on the IOTA discord @lwilld.</p><blockquote><em>If you liked this post, give it a ❤️ or a 👏, or whatever you crazy cats are calling it nowadays.</em></blockquote><blockquote><em>Donations are always welcome! </em><em>BJSLSJNPWSM9QLO9JYJAG9A9LLAUKZAQJGYZLNN9YMBNPCUUS9E9EYE9PIKIKNYHXAPNFAMDGXVIPVKIWGDUVDALPD</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b02a9d7bd2a4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vessels/running-the-iota-c-libs-on-arduino-b02a9d7bd2a4">Running the IOTA C libs on Arduino</a> was originally published in <a href="https://medium.com/vessels">vessels</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>