@ledgerhq/react-native-hw-transport-ble 6.25.2-monorepo.0 → 6.25.2-monorepo.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/.turbo/turbo-build.log +5 -0
  2. package/CHANGELOG.md +11 -0
  3. package/lib/BleTransport.d.ts +69 -0
  4. package/lib/BleTransport.d.ts.map +1 -0
  5. package/lib/BleTransport.js +648 -0
  6. package/lib/BleTransport.js.map +1 -0
  7. package/lib/awaitsBleOn.d.ts +3 -0
  8. package/lib/awaitsBleOn.d.ts.map +1 -0
  9. package/lib/awaitsBleOn.js +38 -0
  10. package/lib/awaitsBleOn.js.map +1 -0
  11. package/lib/monitorCharacteristic.d.ts +5 -0
  12. package/lib/monitorCharacteristic.d.ts.map +1 -0
  13. package/lib/monitorCharacteristic.js +35 -0
  14. package/lib/monitorCharacteristic.js.map +1 -0
  15. package/lib/remapErrors.d.ts +4 -0
  16. package/lib/remapErrors.d.ts.map +1 -0
  17. package/lib/remapErrors.js +23 -0
  18. package/lib/remapErrors.js.map +1 -0
  19. package/lib/timer.d.ts +5 -0
  20. package/lib/timer.d.ts.map +1 -0
  21. package/lib/timer.js +26 -0
  22. package/lib/timer.js.map +1 -0
  23. package/lib/types.d.ts +4 -0
  24. package/lib/types.d.ts.map +1 -0
  25. package/lib/types.js +3 -0
  26. package/lib/types.js.map +1 -0
  27. package/lib-es/BleTransport.d.ts +69 -0
  28. package/lib-es/BleTransport.d.ts.map +1 -0
  29. package/lib-es/BleTransport.js +641 -0
  30. package/lib-es/BleTransport.js.map +1 -0
  31. package/lib-es/awaitsBleOn.d.ts +3 -0
  32. package/lib-es/awaitsBleOn.d.ts.map +1 -0
  33. package/lib-es/awaitsBleOn.js +31 -0
  34. package/lib-es/awaitsBleOn.js.map +1 -0
  35. package/lib-es/monitorCharacteristic.d.ts +5 -0
  36. package/lib-es/monitorCharacteristic.d.ts.map +1 -0
  37. package/lib-es/monitorCharacteristic.js +31 -0
  38. package/lib-es/monitorCharacteristic.js.map +1 -0
  39. package/lib-es/remapErrors.d.ts +4 -0
  40. package/lib-es/remapErrors.d.ts.map +1 -0
  41. package/lib-es/remapErrors.js +17 -0
  42. package/lib-es/remapErrors.js.map +1 -0
  43. package/lib-es/timer.d.ts +5 -0
  44. package/lib-es/timer.d.ts.map +1 -0
  45. package/lib-es/timer.js +24 -0
  46. package/lib-es/timer.js.map +1 -0
  47. package/lib-es/types.d.ts +4 -0
  48. package/lib-es/types.d.ts.map +1 -0
  49. package/lib-es/types.js +2 -0
  50. package/lib-es/types.js.map +1 -0
  51. package/package.json +5 -5
@@ -0,0 +1,5 @@
1
+ @ledgerhq/react-native-hw-transport-ble:build: cache hit, replaying output a2fb334a863bb28f
2
+ @ledgerhq/react-native-hw-transport-ble:build: 
3
+ @ledgerhq/react-native-hw-transport-ble:build: > @ledgerhq/react-native-hw-transport-ble@6.25.2-monorepo.1 build /Users/valmeida/projects/live/ledger-live/libs/ledgerjs/packages/react-native-hw-transport-ble
4
+ @ledgerhq/react-native-hw-transport-ble:build: > bash ../../script/build.sh
5
+ @ledgerhq/react-native-hw-transport-ble:build: 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @ledgerhq/react-native-hw-transport-ble
2
2
 
3
+ ## 6.25.2-monorepo.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1b6fec9db: monorepo prelease 2
8
+ - Updated dependencies [1b6fec9db]
9
+ - @ledgerhq/devices@6.24.2-monorepo.1
10
+ - @ledgerhq/errors@6.10.1-monorepo.1
11
+ - @ledgerhq/hw-transport@6.24.2-monorepo.1
12
+ - @ledgerhq/logs@6.10.1-monorepo.1
13
+
3
14
  ## 6.25.2-monorepo.0
4
15
 
5
16
  ### Patch Changes
@@ -0,0 +1,69 @@
1
+ /// <reference types="node" />
2
+ import Transport from "@ledgerhq/hw-transport";
3
+ import type { DeviceModel } from "@ledgerhq/devices";
4
+ import { Observable } from "rxjs";
5
+ import type { Device, Characteristic } from "./types";
6
+ declare type ReconnectionConfig = {
7
+ pairingThreshold: number;
8
+ delayAfterFirstPairing: number;
9
+ };
10
+ export declare function setReconnectionConfig(config: ReconnectionConfig | null | undefined): void;
11
+ /**
12
+ * react-native bluetooth BLE implementation
13
+ * @example
14
+ * import BluetoothTransport from "@ledgerhq/react-native-hw-transport-ble";
15
+ */
16
+ export default class BluetoothTransport extends Transport {
17
+ /**
18
+ *
19
+ */
20
+ static isSupported: () => Promise<boolean>;
21
+ /**
22
+ *
23
+ */
24
+ static setLogLevel: (level: any) => void;
25
+ /**
26
+ * TODO could add this concept in all transports
27
+ * observe event with { available: bool, string } // available is generic, type is specific
28
+ * an event is emit once and then listened
29
+ */
30
+ static observeState(observer: any): {
31
+ unsubscribe: () => void;
32
+ };
33
+ static list: () => any;
34
+ /**
35
+ * Scan for bluetooth Ledger devices
36
+ */
37
+ static listen(observer: any): {
38
+ unsubscribe: () => void;
39
+ };
40
+ /**
41
+ * Open a BLE transport
42
+ * @param {*} deviceOrId
43
+ */
44
+ static open(deviceOrId: Device | string): Promise<any>;
45
+ /**
46
+ * Globally disconnect a BLE device by its ID
47
+ */
48
+ static disconnect: (id: any) => Promise<void>;
49
+ id: string;
50
+ device: Device;
51
+ mtuSize: number;
52
+ writeCharacteristic: Characteristic;
53
+ writeCmdCharacteristic: Characteristic;
54
+ notifyObservable: Observable<any>;
55
+ deviceModel: DeviceModel;
56
+ notYetDisconnected: boolean;
57
+ constructor(device: Device, writeCharacteristic: Characteristic, writeCmdCharacteristic: Characteristic, notifyObservable: Observable<any>, deviceModel: DeviceModel);
58
+ /**
59
+ * communicate with a BLE transport
60
+ */
61
+ exchange: (apdu: Buffer) => Promise<any>;
62
+ inferMTU(): Promise<number>;
63
+ requestConnectionPriority(connectionPriority: "Balanced" | "High" | "LowPower"): Promise<void>;
64
+ setScrambleKey(): void;
65
+ write: (buffer: Buffer, txid?: string | null | undefined) => Promise<void>;
66
+ close(): Promise<void>;
67
+ }
68
+ export {};
69
+ //# sourceMappingURL=BleTransport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BleTransport.d.ts","sourceRoot":"","sources":["../src/BleTransport.ts"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAU/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,OAAO,EAAE,UAAU,EAAsC,MAAM,MAAM,CAAC;AAetE,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAoBtD,aAAK,kBAAkB,GAAG;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,sBAAsB,EAAE,MAAM,CAAC;CAChC,CAAC;AAKF,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,kBAAkB,GAAG,IAAI,GAAG,SAAS,QAG9C;AAmOD;;;;GAIG;AAEH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,SAAS;IACvD;;OAEG;IACH,MAAM,CAAC,WAAW,QAAO,QAAQ,OAAO,CAAC,CACW;IAEpD;;OAEG;IACH,MAAM,CAAC,WAAW,UAAW,GAAG,UAE9B;IAEF;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,GAAG;;;IAcjC,MAAM,CAAC,IAAI,QAAO,GAAG,CAEnB;IAEF;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG;;;IAmD3B;;;OAGG;WACU,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAI7C;;OAEG;IACH,MAAM,CAAC,UAAU,OAAc,GAAG,mBAGhC;IACF,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,SAAM;IACb,mBAAmB,EAAE,cAAc,CAAC;IACpC,sBAAsB,EAAE,cAAc,CAAC;IACvC,gBAAgB,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;IAClC,WAAW,EAAE,WAAW,CAAC;IACzB,kBAAkB,UAAQ;gBAGxB,MAAM,EAAE,MAAM,EACd,mBAAmB,EAAE,cAAc,EACnC,sBAAsB,EAAE,cAAc,EACtC,gBAAgB,EAAE,UAAU,CAAC,GAAG,CAAC,EACjC,WAAW,EAAE,WAAW;IAY1B;;OAEG;IACH,QAAQ,SAAU,MAAM,KAAG,QAAQ,GAAG,CAAC,CAuBlC;IAGC,QAAQ;IAqCR,yBAAyB,CAC7B,kBAAkB,EAAE,UAAU,GAAG,MAAM,GAAG,UAAU;IAStD,cAAc;IAEd,KAAK,WAAkB,MAAM,SAAS,MAAM,GAAG,IAAI,GAAG,SAAS,mBAsB7D;IAEI,KAAK;CAKZ"}