@@ -324,7 +324,7 @@ export class Web3AuthMPCCoreKit implements ICoreKit {
324324 throw CoreKitError . oauthLoginUnsupported ( `Oauth login is NOT supported in ${ this . options . uxMode } mode.` ) ;
325325 }
326326
327- if ( this . state . factorKey ) {
327+ if ( this . state . factorKey ) {
328328 throw CoreKitError . oauthLoginUnsupported ( "Instance is alreay login or rehydrated" ) ;
329329 }
330330
@@ -761,7 +761,7 @@ export class Web3AuthMPCCoreKit implements ICoreKit {
761761 }
762762
763763 // Client lib expects pub key in XY-format, base64-encoded.
764- const tssPubKeyBase64 = Buffer . from ( tssPubKey . toSEC1 ( secp256k1 ) . subarray ( 1 ) ) . toString ( "base64" ) ;
764+ const tssPubKeyBase64 = tssPubKey . toSEC1 ( secp256k1 ) . subarray ( 1 ) . toString ( "base64" ) ;
765765
766766 const client = new Client (
767767 currentSession ,
@@ -801,7 +801,7 @@ export class Web3AuthMPCCoreKit implements ICoreKit {
801801 this . wasmLib = await this . loadTssWasm ( ) ;
802802 if ( this . keyType === KeyType . secp256k1 ) {
803803 const sig = await this . sign_ECDSA_secp256k1 ( data , hashed , secp256k1Precompute ) ;
804- return Buffer . concat ( [ sig . r , sig . s , Buffer . from ( [ sig . v ] ) ] ) ;
804+ return Buffer . concat ( [ new Uint8Array ( sig . r ) , new Uint8Array ( sig . s ) , new Uint8Array ( [ sig . v ] ) ] ) ;
805805 } else if ( this . keyType === KeyType . ed25519 ) {
806806 return this . sign_ed25519 ( data , hashed ) ;
807807 }
@@ -1244,7 +1244,7 @@ export class Web3AuthMPCCoreKit implements ICoreKit {
12441244 postboxKeyNodeIndexes : postboxKeyNodeIndexes || [ ] ,
12451245 factorKey : factorKey ?. toString ( "hex" ) ,
12461246 tssShareIndex : tssShareIndex as number ,
1247- tssPubKey : Buffer . from ( tssPubKey ) . toString ( "hex" ) ,
1247+ tssPubKey : tssPubKey . toString ( "hex" ) ,
12481248 signatures : this . signatures ,
12491249 userInfo,
12501250 } ;
@@ -1521,7 +1521,7 @@ export class Web3AuthMPCCoreKit implements ICoreKit {
15211521 clientXCoord ,
15221522 clientShareAdjustedHex ,
15231523 pubKeyHex ,
1524- data ,
1524+ new Uint8Array ( data ) ,
15251525 serverCoefficientsHex ,
15261526 this . socketTransports
15271527 ) ;
0 commit comments