@bsv/wallet-toolbox-client
Version:
Client only Wallet Storage
29 lines • 1.7 kB
TypeScript
import { AuthMethodInteractor, AuthPayload, StartAuthResponse, CompleteAuthResponse } from './AuthMethodInteractor';
/**
* DevConsoleInteractor
*
* A client-side class that knows how to call the WAB server for DevConsole-based authentication.
* This is a development-only auth method that generates OTP codes and logs them to the console.
*/
export declare class DevConsoleInteractor extends AuthMethodInteractor {
methodType: string;
/**
* Start the DevConsole authentication on the server.
* - The server will generate an OTP code and log it to the console for development use.
* @param serverUrl - The base URL of the WAB server (e.g. http://localhost:3000)
* @param presentationKey - The 256-bit key the client is attempting to authenticate with
* @param payload - { phoneNumber: string } (identifier for the authentication)
* @returns - { success, message, data }
*/
startAuth(serverUrl: string, presentationKey: string, payload: AuthPayload): Promise<StartAuthResponse>;
/**
* Complete the DevConsole authentication on the server.
* - The server will verify the OTP code that was generated and logged to the console.
* @param serverUrl - The base URL of the WAB server
* @param presentationKey - The 256-bit key
* @param payload - { phoneNumber: string, otp: string } (the identifier and OTP code from console)
* @returns - { success, message, presentationKey }
*/
completeAuth(serverUrl: string, presentationKey: string, payload: AuthPayload): Promise<CompleteAuthResponse>;
}
//# sourceMappingURL=DevConsoleInteractor.d.ts.map