Giter VIP home page Giter VIP logo

certificate-verification-hyperledger-fabric-application's Introduction

View Ledger data from Peer

  1. Find the Docker Container ID:

List all running Docker containers to find the ID of the peer container you are interested in:

docker ps
  1. Access the Container's Filesystem:

Once you have the Container ID, you can access its filesystem using the following command:

docker exec -it <container_id> /bin/sh
  1. Navigate to Ledger Data:

Inside the container, you can navigate to the directories where Hyperledger Fabric stores the ledger data. The default paths are often as follows:

For the world state:

/var/hyperledger/production/ledgersData/stateLeveldb

For the blockchain data:

<!-- Open folder -->
cd /var/hyperledger/production/ledgersData/chains

<!-- Read block data -->
cat /var/hyperledger/production/ledgersData/chains/chains/mychannel/blockfile_000000

API

1. Initialize Network

    POST /init HTTP/1.1
    Host: localhost:4000

2. Add new Authority

POST /add-authority HTTP/1.1
Host: localhost:4000
Content-Type: application/json
Content-Length: 113

{
   "type":"authority",
   "name": "Ruhul amin",
   "authorityId":"ruhul",
   "otherInformation":"other "
    
}

3. Get all Authority

GET /get-all-authorities HTTP/1.1
Host: localhost:4000

4. Add new University

POST /create-university HTTP/1.1
Host: localhost:4000
Content-Type: application/json
Content-Length: 120

{
 "universityName":"Shahjalal University of Science & Technology (SUST)",
  "universityId":"sust",
  "status": 1
    
}

5. Get University

GET /get-university/sust HTTP/1.1
Host: localhost:4000

6. Get all Universities

GET /get-all-universities HTTP/1.1
Host: localhost:4000

7. Create Certificate

POST /create-certificate HTTP/1.1
Host: localhost:4000
Content-Type: application/json
Content-Length: 168

{
        "IssueDate":"12-5-2024",
        "certID":"123",  
        "studentID":"bidyut",
        "course":"BSC in CSE ",
        "details":"write details here"
    
}

8. Get Certificate

GET /get-certificate/123 HTTP/1.1
Host: localhost:4000

9. Get all Certificate

GET /get-all-certificates HTTP/1.1
Host: localhost:4000

3. Add Verifier

POST /share-certificate HTTP/1.1
Host: localhost:4000
Content-Type: application/json
Content-Length: 62

{
  "id":123,
  "shareWithID":"saif",
  "prefix":"cert"
    
}

certificate-verification-hyperledger-fabric-application's People

Contributors

ruhulamin1398 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.