Skip to content
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

check proofs when build new ucan #15

Open
hugomrdias opened this issue Mar 10, 2022 · 0 comments
Open

check proofs when build new ucan #15

hugomrdias opened this issue Mar 10, 2022 · 0 comments

Comments

@hugomrdias
Copy link
Contributor

I wonder if it's worth putting a check here to ensure that the proofs are encoded? Or even automated encoding of them if they're not, such as:

proofs = proofs.map((prf) => isUcan(prf) ? prf : serialize(prf));

It feels like it would be good to catch that kind of rookie error at this point, rather than building the UCAN and then the user getting an error thrown when they later try to use it.

Originally posted by @adamalton in #3 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants