UNPKG

universal-portability

Version:

Universal Portability Framework for Web3 Applications

44 lines 1.15 kB
import { PortabilityMessage, MessageType } from '../types'; import { WebView } from 'react-native-webview'; import { RefObject } from 'react'; /** * React Native specific message types */ export type NativeMessageType = MessageType | 'WALLET_WEBVIEW_READY'; /** * React Native specific message with WebView reference */ export interface NativePortabilityMessage extends PortabilityMessage { webViewRef?: RefObject<WebView>; } /** * Specific props for React Native WebView Port component */ export interface NativePortProps { source: { uri: string; }; address?: string; rpcUrl?: string; chainId?: number; style?: any; height?: number | string; width?: number | string; onLoad?: () => void; onError?: (error: any) => void; } /** * Props for the Native Portability Provider */ export interface NativePortabilityProviderProps { children: React.ReactNode; walletAddress?: string; chainId?: number; isConnected?: boolean; onError?: (error: Error) => void; config?: { allowedOrigins?: string[]; debug?: boolean; }; } //# sourceMappingURL=types.d.ts.map