@bsv/wallet-toolbox-client
Version:
Client only Wallet Storage
33 lines • 1.77 kB
TypeScript
import { CWIStyleWalletManager, UMPTokenInteractor } from './CWIStyleWalletManager';
import { PrivilegedKeyManager } from './sdk/PrivilegedKeyManager';
import { WalletInterface } from '@bsv/sdk';
import { WABClient } from './wab-client/WABClient';
import { AuthMethodInteractor } from './wab-client/auth-method-interactors/AuthMethodInteractor';
/**
* WalletAuthenticationManager
*
* A wallet manager that integrates
* with a WABClient for user authentication flows (e.g. Twilio phone).
*/
export declare class WalletAuthenticationManager extends CWIStyleWalletManager {
private wabClient;
private authMethod?;
private tempPresentationKey?;
constructor(adminOriginator: string, walletBuilder: (primaryKey: number[], privilegedKeyManager: PrivilegedKeyManager) => Promise<WalletInterface>, interactor: UMPTokenInteractor | undefined, recoveryKeySaver: (key: number[]) => Promise<true>, passwordRetriever: (reason: string, test: (passwordCandidate: string) => boolean) => Promise<string>, wabClient: WABClient, authMethod?: AuthMethodInteractor, stateSnapshot?: number[]);
/**
* Sets (or switches) the chosen AuthMethodInteractor at runtime,
* in case the user changes their mind or picks a new method in the UI.
*/
setAuthMethod(method: AuthMethodInteractor): void;
/**
* Initiate the WAB-based flow, e.g. sending an SMS code or starting an ID check,
* using the chosen AuthMethodInteractor.
*/
startAuth(payload: any): Promise<void>;
/**
* Completes the WAB-based flow, retrieving the final presentationKey from WAB if successful.
*/
completeAuth(payload: any): Promise<void>;
private generateTemporaryPresentationKey;
}
//# sourceMappingURL=WalletAuthenticationManager.d.ts.map