Feat: Client validate method#1340
Conversation
There was a problem hiding this comment.
This is amazing! I think this will be an extremely useful addition to the client. Very awesome work.
I made some suggestions for possible changes, and I highlighted a couple of minor mistakes.
A feature that could be nice (likely for a future PR) would be the ability to ignore validation of some URIs. To me, it's really convenient that it is possible to use a wrapper without all of its dependencies. A dependency might only be necessary for some methods that aren't being used. So it would be nice to have a way to incorporate that sort of information into the validation check.
I want to reiterate once again how amazing this is. The options you included here are really fantastic. 🐐🐐🐐
…per instead of client
krisbitney
left a comment
There was a problem hiding this comment.
This is such a cool feature!
…anifest js package with latest changes
pileks
left a comment
There was a problem hiding this comment.
compare.ts is exporting a single function. Would it make sense to rename it to compareSignatures.ts, additionally export default the func?
Maybe also move it into a utils folder?
I'm thinking about this mainly from a ease-of-use, ease-of-finding point of view.
…pe and is exported as default
801e6a0 to
cb24354
Compare
This PR aims to add the
validatefunction to the client, being able to guarantee that the client can communicate with the given wrapper URI ahead-of-timeThe interface is the following:
abiis true, make sure the ABI from 1st level dependencies are available (the ones fromimportedModuleType)recursiveis true, it will check all uris and make sure it can resolve themAlso, a compare function has been implemented in
js/manifests/wrapto compare two array of method definitions, this function allow us to make sure that dependencies are equal and wont fail in runtime