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

chore: mark retrofit functions as static #5001

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions modules/sdk-core/src/bitgo/utils/tss/ecdsa/ecdsaMPCv2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,9 @@ export class EcdsaMPCv2Utils extends BaseEcdsaUtils {
* @param decryptedKeyshare - MPCv1 decrypted signing material for user or backup as a json.stringify string and bitgo's Big Si.
* @param partyId - The party ID of the MPCv1 keyshare.
* @returns The retrofit data needed to start an MPCv2 DKG session.
* @deprecated
*/
getKeyDataForRetrofit(
static getKeyDataForRetrofit(
decryptedKeyshare: string,
partyId: MPCv2PartiesEnum.BACKUP | MPCv2PartiesEnum.USER
): DklsTypes.RetrofitData {
Expand All @@ -403,7 +404,7 @@ export class EcdsaMPCv2Utils extends BaseEcdsaUtils {
Array.from(bigIntToBufferBE(BigInt(2), 32)),
Array.from(bigIntToBufferBE(BigInt(3), 32)),
];
return this.getMpcV2RetrofitDataFromMpcV1Key({
return EcdsaMPCv2Utils.getMpcV2RetrofitDataFromMpcV1Key({
mpcv1PartyKeyShare: decryptedKeyshare,
mpcv1PartyIndex: partyId === MPCv2PartiesEnum.USER ? 1 : 2,
xiList,
Expand All @@ -428,13 +429,13 @@ export class EcdsaMPCv2Utils extends BaseEcdsaUtils {
Array.from(bigIntToBufferBE(BigInt(3), 32)),
];
return {
mpcv2UserKeyShare: this.getMpcV2RetrofitDataFromMpcV1Key({
mpcv2UserKeyShare: EcdsaMPCv2Utils.getMpcV2RetrofitDataFromMpcV1Key({
mpcv1PartyKeyShare: params.mpcv1UserKeyShare,
mpcv1PartyIndex: 1,
xiList,
mpc,
}),
mpcv2BackupKeyShare: this.getMpcV2RetrofitDataFromMpcV1Key({
mpcv2BackupKeyShare: EcdsaMPCv2Utils.getMpcV2RetrofitDataFromMpcV1Key({
mpcv1PartyKeyShare: params.mpcv1BackupKeyShare,
mpcv1PartyIndex: 2,
xiList,
Expand All @@ -443,7 +444,15 @@ export class EcdsaMPCv2Utils extends BaseEcdsaUtils {
};
}

getMpcV2RetrofitDataFromMpcV1Key({
/**
* Get retrofit data from MPCv1 key share.
* @param mpcv1PartyKeyShare
* @param mpcv1PartyIndex
* @param xiList
* @param mpc
* @deprecated
*/
static getMpcV2RetrofitDataFromMpcV1Key({
mpcv1PartyKeyShare,
mpcv1PartyIndex,
xiList,
Expand Down
Loading