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

refactor: do not add ~service in createOOBOffer method #772

Merged

Conversation

TimoGlastra
Copy link
Contributor

@TimoGlastra TimoGlastra commented May 15, 2022

When calling createOutOfBand offer and then attaching it to the oob invitation would create two set of keys. To overcome this the creating of an offer does not create the keys for the exchange anymore. Instead you just get the message that is not associated with a connection yet. Then you can:

  • call oob.createInvitation to create an oob invitation
  • call oob.createLegacyConnectionlessInvitation to create a pre-aip connectionless invitation by attaching the ~service decorator.

BREAKING CHANGE: with the addition of the out of band module credentials.createOutOfBandOffer is renamed to credentials.createOffer and no longer adds the ~service decorator to the message. You need to call oob.createLegacyConnectionlessInvitation afterwards to use it for AIP-1 style connectionless exchanges. See Migrating from AFJ 0.1.0 to 0.2.x for detailed migration instructions.

Signed-off-by: Timo Glastra <timo@animo.id>
@TimoGlastra TimoGlastra requested a review from a team as a code owner May 15, 2022 12:31
@TimoGlastra
Copy link
Contributor Author

@NB-MikeRichardson please take a look at the changes, this touches the credentials module

@TimoGlastra TimoGlastra changed the title refactor: do not add ~service in createOOBOffer method refactor!: do not add ~service in createOOBOffer method May 15, 2022
@codecov-commenter
Copy link

codecov-commenter commented May 19, 2022

Codecov Report

Merging #772 (e875d5d) into main (0c1423d) will increase coverage by 0.02%.
The diff coverage is 95.83%.

@@            Coverage Diff             @@
##             main     #772      +/-   ##
==========================================
+ Coverage   87.59%   87.61%   +0.02%     
==========================================
  Files         437      437              
  Lines       10806    10779      -27     
  Branches     1900     1892       -8     
==========================================
- Hits         9465     9444      -21     
+ Misses       1279     1273       -6     
  Partials       62       62              
Impacted Files Coverage Δ
.../modules/credentials/services/CredentialService.ts 100.00% <ø> (ø)
packages/core/src/modules/oob/OutOfBandModule.ts 87.16% <90.90%> (-0.29%) ⬇️
.../core/src/modules/credentials/CredentialsModule.ts 91.23% <100.00%> (+0.42%) ⬆️
...les/credentials/protocol/v1/V1CredentialService.ts 87.09% <100.00%> (+0.27%) ⬆️
...les/credentials/protocol/v2/V2CredentialService.ts 94.15% <100.00%> (+0.56%) ⬆️
...re/src/storage/didcomm/DidCommMessageRepository.ts 88.88% <100.00%> (+0.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c1423d...e875d5d. Read the comment docs.

@TimoGlastra TimoGlastra added this to the v0.2.0 milestone May 19, 2022
Copy link
Contributor

@berendsliedrecht berendsliedrecht left a comment

Choose a reason for hiding this comment

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

Nothing major, just two code cleanup things.

@TimoGlastra TimoGlastra changed the title refactor!: do not add ~service in createOOBOffer method refactor: do not add ~service in createOOBOffer method May 25, 2022
@TimoGlastra TimoGlastra enabled auto-merge (squash) May 25, 2022 10:43
@TimoGlastra TimoGlastra merged commit a541949 into openwallet-foundation:main May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants