-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: validate caveat payloads #11
Conversation
change all references to web3-storage package, move to storacha-network package BREAKING CHANGE: referencing this package at web3-storage will no longer work after this commit
improves the result type with a more functional typed union primitive and useful wrapper functions
# Goals It had to happen sometime... fixing the names before it gets to complicated # Implementation Change all references to web3-storage package, move to storacha-network package BREAKING CHANGE: referencing this package at web3-storage will no longer work after this commit due to the way go.mod works
# Goals A result type with terser, more type safe and functional UX # Implementation I've been working on this for a few days -- just trying to assemble a result type that seems more pleasant to work with cause it follows traditional functional paradigms around typed unions. This also adds a few recovery functions and restores the NewFailure function.
create a much simpler generic interface for rebind and simplify body as well
@hannahhoward I merged the |
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.
I think I'm LGTM on the rest of this, but I we should take steps to insure the ucan package does not link to anything else (either by copying the ipld.builder interface, or just putting it in the ucan package)
Co-authored-by: hannahhoward <[email protected]> Co-authored-by: Steve Moyer <[email protected]>
This allows caveats (nb) to be used in server handler functions.
It adds a minimal validator framework that parses caveats to a Go type.
You can now define a capability with a Go type for caveats (and an IPLD schema). This allows incoming capability invocation payloads to be parsed to check for validity.