add extractPrivateKeyFromPKCS8Bytes, specifically for use in https://github.com/tkhq/sdk/pull/282. This is required because exporting private keys using webcrypto is only supported by the pkcs8 format; you can't export using raw. As a result, we have to do some manual manipulation to get the 32-byte "actual" private key out of the pkcs8 envelope
How I Tested These Changes
Did you add a changeset?
If updating one of our packages, you'll likely need to add a changeset to your PR. To do so, run pnpm changeset. pnpm changeset will generate a file where you should write a human friendly message about the changes. Note how this (example) includes the package name (should be auto added by the command) along with the type of semver change (major.minor.patch) (which you should set).
These changes will be used at release time to determine what packages to publish and how to bump their version. For more context see this comment.
Summary & Motivation
math.ts
extractPrivateKeyFromPKCS8Bytes
, specifically for use in https://github.com/tkhq/sdk/pull/282. This is required because exporting private keys using webcrypto is only supported by thepkcs8
format; you can't export usingraw
. As a result, we have to do some manual manipulation to get the 32-byte "actual" private key out of the pkcs8 envelopeHow I Tested These Changes
Did you add a changeset?
If updating one of our packages, you'll likely need to add a changeset to your PR. To do so, run
pnpm changeset
.pnpm changeset
will generate a file where you should write a human friendly message about the changes. Note how this (example) includes the package name (should be auto added by the command) along with the type of semver change (major.minor.patch) (which you should set).These changes will be used at release time to determine what packages to publish and how to bump their version. For more context see this comment.