universal-portability
Version:
Universal Portability Framework for Web3 Applications
19 lines • 674 B
TypeScript
import { WebView } from 'react-native-webview';
export interface MessageHandlerConfig {
walletAddress: string;
chainId: number;
signer?: any;
}
/**
* Hook to handle messages from the WebView dApp
*
* This is the React Native equivalent of the useMessageHandler hook
* for web implementations. It handles communication with embedded dApps
* inside WebViews.
*/
export declare function useMessageHandler({ walletAddress, chainId, signer }: MessageHandlerConfig): {
handleWebViewMessage: (event: any) => Promise<void>;
webViewRef: import("react").RefObject<WebView>;
};
export default useMessageHandler;
//# sourceMappingURL=useMessageHandler.d.ts.map