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

Rename prover methods, extend test test_generate_self_attested_proof #764

Merged
merged 5 commits into from
Mar 8, 2023

Conversation

Patrik-Stas
Copy link
Contributor

@Patrik-Stas Patrik-Stas commented Mar 1, 2023

API changes (in aries-vcx, libvcx_core, vcx-napi-rs)

proof (verifier) methods:

  • presentation_request(...) renamed to presentation_request_msg(...)
  • presentation(...) renamed to get_presentation_msg(...)
  • presentation_status(...) renamed to get_presentation_status(...)
  • get_proof_state(...) renamed to proof_get_presentation_verification_status(...)
  • in libvcx_core and upwards added methods: get_presentation_attachment(...), get_presentation_request_attachment(...) - these are returning decoded versions of attachment in the respective messages (json as string)

disclosed proof methods:

  • generate_proof_msg(...) renamed to get_presentation_msg(...) (it's not generating anything, probably did historically)

NodeJS

NodeJS wrapper

  • Removed getProof(...) which combined 2 ffi calls removed
  • instead added granular api getPresentationMsg(...), getPresentationVerificationStatus(...), getPresentationAttachment(...)

vcxagent-core

  • generalized testing util method sendHolderProof(...) to make proofData injectable, updated tests
  • fixed various standard warnings
  • added test Faber should verify proof with self attestation
  • Added asserts to existing proof tests to check verification status and inspect values received in the received presentation

Testing

  • Extended test test_generate_self_attested_proof to include verification of proof containing of self-attested attributes

  • method renames in libvcx_core

    • generate_proof_msg(...) -> get_presentation_msg(...)

@codecov-commenter
Copy link

codecov-commenter commented Mar 2, 2023

Codecov Report

Merging #764 (d0f55ec) into main (7a0d3ee) will increase coverage by 0.04%.
The diff coverage is 89.17%.

@@            Coverage Diff             @@
##             main     #764      +/-   ##
==========================================
+ Coverage   54.60%   54.64%   +0.04%     
==========================================
  Files         380      380              
  Lines       36740    36752      +12     
  Branches     8082     8079       -3     
==========================================
+ Hits        20062    20084      +22     
+ Misses      10712    10690      -22     
- Partials     5966     5978      +12     
Flag Coverage Δ
unittests-aries-vcx 54.54% <89.17%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
messages/src/status.rs 37.50% <ø> (ø)
...ries_vcx/src/handlers/proof_presentation/prover.rs 58.66% <40.00%> (+2.45%) ⬆️
...otocols/proof_presentation/prover/state_machine.rs 65.43% <42.85%> (+0.32%) ⬆️
...es_vcx/src/handlers/proof_presentation/verifier.rs 58.43% <46.15%> (+5.90%) ⬆️
aries_vcx/tests/test_creds_proofs.rs 88.00% <94.58%> (-0.13%) ⬇️
...ocols/proof_presentation/verifier/state_machine.rs 68.86% <100.00%> (ø)
aries_vcx/src/plugins/wallet/base_wallet.rs 42.85% <0.00%> (-14.29%) ⬇️
aries_vcx/src/plugins/wallet/indy_wallet.rs 54.65% <0.00%> (-1.17%) ⬇️
libvdrtools/src/services/pool/networker.rs 75.10% <0.00%> (-0.41%) ⬇️
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Patrik-Stas Patrik-Stas force-pushed the refactor/proof-renames-and-test-update branch 2 times, most recently from 104013d to 6783636 Compare March 2, 2023 22:13
@Patrik-Stas Patrik-Stas force-pushed the refactor/proof-renames-and-test-update branch 2 times, most recently from ff87bcd to 7083a68 Compare March 3, 2023 12:24
@Patrik-Stas Patrik-Stas requested review from mirgee and bobozaur March 3, 2023 15:52
@Patrik-Stas Patrik-Stas force-pushed the refactor/proof-renames-and-test-update branch from 7083a68 to 7a43551 Compare March 7, 2023 08:00
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
@Patrik-Stas Patrik-Stas force-pushed the refactor/proof-renames-and-test-update branch from 5b34026 to d0f55ec Compare March 7, 2023 12:05
@Patrik-Stas Patrik-Stas requested a review from mirgee March 7, 2023 15:11
@Patrik-Stas Patrik-Stas merged commit 516bdb9 into main Mar 8, 2023
@Patrik-Stas Patrik-Stas deleted the refactor/proof-renames-and-test-update branch March 8, 2023 11:39
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.

4 participants