mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 05:27:57 -05:00
feat: allow VC sharing between Android and iOS
This commit is contained in:
62
types/idpass__smartshare-react-native/index.d.ts
vendored
62
types/idpass__smartshare-react-native/index.d.ts
vendored
@@ -1,62 +0,0 @@
|
||||
import { EmitterSubscription } from 'react-native';
|
||||
import { BluetoothState } from 'react-native-bluetooth-state-manager';
|
||||
|
||||
declare module '@idpass/smartshare-react-native' {
|
||||
class IdpassSmartshare {
|
||||
getConnectionParameters: () => string;
|
||||
|
||||
setConnectionParameters: (params: string) => void;
|
||||
|
||||
getConnectionParametersDebug: () => string;
|
||||
|
||||
createConnection: (mode: ConnectionMode, callback: () => void) => void;
|
||||
|
||||
destroyConnection: () => void;
|
||||
|
||||
send: (message: string, callback: () => void) => void;
|
||||
|
||||
handleNearbyEvents: (
|
||||
callback: (event: NearbyEvent) => void
|
||||
) => EmitterSubscription;
|
||||
|
||||
handleLogEvents: (
|
||||
callback: (event: NearbyLog) => void
|
||||
) => EmitterSubscription;
|
||||
}
|
||||
|
||||
export type ConnectionMode = 'dual' | 'advertiser' | 'discoverer';
|
||||
|
||||
export type TransferUpdateStatus =
|
||||
| 'SUCCESS'
|
||||
| 'FAILURE'
|
||||
| 'IN_PROGRESS'
|
||||
| 'CANCELED';
|
||||
|
||||
export type NearbyEvent =
|
||||
| { type: 'msg'; data: string }
|
||||
| { type: 'transferupdate'; data: TransferUpdateStatus }
|
||||
| { type: 'onDisconnected'; data: string };
|
||||
|
||||
export interface NearbyLog {
|
||||
log: string;
|
||||
}
|
||||
|
||||
export interface ConnectionParams {
|
||||
// appId: string;
|
||||
cid: string;
|
||||
pk: string;
|
||||
}
|
||||
|
||||
export = new IdpassSmartshare();
|
||||
}
|
||||
|
||||
declare module 'react-native-bluetooth-state-manager' {
|
||||
type StateChangeCallback = (state: BluetoothState) => void;
|
||||
|
||||
type StateChangeEmitter = Pick<EmitterSubscription, 'remove'>;
|
||||
|
||||
export function onStateChange(
|
||||
callback: StateChangeCallback,
|
||||
emitCurrentState: boolean
|
||||
): StateChangeEmitter;
|
||||
}
|
||||
13
types/react-native-bluetooth-state-manager/index.d.ts
vendored
Normal file
13
types/react-native-bluetooth-state-manager/index.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { EmitterSubscription } from 'react-native';
|
||||
import { BluetoothState } from 'react-native-bluetooth-state-manager';
|
||||
|
||||
declare module 'react-native-bluetooth-state-manager' {
|
||||
type StateChangeCallback = (state: BluetoothState) => void;
|
||||
|
||||
type StateChangeEmitter = Pick<EmitterSubscription, 'remove'>;
|
||||
|
||||
export function onStateChange(
|
||||
callback: StateChangeCallback,
|
||||
emitCurrentState: boolean
|
||||
): StateChangeEmitter;
|
||||
}
|
||||
Reference in New Issue
Block a user