@@ -201,7 +201,7 @@ describe('TSS EdDSA MPCv2 Utils:', async function () {
201201 . once ( )
202202 . reply ( 200 , {
203203 sessionId : 'test-session-id' ,
204- commonPublicKey : 'a' . repeat ( 64 ) ,
204+ commonPublicKeychain : 'a' . repeat ( 128 ) ,
205205 bitgoMsg2 : {
206206 message : Buffer . from ( 'garbage' ) . toString ( 'base64' ) ,
207207 signature : '-----BEGIN PGP SIGNATURE-----\nFAKE\n-----END PGP SIGNATURE-----' ,
@@ -221,7 +221,7 @@ describe('TSS EdDSA MPCv2 Utils:', async function () {
221221 . once ( )
222222 . reply ( 200 , {
223223 sessionId : 'different-session-id' ,
224- commonPublicKey : 'a' . repeat ( 64 ) ,
224+ commonPublicKeychain : 'a' . repeat ( 128 ) ,
225225 bitgoMsg2 : { message : '' , signature : '' } ,
226226 } ) ;
227227
@@ -231,7 +231,7 @@ describe('TSS EdDSA MPCv2 Utils:', async function () {
231231 ) ;
232232 } ) ;
233233
234- it ( 'should reject when commonPublicKey from BitGo does not match the locally computed key ' , async function ( ) {
234+ it ( 'should reject when commonPublicKeychain from BitGo does not match the locally computed keychain ' , async function ( ) {
235235 const bitgoSession = new EddsaMPSDkg . DKG ( 3 , 2 , 2 ) ;
236236 const bitgoState : { msg2 ?: MPSTypes . DeserializedMessage } = { } ;
237237 await nockMPSKeyGenRound1 ( bitgoSession , bitgoState , 1 ) ;
@@ -255,14 +255,14 @@ describe('TSS EdDSA MPCv2 Utils:', async function () {
255255
256256 return {
257257 sessionId : 'test-session-id' ,
258- commonPublicKey : 'fakefakeee' . repeat ( 8 ) , // mutated — will not match user/backup computed key
258+ commonPublicKeychain : 'fakefakeee' . repeat ( 16 ) , // mutated — will not match user/backup computed keychain
259259 bitgoMsg2 : await MPSComms . detachSignMpsMessage ( Buffer . from ( bitgoState . msg2 . payload ) , bitgoPrvKeyObj ) ,
260260 } ;
261261 } ) ;
262262
263263 await assert . rejects (
264264 tssUtils . createKeychains ( { passphrase : 'test' , enterprise : enterpriseId } ) ,
265- / d o e s n o t m a t c h B i t G o c o m m o n p u b l i c k e y /
265+ / d o e s n o t m a t c h B i t G o c o m m o n k e y c h a i n /
266266 ) ;
267267 } ) ;
268268
@@ -286,6 +286,7 @@ describe('TSS EdDSA MPCv2 Utils:', async function () {
286286 name : 'irrelevant' ,
287287 publicKey : bitgoGpgKeyPair . publicKey ,
288288 mpcv2PublicKey : bitgoGpgKeyPair . publicKey ,
289+ eddsaMpcv2PublicKey : bitgoGpgKeyPair . publicKey ,
289290 enterpriseId,
290291 } ) ;
291292 nock ( stagingBgUrl ) . get ( '/api/v1/client/constants' ) . reply ( 200 , { ttl : 3600 , constants } ) ;
@@ -390,7 +391,7 @@ describe('TSS EdDSA MPCv2 Utils:', async function () {
390391
391392 return {
392393 sessionId,
393- commonPublicKey : bitgoSession . getSharePublicKey ( ) . toString ( 'hex' ) ,
394+ commonPublicKeychain : bitgoSession . getCommonKeychain ( ) ,
394395 bitgoMsg2 : await MPSComms . detachSignMpsMessage ( Buffer . from ( bitgoState . msg2 . payload ) , bitgoPrvKeyObj ) ,
395396 } ;
396397 } ) ;
0 commit comments