We might also want to add a BchdGrpcNetworkProvider
I experimented with the BCHD grpc years ago, i used the library @improbable-eng/grpc-web back then but now grpc-web seems to be the standard. I simply copy/pasted the bchrpc folder from bchd-block-explorer back then.
There's old documentation in the BCHD repo, but it's probably out-of-date: https://github.com/gcash/bchd/tree/master/bchrpc/documentation/client-usage-examples/nodejs-grpc
I used
import*aspbfrom"./bchrpc/bchrpc_pb_service";import{GetAddressTransactionsRequest}from"./bchrpc/bchrpc_pb";constclient=newpb.bchrpcClient("https://ryzen.electroncash.de:8335");and then something like
letgetAddressTransactionsRequest=newGetAddressTransactionsRequest();getAddressTransactionsRequest.setAddress(address);console.log("getAddressTransactions");constcancel=client.getAddressTransactions(getAddressTransactionsRequest,headers,function(error,response){if(error){// todo: show error modalconsole.log("error getAddressTransactions:",error.code,error.message);}else{console.log("getAddressTransactions");letmessage=newGetAddressTransactionsResponse();message=response;}});
We might also want to add a
BchdGrpcNetworkProviderI experimented with the BCHD grpc years ago, i used the library
@improbable-eng/grpc-webback then but nowgrpc-webseems to be the standard. I simply copy/pasted thebchrpcfolder from bchd-block-explorer back then.There's old documentation in the BCHD repo, but it's probably out-of-date: https://github.com/gcash/bchd/tree/master/bchrpc/documentation/client-usage-examples/nodejs-grpc
I used
and then something like