lens
lens copied to clipboard
client/chain_client: Add option to construct chain client with `client.Client` directly
Add option to construct ChainClient
with an RPC client.Client
directly.
TODO:
- [ ] what to do regarding light provider
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 🙏
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.