Open
Description
I see that there's a lot of use case if we make this libra-core works directly on browser, and developer can use the same syntax as libra-core provided right now, so I make https://github.com/kulapio/libra-core that forked from this project and make it works on gRPC-web that some codes derived from https://github.com/bandprotocol/libra-web/ as well.
We make some changes for example.
- use grp-web, js-sha3 package.
- generate grpc-web protob for JS/TS with this script.
# Generate JavaScript/TypeScript for gRPC-web
protoc \
--grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:$GEN_OUT_DIR \
-I=${PROTO_IMPORT_DIR} \
${FILE_PATHS} \
- the libra client init with this.
const client = new LibraClient({
transferProtocol: 'https',
host: 'ac-libra-testnet.kulap.io',
port: '443',
dataProtocol: 'grpc-web-text'
})
- perhaps if we init client directly to ac.testnet.libra.org we can use this config (WIP).
const client = new LibraClient({
transferProtocol: 'socket',
host: 'ac.testnet.libra.org',
port: '80',
dataProtocol: 'grpc'
})
// or just default
const client = new LibraClient({ network: LibraNetwork.Testnet });
What do you think for kind of this changes? that I can do a PR for this.
Metadata
Metadata
Assignees
Labels
No labels