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

Update web5/dids, web5/credentials, web5/crypto, web5/common to latest #177

Merged
merged 8 commits into from
Feb 16, 2024

Conversation

kirahsapong
Copy link
Contributor

closes #160

Copy link

changeset-bot bot commented Feb 16, 2024

🦋 Changeset detected

Latest commit: fad1deb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@tbdex/http-client Minor
@tbdex/http-server Minor
@tbdex/protocol Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Feb 16, 2024

TBDocs Report

🛑 Errors: 0
⚠️ Warnings: 12

@tbdex/protocol

  • Project entry file: packages/protocol/src/main.ts

@tbdex/http-client

  • Project entry file: packages/http-client/src/main.ts
📄 File: packages/http-client/src/errors/request-error.ts
⚠️ extractor:ae-missing-release-tag: "RequestErrorParams" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) #L1
⚠️ extractor:ae-undocumented: Missing documentation for "RequestErrorParams". #L1
⚠️ extractor:ae-undocumented: Missing documentation for "recipientDid". #L13
⚠️ extractor:ae-undocumented: Missing documentation for "url". #L14
📄 File: packages/http-client/src/errors/request-token-error.ts
⚠️ extractor:ae-missing-release-tag: "RequestTokenErrorParams" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) #L3
⚠️ extractor:ae-undocumented: Missing documentation for "RequestTokenErrorParams". #L3
📄 File: packages/http-client/src/errors/response-error.ts
⚠️ extractor:ae-missing-release-tag: "ResponseErrorParams" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) #L3
⚠️ extractor:ae-undocumented: Missing documentation for "ResponseErrorParams". #L3
⚠️ extractor:ae-undocumented: Missing documentation for "statusCode". #L15
⚠️ extractor:ae-undocumented: Missing documentation for "details". #L16
⚠️ extractor:ae-undocumented: Missing documentation for "recipientDid". #L17
⚠️ extractor:ae-undocumented: Missing documentation for "url". #L18

@tbdex/http-server

  • Project entry file: packages/http-server/src/main.ts

TBDocs Report Updated at 2024-02-16T17:11:28Z fad1deb

Copy link

codecov bot commented Feb 16, 2024

Codecov Report

Merging #177 (fad1deb) into main (589edc3) will decrease coverage by 0.15%.
The diff coverage is 88.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #177      +/-   ##
==========================================
- Coverage   89.13%   88.99%   -0.15%     
==========================================
  Files          36       36              
  Lines        2871     2825      -46     
  Branches      268      262       -6     
==========================================
- Hits         2559     2514      -45     
+ Misses        312      311       -1     
Components Coverage Δ
protocol 93.39% <86.04%> (-0.12%) ⬇️
http-client 93.63% <100.00%> (+0.01%) ⬆️
http-server 71.15% <ø> (ø)

@jiyoontbd
Copy link
Contributor

TBDocs Report

i'm fixing these in #176 fyi

packages/http-client/tests/client.spec.ts Outdated Show resolved Hide resolved
packages/protocol/src/crypto.ts Outdated Show resolved Hide resolved
packages/protocol/src/dev-tools.ts Outdated Show resolved Hide resolved
packages/protocol/src/dev-tools.ts Outdated Show resolved Hide resolved
packages/protocol/src/dev-tools.ts Outdated Show resolved Hide resolved
@kirahsapong
Copy link
Contributor Author

kirahsapong commented Feb 16, 2024

opened an PR in tbdex test vectors which will need to merge to get passing CI - looking for reviews there

cc: @mistermoe @jiyoontbd @diehuxx

@mistermoe
Copy link
Member

opened an PR in tbdex test vectors which will need to merge to get passing CI - looking for reviews there

cc: @mistermoe @jiyoontbd @diehuxx

stamped @kirahsapong !

@mistermoe
Copy link
Member

merged TBD54566975/tbdex#236

@@ -41,44 +39,11 @@ export type VerifyOptions = {
signature: string
}

/**
Copy link
Contributor

Choose a reason for hiding this comment

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

nice, this whole file looks a lot better using the new sdk calls

@@ -50,7 +50,7 @@ describe('POST /exchanges/:exchangeId/rfq', () => {

it('returns a 400 if create exchange request contains a replyTo which is not a valid URL', async () => {
const aliceDid = await DevTools.createDid()
const pfiDid = await DevTools.createDid()
const pfiDid = await DevTools.createDid('dht')
Copy link
Contributor

Choose a reason for hiding this comment

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

is DevTools createDid needed at this point? Can we just do DidDht.create()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we certainly could! though DevTools is just calling DidDht.create() - prob worth deciding what convention we should stick with for consistency! I will track to follow up with

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO we should we should only use Devtools when it is significantly more concise to use Devtools AND it is appropriate to use dummy data without needing to modify the output of Devtools very much. I.e. in this case, I would switch to DidDht.create()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Issue here for tracking!

Copy link
Contributor

@KendallWeihe KendallWeihe left a comment

Choose a reason for hiding this comment

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

At least a few breaking changes here, may be worth documenting them in some capacity (even if it's just in the PR description?), for example I think some of the function signatures expect a BearerDID instead of a PortableDID

That may be unreasonable at this moment, so I'll defer to best judgement

Great job! ✅


/**
* Can be used to resolve did:ion and did:key DIDs
*
* @beta
*/
export const DidResolver = new Web5DidResolver({
didResolvers: [DidIonMethod, DidKeyMethod, DidDhtMethod]
didResolvers: [DidDht, DidJwk, DidWeb]
Copy link
Contributor

Choose a reason for hiding this comment

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

are we sure we want to gut out ion? Our current pfi uses ion right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

seems we're going full deprecation mode! def will be a big breaking change. we will update our pfi-exemplar right afterward to use DHT! alternatively, any strong opinion against and i can definitely move it back in so we still have resolution available

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -6,7 +6,7 @@ import { Crypto, DevTools } from '../src/main.js'
describe('Crypto', () => {
describe('sign / verify', () => {
it('works with did:ion', async () => {
const alice = await DevTools.createDid('ion')
const alice = await DevTools.createDid()
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible to not use devtools anymore here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is the plan to move away from DevTools?

cc: @KendallWeihe

Copy link
Contributor

Choose a reason for hiding this comment

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

well... maybe, but at least not right now

maybe we should open a ticket on the backlog to discuss?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@KendallWeihe @nitro-neal looking through the various tests we have DevTools abstracting away the underlying DidDht and DidJwk calls for almost all, except in http-client, which uses DevTools other utility functions, and one test in http-server.

For the sake of consistency, should I change these two isolated instances to use DevTools as well, and then keep the larger discussion open for future change?

Copy link
Contributor

Choose a reason for hiding this comment

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

nah I vote keep the changes specific to the intent of the PR here (upgrade) and then we'll follow up with a design discussion on le backlog

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok yeah word! good call, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

mentioned up above but: Issue #178 for tracking!

Copy link
Contributor

@nitro-neal nitro-neal left a comment

Choose a reason for hiding this comment

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

Great job!

@nitro-neal
Copy link
Contributor

might be good to create a test or two that use a portable did as well

@kirahsapong
Copy link
Contributor Author

might be good to create a test or two that use a portable did as well

I don't think the compiler will accept anything that isn't a BearerDid but maybe I'm misunderstanding whatcha mean?

@kirahsapong kirahsapong merged commit eba04b8 into main Feb 16, 2024
15 of 17 checks passed
@kirahsapong kirahsapong deleted the feat/update-web5 branch February 16, 2024 17:25
diehuxx added a commit that referenced this pull request Feb 16, 2024
* main:
  Version Packages (#167)
  Update web5/dids, web5/credentials, web5/crypto, web5/common to latest  (#177)
phoebe-lew added a commit that referenced this pull request Feb 20, 2024
* main:
  Stricten, test, and bugfix http-server (#170)
  Version Packages (#167)
  Update web5/dids, web5/credentials, web5/crypto, web5/common to latest  (#177)
  Add exchange state machine (#168)
  Stricten http-client (#169)
  Make `pfiDid` required property in `TbdexHttpServer` (#166)
diehuxx added a commit that referenced this pull request Feb 20, 2024
* main:
  Add external_id field (#163)
  Stricten, test, and bugfix http-server (#170)
  Version Packages (#167)
  Update web5/dids, web5/credentials, web5/crypto, web5/common to latest  (#177)
@jiyoontbd jiyoontbd linked an issue Feb 26, 2024 that may be closed by this pull request
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.

Bump web5/credentials and web5/did versions Update to latest web5 packages
6 participants