chore: remove RPC for public credentials and remove Api suffix from runtime APIs#426
Merged
chore: remove RPC for public credentials and remove Api suffix from runtime APIs#426
Api suffix from runtime APIs#426Conversation
weichweich
approved these changes
Oct 20, 2022
Comment on lines
+80
to
+82
| pub trait ItemFilter<Item> { | ||
| fn should_include(&self, credential: &Item) -> bool; | ||
| } |
Contributor
There was a problem hiding this comment.
there is a similar trait in Frame support(?).
Contributor
Author
There was a problem hiding this comment.
Yes, but in the last conversation we had (#378 (comment))
we agreed we don't need any superset logic, so I would rather not use that. I would be happy to use any other trait that would work, otherwise we can keep it as it is, and get rid of it in the future if needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Since runtime APIs are easier to support in the SDK and to version, and because we did not do any crazy logic at the RPC layer, I think removing the RPC is a good idea. It also removes the
node-commonfolder since there is nothing in there anymore.The runtime API for
get_credentialshas also been modified from taking already a formed AssetDid (i.e., an enum), to accept aVec<u8>, and internally it tries to decode it to a validAssetDid, failing in case the input is invalid.We probably also don't need to derive
serdeanymore for most of the types, since runtime API use SCALE encoding, but I left that out and to be tackled in a separate PR, maybe even #419.