Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

renaynay
Copy link

@renaynay renaynay commented Feb 4, 2022

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

TODO:

  • what to do regarding light provider

return err
}

// TODO: figure out how to deal with input or maybe just make all keyring backends test?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should make all keyring backends test backends and eliminate the option from the struct

}

func (cc *ChainClient) initKeybase() error {
// TODO: test key directory and return error if not created
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to have options for in-mem keysbases too.

@jackzampolin
Copy link
Member

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 🙏

@renaynay
Copy link
Author

renaynay commented Feb 5, 2022

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants