-
Notifications
You must be signed in to change notification settings - Fork 257
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
Feature request: subscribing to storage changes #479
Comments
This does come up from time to time, but one blocker for this is that the new RPC interface doesn't currently provide such a method, so I can imagine that the steps will be:
|
I do exactly this with smoldot light client. I used subxt only as decoder, not as RPC caller or subscriber.
So would be ideal if |
@lexnv I wonder whether the recent V2 RPC spec changes have added something that lets us subscribe to storage changes? Maybe it's something to raise an issue on the RPC spec repo for because it could be pretty cool to have this sort of thing in Subxt :) |
Substrate provides
state_subscribeStorage
to subscribe to storage changes. It would be great if subxt could expose this. I'm not sure how the api would look - maybe something likeapi.subscribe_storage().timestamp().now()
. It shouldn't be super difficult to implement, I think, although I'm not sure how listening only to finalized changes could best be implemented.The text was updated successfully, but these errors were encountered: