Reader small image

You're reading from  Ripple Quick Start Guide

Product typeBook
Published inDec 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781789532197
Edition1st Edition
Languages
Right arrow
Author (1)
Febin John James
Febin John James
author image
Febin John James

Febin John James is presently working on building autonomous lending and borrowing protocol on the Ethereum blockchain. He also works as a tech and marketing consultant to ICOs and blockchain-based start-ups. He has years of experience in building and scaling tech architectures from scratch. His blockchain stories on Medium have gained a lot of popularity and have been translated into multiple languages. He writes for well-known publications such as Hacker Noon and freeCodeCamp. He is also the author of the book, Cloud is a Piece of Cake. Previously, he worked as the CTO of Boutline, a sports start-up. He has also bagged devices, cash prizes, and recognition from companies such as Intel, Blackberry, and Microsoft.
Read more about Febin John James

Right arrow

First Ripple application

In our first application, we'll write a simple program to connect to the network and fetch the account details of a specific Ripple address.

Here's the code that connects to the Ripple test network and fetches the account details of the address: 'r41sFTd4rftxY1VCn5ZDDipb4KaV5VLFy2'. Let's run this code first and then get into the details to learn how it works. Save the following code into a file and give it the name 'get_account.js':

'use strict';
const RippleAPI = require('ripple-lib').RippleAPI;

const api = new RippleAPI({
server: 'wss://s.altnet.rippletest.net:51233' // Ripple Test Network Address
});

api.connect().then(() => {
const accountAddress = 'r41sFTd4rftxY1VCn5ZDDipb4KaV5VLFy2';

console.log('Fetching account details of', accountAddress);
return api.getAccountInfo...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Ripple Quick Start Guide
Published in: Dec 2018Publisher: PacktISBN-13: 9781789532197

Author (1)

author image
Febin John James

Febin John James is presently working on building autonomous lending and borrowing protocol on the Ethereum blockchain. He also works as a tech and marketing consultant to ICOs and blockchain-based start-ups. He has years of experience in building and scaling tech architectures from scratch. His blockchain stories on Medium have gained a lot of popularity and have been translated into multiple languages. He writes for well-known publications such as Hacker Noon and freeCodeCamp. He is also the author of the book, Cloud is a Piece of Cake. Previously, he worked as the CTO of Boutline, a sports start-up. He has also bagged devices, cash prizes, and recognition from companies such as Intel, Blackberry, and Microsoft.
Read more about Febin John James