Closed elderapo closed 3 years ago
It would be nice to have isomorphic grpc-bchrpc package that uses grpc-bchrpc-node if ran from nodejs and grpc-bchrpc-web if ran from web.
grpc-bchrpc
grpc-bchrpc-node
grpc-bchrpc-web
I think both of these packages have exact same API besides connection logic which could be abstracted like:
const nodeClient = new GrpcClient({ transport: new GrpcClientNodeTransport({ url: "bchd.greyh.at:8335" rootCertPath: ..., ...otherNodeTransportOptions }) }); const browserClient = new GrpcClient({ transport: new GrpcClientBrowserTransport({ url: "https://bchd.greyh.at:8335" }) });
I really like this idea.
Closing this as I don't see it happening unless someone else wants to take the time to make it happen.
It would be nice to have isomorphic
grpc-bchrpc
package that usesgrpc-bchrpc-node
if ran from nodejs andgrpc-bchrpc-web
if ran from web.I think both of these packages have exact same API besides connection logic which could be abstracted like: