@@ -43,7 +43,7 @@ import {
4343 JWTLoginParams ,
4444 MPCKeyDetails ,
4545 OAuthLoginParams ,
46- PreSigningValidatorType ,
46+ PreSigningHookType ,
4747 Secp256k1PrecomputedClient ,
4848 SessionData ,
4949 SubVerifierDetailsParams ,
@@ -100,7 +100,7 @@ export class Web3AuthMPCCoreKit implements ICoreKit {
100100
101101 private atomicCallStackCounter : number = 0 ;
102102
103- private preSigningValidator ?: PreSigningValidatorType ;
103+ private preSigningHook ?: PreSigningHookType ;
104104
105105 constructor ( options : Web3AuthOptions ) {
106106 if ( ! options . web3AuthClientId ) {
@@ -459,8 +459,8 @@ export class Web3AuthMPCCoreKit implements ICoreKit {
459459 }
460460 }
461461
462- setPreSigningValidator ( preSigningValidator : PreSigningValidatorType ) {
463- this . preSigningValidator = preSigningValidator ;
462+ setPreSigningHook ( preSigningValidator : PreSigningHookType ) {
463+ this . preSigningHook = preSigningValidator ;
464464 }
465465
466466 public async handleRedirectResult ( ) : Promise < void > {
@@ -785,8 +785,8 @@ export class Web3AuthMPCCoreKit implements ICoreKit {
785785 }
786786
787787 public async sign ( data : Buffer , hashed : boolean = false , secp256k1Precompute ?: Secp256k1PrecomputedClient ) : Promise < Buffer > {
788- if ( this . preSigningValidator ) {
789- const result = await this . preSigningValidator ( { data : Uint8Array . from ( data ) , hashed } ) ;
788+ if ( this . preSigningHook ) {
789+ const result = await this . preSigningHook ( { data : Uint8Array . from ( data ) , hashed } ) ;
790790 if ( ! result . success || result . error ) {
791791 throw Error ( result . error || "preSigningValidator failed" ) ;
792792 }
0 commit comments