universal-portability
Version:
Universal Portability Framework for Web3 Applications
23 lines • 1.01 kB
TypeScript
import React from 'react';
import { PortabilityMessage } from '../types';
import { NativePortabilityProviderProps } from './types';
interface NativePortabilityContextType {
sendMessageToWebView: (message: PortabilityMessage, webViewRef: React.RefObject<any>) => void;
registerWebView: (ref: React.RefObject<any>) => void;
unregisterWebView: (ref: React.RefObject<any>) => void;
webViews: React.RefObject<any>[];
isConnected: boolean;
walletAddress: string | null;
chainId: number | null;
}
/**
* NativePortabilityProvider is the React Native equivalent of UniversalPortabilityProvider.
* It manages communication between the wallet app and embedded WebViews.
*/
export declare const NativePortabilityProvider: React.FC<NativePortabilityProviderProps>;
/**
* Hook to access the NativePortability context
*/
export declare const useNativePortability: () => NativePortabilityContextType;
export default NativePortabilityProvider;
//# sourceMappingURL=NativePortabilityProvider.d.ts.map