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

Sync CLI options with SDK options #402

Merged
merged 3 commits into from
Oct 28, 2024
Merged

Conversation

andresuribe87
Copy link
Contributor

What type of PR is this? (check all applicable)

  • ♻️ Refactor
  • ✨ New Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 👷 Example Application
  • 🧑‍💻 Code Snippet
  • 🎨 Design
  • 📖 Content
  • 🧪 Tests
  • 🔖 Release
  • 🚩 Other

Description

This PR allows the web5 cli to pass in a number of options when creating a VC.

Related Tickets & Documents

Resolves #

Mobile & Desktop Screenshots/Recordings

Added code snippets?

  • 👍 yes
  • 🙅 no, because they aren't needed

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

No tests? Add a note

This is simple plumbing

Added to documentation?

  • 📜 readme
  • 📜 contributing.md
  • 📓 general documentation
  • 🙅 no documentation needed

No docs? Add a note

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

Copy link

github-actions bot commented Oct 24, 2024

TBD Spec Test Vectors Report (web5-rs)

Total Test VectorsTotal Test Cases✅ Passed❌ Failed⚠️ Skipped
185500
ℹ️ 5 out of 18 test vectors passed successfully.

❌ Missing Vectors (13)

These are test vectors without any test cases.
FeatureName
Credentialscreate
CryptoEs256ksign
CryptoEs256kverify
DidDhtcreate
DidWebresolve
PortableDidparse
PresentationExchangecreate_presentation_from_credentials
PresentationExchangeevaluate_presentation
PresentationExchangeselect_credentials
PresentationExchangevalidate_definition
PresentationExchangevalidate_submission
VcJwtdecode
VcJwtverify

Automatically generated at: 2024-10-25T18:33:22.037Z

@@ -92,6 +121,24 @@ impl Commands {
}
},
};
let issuance_date = match issuance_date {
Copy link
Contributor

Choose a reason for hiding this comment

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

can issuance date be none?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It cannot. Will default to current date and time.

@@ -92,6 +121,24 @@ impl Commands {
}
},
};
let issuance_date = match issuance_date {
None => None,
Copy link
Contributor

Choose a reason for hiding this comment

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

Here it should do the issuance date now()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The SDK will take care of that. This is just meant to be a passthrough from the CLI to the SDK function.

Copy link

github-actions bot commented Oct 24, 2024

TBD Spec Test Vectors Report (web5-core-kt)

Total Test VectorsTotal Test Cases✅ Passed❌ Failed⚠️ Skipped
183300
ℹ️ 3 out of 18 test vectors passed successfully.

❌ Missing Vectors (15)

These are test vectors without any test cases.
FeatureName
Credentialscreate
Credentialsverify
CryptoEs256ksign
CryptoEs256kverify
DidDhtcreate
DidDhtresolve
DidWebresolve
PortableDidparse
PresentationExchangecreate_presentation_from_credentials
PresentationExchangeevaluate_presentation
PresentationExchangeselect_credentials
PresentationExchangevalidate_definition
PresentationExchangevalidate_submission
VcJwtdecode
VcJwtverify

Automatically generated at: 2024-10-25T18:37:46.981Z

Copy link
Contributor

@nitro-neal nitro-neal left a comment

Choose a reason for hiding this comment

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

Also do you mind switching it to use chrono instead of System time for generating the timestamp:

There was unknown wasm black hole when using it
here was a fix in tbdex-rs - TBD54566975/tbdex-rs@6bac761

use chrono::{Duration, Utc};
use std::time::SystemTime;

let now = Utc::now();
let exp = now + Duration::seconds(60);

let now_system_time: SystemTime = now.into();
let exp_system_time: SystemTime = exp.into();

@andresuribe87 andresuribe87 merged commit f6d347b into main Oct 28, 2024
26 checks passed
@andresuribe87 andresuribe87 deleted the add_vc_creation_opts_to_cli branch October 28, 2024 14:12
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.

2 participants