UNPKG

@mono.co/prove-react-native

Version:

The Mono Prove SDK is a quick and secure way to onboard your users from within your React Native app.

50 lines (43 loc) 973 B
import type { ReactNode } from 'react'; interface WebviewMessage { type: string; data: any; } interface ProveProviderProps { children: ReactNode; sessionId: string; onClose: () => void; onSuccess: () => void; onEvent?: (eventName: string, data: ProveEventData) => void; reference?: string; } interface ProveEventData { reference?: string; errorType?: string; errorMessage?: string; pageName?: string; reason?: string; timestamp?: number; } interface MonoProveProps { sessionId: string; onClose: () => void; onSuccess: () => void; live?: boolean; // default is true setOpenWidget: (v: boolean) => void; openWidget: boolean; onEvent?: (eventName: string, data: ProveEventData) => void; reference?: string; children?: any; } interface ErrorProps { name: string | undefined; setOpenWidget: (v: boolean) => void; } export type { WebviewMessage, MonoProveProps, ProveProviderProps, ProveEventData, ErrorProps, };