Fixed subscription API, and simplified #1809
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After carefully reading this again, i noticed that there was an issue with the subscription.
One should put the subscription type in, so that the notification can pre-filter based on the subscription type (
eth_subscription
,ssh_subscription
). Athen the returned object is within this subscription type, and mapping of sub IDs can be done properly.To explain it in short:
Also the standard should not talk about JSON RPC, as this provider is meant to abstract that away. Under the hood it probably will have to create a son roc object, depending on how it communicates with the node.
I'm personally not sure if the
accountsChanged
andnetworkChanged
events should be in this standard.I certainly think the
eth_requestAccounts
should be in another standards proposal and not in the initial one here.Ps. I took the freedom to move myself as the first author, given the fact that this proposal is 1:1 the same as I did in march 2017, with the addition of promises.