Skip to content

Commit 3072950

Browse files
add 0000-hyperledger_fabric_flutter_labs.md .
link the labs rfc to hyperledger fabric rfcs . add license . Signed-off-by: ZHANG, HENGMING <22887031+ghpZ54K8ZRwU62zGVSePPs97yAv9swuAY0mVDR4@users.noreply.github.com>
1 parent 82f2512 commit 3072950

File tree

1 file changed

+160
-0
lines changed

1 file changed

+160
-0
lines changed
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
---
2+
layout : default
3+
title : hyperledger_fabric_flutter_labs
4+
parent : RFCs
5+
SPDX-License-Identifier : CC-BY-4.0
6+
---
7+
8+
- Feature Name : support for hyperledger fabric version 2.4 or later on
9+
flutter and dart platforms
10+
- Start Date : 2025-10-27
11+
- RFC PR :
12+
https://github.com/LF-Decentralized-Trust-labs/LF-Decentralized-Trust-labs.github.io/pull/343
13+
- Fabric Component : fabric-gateway
14+
- Fabric Issue :
15+
https://github.com/LF-Decentralized-Trust-labs/LF-Decentralized-Trust-labs.github.io/issues/344
16+
17+
# Summary
18+
19+
bringing purely client side support on flutter and dart platforms ( e.g.
20+
android ) for hyperledger fabric through hyperlefger fabric gateway
21+
client api for java .
22+
23+
# Motivation
24+
25+
since the introduction of hyperledger fabric version 2.5 , earlier
26+
releases of hyperledger fabric sdks deprecated .
27+
28+
some of the labs components are deprecated , too . this includes
29+
archived fabric_client_flutter and fabric-server-node .
30+
31+
in reviving the outdated fabric_client_flutter lab in sight of the
32+
hyperledger community's interests in the last five years and bringing up
33+
the flutter and dart platforms up to date and separating from relaying
34+
on the sdk servers , new platforms and components for android platform (
35+
e.g. offline tls ca certificate loading on android instead of requesting
36+
from a ca server over the internet ) will also be introduced for
37+
conveniency , eliminating the certificate signing request requirements .
38+
39+
this is a conception proposal for the non-csr workflow of using the java
40+
bindings of jnigen from hyperledger fabric gateway client api for java
41+
on flutter and dart platforms to support offline signing and
42+
certificates loading on mobile devices .
43+
44+
this will bring up mobile-only use cases for hyperledger fabric through
45+
the hyperledger fabric gateway client api .
46+
47+
# Guide-level explanation
48+
49+
let ' s look at the workflow first :
50+
51+
workflow
52+
53+
- the client device creates a self-signed x.509 certificate for identity
54+
.
55+
- the client then generates a key pair and create a signing
56+
implimentation based on the private key .
57+
- client identifies a uri for
58+
the grpc connection and loads the tls ca certificate installed on the
59+
device beforehand .
60+
- client connects to the gateway based on the
61+
client identity .
62+
- client performs crud and smart contract operations
63+
based on the identity .
64+
65+
this workflow differs from the old fabric_client_flutter lab with
66+
offline tls ca certificate loading on device , high-level api calls for
67+
the hyperledger fabric gateway client api , added interations with the
68+
connected hyperledger fabric network via the identity , and eliminated
69+
requirements for csrs and server-side sdks .
70+
71+
the new lab will only bring support for the android platform , since ios
72+
or apple platforms require an apple developer account to install and
73+
load a certificate from a device .
74+
75+
# Reference-level explanation
76+
77+
on flutter and dart platforms , android platform binding for dart
78+
language is achieved through kotlin and java , and for external
79+
third-party java api bindings is implemented via a dart package jnigen (
80+
https://pub.dev/packages/jnigen ) . this will enable mobile platforms to
81+
use client-only device to communicate with the hyperledger fabric
82+
network through hyperledger fabric gateway client api for java ,
83+
eliminating requirements for a sdk server or a third party acme server
84+
to communicate to get into the network .
85+
86+
by referencing a pre-installed tls ca certificate and loading it on
87+
device , tls connection of the certification part is guaranteed
88+
attack-proof or mitm-proof , making the client-side application
89+
completely offline on cryptographic operations . thus a hardware
90+
security module and a pkcs # 11 interface aren ' t necessary for the
91+
client-side .
92+
93+
# Drawbacks
94+
95+
backward incompatibility with hyperledger fabric version earlier than
96+
2.4 .
97+
98+
the drawback could be eliminated by reusing the old
99+
fabric_client_flutter lab for flutter and dart platforms .
100+
101+
# Rationale and alternatives
102+
103+
improving with the old fabric_client_flutter lab is possible . however ,
104+
sdks of hyperledger fabric have diverged into two flows : v 2.4 or later
105+
and versions ealier than v 2.5 . so it ' s rationale to create a new lab
106+
and name it after version 2.4 for the hyperledger fabric sdks on
107+
high-level network interations , while keeping the old lab compatible
108+
with early sdks of hyperledger fabric or low-level interations with
109+
hyperledger fabric network .
110+
111+
reusing the old lab for newly created sdk servers of hyperledger fabric
112+
version 2.4 or later is also permissive , whatsoever , there is still a
113+
requirement for creating a high-level workflow on the client side to
114+
interate with the hyperledger fabric network . there has been seen
115+
suggestions and improvement requests from the hyperledger community (
116+
https://github.com/ghpZ54K8ZRwU62zGVSePPs97yAv9swuAY0mVDR4/fabric_client_flutter/issues
117+
) .
118+
119+
# Prior art
120+
121+
fabric_client_flutter :
122+
https://github.com/ghpZ54K8ZRwU62zGVSePPs97yAv9swuAY0mVDR4/fabric_client_flutter
123+
.
124+
125+
fabric-server-node :
126+
https://github.com/ghpZ54K8ZRwU62zGVSePPs97yAv9swuAY0mVDR4/fabric-server-node
127+
.
128+
129+
# Testing
130+
131+
validate whether hyperledger fabric gateway client api for java supports
132+
on android platform , as the early low-level java sdk does not implement
133+
support for android .
134+
135+
complete client workflow on high-level defined apis from hyperledger
136+
fabric gateway client api for java .
137+
138+
# Dependencies
139+
140+
fabric-gateway ( https://github.com/hyperledger/fabric-gateway ) .
141+
142+
fabn-895 (
143+
https://docs.google.com/document/d/1gj5XB7yS-pfjpvZEUQh5lBGSIE6aQemu8A69tAYQtTc
144+
) .
145+
146+
# Unresolved questions
147+
148+
- does fabric-gateway support for android platform ?
149+
- how does
150+
pre-installing a tls ca certificate on device work , either through a
151+
wired cable or over the internet ?
152+
- is loading from a signle tls ca
153+
certificate sufficient ? how does choosing and loading one work if
154+
multiple certificates are installed on device ?
155+
- does installing and
156+
loading pre-existed tls ca certificates work in absent of an apple
157+
developer account on ios ?
158+
- can the app be ported onto other platforms
159+
( e.g. ios ) without pre-requisites conditions ( apple developer account
160+
, etc. ) ?

0 commit comments

Comments
 (0)