Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Kotlin validate submission pex #1234

Merged
merged 8 commits into from
Feb 14, 2024
Merged

Conversation

blackgirlbytes
Copy link
Contributor

@blackgirlbytes blackgirlbytes commented Feb 13, 2024

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

  • 📝 Documentation Update

Description

This PR adds the Kotlin code snippets for validateSubmission(). It also clarifies why we're creating a VP after creating a Presentation from Credentials. Eventually the JS will match this logic, but the SDK code is not merged yet.

Related Tickets & Documents

Resolves #

Added code snippets?

  • 👍 yes

Added tests?

  • 👍 yes

Added to documentation?

  • 📓 general documentation

Copy link

netlify bot commented Feb 13, 2024

Deploy Preview for tbd-website-developer ready!

Name Link
🔨 Latest commit 8953f31
🔍 Latest deploy log https://app.netlify.com/sites/tbd-website-developer/deploys/65cc49d8fe8dfb000838d815
😎 Deploy Preview https://deploy-preview-1234--tbd-website-developer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -71,6 +73,7 @@ import { PresentationExchange } from '@web5/credentials';
code: `
import web5.sdk.credentials.PresentationExchange
import web5.sdk.credentials.VerifiablePresentation
import web5.sdk.credentials.model.PresentationSubmission
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know I already included import web5.sdk.credentials.model.*, but for some strange reason that doesn't import PresentationSubmission, so that needs to be imported separately.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nitro-neal any thoughts or advice on why I have to import web5.sdk.credentials.model.PresentationSubmission if I'm doing import web5.sdk.credentials.model.*

Copy link
Contributor

Choose a reason for hiding this comment

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

That is pretty strange, could be ide or linter problem.

Does PresentationDefinition work with *?

Its probably better to import them individually instead of using * to be more explicit and not import unnecessary things, but yea is strange. I'll see if it happens on my end

@blackgirlbytes blackgirlbytes self-assigned this Feb 13, 2024
@blackgirlbytes blackgirlbytes added the documentation Improvements or additions to documentation label Feb 13, 2024
{ content: 'Once the [Presentation](/docs/glossary#verifiable-presentation) is error-free and has passed the validation checks, you can submit the Verifiable Presentation by providing the lender with the `presentation` JSON object:', snippetContent: validVerifiablePresentationForPex, language: 'JavaScript'},
{ content: 'After successfully creating the [Presentation](/docs/glossary#verifiable-presentation) using `VerifiablePresentation.create()`, and ensuring it is error-free and has passed all validation checks, you can submit the Verifiable Presentation by providing the lender with the `mappedPresentationSubmission` object:', snippetContent: validVerifiablePresentationForPexKt, language: 'Kotlin'},
{
content: 'Once the [Presentation](/docs/glossary#verifiable-presentation) is error-free and has passed the validation checks, you can submit the Verifiable Presentation by providing the lender with the `presentation` JSON object:',
Copy link
Member

Choose a reason for hiding this comment

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

For JS, why aren't we signing and returning the JWT like we're doing in Kotlin?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's not available yet. I'm still waiting for that to be merged then released decentralized-identity/web5-js#382

@blackgirlbytes blackgirlbytes merged commit 1b02576 into main Feb 14, 2024
8 of 10 checks passed
@blackgirlbytes blackgirlbytes deleted the kotlin-validate-submission-pex branch February 14, 2024 15:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants