Skip to content

Commit

Permalink
Merge pull request #5001 from BitGo/WP-2292/remove-sdk-dependency-ret…
Browse files Browse the repository at this point in the history
…rofit-call

chore: mark retrofit functions as static
  • Loading branch information
mohammadalfaiyazbitgo authored Oct 7, 2024
2 parents dc1c3cc + 17e63dc commit d897e36
Showing 1 changed file with 14 additions and 5 deletions.
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

0 comments on commit d897e36

Please sign in to comment.