Menu
Who Do Is
  • Home
  • What
  • How
  • Is
  • Can
  • Are
  • Does
  • Do
  • Why
  • Who
  • Where
  • Which
  • Which
  • Should
  • Will
  • When
  • What’s
  • Did
Who Do Is

[ANSWERED] Connecting Android to Hyperledger Fabric network

Posted on November 14, 2022

Solution 1 :

Solutions:

  1. You can make your own gRPC clients. This process is very costly but this is the best way till now. To make your own gRPC clients, you can take help from Hyperledger Fabric Java SDK
  2. You can convert Hyperledger Fabric Java SDK to Android.
  3. You can use keyhole-fabric-api-gateway though it has some security problems.

& obviously there are other options too.

Problem :

So I have a 4 organization (10 peers altogether, CLI and 1 orderer) Hyperledger Fabric network up and running on my PC. I use Docker and chaincode written in Go without any additional tools that Hyperledger offers.

On the other side, I’m developing an Android application in Android Studio. In this app, one can create an account and keep track of some points that come from the above mentioned organizations. For this I need to access my running chaincode form the android app – I need to query data, read it & change it in my blockchain.

Essentially I need to invoke my chaincode & make changes to my blockchain from my Android app.

What would be the best solution for this? Do I incorporate CA’s and somehow connect them with the Android app? Is there some kind of API I could use? It doesn’t make sense to create an additional database for my android app to use, since I also need info from my blockchain.

Comments

Comment posted by Ta-seen Junaid

If you use Android only for invoke & query chaincode, than it will be very easy to make gRPC clients.

Comment posted by Sara Petrovic

grateful for your reply! Can you please give me advice how to implement server side gRPC in fabric? I cant seem to find any source on doing such (via fabric-sdk-go or any other). Thanks!

READ  [ANSWERED] Migrating from jcenter to maven gives error: "Failed to resolve: org.adblockplus:adblock-android-webview:4.4.0"
Powered by Inline Related Posts

Comment posted by github.com/hyperledger/fabric-protos

You do not need to implement any server because Peers, Orderers are the servers, you have to make client for those server. You can find all the protos on here:

Comment posted by Ta-seen Junaid

1st you need to make a signed proposal, To send a signed proposal to peer for endorsement, you need a ProcessProposal gRPC call where you can get the response from endorsing peer and your need to create a EndorserClient too. After that you need to collect all endorsements from peers and have to make signed envelope. To send a signed envelope to orderers you need to broadcast your envelope to orderers with Send gRPC call where we need to create a AtomicBroadcastClient.

Comment posted by github.com/hyperledger/fabric/blob/master/core/endorser/…

Hyperledger Fabric Java SDK, Go SDK etc etc works as gRPC clients, you can build your client by following those examples, test cases on those repository. You can check on fabric repository too.

Recent Posts

  • How can I play with my cat without toys?
  • What is a bag pipe band called?
  • Are Honda Civics actually fast?
  • Are Yankee candles toxic?
  • How do I pair my Michael Kors smartwatch with my Android?

Recent Comments

No comments to show.

Archives

  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuántas
  • ¿Cuánto
  • ¿Que
  • ¿Quién
  • 90” and 108” so you may have to round up to the nearest size.
  • and delete any Spotify folders from it. Once this is done
  • Android
  • Are
  • At
  • Bei
  • blink
  • C'est
  • Can
  • carbs
  • Comment
  • Did
  • Do
  • Does
  • During
  • For
  • Has
  • How
  • In
  • Is
  • Ist
  • Kann
  • Können
  • nouveau
  • On
  • or 108 inches.2020-08-03
  • Où
  • owning
  • Pourquoi
  • Puis-je
  • Quand
  • Quante
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • spiritual
  • tap the downward-facing arrow on the top left. A downward-facing arrow will appear underneath each song in the album; they'll turn green as the download completes.2020-07-28
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welcher
  • Welches
  • Welke
  • Wer
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Whose
  • Why
  • Wie
  • Will
  • Wo
  • Woher
  • you will receive two curtains each with the same measurements of width 66"" (168cm) x drop 54""(137cm).
  • you'll see a green downward-facing arrow next to each song.2021-02-26
©2023 Who Do Is | Powered by SuperbThemes & WordPress