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

(Feature): Add ability to pass in additional-properties in Web5 CLI to web5 vc create #326

Closed
7 tasks
Tracked by #322
blackgirlbytes opened this issue Aug 29, 2024 · 7 comments · Fixed by #399
Closed
7 tasks
Tracked by #322

Comments

@blackgirlbytes
Copy link
Contributor

blackgirlbytes commented Aug 29, 2024

🚀 Goal

Enhance the web5 vc create command to allow users to pass in additional properties when creating a Verifiable Credential.

🔑 Tasks

  • Modify the web5 vc create command to accept additional properties
    Example below:
web5 vc create rizel \
  --portable-did $PORTABLE_DID \
  --issuer "did:dht:pe45oj88hq9zza3cjd41r5rej9ekfg9bq7k4jjeaw889t78jesko" \
  --expiration-date "2025-12-31T23:59:59Z" \
  --additional-property "role:engineer" \
  --additional-property "clearance:level5"
  • Determine the best format for passing additional properties (e.g., JSON string, key-value pairs)
  • Implement the logic to incorporate these additional properties into the created VC
  • Add appropriate error handling for invalid additional properties
  • Update the CLI documentation to explain how to use this new feature
  • Add examples demonstrating the use of additional properties
  • Write tests to ensure the feature works as expected

🌟 Resources

Getting Started

  1. Comment ".take" on this issue to get assigned
  2. Fork the repository and create a new branch for this task
  3. Implement the feature as described in the tasks
  4. Submit a pull request with your changes
  5. Respond to any feedback during the review process

💭 Questions?

If you have any questions or need clarification, please comment on this issue or join our Discord community.
Happy coding! 🎉

@blackgirlbytes blackgirlbytes changed the title (Feature): Add ability to pass in additional-properties to web5 vc create (Feature): Add ability to pass in additional-properties in Web5 CLI to web5 vc create Aug 29, 2024
@aruokhai
Copy link

aruokhai commented Sep 30, 2024

.take

@aruokhai
Copy link

For the First task, i thought about the first approach but it seams to requires lots of typing which increases the chances for errors. Nevertheless, its ease of use is much appreciated when compared to a config file, which has a requirement of passing a correct file path, but can improve the speed of passing lots of additional parameters.

Therefore i have settled on an approach that makes use of the best of both worlds:

web5 vc create rizel \
  --portable-did $PORTABLE_DID \
  --issuer "did:dht:pe45oj88hq9zza3cjd41r5rej9ekfg9bq7k4jjeaw889t78jesko" \
  --expiration-date "2025-12-31T23:59:59Z" \
  --x-role "engineer" \
  --x-clearance "level5"
  --x "./path-to-env"

Precedence: Key-Value > Env File

@blackgirlbytes
Copy link
Contributor Author

Hi @aruokhai,

Your initial .take command didn't assign the issue to you because you edited your comment. If you're still interested in working on this issue, please follow these steps:

  1. Write a new comment on the issue.
  2. Include the keyword .take in your new comment.

Once you do this, the issue should be assigned to you, and you can start working on it.

Let me know if you need any further clarification!

Copy link

github-actions bot commented Oct 2, 2024

Thanks for taking this issue! Let us know if you have any questions!

@blackgirlbytes blackgirlbytes removed their assignment Oct 2, 2024
@taniashiba
Copy link
Contributor

Hi @aruokhai - wanted to check back and see if you had any questions or needed help ❤

@w3irdrobot
Copy link
Contributor

i can pick it up if @aruokhai is unable to complete it.

@blackgirlbytes
Copy link
Contributor Author

I'll reassign it to you since I know you just worked on the presentation definition part of the web5 cli so you may be familiar with this. @w3irdrobot

@aruokhai I can help you find more related issues if you're interested!

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

Successfully merging a pull request may close this issue.

4 participants