-
Notifications
You must be signed in to change notification settings - Fork 204
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: anoncreds w3c migration #1744
feat: anoncreds w3c migration #1744
Conversation
Signed-off-by: Martin Auer <[email protected]>
Signed-off-by: Martin Auer <[email protected]>
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.
Lot of work @2mau!!! I've left quite some comments. Most of them are small housekeeping fixes, some require some more substantial refacotrs. I'm fine with possibly moving some improvements over to after this is merged and released, but especially the API surface can sometimes use some clenaup I think. The logic itself makes sense though and I think you made the right abstractions, nice job 👍
packages/core/src/modules/vc/repository/W3cCredentialRepository.ts
Outdated
Show resolved
Hide resolved
packages/core/src/modules/dif-presentation-exchange/DifPresentationExchangeService.ts
Outdated
Show resolved
Hide resolved
...odules/proofs/formats/dif-presentation-exchange/DifPresentationExchangeProofFormatService.ts
Outdated
Show resolved
Hide resolved
...odules/proofs/formats/dif-presentation-exchange/DifPresentationExchangeProofFormatService.ts
Outdated
Show resolved
Hide resolved
packages/anoncreds/src/anoncreds-rs/AnonCreds2023DataIntegrityService.ts
Outdated
Show resolved
Hide resolved
091f9f4
to
9cefe8a
Compare
@2mau #1754 has just been merged. The tests were flaky and almost always failing. There are some changes however to e2e tests vs unit tests. Could you make sure that all the tests you edited / added are following the new pattern:
If a test is a e2e test it should end with .e2e.test.ts An easy way to check is running the unit tests ( |
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.
Lots of good updates! I left some additional comments. Also some comments I left on previous review seemed unresolved but marked as resolved
packages/anoncreds/src/anoncreds-rs/AnonCredsDataIntegrityService.ts
Outdated
Show resolved
Hide resolved
packages/anoncreds/src/anoncreds-rs/AnonCredsDataIntegrityService.ts
Outdated
Show resolved
Hide resolved
packages/anoncreds/src/anoncreds-rs/AnonCredsDataIntegrityService.ts
Outdated
Show resolved
Hide resolved
packages/anoncreds/src/anoncreds-rs/AnonCredsDataIntegrityService.ts
Outdated
Show resolved
Hide resolved
packages/anoncreds/src/anoncreds-rs/AnonCredsRsHolderService.ts
Outdated
Show resolved
Hide resolved
if (!isUnqualifiedSchemaId(schemaId)) { | ||
throw new CredoError(`${schemaId} is not a valid legacy indy schema id`) | ||
} |
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.
This service should not support qualified ids. It's a legacy service (LegacyIndyProofFormatService), and was from before qualifieid identifiers existed.
const missingBindingMethod = | ||
binding_required && !binding_method?.anoncreds_link_secret && !binding_method?.didcomm_signed_attachment | ||
|
||
const invalidDataModelVersions = | ||
!data_model_versions_supported || | ||
data_model_versions_supported.length === 0 || | ||
data_model_versions_supported.some((v) => v !== '1.1' && v !== '2.0') | ||
|
||
const invalidLinkSecretBindingMethod = | ||
binding_method?.anoncreds_link_secret && | ||
(!binding_method.anoncreds_link_secret.cred_def_id || | ||
!binding_method.anoncreds_link_secret.key_correctness_proof || | ||
!binding_method.anoncreds_link_secret.nonce) | ||
|
||
const invalidDidCommSignedAttachmentBindingMethod = | ||
binding_method?.didcomm_signed_attachment && | ||
(!binding_method.didcomm_signed_attachment.algs_supported || | ||
!binding_method.didcomm_signed_attachment.did_methods_supported || | ||
!binding_method.didcomm_signed_attachment.nonce) | ||
|
||
if ( | ||
missingBindingMethod || | ||
invalidDataModelVersions || | ||
invalidLinkSecretBindingMethod || | ||
invalidDidCommSignedAttachmentBindingMethod | ||
) { | ||
throw new ProblemReportError('Invalid credential offer', { | ||
problemCode: CredentialProblemReportReason.IssuanceAbandoned, | ||
}) | ||
} | ||
} |
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.
This is not resolved?
packages/anoncreds/src/anoncreds-rs/__tests__/AnonCredsRsServices.test.ts
Outdated
Show resolved
Hide resolved
Changes are addressed. Any open questions can be addressed in a follow-up PR
d7c2bbb
into
openwallet-foundation:main
No description provided.