Merged
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring alerts on:
|
Contributor
Author
|
@SocketSecurity ignore npm/@toruslabs/torus.js@17.1.0
|
f3ecd38 to
5c67fc2
Compare
chaitanyapotti
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira Link
Description
Update
@toruslabs/metadata-helpersto v8.2.0 and consolidate crypto utilitiesSummary
Upgrade
@toruslabs/metadata-helpersfrom^8.1.0to^8.2.0across all packages and consolidate cryptographic utility imports to use it as the single source of truth. This also bumps@toruslabs/customauthto^22.2.0.Motivation
Several crypto utility functions (
hexToBigInt,secp256k1,keccak256,bytesToNumberBE,concatBytes,numberToBytesBE,mod, etc.) were previously imported from multiple sources —@noble/curves,@toruslabs/torus.js, or defined locally. The new@toruslabs/metadata-helpers@^8.2.0re-exports all of these, allowing us to remove redundant direct dependencies and local utility definitions.Changes
Dependency cleanup — removed direct dependencies where no longer needed:
@noble/curvesremoved fromcommon-types,core,security-questions,seed-phrase,share-transfer@toruslabs/torus.jsremoved fromcommon-types,core,storage-layer-torus@toruslabs/metadata-helpersadded toprivate-keys,seed-phrase,service-provider-torus(previously only used transitively)Source code consolidation:
@noble/curves/utils.jsand@noble/curves/secp256k1.jsimports with@toruslabs/metadata-helperskeccak256/toChecksumAddressimports from@toruslabs/torus.jswithkeccak256/getChecksumAddress/keccak256Bytesfrom@toruslabs/metadata-helpershexToBigIntfromPoint.ts— now exported from@toruslabs/metadata-helpersstripHexPrefixfromutils.ts— replaced withadd0xor direct usage from@toruslabs/metadata-helperssecp256k1fromcommon-types/src/utils.tsconcatBytescall sites to use the new array signature:concatBytes([a, b, c])BigInt(0x${...})patterns withhexToBigInt(...)throughoutTests:
@toruslabs/metadata-helperscommon-typestest coverage with new tests for utility functions (encrypt/decrypt,generateAddressFromPublicKey,bigIntReplacer,isEmptyObject,isErrorObj, etc.)shareCommitment: Point[])Packages affected
common-types,core,default,private-keys,security-questions,seed-phrase,service-provider-base,service-provider-sfa,service-provider-torus,share-serialization,share-transfer,storage-layer-torusHow has this been tested?
Screenshots (if appropriate)
Types of changes
Checklist