<?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 Wietse Wind on Medium]]></title>
        <description><![CDATA[Stories by Wietse Wind on Medium]]></description>
        <link>https://medium.com/@wietsewind?source=rss-c49d620d22ec------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4r1uRb_TEbNoLZ6NYSdeOA.jpeg</url>
            <title>Stories by Wietse Wind on Medium</title>
            <link>https://medium.com/@wietsewind?source=rss-c49d620d22ec------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 03:27:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wietsewind/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[Howto: XRP + Raspberry Pi — ILP enabled (streaming payments) power switch]]></title>
            <link>https://wietsewind.medium.com/raspberry-pi-interledger-enabled-power-switch-d6966662b04b?source=rss-c49d620d22ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6966662b04b</guid>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[power]]></category>
            <category><![CDATA[interledger]]></category>
            <category><![CDATA[internet-of-value]]></category>
            <category><![CDATA[payments]]></category>
            <dc:creator><![CDATA[Wietse Wind]]></dc:creator>
            <pubDate>Tue, 18 Sep 2018 06:27:00 GMT</pubDate>
            <atom:updated>2018-09-18T06:27:00.237Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b8IUyWmhmDub8dVPvirt6g.png" /></figure><blockquote>— <a href="https://xrpcommunity.blog/raspberry-pi-interledger-xp-powerswitch-howto/">published at the XRP Community Blog</a></blockquote><p>For just ~$30 in parts (Raspberry Pi, 3.3V Relay board and a few wires) you can build your own power switch that will switch on if a streaming ILP payment comes in. Payment stream stops? Power turns off.</p><p>Is this useful? Well, right now… Not really, right? There’s no easy way for people to start streaming XRP to you over ILP, but… That may change ;)</p><p>I hope I can guide you through the process of installing your Raspberry Pi and wiring your Pi to your power socket.</p><h3>WARNING: YOU ARE GOING TO WORK WITH HIGH VOLTAGE ELECTRICITY! IF YOU DON’T KNOW WHAT YOU ARE DOING (or at least: the electricity / wiring part) PLEASE DO NOT SWITCH 110V/220V, BUT SWITCH A SIMPLE LOW VOLTAGE LED INSTEAD.</h3><p>Depending on your experience with hard- and software it may take you between 30 minutes and a few hours to complete this howto.</p><h3>1. Prerequisites</h3><p>This is your shopping list:</p><ul><li>Raspberry Pi, model 2B or 3</li><li><a href="https://dz6ehzj.dlvr.cloud/2.png">High speed Micro SD card</a>, 4GB or more</li><li>Decent <a href="https://mhwcu47.dlvr.cloud/5.jpeg">power supply</a> for a Raspberry Pi (the Pi is pretty sensitive)</li><li>Either: a soldering iron and some low voltage wires, or (<strong>even better</strong>) <a href="https://hj9bnfd.dlvr.cloud/jumperwires-ff-10-1-684x456.jpg">jumper wires</a></li><li>A 3.3V relay board (5V may work as well)</li></ul><p>You’ll also need a <strong>family seed</strong> (a.k.a. “secret”), the secret for your own XRP account (wallet) starting with a lowercase s, eg. snq1b...Qoa...fo2HjPHppq3rZUG.<br><strong>PLEASE NEVER SHARE YOUR SECRET WITH ANYONE!</strong></p><p>You need to <a href="https://mhwcu47.dlvr.cloud/5.jpeg">connect</a> your Raspberry Pi to a monitor / TV with a HDMI cable, and into your switch/router with a CAT5 / CAT6 network cable. You also need to connect (USB) a keyboard for the initial setup.</p><p>If you are on Windows, you’ll also need a SSH client to connect to the Raspberry after the initial installation. Please <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html">install Putty</a>. If you are on Mac OSX or Linux, you are already fine.</p><h3>2. Raspberry Pi operating system</h3><p>The Raspberry Pi needs an operating system. We’ll use the lightweight version of Debian linux: “Raspbian Stretch Lite”. Please visit:<br><a href="https://www.raspberrypi.org/downloads/raspbian/">https://www.raspberrypi.org/downloads/raspbian/</a></p><p>… and download the <strong>Raspbian Stretch Lite ZIP</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GvWIzKuRCiyiNgER.png" /></figure><h3>3. Write the OS to the SD card</h3><p>To write the ZIP with “Raspbian Stretch Lite” to your Micro SD card, please download <a href="https://etcher.io/">etcher</a>. It’s an awesome and user friendly tool to write the Raspberry Pi operating system to the Micro SD card.</p><p>Insert your Micro SD card into your card reader, Launch Etcher, select the downloaded ZIP (don’t extract the ZIP) and select your SD card.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B-1lfQyGY7GI3hJr.png" /></figure><p>When Etcher tells you it’s done, safely unmount the SD and <a href="https://gzstkd8.dlvr.cloud/4.png">insert it</a> into your Raspberry Pi.</p><h3>4. Connect your Pi</h3><p>Now connect your Pi. Connect your monitor, network and keyboard.</p><h3>Lastly: plugin your power supply.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*V4evlr4_Um8XjEAU.jpeg" /></figure><p>Your Raspberry Pi will now boot. We can move on to step <strong>#5</strong> when your Raspberry Pi asks you to login.</p><h3>To login to a freshly installed Raspberry Pi, your username is pi and your password is raspberry.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9S0Wy6Mgp8gsm-ID.jpg" /></figure><h3>5. Basic installation</h3><p>First, lets check the IP address on your local network your router assigned to your Raspberry. This is the IP you can connect to, using SSH, in a few minutes;</p><p>Enter this command:</p><pre>ifconfig</pre><p>Your Pi will show your IP; check the IP (inet) for eth0, the wired network interface:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AgW1ToaEHoaj80wz.jpg" /></figure><p>The IP probably starts with 10., 172. or 192. (local network ranges). If the IP starts with 169. there is probably something wrong with your network connection.</p><p>You probably want to continue the installation from behind your own computer, allowing you to copy-paste the commands I’m going to share with you. To do this, we’re going to enable <strong>SSH</strong> on the Raspberry, allowing remote logins to the Raspberry Pi terminal.</p><p>Please enter this command:</p><pre>sudo touch /boot/ssh</pre><p>… and press enter. You’ll probably have to enter your password, raspberry, again.</p><p>This command creates a file (/boot/ssh) that tells the Raspberry to allow SSH connections.</p><p>Now let’s apply and reboot; enter sudo reboot and press enter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*U0uD_utMuwlLVita.jpg" /></figure><p>Wait for your Raspberry to reboot and return to the login screen.</p><h3>6. Login to the Raspberry Pi using SSH</h3><p>Now return to your own computer.</p><h3>Your computer needs to be connected to the same network the Raspberry Pi is connected to. Your computer may be connected wireless while your Raspberry Pi is connected with a wire, as long as it’s the same network.</h3><p>Please open your <strong>terminal</strong> (OSX, Linux) or <strong>Putty</strong> (Windows) and create a new SSH connection to the Raspberry, using the IP you checked in step <strong>#5</strong>.</p><p>OSX / Linux users can enter this terminal command:</p><pre>ssh -p 22 pi@0.0.0.0</pre><p>… Where you have to replace the fake 0.0.0.0 IP with the IP of the Raspberry.</p><p>Windows users can enter the IP in the Host Name (or IP address) field, and 22 in the port field. Select SSH as connection type.</p><p>Now connect. If you are asked for a username, enter pi. You will be asked for the password, that&#39;s raspberry.</p><p>After being connected, a <a href="https://x5qusbn.dlvr.cloud/9.png">welcome message</a> from the Raspberry Pi will show, asking you to change your password (now: raspberry). Enter the command:</p><pre>passwd</pre><p>… to <a href="https://x5qusbn.dlvr.cloud/9.png">change the password</a>. Enter the existing password (raspberry) and enter a new one. Then retype your new password.</p><h4>The next time you will login to your Raspberry (either with your connected USB keyboard, or using SSH) you’ll need to use your new password.</h4><h3>7. Update the Raspberry</h3><p>You’ll want to make sure you are running the most recent (software) packages on the Raspberry. Let’s <a href="https://x5qusbn.dlvr.cloud/">update and upgrade it</a>;</p><pre>sudo apt -y update &amp;&amp; sudo apt -y upgrade &amp;&amp; sudo apt -y dist-upgrade</pre><p>… This may <a href="https://x5qusbn.dlvr.cloud/">take a while</a> (15 ~ 30 minutes, depending on your bandwidth).</p><h3>8. Install node</h3><p>Now let’s install <strong>node</strong> and <strong>git</strong>. Git will allow you to fetch my sample code and node will allow you to run it.</p><p>This command will tell your Pi where to look for the node software:</p><pre>curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8-nNmYXXQfVZyujT.png" /></figure><p>Now install node:</p><pre>sudo apt-get install -y nodejs</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UeOmKmPDphSTNiQi.png" /></figure><p>When the Pi has installed node, you can verify by checking the installed node version:</p><pre>node -v</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Smv1vEh3DU84MV4U.png" /></figure><h3>9. Install ILP dependencies</h3><p>To be able to connect to Interledger (ILP), we’re going to install <strong>moneyd</strong>. To be able to receive money over ILP, we’re going to allow moneyd to connect to the XRP ledger. When we installed node, npm was also installed. <strong>npm</strong> is the <em>Node Package Manager</em>.</p><p>Let’s install moneyd and moneyd-uplink-xrp:</p><pre>sudo npm install --unsafe-perm -g moneyd moneyd-uplink-xrp</pre><p>If you see a few warnings (orange, yellow): no problem. Errors (red) are bad though.</p><h3>10. Configure moneyd</h3><p>Now let’s configure moneyd, so you can send and receive ILP payments. You will need 10 XRP of available XRP balance that will be locked in a Payment Channel (you can always close the Payment Channel and get your XRP back).</p><p>Please enter this command:</p><pre>sudo moneyd xrp:configure --advanced</pre><p>You’ll be asked <strong>four</strong> questions, you’ll need to manually enter <strong>two of them</strong>.</p><ul><li>BTP host: please enter client.scyl.la</li><li>Name to assign to this channel: <em>please leave as is</em></li><li>XRP secret: <strong>please enter your own account XRPL (wallet) secret</strong></li><li>Rippled server: <em>please leave as is</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VjKYTLKesPlRvHxh.png" /></figure><h3>11. Install moneyd as a service</h3><p>Now moneyd is configured, we want to configure a service, allowing moneyd to run in the background and auto-start when the Raspberry Pi boots.</p><p>Please copy-paste as is, and press enter:</p><pre>sudo bash -c &#39;echo &quot;[Unit]<br>Description=ILP provider using XRP payment channels<br>After=network.target nss-lookup.target</pre><pre>[Service]<br>ExecStart=/usr/bin/moneyd xrp:start<br>Restart=always<br>StandardOutput=syslog<br>StandardError=syslog<br>SyslogIdentifier=moneyd<br>User=root<br>Group=root</pre><pre>[Install]<br>WantedBy=multi-user.target&quot; &gt; /etc/systemd/system/moneyd-xrp.service&#39;</pre><p>Now let’s reload, so the Raspberry Pi is aware we just created a new service:</p><pre>sudo systemctl daemon-reload</pre><p>Now let’s enable the moneyd service:</p><pre>sudo systemctl enable moneyd-xrp.service</pre><p>… and finally: let’s <strong>start</strong> the moneyd service:</p><pre>sudo systemctl start moneyd-xrp.service</pre><p>Let’s wait ~20 seconds (so moneyd can start and connect) and check the logs:</p><pre>sudo systemctl status moneyd-xrp.service</pre><p>You should see a (partial) moneyd ASCII art banner and some more info;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UgPBoWeGRJy9-3s-.png" /></figure><h4>Your Raspberry is now connected to ILP 🎉</h4><h3>12. Fetch and install the code</h3><p>To receive ILP payments and send instructions (switch on / off) to your Raspberry Pi’s GPIO (General Purpose Input/Output) ports, you’ll need a piece of software I wrote. To fetch the code from <a href="https://github.com/WietseWind/RaspberryPi-ILP-GPIO/">Github</a>, you’ll need to install git:</p><pre>sudo apt install -y git</pre><p>Now go to the <em>home directory</em> on your Raspberry Pi:</p><pre>cd</pre><p>… and clone my sample code from Github:</p><pre>git clone <a href="https://github.com/WietseWind/RaspberryPi-ILP-GPIO.git">https://github.com/WietseWind/RaspberryPi-ILP-GPIO.git</a></pre><p>Now my code is cloned to the RaspberryPi-ILP-GPIO folder, let&#39;s go there:</p><pre>cd RaspberryPi-ILP-GPIO</pre><p>Rember <em>npm</em>, the node package manager, we used to install moneyd? We&#39;ll now use npm again, to install the dependencies (I didn&#39;t write all the code myself, I rely on packages by the awesome people at Interledger, etc.):</p><pre>npm install</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8MHfUijctySvKuDY.png" /></figure><p>Now let’s run the code:</p><pre>node index.js</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tw_JXIo1yFncm2Qs.png" /></figure><p>If you want to run this code <em>headless</em> (in the background, at your own domain) you’ll need a follow-up tutorial, but for now, the code just <strong>generates a random hostname</strong>. This is your <strong>Payment Pointer</strong>. Money can be sent here (over ILP) 🎉</p><h3>13. Note on reboots</h3><p>When you reboot your Raspberry Pi, moneyd will auto-start since we&#39;ve installed a service. The ILP receiver (my sample code, we just fetched from Git) will <strong>not</strong> run automatically, and will <strong>not</strong> run in the background, since you&#39;ll need to see the generated <strong>Payment Pointer</strong>.</p><p>If you reboot your Pi, you need to login again using SSH (step <strong>#6</strong>), go to the right folder again, and run it:</p><pre>cd RaspberryPi-ILP-GPIO<br>node index.js</pre><p>You will receive a <strong>new</strong> Payment Pointer every time you run the code again.</p><p>If you want to quit the code, press <strong>Control C</strong> a few times (<em>on OSX, that’s </em><strong><em>also</em></strong><em>Control, not Command</em>).</p><h3>14. Wiring</h3><p>So now the software is ready. Let’s get the hardware ready. Depending on your experience, this is either the easy or the scary part.</p><p>For the wiring, we’re using the GPIO connectors on the Raspberry Pi. The GPIO (General Purpose Input/Output) connector contains 40 pins. We’re <strong>only going to use three of them</strong>,</p><ul><li>The 3.3 volt pin</li><li>The GPIO4 pin</li><li>The GND pin</li></ul><p>The external relay 3.3v relay board will also have 3 pins we’ll connect:</p><ul><li>3.3v / Vcc</li><li>IN1/Signal</li><li>GND</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*twYlpoSPlUxbM_bx.png" /></figure><p>The code from <strong>Step #12</strong> instructs the Raspberry Pi to switch on/off the GP4 pin. The GP4 pin will either send <strong>no power</strong> or <strong>3.3v</strong>, depending on if an ILP payment is coming in.</p><p>Since you can’t power a wall socket with 3.3v, we’ll switch a relay, that will switch the high(er) voltage wall socket / device.</p><blockquote><em>If you don’t want to work with high voltage, you can also connect a low voltage (3.3v, or use a resistor) LED to the GP4 and GND connectors.</em></blockquote><h3>15. What’s next</h3><p>I can think of a few things (not covered by this tutorial):</p><ul><li>Sending money, so your device will power on</li><li>Running the ILP receiver in the background</li><li>Running the <strong>Payment Pointer</strong> on your own (persistent) hostname, instead of a random localtunnel.me hostname</li><li>Additional GPIO connectivity (inputs / outputs)</li><li>Determine power usage and adjust ILP payments</li></ul><p>I hope other community members will continue developing, sharing, blogging, etc. but I’d be happy to write follow-up blogs on these subjects… To be continued, by me, or by others ;)?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fc-eS0HQUuJg%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dc-eS0HQUuJg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fc-eS0HQUuJg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/59de53160ed30b41160d884c300f6f1a/href">https://medium.com/media/59de53160ed30b41160d884c300f6f1a/href</a></iframe><p>Thank you, <a href="https://twitter.com/byrawpixel">@byrawpixel</a> for the cover photo. Thanks to all XRPL, Interledger and Raspberry developers for allowing me to create awesome stuff :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6966662b04b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Develop awesome webapps using VueJS + Webpack (demonstrating by building a XRP ledger integration)]]></title>
            <link>https://itnext.io/develop-awesome-webapps-using-vuejs-webpack-bda08ebb691c?source=rss-c49d620d22ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/bda08ebb691c</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[vue]]></category>
            <category><![CDATA[xrp]]></category>
            <category><![CDATA[ripple]]></category>
            <category><![CDATA[vuejs]]></category>
            <dc:creator><![CDATA[Wietse Wind]]></dc:creator>
            <pubDate>Thu, 05 Apr 2018 12:53:16 GMT</pubDate>
            <atom:updated>2018-06-18T07:42:55.273Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*23xdbC1Dy3mMDrKGNRMOqw.jpeg" /></figure><p>Vue (pronounced /vjuː/, like view) is a progressive framework for building user interfaces.</p><p>Using VueJS, you can combine writing HTML and Javascript. Vue will then keep your Javascript objects and HTML in sync. This means your events in your DOM (HTML) can mutate the VueJS Javascript objects, resulting in modifications in your DOM (and the other way around).</p><p><a href="https://jsfiddle.net/k6j2u2kx/5/">Here is a simple example</a> — This small piece of HTML + VueJS code allows you to add and remove Todo’s.</p><p>You can use Vue in <em>vanillajs</em> projects (so: just write plain old Javascript), but you probably want to do a bit more. How about using ES6 syntax, modules, npm packages, etc.?</p><p>And: how about live-reload to make development easier? How about packing everything and make your project ready for deployment to browsers?</p><blockquote>This tutorial may require some knowledge about html, javascript and the basics of virtual dom.</blockquote><h4>NPM</h4><p><strong>npm</strong> is the package manager for JavaScript and the world’s largest software registry. There is an amazing amount of packages, ready to use, available at <a href="https://www.npmjs.com](https://www.npmjs.com)">https://www.npmjs.com</a></p><p>When you have nodejs installed on your PC, you will automatically have <strong>npm</strong> installed as well. We are going to use <strong>npm</strong> in a minute, so make sure you have <a href="https://nodejs.org/en/">node (js)</a> <a href="https://nodejs.org/en/download/"><strong>installed</strong></a>.</p><h4>Meet vue-cli</h4><p>There are a lot of tools that, combined, will allow you to start developing your VueJS webapp in seconds. All the good stuff is already available for you in templates. <strong>vue-cli</strong> allows you to kick off your project.</p><p>Let’s install <strong>vue-cli</strong> globally (the -g option):</p><pre>npm install -g vue-cli</pre><p>Now you have the vue init command available (and since we’ve installed <strong>vue-cli</strong> globally, you can run this command from every folder (in your terminal))</p><p>The vue init command allows you to specify a template package and a project folder. After a small install wizard your project folder will be created with lots of tools and config pre-installed, allowing you to start development.</p><p><strong>The vue webpack template</strong></p><p>The webpack template for VueJS comes with lots of awesome tools pre-installed and pre-configured:</p><ul><li>Development webserver with auto-reload</li><li>ES6 syntax support (import, require, etc.)</li><li>Build tools (to compile, minify, etc.) for deployment to the browser</li><li>Routing</li><li>Vue components (combine the Vue HTML template with the vue object and styling in one component (file))</li><li>Debugging tools</li><li>Syntax linting</li></ul><h3>Create your first project</h3><p>Go to the folder where you would like to create your vue webpack project (folder), and run:</p><pre>vue init webpack sampleproject</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vhL_tgaCbFGyc5x5Cz49zA.png" /><figcaption>Vue init wizard — Let’s answer some questions.</figcaption></figure><p>This will create a vue webpack project in the folder (will be created) sampleproject/.</p><p>You’ll have to enter:</p><ul><li>Project name (a-z-)</li><li>Project description</li><li>Author (name &lt;mail&gt;)</li><li>The <em>Vue build</em> (select <em>“Runtime + Compiler”</em>)</li><li>Install <em>vue-router<br></em>If you want to develop a multi-page project, where components can have their own URL. This tutorial will not cover routing, so select <strong>No (n) </strong>if you want to try out Vue + Webpack and keep it simple.</li><li>Use ESLint? <br>ESLint will check your code. It will suck at first (since it will even compain about extra spacing, missing spaces, etc.) but it helps you write consistent code. I would pick <strong>Yes (Y)</strong> 😇</li><li>ESLint preset: select <strong>Standard</strong>. <br>This is the ruleset ESLint will use to check your code</li><li>Set up unit tests: <strong>No (N)</strong> for now. We’re just getting familiar with vue webpack, unit tests are another level.</li><li>Setup e2e tests: <strong>No (N)</strong> for now.</li><li>Should we run `npm install`? <br>Select <strong>Yes, use NPM</strong>. This saves us another command ;)</li></ul><p>Your project will be created and all dependencies will be downloaded and installed in your project. This will take a minute. npm may show a few warnings; as long as there are no errors you are probably fine.</p><p>Now open your project folder and start the development server:</p><pre>cd sampleproject<br>npm run dev</pre><h4>The development server</h4><p>You can launch a local development webserver using the npm run dev command. The server will be launched at <a href="http://localhost:8080`">http://localhost:8080</a>, except if port 8080 is already taken: the port number will increment until a free TCP port is found. The development server will show the URL in your terminal.</p><p>Please visit it :) <br>You will see a Vue.js .sample page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SeeIn1jmrm5KAwarL8m6bw.png" /></figure><p><strong>Shutting down the development server</strong></p><p>Press Ctrl — C</p><h4>Project (folder) structure</h4><p>If you open your project folder, these are the relevant files and folders (for now):</p><ul><li>index.html <br>The base HTML of your project. If you want to add stuff to your &lt;head&gt;, like a title, meta-tags, etc. you can edit this file.</li><li>static/ <br>You can store your static assets over here, like images, fixed JS / CSS files, etc.</li><li>src/<br>The most important folder. This is where your Vue.js code lives</li><li>src/App.vue<br>The entry point of your application</li><li>src/components/HelloWorld.vue<br>The sample content of your new project, visible when you visit your development server in the browser,</li></ul><p>Of course there are more files and folders, but we won’t cover them now.</p><h4>src/components/HelloWorld.vue</h4><p>The src/components/HelloWorld.vue file contains most of the sample page when you visit your development server address at <a href="http://localhost:8080/">http://localhost:8080</a> — because src/App.vue <em>imports</em> this file, registers it as a Vue <em>component</em> and the src/App.vue file then displays the contents below the logo using &lt;HelloWorld /&gt;</p><p>Now open src/components/HelloWorld.vue in your editor. You’ll see this file contains three ‘sections’ (root tags):</p><ul><li>&lt;template&gt;...&lt;/template&gt;<br>This tag contains the regular HTML your vue component will render. You can mix Vue syntax with plain old HTML, and refer to other .vue files (if imported and registered, just as src/App.vue does with HelloWorld.vue.</li><li>&lt;script&gt;...&lt;/script&gt;<br>This is were modules are imported, and your Vue component is exported. The vue component can contain <em>components</em>, <em>methods</em>, <em>data, </em>etc.</li><li>&lt;style scoped&gt;...&lt;/style&gt;<br>The CSS lives here. If the <em>scoped</em> attribute is present, the style will only affect the DOM in this specific module. If you omit the <em>scoped</em> attribute, styling can affect other components as well.<br>(If you prefer sass/scss, scroll down, I added a section about installing the sass/scss requirements for your vue webpack project)</li></ul><h4>Your first code</h4><p>Edit src/App.vue — remove the &lt;img ... /&gt; tag (containing the Vue logo) and remove the styling at the bottom of the page (in the &lt;style&gt; tag).</p><p>Now edit src/components/HelloWorld.vue — remove the existing code in the file and replace it with the minimal code required for the component:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c0c5983b5bacc5821f7069878365592/href">https://medium.com/media/2c0c5983b5bacc5821f7069878365592/href</a></iframe><p>Your development server will automatically pick up the changes and your browser will show a very basic page with the message from the msg variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*hxkAGhLqtetjJF_vWmK60w.png" /></figure><p>Now let’s add a few simple things to the code, showing you some of the basic (but still awesome) virtual dom tricks (manipulating your Vue object from the DOM and the other way around):</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c190d73398121982a6682257e710e45/href">https://medium.com/media/1c190d73398121982a6682257e710e45/href</a></iframe><p>You will probably get it when you read the code;</p><ul><li>There’s a button calling the toggleShowMore method. This method will update the Vue component data by inverting showMore (<em>this</em> refers to <em>this vue object</em>, you can call methods or refer to data)</li><li>The button will either display “Show” or “Hide” depending on the state (true / false) of showMore</li><li>The div with more information will only be visible if showMore is true.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*RLAqklqlVVuMkc95xrnrhg.gif" /></figure><h4>Use npm modules</h4><p>OK, great. You can write your html, css and javascript in .vue files. How about all those nice <strong>npm</strong> modules? How to add them to your project?</p><ol><li><strong>Install the module<br></strong>Quit your development server (Ctrl — C) and install the module. I’ll use the <em>rippled-ws-client</em> module: a module I wrote to make awesome applications for the XRP (cryptocurrency) ledger. We are going to check a wallet balance. Live. Awesome, right!?</li><li><strong>Import the module<br></strong>When the <strong>npm </strong>module is added to your project we need to ‘<em>tell vue</em>’ to use it. We’ll use the import keyword to do this.</li><li><strong>Use the module<br></strong>Let’s write some code!</li></ol><p>To install the module, we run <em>npm install</em> with the --save attribute. This will add the module to the package.json file, so if we push our project to Git, the module is automatically installed when someone clones your repository and runs <em>npm install.</em></p><pre>npm install --save rippled-ws-client</pre><p>Now start your development server again;</p><pre>npm run dev</pre><p>… and edit src/components/HelloWorld.vue once more. In the &lt;script&gt; tag, above the export of our Vue object, we’ll import the module. We’ll add some more code as well (check the gist below).</p><p>Let me explain a few things first:</p><ul><li>At line 5 we use vue conditional classes, the key is the classname (CSS: line 63) and the value is the javascript condition to add this class.</li><li>At line 21 we import the rippled-ws-client npm module and name the module RippleClient — we can now refer to the RippleClient constant in our code (line 34)</li><li>The XRP wallet address is hardcoded (for now) at line 27 — <em>(This is my wallet. If you feel generous, be my guest 😇)</em></li><li>The <em>rippled-ws-client</em> connects to a Rippled-server. We’ll use the public server s1.ripple.com (line 34)</li><li>To fetch the balance for a wallet (an <em>account</em>), we send the account_info request to the Rippled-server. When the server answers, we set the response data to the vue object (line 44 – 55)</li><li>We can refer to the vue object with this because we use the ES6 “<em>spaceship operator</em>” (args) =&gt; { function } for callback functions. Functions defined using the <em>spaceship operator</em> don’t overwrite the this context.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e1eb732da54369c3e147379af8d06f46/href">https://medium.com/media/e1eb732da54369c3e147379af8d06f46/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*yKvXBXzx2NFiJVQH3EBthw.gif" /><figcaption>Your first application connecting to the XRP ledger using Vue.js :D</figcaption></figure><h3>Compile for the browser</h3><p>So we created something awesome. Now you want to show your web application to the world. Your development webserver running at your own computer at <a href="http://localhost:8080/">localhost:8080</a> is great for development, but not publicly available.</p><p>Since everything you code in your Vue.js project is client side, you can just compile your project for the browser using the npm run build command. Your vue webpack project will be exported to the (newly created) dist/ folder. This is what will happen:</p><ul><li>JavaScript minified with <a href="https://github.com/mishoo/UglifyJS2/tree/harmony">UglifyJS v3</a>.</li><li>HTML minified with <a href="https://github.com/kangax/html-minifier">html-minifier</a>.</li><li>CSS across all components extracted into a single file and minified with <a href="https://github.com/ben-eb/cssnano">cssnano</a>.</li><li>Static assets compiled with version hashes for efficient long-term caching, and an auto-generated production index.html with proper URLs to these generated assets.</li></ul><p>We quit our development server using Ctrl — C and we run:</p><pre>npm run build</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kIboNxnHXCMQyVxT77SmCQ.png" /></figure><p>You can now grab the generated dist/ folder from your vue webpack project and publish the contents to a webserver.</p><p>Tip: To easily publish media or static websites to a unique website, I developed <a href="https://dlvr.cloud/"><strong>dlvr.cloud</strong></a>. Use a modern browser (eg. Chrome) to drag — drop the dist/ folder from your project to <a href="https://dlvr.cloud/">https://dlvr.cloud</a> — your production ready vue webpack project is now online 😁</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S31WHY6P-6vCshE1m174Kw.png" /></figure><h3>Extra</h3><h4>Use sass/scss in the `.vue` files</h4><p>If you want to use scss (awesome, nested CSS styling, variables, etc.) in your vue webpack project you’ll have to install two packages, and add the lang=&quot;scss&quot; attribute to the &lt;style ...&gt; tags in your .vue files:</p><pre>npm install --save node-sass sass-loader</pre><p>Now add lang=&quot;scss&quot; to your &lt;style&gt; tag:</p><pre>&lt;style lang=&quot;scss&quot; scoped&gt;<br>  /* scss */<br>&lt;/style&gt;</pre><p><strong>SCSS (nested css, functions) example</strong></p><pre>&lt;style lang=&quot;scss&quot; scoped&gt;<br>  div {<br>    &amp;.hello {<br>      font-family: Arial, Tahoma, Verdana; <br>      font-size: 1em; line-height: 1.5em;</pre><pre>      .waiting { color: darken(orange, 10%); }<br>    }<br>  }<br>&lt;/style&gt;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bda08ebb691c" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/develop-awesome-webapps-using-vuejs-webpack-bda08ebb691c">Develop awesome webapps using VueJS + Webpack (demonstrating by building a XRP ledger integration)</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Updating your rippled Docker Container]]></title>
            <link>https://wietsewind.medium.com/updating-your-rippled-docker-container-65a298ebae3f?source=rss-c49d620d22ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/65a298ebae3f</guid>
            <category><![CDATA[ripple]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[rippled]]></category>
            <dc:creator><![CDATA[Wietse Wind]]></dc:creator>
            <pubDate>Wed, 21 Feb 2018 14:12:24 GMT</pubDate>
            <atom:updated>2018-05-19T21:13:38.899Z</atom:updated>
            <content:encoded><![CDATA[<p>If you operate a <strong><em>validator</em> or <em>rippled</em> Docker Container </strong>(<a href="https://medium.com/@WietseWind/how-to-run-a-ripple-validator-digitalocean-7e5fca1c3d77">howto</a>) the upgrade process is pretty easy. I intend to update the Docker Hub container images to the most recent rippled version ASAP, so all you have to do is re-create your container based on the newest image.</p><p>If you used the Github repositories (<a href="https://github.com/WietseWind/docker-rippled">docker-rippled</a>, <a href="https://github.com/WietseWind/docker-rippled-validator">docker-rippled-validator</a>) there are instructions at the end of this article.</p><h3>Docker Hub</h3><p>If you just followed the instructions in the Howto and created a container, the old container image was fetched from the Docker Hub automatically. By now, the same image containing a newer version of rippled is waiting for you at the Docker Hub.</p><blockquote>The steps below assume we are talking about the validator container, rippledvalidator — if you are running the rippled image instead of the rippledvalidator, please replace rippledvalidator in all the commands below for rippled.</blockquote><p>If you named your container differently (my howto assumed the --name of the container to be either rippledvalidator or rippled, you can check your container name with the command:</p><pre>docker ps -a</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ygVGGoQ5Gu4bojDWdBMIrQ.png" /><figcaption>The last column will show your container name</figcaption></figure><h4><strong><em>1. Check the file mounts of our existing docker container (the -v argument)</em></strong></h4><p>When you created the container, you probably used a command containing a folder mapping (from the host to the docker container). This is where your rippled config and keys are stored. We are going to remove the container, and when we re-create our container (step 6) we want to use our existing config and keys. To be sure, we are going to check the path(s) mapped to the container:</p><pre>docker inspect -f &#39;{{ .Mounts }}&#39; rippledvalidator</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*QOUnB_Lm7VEAfb0BT9P1rg.png" /><figcaption>The mapped folders (mounts) are displayed</figcaption></figure><p>Looks like (in my case) I specified the path below using the -v option:</p><pre>-v /Users/wrw/Desktop/Ripple/Docker/validator/keystore:/keystore</pre><h4><strong><em>2. Check the mapped ports of our existing docker container (the </em></strong><strong><em>-p argument)</em></strong></h4><p>Let’s check the mapped ports (from our Docker host to the container):</p><pre>docker ps -a</pre><p>In this case we see ...:51235-&gt;51235 in the output (for our rippledvalidator container)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8YMmpWFyEZKHwPFU_MFY2g.png" /></figure><p>Looks like I specified a portmap using the -p option:</p><pre>-p 51235:51235</pre><h4><strong><em>3. Stop the existing container</em></strong></h4><p>Now we know the -v and the -p argument(s) we have to use when we are going to re-create our docker container (step 6), we can stop our container:</p><pre>docker stop rippledvalidator</pre><p>Stopping the container will take 10~60 seconds; rippled wil gracefully close all connections and write remaining information to the database.</p><h4><strong><em>4. Remove the existing container</em></strong></h4><p>Let’s remove the container:</p><pre>docker rm rippledvalidator</pre><h4><strong><em>5. Remove the existing docker image</em></strong></h4><p>If we would re-create our container, Docker would just reuse our old container image (containing rippled 0.81.0). We are going to remove our image, so Docker will download the newest version from the Docker Hub:</p><pre>docker rmi xrptipbot/rippledvalidator:latest</pre><blockquote>docker rm = remove container, docker rmi = remove image</blockquote><h4><strong><em>6. Re-create the container. Docker will download the most recent image containing rippled</em></strong></h4><p>We will now combine the information from step 1 and step 2, and create a new container. We will mount the folder with our config, keys (and in case of the rippled-image: database) again. The command in my <a href="https://medium.com/@WietseWind/how-to-run-a-ripple-validator-digitalocean-7e5fca1c3d77">howto</a> is:</p><pre>docker run -dit \<br>    --name rippledvalidator \<br>    -p 51235:51235 \<br>    -v /My/Local/Disk/RippledKeystore/:/keystore/ \<br>    xrptipbot/rippledvalidator:latest</pre><blockquote><strong>PLEASE NOTE! Replace </strong><strong>/My/Local/Disk/RippledKeystore/ for the path step 1. showed. This is probably </strong><strong>/keystore/. This line will then be:<br> </strong><strong>-v /keystore/:/keystore/</strong></blockquote><p>You can update this command with your own ports and paths from step 1 and step 2. If you want to map multiple ports and/or multiple folders, just use the -p and/or -v arguments multiple times.</p><p>Now your new container is running, you can check the rippled-version with this command:</p><pre>docker exec rippledvalidator /opt/ripple/bin/rippled server_info|grep version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*DkDmVi_tI9KRC-f47b87bg.png" /><figcaption>Looks like (in the example above) we are now running 0.90.0 :)</figcaption></figure><h3>Github</h3><p>If you cloned the <a href="https://github.com/WietseWind/docker-rippled-validator">docker-rippled-validator</a> or the <a href="https://github.com/WietseWind/docker-rippled">docker-rippled</a> Github repository and you used the go/build and go/up commands these are your steps to update.</p><p>Use your terminal to go to the folder the repository is checked out, and fetch the most recent version:</p><pre>git pull</pre><p>Now take the container down using the script in the repository:</p><pre>go/down</pre><p>Since the go/build script removes the existing image, you can just build a new image; the newest rippled-version will automatically download for your new build:</p><pre>go/build</pre><p>Now launch your container based on the new image:</p><pre>go/up</pre><p>Now your new container is running, you can check the rippled-version with this command:</p><pre>docker exec rippledvalidator /opt/ripple/bin/rippled server_info|grep version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*DkDmVi_tI9KRC-f47b87bg.png" /><figcaption>Looks like (in the example above) we are now running 0.90.0 :)</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65a298ebae3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Show your XRPL validator domain]]></title>
            <link>https://wietsewind.medium.com/verify-your-ripple-validator-show-your-domain-da19de30b19b?source=rss-c49d620d22ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/da19de30b19b</guid>
            <category><![CDATA[xrp]]></category>
            <category><![CDATA[digitalocean]]></category>
            <category><![CDATA[ripple]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Wietse Wind]]></dc:creator>
            <pubDate>Mon, 12 Feb 2018 09:42:04 GMT</pubDate>
            <atom:updated>2021-05-28T12:15:39.960Z</atom:updated>
            <content:encoded><![CDATA[<p>This (old) old article has been removed, the new domain verification procedure can be found here:<br><a href="https://xrpl.org/xrp-ledger-toml.html#domain-verification">https://xrpl.org/xrp-ledger-toml.html#domain-verification</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da19de30b19b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to run a XRPL validator]]></title>
            <link>https://wietsewind.medium.com/how-to-run-a-ripple-validator-digitalocean-7e5fca1c3d77?source=rss-c49d620d22ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e5fca1c3d77</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[xrp]]></category>
            <category><![CDATA[ripple]]></category>
            <category><![CDATA[digitalocean]]></category>
            <dc:creator><![CDATA[Wietse Wind]]></dc:creator>
            <pubDate>Thu, 08 Feb 2018 17:28:51 GMT</pubDate>
            <atom:updated>2021-05-28T12:15:08.566Z</atom:updated>
            <content:encoded><![CDATA[<p>This post has been removed, please see the updated docs:</p><p><a href="https://xrpl.org/run-rippled-as-a-validator.html">https://xrpl.org/run-rippled-as-a-validator.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e5fca1c3d77" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>