TBD54566975 / web5-js

Monorepo for the Web5 JS TypeScript implementation
https://tbd54566975.github.io/web5-js/
Apache License 2.0
129 stars 52 forks source link

[WIP] Agent resolver refreshes did store and cache #914

Open LiranCohen opened 3 days ago

LiranCohen commented 3 days ago

This PR adds update functionality to DidApi which will store an updated did document and (optionally) publish the updated document if the did is a did:dht method, the resolution cache is pre-populated with the updated document.

Additionally the AgentDidResolverCache now updates the DID Store with any newly resolved DID to make sure the locate store is in sync wit the resolved DID.

changeset-bot[bot] commented 3 days ago

⚠️ No Changeset found

Latest commit: 168dd1a77d5d6ac3186a8122b2a96256d7d83d33

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

github-actions[bot] commented 3 days ago

TBDocs Report

✅ No errors or warnings

@web5/api

@web5/crypto

@web5/crypto-aws-kms

@web5/dids

@web5/credentials


TBDocs Report Updated at 2024-09-27T00:08:38Z 168dd1a

codecov[bot] commented 3 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.55%. Comparing base (d3b4728) to head (168dd1a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #914 +/- ## ========================================== + Coverage 93.49% 93.55% +0.05% ========================================== Files 117 117 Lines 33456 33548 +92 Branches 2706 2725 +19 ========================================== + Hits 31281 31386 +105 + Misses 2136 2123 -13 Partials 39 39 ``` | [Components](https://app.codecov.io/gh/TBD54566975/web5-js/pull/914/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) | Coverage Δ | | |---|---|---| | [agent](https://app.codecov.io/gh/TBD54566975/web5-js/pull/914/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) | `87.79% <100.00%> (+0.20%)` | :arrow_up: | | [api](https://app.codecov.io/gh/TBD54566975/web5-js/pull/914/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) | `99.61% <ø> (ø)` | | | [common](https://app.codecov.io/gh/TBD54566975/web5-js/pull/914/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) | `98.68% <ø> (ø)` | | | [credentials](https://app.codecov.io/gh/TBD54566975/web5-js/pull/914/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) | `94.95% <ø> (ø)` | | | [crypto](https://app.codecov.io/gh/TBD54566975/web5-js/pull/914/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) | `93.79% <ø> (ø)` | | | [dids](https://app.codecov.io/gh/TBD54566975/web5-js/pull/914/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) | `97.77% <ø> (ø)` | | | [identity-agent](https://app.codecov.io/gh/TBD54566975/web5-js/pull/914/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) | `96.42% <ø> (ø)` | | | [crypto-aws-kms](https://app.codecov.io/gh/TBD54566975/web5-js/pull/914/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) | `100.00% <ø> (ø)` | | | [proxy-agent](https://app.codecov.io/gh/TBD54566975/web5-js/pull/914/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) | `96.42% <ø> (ø)` | | | [user-agent](https://app.codecov.io/gh/TBD54566975/web5-js/pull/914/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) | `96.57% <ø> (ø)` | |