-
Notifications
You must be signed in to change notification settings - Fork 47
feat: remove client RPC for DIDs #422
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removal LGTM. However, I think you missed flagging the other DID runtime API call
Already looking forward to rebasing #413 🥲
| /// * associated accounts | ||
| /// * service endpoints | ||
| fn query_did(did: DidIdentifier) -> Option<RawDidLinkedInfo<DidIdentifier, AccountId, LinkableAccountId,Balance, Key, BlockNumber>>; | ||
| fn query_did(did: DidIdentifier) -> Option<RawDidLinkedInfo<DidIdentifier, AccountId, LinkableAccountId, Balance, Key, BlockNumber>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we have a changed_in flag for this call as well then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true! I think all of them must be marked as deprecated. Good catch!
wischli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* Remove DID RPC * Add version support for DID RPC call * Mark other DID API methods as deprecated as well
This PR follows the direction that Parity is taking of removing RPC calls that do nothing but forwarding it to the runtime. Plus, RPC calls do not support versioning, while runtime calls do, and this makes it very easy for the SDK to use the right types and functions depending on the runtime API version (tested on a local script using the same type definitions to connect both to Spiritnet and to a node running this PR, and both were successful).
If this PR is merged, #421 becomes less urgent, although we should have a strategy for breaking changes at the RPC level anyway.
How it's used in the SDK
Please refer to the following commit: KILTprotocol/sdk-js@ba1c023.