The First Libra Wallet POC— Building your own Wallet and APIs | by Nattapon Nimakul | KULAPofficial | Medium

The First Libra Wallet POC— Building your own Wallet and APIs

( 28/06/2019 ) immediately, we have users more than 3,000 with more than 21,000 transactions using our wallet .Libra Wallet on Testnet It ’ sulfur been about a week since Facebook announced Libra Blockchain which has Libra Coin run on it. Libra Coin is a stable coin backed by a basket of decree currencies. Libra Coin itself is created by Move language that Facebook announced aboard with its blockchain. Libra is an open generator stick out so we can look inside, play around with it or create a custom-made faculty ( by Move language ). so for Developers it just easy to get started with Libra-CLI to create an account, mint some coins and send it to your friends ( of course Developers ).

merely try this one, hypertext transfer protocol : // And Thai adaptation here .

What about normal users? who might interest Libra right now ? do they have a gamble to get some Libra coins ? of path not because we no have a user interface for now ( Yeah it just getting started 🎉 ) .

Introduce Libra Wallet POC

You can try the first Libra wallet hera = > hypertext transfer protocol : // Wallet Proof of concept At as we ’ re smart abridge developers for Ethereum that building Dex ( Decentralized Exchange ). we see a draw of opportunities here, and we think aggregate users should have a probability to try it out so we create Libra Wallet POC that easy to use on hands of all users. Libra Wallet POC is a web wallet that allows users to create their wallets ( with 100 Libra Coins ) as equitable open a web page, and send it to their friends with QR Code!

Quick walkthrough

1. Open this page

It will be creating your wallet with 100 Libra coins on it .Libra Wallet Proof of concept

If don ’ triiodothyronine get 100 coins to please clear browser local storage and try again .

2. Send to your friends (or other browsers)

Select “ Send ” to scan QR or use “ Manual ” to provide target address yourself ( you can use an report on Libra-CLI here ), then “ Confirm ” .Libra Wallet — Transfer with QRLibra Wallet — Transfer with address

3. Done

then, you should see now your wallet remain balance ’ s 90 Libra coins .Libra Wallet — Balance And the destination address received 10 Libra coins .Libra Wallet — Balance on Libra-CLI

Libra wallet APIs

right now Libra visualize hasn ’ t officially announced any APIs that we can use with frontend so we decide to make our own APIs that routing any requests to Libra-CLI and return the resultant role from it .

1. Creating a wallet

[ POST ] hypertext transfer protocol : // Request Params:
// not thing or { } Return: You will get the mnemonic phrase ( secret ) and public address. Will call Libra-CLI as following below .

1. explanation make 2. report mint 0 100 3. question symmetry 0 4. report write ( to get your mnemonic phrase)

 curl -- location -- request POST `` hypertext transfer protocol : // '' \ 
-- header `` Content-Type : application/json '' \
-- data `` { } ''

2. Transfer

[ POST ] hypertext transfer protocol : // Request: Return:

Will call Libra-CLI as following below .

1. report recover 2. transferb 0 31c70925…14144b 11 ( suffix ‘ bacillus ’ is for waiting transaction to be committed to the blockchain )

 coil -- placement -- request POST `` hypertext transfer protocol : // '' \ 
-- header `` Content-Type : application/json '' \
-- data `` {
\ '' fromAddress\ '' : \ '' 91f63f777d8fc5294a4a19a4631a1af4a7e3ae4829cf6b021275773b25782dc7\ '',
\ '' mnemonic\ '' : \ '' burger trust dame hotel hedge recipe intense token south hero illness memory entry way property caution car cram quality aisle choose corrosion crane army ; 1\ '',
\ '' toAddress\ '' : \ '' 31c7092554bb804a4e25bd24399859428404c28cbc3b44dea5dc2a9f2314144b\ '',
\ '' amount\ '' : \ '' 11\ ''
} ''

3. Get balance

[ POST ] hypertext transfer protocol : // Request: Return: Will call Libra-CLI as following below .

1. question balance 08c7bdf6…0e18c3

 curl -- location -- request POST `` hypertext transfer protocol : // '' \ 
-- header `` Content-Type : application/json '' \
-- data `` {
\ '' address\ '' : \ '' 91f63f777d8fc5294a4a19a4631a1af4a7e3ae4829cf6b021275773b25782dc7\ ''
} ''


hypertext transfer protocol : // ? version=latest

Libra Wallet Service Architect

Libra Service API (stateless) To build that APIs we need shell synergistic that can send requests to Libra-cli so we use Node.js with child_process and rauschma/stringio libs to run a Libra-cli container every time when the drug user makes a request ( homeless ) .Libra shell interactive example 1 For example, createAccount ( ) serve will spawn a process of libra-cli container and pipe writableSteam and readableSteam to createAccountWriteToWritable and createAccountReadable accordingly to simulate shell instruction inout / output signal . Inside “ createAccountWriteToWritable”, will call each libra-cli commands footprint by footfall and use sleep ( ) between each pace to make sure that dominate from previous tone has done .Libra shell interactive example 2 finally createAccountReadable we use to parse command end product, commemorate it to states, then return output signal to API caller ( end product return in createAccount() oscilloscope ) .Libra shell interactive example 3 You can see all complete code here https : // .

The Frontend project

We use Vue.js and Axios for API calling therefore nothing visualize here if you interesting please have a search at hypertext transfer protocol : // .

Mnemonic phrase is saved on local anesthetic storage, so you can just open another browser to have two wallets .


This POC Libra wallet focusses on users to show how it works by allowing them to play it on their smartphone, laptop or background. This ’ randomness not safe wallet so please don ’ thymine use this technique to your production wallet because sending mnemonic phrase around is not procure at all. To building a production-grade wallet we should generate mnemonic phrase on the client and never sent it to anyone when the drug user needs to make a transaction wallet itself need to implement individual key singing mechanism and function sign transaction to board cast to the network. Might implementing mnemonic phrase encryption with password adenine well .

Thank you

Thank you very much for your time read. If you like this article feel unblock to share this article with your friends or person who might be matter to ^_^. Thanks to Bitcoin-Addict Thailand for mentioning this Wallet as The first Libra Wallet in the world ^^. Any questions please feel free to comments .


After we launched our lotion until now ( 23 June ) We have active users that create a wallet in our app > 1,000+ wallets. With 5,000+ transactions.

Welcome to contributing


API Service : hypertext transfer protocol : // Frontend : hypertext transfer protocol : //


hypertext transfer protocol : //

source :

Related Posts

Leave a Reply

Your email address will not be published.