lens icon indicating copy to clipboard operation
lens copied to clipboard

client/chain_client: Add option to construct chain client with `client.Client` directly

Open renaynay opened this issue 3 years ago • 2 comments

Add option to construct ChainClient with an RPC client.Client directly.

TODO:

  • [ ] what to do regarding light provider

renaynay avatar Feb 04 '22 12:02 renaynay

Hey @renaynay thanks for the PR, interested to hear what you are trying to do here and how to better support this. I can imagine how you might want to use this but would love a bit more clarity here and potentially some code 🙏

jackzampolin avatar Feb 04 '22 17:02 jackzampolin

Hey @jackzampolin I'll provide some more code snippets later of how we plan to use the constructor. Just to tl;dr it - celestia-node has a bridge node type that maintains an rpc connection to a celestia-core(tendermint) client. We have two options: either dialling a remote endpoint handed to the node during construction or to embed the celestia-core node and use the provided client.Client rpc interface. Either way, it would be nice if the chain client constructor can take a client.Client instead of having to dial the given endpoint.

renaynay avatar Feb 05 '22 18:02 renaynay