robosats/mobile/native/TorModule.ts

15 lines
502 B
TypeScript
Raw Normal View History

2024-03-29 19:05:50 +00:00
import { NativeModules } from 'react-native';
const { TorModule } = NativeModules;
interface TorModuleInterface {
start: () => void;
restart: () => void;
getTorStatus: () => void;
sendWsOpen: (path: string) => Promise<boolean>;
sendWsClose: (path: string) => Promise<boolean>;
sendWsSend: (path: string, message: string) => Promise<boolean>;
2024-03-29 19:05:50 +00:00
sendRequest: (action: string, url: string, headers: string, body: string) => Promise<string>;
}
export default TorModule as TorModuleInterface;