Skip to content

Conversation

@ntn-x2
Copy link
Contributor

@ntn-x2 ntn-x2 commented Oct 20, 2022

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-common folder since there is nothing in there anymore.

The runtime API for get_credentials has also been modified from taking already a formed AssetDid (i.e., an enum), to accept a Vec<u8>, and internally it tries to decode it to a valid AssetDid, failing in case the input is invalid.

We probably also don't need to derive serde anymore 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.

@ntn-x2 ntn-x2 self-assigned this Oct 20, 2022
@ntn-x2 ntn-x2 requested review from weichweich and wischli and removed request for weichweich October 20, 2022 06:53
Comment on lines +80 to +82
pub trait ItemFilter<Item> {
fn should_include(&self, credential: &Item) -> bool;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a similar trait in Frame support(?).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you talking about InstanceFilter ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@wischli wischli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ntn-x2 ntn-x2 merged commit 3ffff0f into develop Oct 20, 2022
@ntn-x2 ntn-x2 deleted the aa/public-credentials-renaming branch October 20, 2022 09:48
@ntn-x2 ntn-x2 restored the aa/public-credentials-renaming branch November 29, 2022 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants