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

feat(agent): agent separation of concerns #159

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

goncalo-frade-iohk
Copy link
Contributor

@goncalo-frade-iohk goncalo-frade-iohk commented Aug 15, 2024

Description:

This is a refactor, from now on the EdgeAgent will not have any reference with DIDComm and a DIDCommAgent will replace this.
EdgeAgent now will scope all the logic that is inherent to it removing any transport layer association, and new agents like DIDCommAgent will scope the EdgeAgent functionalities for a transport layer.

With this Pollux also has some significant changes so it is not aggregated to the DIDComm Message.

Checklist:

  • My PR follows the contribution guidelines of this project
  • My PR is free of third-party dependencies that don't comply with the Allowlist
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked the PR title to follow the conventional commit specification

@coveralls
Copy link

coveralls commented Aug 15, 2024

Pull Request Test Coverage Report for Build 11035384347

Details

  • 232 of 1063 (21.83%) changed or added relevant lines in 19 files are covered.
  • 187 unchanged lines in 14 files lost coverage.
  • Overall coverage decreased (-3.1%) to 40.842%

Changes Missing Coverage Covered Lines Changed/Added Lines %
EdgeAgentSDK/EdgeAgent/Sources/EdgeAgent.swift 1 2 50.0%
EdgeAgentSDK/EdgeAgent/Sources/DIDCommAgent/DIDCommAgent+Proof.swift 75 79 94.94%
EdgeAgentSDK/Pollux/Sources/Models/JWT/JWTCredential.swift 11 16 68.75%
EdgeAgentSDK/Pollux/Sources/Models/SDJWT/SDJWT+ProvableCredential.swift 20 29 68.97%
EdgeAgentSDK/EdgeAgent/Sources/OIDCAgent/OIDCAgent+DIDs.swift 0 14 0.0%
EdgeAgentSDK/EdgeAgent/Sources/EdgeAgent+Credentials.swift 2 19 10.53%
EdgeAgentSDK/EdgeAgent/Sources/DIDCommAgent/DIDCommAgent+Invitations.swift 7 30 23.33%
EdgeAgentSDK/Pollux/Sources/PolluxImpl+CredentialRequest.swift 0 26 0.0%
EdgeAgentSDK/Pollux/Sources/Models/JWT/JWTCredential+ProofableCredential.swift 20 50 40.0%
EdgeAgentSDK/EdgeAgent/Sources/EdgeAgentErrors.swift 0 36 0.0%
Files with Coverage Reduction New Missed Lines %
EdgeAgentSDK/Pollux/Sources/Models/SDJWT/SDJWTPresentation.swift 1 90.09%
EdgeAgentSDK/EdgeAgent/Sources/EdgeAgent.swift 1 56.1%
EdgeAgentSDK/Pollux/Sources/PolluxImpl+CredentialVerification.swift 1 58.45%
EdgeAgentSDK/Apollo/Sources/Model/X25519Key.swift 4 49.02%
EdgeAgentSDK/Pollux/Sources/Models/SDJWT/SDJWT+ProvableCredential.swift 5 55.26%
EdgeAgentSDK/Pollux/Sources/Models/JWT/JWTCredential+ProofableCredential.swift 5 23.08%
EdgeAgentSDK/Apollo/Sources/Operations/CreateX25519KeyPairOperation.swift 5 80.77%
EdgeAgentSDK/Apollo/Sources/Operations/CreateEd25519KeyPairOperation.swift 5 28.0%
EdgeAgentSDK/Apollo/Sources/Model/Ed25519Key.swift 5 39.66%
EdgeAgentSDK/Apollo/Sources/ApolloImpl+Public.swift 7 64.94%
Totals Coverage Status
Change from base Build 10832499635: -3.1%
Covered Lines: 5202
Relevant Lines: 12737

💛 - Coveralls

@goncalo-frade-iohk goncalo-frade-iohk force-pushed the feature/OIDC-Preparation-Refactoring branch 3 times, most recently from c203ade to e201eb3 Compare September 23, 2024 14:21

public func parseCredential(type: String, credentialPayload: Data, options: [CredentialOperationsOptions]) async throws -> Credential {
switch type {
case "jwt", "", "prism/jwt":
Copy link
Contributor

Choose a reason for hiding this comment

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

should this empty string be here?

Suggested change
case "jwt", "", "prism/jwt":
case "jwt", "prism/jwt":

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done ;)

Copy link

@cristianIOHK cristianIOHK left a comment

Choose a reason for hiding this comment

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

Good job

@goncalo-frade-iohk goncalo-frade-iohk force-pushed the feature/OIDC-Preparation-Refactoring branch from e201eb3 to 80571a6 Compare September 25, 2024 14:37
BREAKING CHANGE: This is a refactor, from now on the EdgeAgent will not have any reference with DIDComm and a DIDCommAgent will replace this.
EdgeAgent now will scope all the logic that is inherent to it removing any transport layer association, and new agents like DIDCommAgent will scope the EdgeAgent functionalities for a transport layer.

With this Pollux also has some significant changes so it is not aggregated to the DIDComm Message.

OIDCAgent will take part of OIDC transport layer communication.

Signed-off-by: goncalo-frade-iohk <goncalo.frade@iohk.io>
@goncalo-frade-iohk goncalo-frade-iohk force-pushed the feature/OIDC-Preparation-Refactoring branch from 80571a6 to 65ff99d Compare September 25, 2024 14:40
@goncalo-frade-iohk goncalo-frade-iohk merged commit 65ff99d into main Sep 26, 2024
4 checks passed
@goncalo-frade-iohk goncalo-frade-iohk deleted the feature/OIDC-Preparation-Refactoring branch September 26, 2024 09:48
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