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

Add ability to update the Identity Metadata name field. #956

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

LiranCohen
Copy link
Member

@LiranCohen LiranCohen commented Oct 21, 2024

This PR exposes the ability to update the name field within the Identity's Metadata.

The reasoning behind exposing the specific field vs allowing the entire object to be updated is to prevent some pretty bad foot-guns.

For more context:

export interface IdentityMetadata {
  name: string;
  tenant: string;
  uri: string;
  connectedDid?: string;
}

The uri field should always be the DID's URI, so this should remain unchanged.
The tenant field is set to the Agent's DID, changing this would be a foot-gun and might render the identity un-readable.
The connectedDid field is used to denote whether a DID is a delegated/connected DID and which DID it is acting on behalf of (the connectedDID).

Since none of these other values should be changed, we expose a method to update a single field.

Copy link

changeset-bot bot commented Oct 21, 2024

🦋 Changeset detected

Latest commit: 131db7c

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

This PR includes changesets to release 5 packages
Name Type
@web5/agent Patch
@web5/identity-agent Patch
@web5/proxy-agent Patch
@web5/user-agent Patch
@web5/api Patch

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 Oct 21, 2024

TBDocs Report

✅ No errors or warnings

@web5/api

  • Project entry file: packages/api/src/index.ts

@web5/crypto

  • Project entry file: packages/crypto/src/index.ts

@web5/crypto-aws-kms

  • Project entry file: packages/crypto-aws-kms/src/index.ts

@web5/dids

  • Project entry file: packages/dids/src/index.ts

@web5/credentials

  • Project entry file: packages/credentials/src/index.ts

TBDocs Report Updated at 2024-10-21T23:34:21Z 131db7c

Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.36%. Comparing base (1334fae) to head (131db7c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #956   +/-   ##
=======================================
  Coverage   93.36%   93.36%           
=======================================
  Files         118      118           
  Lines       33751    33784   +33     
  Branches     2746     2753    +7     
=======================================
+ Hits        31510    31543   +33     
  Misses       2200     2200           
  Partials       41       41           
Components Coverage Δ
agent 87.85% <100.00%> (+0.03%) ⬆️
api 99.61% <ø> (ø)
common 95.02% <ø> (ø)
credentials 94.95% <ø> (ø)
crypto 93.79% <ø> (ø)
dids 97.77% <ø> (ø)
identity-agent 96.42% <ø> (ø)
crypto-aws-kms 100.00% <ø> (ø)
proxy-agent 96.42% <ø> (ø)
user-agent 96.57% <ø> (ø)

@LiranCohen LiranCohen changed the title [WIP] Add setter and getter for the identity metadata name Add ability to update the Identity Metadata name field. Oct 21, 2024
@LiranCohen LiranCohen marked this pull request as ready for review October 21, 2024 19:52
@LiranCohen LiranCohen force-pushed the lirancohen/update-metadata-name branch from 583359d to 131db7c Compare October 21, 2024 23:32
@LiranCohen LiranCohen merged commit e7f5dfe into main Oct 21, 2024
35 checks passed
@LiranCohen LiranCohen deleted the lirancohen/update-metadata-name branch October 21, 2024 23:58
@github-actions github-actions bot mentioned this pull request Oct 21, 2024
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.

2 participants