-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't require Pair
and ExtrinsicParams
trait bound for getter implementations.
#357
Comments
Pair
amd ExtrinsicParams
trait bound for getter implementations.Pair
and ExtrinsicParams
trait bound for getter implementations.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
The Pair problem should be solved with PR #356. The ExtrinsicParams will need to be solved in a separate PR |
There's one problem with ExtrinsicParams:
So simply moving the function to a different impl will not solve this. I see the following options:
What's your take on that @clangenb ? |
I don't like 1. and 2., but 3. is an option for me, but it goes against the initial goal to be able to have Maybe just separate the api into: GetterClient
ExtrinsicSender
FullApiClient Or lastly, perhaps we should just combine the all those fields into |
If we separate, then I believe two are enough. The ExtrinsicSender needs to be able to Hm.. maybe yes to the Config struct. But maybe both make sense, as the GetterClient would be a lot simpler than the FullApiClient, not needing any node information at all. If it's alright with you, I'll create a follow-up issue with a |
This is ok for me, however, my ideas were just a brainstorm, take it with a grain of salt. |
Don't worry. I was thinking about that as well. And I think subxt has a similar concept with offline and online client. |
We always require
Pair
orExtrinsicsParams
for all theApi
implementations. This leads to the weird situation, where an actual pair needs to be supplied even if we never set a signer, as we don't need to sign anything, e.g.:substrate-api-client/examples/get_blocks.rs
Line 31 in 7ff294c
If we remove the trait bound for all getters, we can instantiate the
Api
like this, which is much simpler:The text was updated successfully, but these errors were encountered: