UNPKG

rn-sid-address-verification

Version:
63 lines (39 loc) 1.39 kB
# rn-sid-address-verification React Native package for SID Address Verification with location tracking capabilities. ## Installation ```sh npm install rn-sid-address-verification ``` Or visit our [npm page](https://www.npmjs.com/package/rn-sid-address-verification) ### iOS Setup Run pod install: ```sh cd ios && pod install ``` ## Usage ```js import { startTrackingWithConfig, fetchConfiguration, } from 'rn-sid-address-verification'; // Fetch configuration const config = await fetchConfiguration('api-key', 'token', 'refresh-token'); console.log('Configuration:', config); // Start tracking startTrackingWithConfig('api-key', 'token', 'refresh-token'); console.log('Tracking started:', success); ``` ## API ### Methods #### `fetchConfiguration(apiKey: string, token: string, refreshToken: string): Promise<{pollingInterval: number, sessionTimeout: number}>` Fetches configuration from the server. #### `startTrackingWithConfig(apiKey: string, token: string, refreshToken: string): Promise<boolean>` Starts location tracking with the provided configuration. ## Contributing - [Development workflow](CONTRIBUTING.md#development-workflow) - [Sending a pull request](CONTRIBUTING.md#sending-a-pull-request) - [Code of conduct](CODE_OF_CONDUCT.md) ## License MIT --- Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)