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

feat: replaces secp256k1 npm package with @noble/curves #814

Merged
merged 6 commits into from Jan 2, 2024

Conversation

krpeacock
Copy link
Contributor

@krpeacock krpeacock commented Dec 18, 2023

Description

  • enhances .from methods on public key classes to support unknown types, including PublicKey instances, ArrayBuffer-like objects, DER encoded public keys, and hex strings.
  • introduces a new bufFromBufLike util
  • Fixes the inability to cast a PublicKey as Secp256k1PublicKey
  • Returns type PublicKey & DerCryptoKey from ECDSAKeyIdentity.getPublicKey

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Checklist:

  • My changes follow the guidelines in CONTRIBUTING.md.
  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

enhances `.from` methods on public key classes to support unknown types, including PublicKey instances, ArrayBuffer-like objects, DER encoded public keys, and hex strings. Also introduces a new `bufFromBufLike` util
Copy link
Contributor

github-actions bot commented Dec 18, 2023

size-limit report 📦

Path Size
@dfinity/agent 99.77 KB (+0.21% 🔺)
@dfinity/candid 13.58 KB (+0.17% 🔺)
@dfinity/principal 5.05 KB (+0.61% 🔺)
@dfinity/auth-client 91.65 KB (+0.58% 🔺)
@dfinity/assets 91.77 KB (+0.01% 🔺)
@dfinity/identity 89.01 KB (+0.44% 🔺)
@dfinity/identity-secp256k1 262.41 KB (+2.7% 🔺)

@krpeacock krpeacock marked this pull request as ready for review December 18, 2023 23:07
@krpeacock krpeacock requested a review from a team as a code owner December 18, 2023 23:07
@krpeacock krpeacock enabled auto-merge (squash) December 19, 2023 00:44
@krpeacock krpeacock merged commit e46045b into main Jan 2, 2024
15 checks passed
@krpeacock krpeacock deleted the kyle/Secp256k1PublicKey-compatibility branch January 2, 2024 20:52
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.

None yet

2 participants