Skip to content

Latest commit

 

History

History
77 lines (70 loc) · 2.42 KB

README.md

File metadata and controls

77 lines (70 loc) · 2.42 KB

ZeroToBlockchain Chapter 10: Building the Finance Company User Experience

Return to Table of Contents

In this chapter, we will create the Finance Company view and add server-side services to support it. This runs on HyperLedger Fabric Version 1.0. The code that we will write is managed in this chapter and all the subsequent chapters in the following folder structure:

Chapter 10
  ↳ controller
     ↳restapi
       router.js
        ↳features
           ↳composer
             autoLoad.js
             hlcAdmin.js
             hlcClient.js
             queryBlockChain.js
             Z2B_Services.js
             Z2B_Utilities.js
           ↳ text
               multi-lingual.js
               resources.js
  ↳ HTML
    index.html
    admin.html
    buyer.html
    ceateConnectionProfile.html
    createMember.html
    createOrder.html
    deleteConnectionProfile.html
    financeCo.html
    getMemberSecret.html
    removeMember.html
    provider.html
    seller.html
    shipper.html
     ↳CSS
       pageStyles.css
     ↳js
       z2b-admin.js
       z2b-buyer.js
       z2b-events.js
       z2b-financeCo.js
       z2b-initiate.js
       z2b-provider.js
       z2b-seller.js
       z2b-shipper.js
       z2b-utilities.js
  ↳ network
   permissions.acl
   queries.qry
    ↳lib
      sample.js
    ↳models
      base.cto
      events.cto
      sample.cto

Two new files are introduced in this chapter and two existing files are updated:

Files used in this chapter

Web Server Code Unique to this Chapter

  • hlcClient.js
    • This file is update to support the Finance Company interface on the server side

Defining the business network

  • network/permissions.acl
    • This file is updated to allow the Finance Company to access Orders and to execute selected transactions.
    • It determines precisely what transactions a member can execute and what assets a member can see. The basic rule is "If authority is not specifically granted in this file, then access is denied."

Web Browser Code

  • z2b-financeCo.js
    • This file contains all of the browser functional code to support the Finance Company user experience
  • financeCo.html
    • This contains the HTML framework for the Finance Company experience. Content for this framework is generated by the functions in the z2b-financeCo.js file
    • Text on this page is determined by the selected language (default is US English)