@@ -22,8 +22,8 @@ import { SafeEventEmitter } from "@web3auth/auth";
2222import BN from "bn.js" ;
2323
2424import { FactorKeyTypeShareDescription , TssShareType , USER_PATH , WEB3AUTH_NETWORK } from "./constants" ;
25- import { IRemoteClientState , IRemoteSignerContext } from "./plugins/ICustomSigner " ;
26- import { ISessionSigGenerator } from "./plugins/ISessionSigGenerator " ;
25+ import { ISessionSigGenerator } from "./plugins/SessionSigGenerator/ISessionSigGenerator " ;
26+ import { IRemoteClientState } from "./plugins/Signer/ISigner " ;
2727
2828export type CoreKitMode = UX_MODE_TYPE | "nodejs" | "react-native" ;
2929
@@ -336,13 +336,45 @@ export interface Web3AuthOptions {
336336 useClientGeneratedTSSKey ?: boolean ;
337337}
338338export type Web3AuthOptionsWithDefaults = Required < Web3AuthOptions > ;
339+ export type SigType = WEB3AUTH_SIG_TYPE ;
340+
341+ export interface ISignerContext {
342+ stateEmitter : SafeEventEmitter ;
343+ config : Web3AuthOptionsWithDefaults ;
344+ status : COREKIT_STATUS ;
345+ state : Web3AuthState ;
346+ tKey : TKeyTSS ;
347+ keyType : KeyType ;
348+ sigType : SigType ;
349+ verifier : string ;
350+ verifierId : string ;
351+ getTssNonce : ( ) => number ;
352+ getSessionSignatures : ( ) => Promise < string [ ] > ;
353+ getPubKey ( ) : Buffer ;
354+ precomputeSecp256k1 ( params ?: { sessionSignatures ?: string [ ] } ) : Promise < {
355+ client : Client ;
356+ serverCoeffs : Record < string , string > ;
357+ signatures : string [ ] ;
358+ } > ;
359+ setupRemoteSigning ( params : Omit < IRemoteClientState , "tssShareIndex" > , rehydrate ?: boolean ) : Promise < void > ;
360+ createFactor ( createFactorParams : CreateFactorParams ) : Promise < string > ;
361+ inputFactorKey ( factorKey : string ) : Promise < void > ;
362+ deleteFactor ( factorPub : TkeyPoint , factorKey ?: BNString ) : Promise < void > ;
363+ getKeyDetails ( ) : Record < string , unknown > & { shareDescriptions : ShareDescriptionMap } ;
364+ getMetadataKey ( ) : string | undefined ;
365+ getMetadataPublicKey ( ) : string | undefined ;
366+ getWeb3AuthNetwork ( ) : WEB3AUTH_NETWORK_TYPE ;
367+ }
339368
340- export interface IMPCContext extends IRemoteSignerContext {
369+ export interface IMPCContext {
341370 stateEmitter : SafeEventEmitter ;
342371 config : Web3AuthOptionsWithDefaults ;
343372 status : COREKIT_STATUS ;
344373 state : Web3AuthState ;
345374 torusSp : TSSTorusServiceProvider | null ;
375+ tKey : TKeyTSS ;
376+ keyType : KeyType ;
377+ sigType : SigType ;
346378 updateState : ( newState : Partial < Web3AuthState > ) => void ;
347379 getUserInfo : ( ) => UserInfo ;
348380 setupTkey : ( params ?: {
@@ -441,8 +473,7 @@ export interface ICoreKit {
441473 * associated metadata.
442474 * @param factorPub - The public key of the factor to delete.
443475 */
444- deleteFactor ( factorPub : TkeyPoint ) : Promise < void > ;
445-
476+ deleteFactor ( factorPub : TkeyPoint , factorKey ?: BNString ) : Promise < void > ;
446477 /**
447478 * Logs out the user, terminating the session.
448479 */
@@ -520,8 +551,6 @@ export interface TkeyLocalStoreData {
520551 factorKey : string ;
521552}
522553
523- export type SigType = WEB3AUTH_SIG_TYPE ;
524-
525554export interface CoreKitSigner {
526555 keyType : KeyType ;
527556 sigType : SigType ;
0 commit comments