Skip to content

create a dart binding library for the fabric gateway client api for java . #1000

@ghpZ54K8ZRwU62zGVSePPs97yAv9swuAY0mVDR4

Description

As a frontend developer
I want to communicate to a gateway service provider via gateway api directly from native platforms
So that an intermediary backend gateway api server isn't required

native platforms needs to be handled when a client
wants to communicate with the service provider
via fabric gateway api without an intermediary
gateway api server . this is described at
hyperledger/fabric-rfcs#67
for a downstream task .

a standalone dart binding library via java native
interface could be created for the upstream repo
of the java api , given the similar issue on #609 .

the offline-signing part could be resolved by
using the low-level pointycastle library and the
high-level basic_utils library from dart for x.509
certificate generation and ecdsa keypair creation .
however , implementing grpc directly from dart
using dart ' s native grpc library to resolve channel
connection for the gateway connection seems to be
impracticable when there ' s a compatibility issue found
between jni < - > dart for the grpc classes . that to say
either the dart implementation for grpc could be passed
on the jni for the acceptance of the gateway api or there
must be a way to split grpc java separately from fabric
gateway client api for java so that a custom grpc
implementation could be used instead of the embedded
ones .

apart from the above - mentioned , there shall be considered
a prototype for easily opening a gateway - enabled peer to
communicate with for a testing propose of the example
currently described at
https://hyperledger.github.io/fabric-gateway/main/api/java/
, for the testing of a workable example through jni on dart .
this could be probably achieved via reusing a fabric-sample
or a sample found in fabric-gateway ( e.g. a network bootstrap
script ) .

creating a dart binding via jnigen with jni for fabric gateway api
for java could eliminate the need of an intermediary server for
the gateway api implementation in go , node , or java , which
will also enable clients to communicate with gateway - enabled
peers directly on native platforms supported by dart and flutter
( linux , android , windows, etc. ) .

the alternative shall be calling the fabric gateway client api for
java directly from android which java is supported natively on the
platform . which shall be only resolvable on android platform
without other platforms supported , and handled for okhttp
specifically on android .

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions