feat(sdk-core): add EdDSA MPCv2 offline signing helper utils#8793
Merged
Conversation
73179bb to
f4ebbae
Compare
Marzooqa
reviewed
May 19, 2026
Marzooqa
reviewed
May 19, 2026
Marzooqa
reviewed
May 19, 2026
Marzooqa
reviewed
May 19, 2026
Marzooqa
reviewed
May 19, 2026
f4ebbae to
2188290
Compare
Marzooqa
reviewed
May 19, 2026
2188290 to
6340d35
Compare
Marzooqa
reviewed
May 20, 2026
Marzooqa
reviewed
May 20, 2026
6340d35 to
2facaea
Compare
Ticket: WCI-386 Centralizes shared MPCv2 helper logic in BaseTssUtils for reuse across ECDSA and EdDSA, and moves misplaced helper tests from the EdDSA keychain creation test to a dedicated BaseTssUtils test file in sdk-core. - Move getSignableHexAndDerivationPath() into BaseTssUtils for shared ECDSA and EdDSA MPCv2 transaction extraction - Move validateAdata() into BaseTssUtils to eliminate duplicated authenticated data validation - Move getBitgoAndUserGpgKeys() into BaseTssUtils with v1 (SJCL) and v2 (Argon2id) envelope support; accepts a userGpgKeyDomainSeparator arg - Remove redundant private getBitgoAndUserGpgKeys() from EcdsaMPCv2Utils and EddsaMPCv2Utils; delegate to base class - Remove unused MPS_DSG_SIGNING_USER_GPG_KEY constant and isV2Envelope import from EddsaMPCv2Utils - Remove misplaced External Signing Helpers tests from createKeychains.ts - Add sdk-core/test/unit/bitgo/utils/tss/baseTSSUtils.ts with lean, strictly typed tests for all extracted helpers and ECDSA delegation Co-authored-by: Cursor <cursoragent@cursor.com>
2facaea to
53a09b0
Compare
Marzooqa
approved these changes
May 21, 2026
Contributor
Marzooqa
left a comment
There was a problem hiding this comment.
Reviewed the behavioral changes for getBitgoAndUserGpgKeys in ECDSA — the refactoring is safe. readKey → readPrivateKey is strictly stricter with no behavioral change for valid inputs. Domain separator, validateAdata logic, and SerializedKeyPair reconstruction are all equivalent. Test subclass pattern (TestBaseTssUtils) is consistent with existing conventions in this repo (e.g. bitgoMpcGpgPubKeys.ts). LGTM.
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.
Centralizes shared MPCv2 helper logic in BaseTssUtils for reuse across ECDSA and EdDSA, and moves misplaced helper tests from the EdDSA keychain creation test to a dedicated BaseTssUtils test file in sdk-core.
ECDSA and EdDSA MPCv2 transaction extraction
authenticated data validation
and v2 (Argon2id) envelope support; accepts a userGpgKeyDomainSeparator arg
and EddsaMPCv2Utils; delegate to base class
import from EddsaMPCv2Utils
strictly typed tests for all extracted helpers and ECDSA delegation
Ticket: WCI-386