UNPKG

@bsv/wallet-toolbox

Version:

BRC100 conforming wallet, wallet storage and wallet signer components

28 lines 1.59 kB
import { AuthMethodInteractor, AuthPayload, StartAuthResponse, CompleteAuthResponse } from './AuthMethodInteractor'; /** * TwilioPhoneInteractor * * A client-side class that knows how to call the WAB server for Twilio-based phone verification. */ export declare class TwilioPhoneInteractor extends AuthMethodInteractor { methodType: string; /** * Start the Twilio phone verification on the server. * - The server will send an SMS code to the user’s phone, using Twilio Verify. * @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 } (the phone number to verify) * @returns - { success, message, data } */ startAuth(serverUrl: string, presentationKey: string, payload: AuthPayload): Promise<StartAuthResponse>; /** * Complete the Twilio phone verification on the server. * - The server will verify the code with Twilio Verify’s verificationChecks endpoint. * @param serverUrl - The base URL of the WAB server * @param presentationKey - The 256-bit key * @param payload - { phoneNumber: string, otp: string } (the code that was received via SMS) * @returns - { success, message, presentationKey } */ completeAuth(serverUrl: string, presentationKey: string, payload: AuthPayload): Promise<CompleteAuthResponse>; } //# sourceMappingURL=TwilioPhoneInteractor.d.ts.map