@@ -68,7 +68,7 @@ interface EddsaSigningParams {
6868 userToBitgoRShare ?: SignShare ;
6969 encryptedUserToBitgoRShare ?: EncryptedSignerShareRecord ;
7070 bitgoToUserCommitment ?: CommitmentShareRecord ;
71- bitgoGpgPubKey ?: string ;
71+ bitgoPublicGpgKey ?: string ;
7272}
7373
7474// Unified parameters for handleEcdsaSigning - includes all possible fields
@@ -77,7 +77,7 @@ interface EcdsaSigningParams {
7777 shareType : ShareType ;
7878 txRequest : TxRequest ;
7979 prv : string ;
80- bitgoGpgPubKey ?: string ;
80+ bitgoPublicGpgKey ?: string ;
8181 encryptedDataKey ?: string ;
8282 encryptedUserGpgPrvKey ?: string ;
8383 encryptedRound1Session ?: string ;
@@ -119,15 +119,15 @@ export async function signMpcTransaction(req: EnclavedApiSpecRouteRequest<'v1.mp
119119 userToBitgoRShare : req . decoded . userToBitgoRShare ,
120120 encryptedUserToBitgoRShare : req . decoded . encryptedUserToBitgoRShare ,
121121 bitgoToUserCommitment : req . decoded . bitgoToUserCommitment ,
122- bitgoGpgPubKey : req . decoded . bitgoGpgPubKey ,
122+ bitgoPublicGpgKey : req . decoded . bitgoPublicGpgKey ,
123123 } ) ;
124124 } else if ( mpcAlgorithm === MPCType . ECDSA ) {
125125 return await handleEcdsaMpcV2Signing ( req . bitgo , req . config , {
126126 coin : coinInstance ,
127- shareType,
127+ shareType : shareType as ShareType ,
128128 txRequest : req . decoded . txRequest ,
129129 prv,
130- bitgoGpgPubKey : req . decoded . bitgoGpgPubKey ,
130+ bitgoPublicGpgKey : req . decoded . bitgoPublicGpgKey ,
131131 encryptedDataKey : req . decoded . encryptedDataKey ,
132132 encryptedUserGpgPrvKey : req . decoded . encryptedUserGpgPrvKey ,
133133 encryptedRound1Session : req . decoded . encryptedRound1Session ,
@@ -164,23 +164,23 @@ async function handleEddsaSigning(
164164 userToBitgoRShare,
165165 encryptedUserToBitgoRShare,
166166 bitgoToUserCommitment,
167- bitgoGpgPubKey ,
167+ bitgoPublicGpgKey ,
168168 } = params ;
169169
170170 // Create EddsaUtils instance using the coin's bitgo instance
171171 const eddsaUtils = new EddsaUtils ( bitgo , coin ) ;
172172
173173 switch ( shareType . toLowerCase ( ) ) {
174174 case ShareType . Commitment : {
175- if ( ! bitgoGpgPubKey ) {
176- throw new Error ( 'bitgoGpgPubKey is required for commitment share generation' ) ;
175+ if ( ! bitgoPublicGpgKey ) {
176+ throw new Error ( 'bitgoPublicGpgKey is required for commitment share generation' ) ;
177177 }
178178 const dataKey = await generateDataKey ( { keyType : 'AES-256' , cfg } ) ;
179179 const commitmentParams : CommitmentShareParams = {
180180 txRequest,
181181 prv,
182182 walletPassphrase : dataKey . plaintextKey ,
183- bitgoGpgPubKey,
183+ bitgoGpgPubKey : bitgoPublicGpgKey ,
184184 } ;
185185 return {
186186 ...( await eddsaUtils . createCommitmentShareFromTxRequest ( commitmentParams ) ) ,
@@ -257,8 +257,8 @@ async function handleEcdsaMpcV2Signing(
257257 if ( ! params . encryptedDataKey ) {
258258 throw new Error ( 'encryptedDataKey from Round 1 is required for MPCv2 Round 2' ) ;
259259 }
260- if ( ! params . bitgoGpgPubKey ) {
261- throw new Error ( 'bitgoGpgPubKey is required for MPCv2 Round 2' ) ;
260+ if ( ! params . bitgoPublicGpgKey ) {
261+ throw new Error ( 'bitgoPublicGpgKey is required for MPCv2 Round 2' ) ;
262262 }
263263 if ( ! params . encryptedUserGpgPrvKey ) {
264264 throw new Error ( 'encryptedUserGpgPrvKey is required for MPCv2 Round 2' ) ;
@@ -274,7 +274,7 @@ async function handleEcdsaMpcV2Signing(
274274 txRequest : params . txRequest ,
275275 prv : params . prv ,
276276 walletPassphrase : plaintextDataKey ,
277- bitgoPublicGpgKey : params . bitgoGpgPubKey ,
277+ bitgoPublicGpgKey : params . bitgoPublicGpgKey ,
278278 encryptedUserGpgPrvKey : params . encryptedUserGpgPrvKey ,
279279 encryptedRound1Session : params . encryptedRound1Session ,
280280 } ) ;
@@ -283,7 +283,7 @@ async function handleEcdsaMpcV2Signing(
283283 if ( ! params . encryptedDataKey ) {
284284 throw new Error ( 'encryptedDataKey from Round 1 is required for MPCv2 Round 3' ) ;
285285 }
286- if ( ! params . bitgoGpgPubKey ) {
286+ if ( ! params . bitgoPublicGpgKey ) {
287287 throw new Error ( 'bitgoGpgPubKey is required for MPCv2 Round 3' ) ;
288288 }
289289 if ( ! params . encryptedUserGpgPrvKey ) {
@@ -300,7 +300,7 @@ async function handleEcdsaMpcV2Signing(
300300 txRequest : params . txRequest ,
301301 prv : params . prv ,
302302 walletPassphrase : plaintextDataKey ,
303- bitgoPublicGpgKey : params . bitgoGpgPubKey ,
303+ bitgoPublicGpgKey : params . bitgoPublicGpgKey ,
304304 encryptedUserGpgPrvKey : params . encryptedUserGpgPrvKey ,
305305 encryptedRound2Session : params . encryptedRound2Session ,
306306 } ) ;
0 commit comments