Book Image

Advanced Blockchain Development

By : Imran Bashir, Narayan Prusty
Book Image

Advanced Blockchain Development

By: Imran Bashir, Narayan Prusty

Overview of this book

Blockchain technology is a distributed ledger with applications in industries such as finance, government, and media. This Learning Path is your guide to building blockchain networks using Ethereum, JavaScript, and Solidity. You will get started by understanding the technical foundations of blockchain technology, including distributed systems, cryptography and how this digital ledger keeps data secure. Further into the chapters, you’ll gain insights into developing applications using Ethereum and Hyperledger. As you build on your knowledge of Ether security, mining, smart contracts, and Solidity, you’ll learn how to create robust and secure applications that run exactly as programmed without being affected by fraud, censorship, or third-party interference. Toward the concluding chapters, you’ll explore how blockchain solutions can be implemented in applications such as IoT apps, in addition to its use in currencies. This Learning Path also highlights how you can increase blockchain scalability, and discusses the future scope of this fascinating and powerful technology. By the end of this Learning Path, you'll be equipped with the skills you need to tackle pain points encountered in the blockchain life cycle and confidently design and deploy decentralized applications.
Table of Contents (25 chapters)
Title Page
Copyright and Credits
About Packt
Contributors
Preface
15
Blockchain - Outside of Currencies
16
Scalability and Other Challenges
Index

Building a wallet service


Now we have learned enough theory about LightWallet, it's time to build a wallet service using LightWallet and hooked-web3-provider. Our wallet service will let users generate a unique seed, display addresses and their associated balance, and finally, the service will let users send ether to other accounts. All the operations will be done on the client side so that users can trust us easily. Users will either have to remember the seed or store it somewhere.

Prerequisites

Before you start building the wallet service, make sure that you are running the geth development instance, which is mining, has the HTTP-RPC server enabled, allows client-side requests from any domain, and finally has account 0 unlocked. You can do all these by running this:

geth --dev --rpc --rpccorsdomain "*" --rpcaddr "0.0.0.0" --rpcport "8545" --mine --unlock=0

Here, --rpccorsdomain is used to allow certain domains to communicate with geth. We need to provide a list of domains space separated,...