Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Blockchain Development for Finance Projects

You're reading from  Blockchain Development for Finance Projects

Product type Book
Published in Jan 2020
Publisher Packt
ISBN-13 9781838829094
Pages 530 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Ishan Roy Ishan Roy
Profile icon Ishan Roy

Table of Contents (17) Chapters

Preface 1. Section 1: Blockchain Payments and Remittances
2. Blockchain in Financial Services 3. Building a Blockchain Wallet for Fungible and Non-Fungible Assets 4. Designing a Payment Gateway for Online Merchants 5. Corporate Remittances and Settlement 6. Enabling Cross-Border Remittances with Real-Time KYC/AML Verification 7. Section 2: Blockchain Workflows Using Smart Contracts
8. Building a Letter of Credit Workflow Module Using Smart Contracts 9. Section 3: Securing Digital Documents and Files Using Blockchain
10. Building a Tamper-Proof Document Storage System 11. Section 4: Decentralized Trading Exchanges Using Blockchain
12. Building a Decentralized Trading Exchange 13. Developing a Currency Trading Exchange for Market Making 14. Looking into the Future 15. Other Books You May Enjoy Appendix: Application Checklist

Creating an API for generating dynamic payment addresses

For creating dynamic wallet addresses on the fly for each payment request, we will be setting up an HD wallet for the merchant who is accepting payment for their products from the e-commerce gateway.

HD wallets allow us to create a set of hierarchical wallet addresses derived from the same mnemonic. If the merchant can safely preserve one mnemonic phrase, they can manage all of the addresses using the same string of words.

For providing dynamically generated, hierarchically linked addresses to our payment gateway, we'll be setting up a Node.js app with a get API service. The payment gateway can use this service to fetch a new address from the merchant's HD wallet:

  1. Create a new Node.js project directory as shown in the following. Let's call this hdwallet.
  2. Run the mkdir hdwallet command.
  1. Run npm init to create...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}