UNPKG

@ledgerhq/swift-bridge-hw-transport-ble

Version:

Package to expose the Swift BLE transport to JS

27 lines 817 B
import Transport from "@ledgerhq/hw-transport"; /** * iOS Bluetooth Transport implementation */ export default class TransportBLESwift extends Transport { /** * SwiftTransport lives in the `global` scope and gets injected by the Swift Native Module */ private transport; constructor(); /** * communicate with a BLE transport */ exchange(apdu: Buffer): Promise<Buffer>; promisify(callback: Callback): Promise<any>; arrayToBuffer(int8Array: Uint8Array): Buffer; } type Callback = (f: (response: unknown, error: unknown) => void) => void; type SwiftTransportType = { exchange: (_: Buffer) => Callback; create: () => SwiftTransportType; }; declare global { const SwiftTransport: SwiftTransportType; } export {}; //# sourceMappingURL=TransportBLESwift.d.ts.map