Skip to content

feat: Generic SecretMetadata #12

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

Merged
merged 7 commits into from
May 14, 2025

Conversation

lwin-kyaw
Copy link

@lwin-kyaw lwin-kyaw commented May 13, 2025

Explanation

Current metadata class (SeedPhraseMetadata) can only support the Mnemonics type (bytes).
This PR adds additional information to the metadata class so that it can support other types of Secrets with different Data types (besides Uint8Array).
The version field is also added to make sure that the PR addresses the backward/forward compatibility.

References

Changelog

  • renamed file and class, SeedPhraseMetadata to SecretMetadata
  • added new fields to the SecretMetadata class
    • type (Type of the Secret data, e.g. Mnemonic, PrivateKey
    • version (Version of the SecretMetadata data structure)
  • update data field to Generic type which supports Uint8Array, string and number. The reason for it is to make the easier type updates in the future.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@lwin-kyaw lwin-kyaw marked this pull request as draft May 13, 2025 09:29
@lwin-kyaw lwin-kyaw changed the title Feat/secret metadata type feat: Generic SecretMetadata May 14, 2025
Copy link
Member

@chaitanyapotti chaitanyapotti left a comment

Choose a reason for hiding this comment

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

lgtm

@chaitanyapotti chaitanyapotti marked this pull request as ready for review May 14, 2025 10:28
@chaitanyapotti chaitanyapotti merged commit 7104c8c into feat/seedless-multi-srp May 14, 2025
203 of 204 checks passed
@chaitanyapotti chaitanyapotti deleted the feat/secret-metadata-type branch May 14, 2025 13:57
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