@voltras/node-sdk 0.1.1 → 0.2.0
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.
- package/README.md +122 -31
- package/dist/cjs/bluetooth/adapters/native.js +36 -34
- package/dist/cjs/bluetooth/adapters/native.js.map +1 -1
- package/dist/cjs/bluetooth/adapters/node.js +9 -7
- package/dist/cjs/bluetooth/adapters/node.js.map +1 -1
- package/dist/cjs/bluetooth/adapters/web-bluetooth-base.js +6 -4
- package/dist/cjs/bluetooth/adapters/web-bluetooth-base.js.map +1 -1
- package/dist/cjs/bluetooth/adapters/web.js +7 -5
- package/dist/cjs/bluetooth/adapters/web.js.map +1 -1
- package/dist/cjs/bluetooth/controllers/scanner-controller.js +0 -2
- package/dist/cjs/bluetooth/controllers/scanner-controller.js.map +1 -1
- package/dist/cjs/bluetooth/index.js.map +1 -1
- package/dist/cjs/errors.js.map +1 -1
- package/dist/cjs/index.js +19 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react/hooks.js +2 -6
- package/dist/cjs/react/hooks.js.map +1 -1
- package/dist/cjs/sdk/notification-dispatcher.js +47 -0
- package/dist/cjs/sdk/notification-dispatcher.js.map +1 -0
- package/dist/cjs/sdk/reconnect-handler.js +61 -0
- package/dist/cjs/sdk/reconnect-handler.js.map +1 -0
- package/dist/cjs/sdk/voltra-client.js +206 -72
- package/dist/cjs/sdk/voltra-client.js.map +1 -1
- package/dist/cjs/sdk/voltra-manager.js +13 -2
- package/dist/cjs/sdk/voltra-manager.js.map +1 -1
- package/dist/cjs/shared/index.js +5 -1
- package/dist/cjs/shared/index.js.map +1 -1
- package/dist/cjs/shared/logger.js +54 -0
- package/dist/cjs/shared/logger.js.map +1 -0
- package/dist/cjs/voltra/index.js +15 -12
- package/dist/cjs/voltra/index.js.map +1 -1
- package/dist/cjs/voltra/models/device.js +13 -0
- package/dist/cjs/voltra/models/device.js.map +1 -1
- package/dist/cjs/voltra/protocol/commands.js +127 -210
- package/dist/cjs/voltra/protocol/commands.js.map +1 -1
- package/dist/cjs/voltra/protocol/constants/ble-config.js +24 -0
- package/dist/cjs/voltra/protocol/constants/ble-config.js.map +1 -0
- package/dist/cjs/voltra/protocol/constants/connection-commands.js +55 -0
- package/dist/cjs/voltra/protocol/constants/connection-commands.js.map +1 -0
- package/dist/cjs/voltra/protocol/constants/enums.js +117 -0
- package/dist/cjs/voltra/protocol/constants/enums.js.map +1 -0
- package/dist/cjs/voltra/protocol/constants/index.js +32 -0
- package/dist/cjs/voltra/protocol/constants/index.js.map +1 -0
- package/dist/cjs/voltra/protocol/constants/message-types.js +70 -0
- package/dist/cjs/voltra/protocol/constants/message-types.js.map +1 -0
- package/dist/cjs/voltra/protocol/constants/timing.js +21 -0
- package/dist/cjs/voltra/protocol/constants/timing.js.map +1 -0
- package/dist/cjs/voltra/protocol/data/protocol-data.generated.js +7 -0
- package/dist/cjs/voltra/protocol/data/protocol-data.generated.js.map +1 -0
- package/dist/cjs/voltra/protocol/telemetry-decoder.js +122 -6
- package/dist/cjs/voltra/protocol/telemetry-decoder.js.map +1 -1
- package/dist/cjs/voltra/protocol/types.js +9 -0
- package/dist/cjs/voltra/protocol/types.js.map +1 -0
- package/dist/esm/bluetooth/adapters/native.js +36 -34
- package/dist/esm/bluetooth/adapters/native.js.map +1 -1
- package/dist/esm/bluetooth/adapters/node.js +9 -7
- package/dist/esm/bluetooth/adapters/node.js.map +1 -1
- package/dist/esm/bluetooth/adapters/web-bluetooth-base.js +6 -4
- package/dist/esm/bluetooth/adapters/web-bluetooth-base.js.map +1 -1
- package/dist/esm/bluetooth/adapters/web.js +7 -5
- package/dist/esm/bluetooth/adapters/web.js.map +1 -1
- package/dist/esm/bluetooth/controllers/scanner-controller.js +0 -2
- package/dist/esm/bluetooth/controllers/scanner-controller.js.map +1 -1
- package/dist/esm/bluetooth/index.js +1 -1
- package/dist/esm/bluetooth/index.js.map +1 -1
- package/dist/esm/errors.js.map +1 -1
- package/dist/esm/index.js +4 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/react/hooks.js +1 -5
- package/dist/esm/react/hooks.js.map +1 -1
- package/dist/esm/sdk/notification-dispatcher.js +44 -0
- package/dist/esm/sdk/notification-dispatcher.js.map +1 -0
- package/dist/esm/sdk/reconnect-handler.js +57 -0
- package/dist/esm/sdk/reconnect-handler.js.map +1 -0
- package/dist/esm/sdk/voltra-client.js +204 -70
- package/dist/esm/sdk/voltra-client.js.map +1 -1
- package/dist/esm/sdk/voltra-manager.js +13 -2
- package/dist/esm/sdk/voltra-manager.js.map +1 -1
- package/dist/esm/shared/index.js +1 -0
- package/dist/esm/shared/index.js.map +1 -1
- package/dist/esm/shared/logger.js +49 -0
- package/dist/esm/shared/logger.js.map +1 -0
- package/dist/esm/voltra/index.js +3 -8
- package/dist/esm/voltra/index.js.map +1 -1
- package/dist/esm/voltra/models/device.js +13 -0
- package/dist/esm/voltra/models/device.js.map +1 -1
- package/dist/esm/voltra/protocol/commands.js +117 -209
- package/dist/esm/voltra/protocol/commands.js.map +1 -1
- package/dist/esm/voltra/protocol/constants/ble-config.js +18 -0
- package/dist/esm/voltra/protocol/constants/ble-config.js.map +1 -0
- package/dist/esm/voltra/protocol/constants/connection-commands.js +49 -0
- package/dist/esm/voltra/protocol/constants/connection-commands.js.map +1 -0
- package/dist/esm/voltra/protocol/constants/enums.js +114 -0
- package/dist/esm/voltra/protocol/constants/enums.js.map +1 -0
- package/dist/esm/voltra/protocol/constants/index.js +12 -0
- package/dist/esm/voltra/protocol/constants/index.js.map +1 -0
- package/dist/esm/voltra/protocol/constants/message-types.js +64 -0
- package/dist/esm/voltra/protocol/constants/message-types.js.map +1 -0
- package/dist/esm/voltra/protocol/constants/timing.js +18 -0
- package/dist/esm/voltra/protocol/constants/timing.js.map +1 -0
- package/dist/esm/voltra/protocol/data/protocol-data.generated.js +5 -0
- package/dist/esm/voltra/protocol/data/protocol-data.generated.js.map +1 -0
- package/dist/esm/voltra/protocol/telemetry-decoder.js +124 -8
- package/dist/esm/voltra/protocol/telemetry-decoder.js.map +1 -1
- package/dist/esm/voltra/protocol/types.js +8 -0
- package/dist/esm/voltra/protocol/types.js.map +1 -0
- package/dist/types/bluetooth/adapters/native.d.ts.map +1 -1
- package/dist/types/bluetooth/adapters/node.d.ts.map +1 -1
- package/dist/types/bluetooth/adapters/web-bluetooth-base.d.ts.map +1 -1
- package/dist/types/bluetooth/adapters/web.d.ts.map +1 -1
- package/dist/types/bluetooth/controllers/scanner-controller.d.ts.map +1 -1
- package/dist/types/bluetooth/index.d.ts +1 -1
- package/dist/types/bluetooth/index.d.ts.map +1 -1
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/react/hooks.d.ts.map +1 -1
- package/dist/types/sdk/index.d.ts +2 -1
- package/dist/types/sdk/index.d.ts.map +1 -1
- package/dist/types/sdk/notification-dispatcher.d.ts +29 -0
- package/dist/types/sdk/notification-dispatcher.d.ts.map +1 -0
- package/dist/types/sdk/reconnect-handler.d.ts +55 -0
- package/dist/types/sdk/reconnect-handler.d.ts.map +1 -0
- package/dist/types/sdk/types.d.ts +35 -0
- package/dist/types/sdk/types.d.ts.map +1 -1
- package/dist/types/sdk/voltra-client.d.ts +77 -2
- package/dist/types/sdk/voltra-client.d.ts.map +1 -1
- package/dist/types/sdk/voltra-manager.d.ts.map +1 -1
- package/dist/types/shared/index.d.ts +1 -0
- package/dist/types/shared/index.d.ts.map +1 -1
- package/dist/types/shared/logger.d.ts +39 -0
- package/dist/types/shared/logger.d.ts.map +1 -0
- package/dist/types/voltra/index.d.ts +3 -3
- package/dist/types/voltra/index.d.ts.map +1 -1
- package/dist/types/voltra/models/device.d.ts +11 -1
- package/dist/types/voltra/models/device.d.ts.map +1 -1
- package/dist/types/voltra/protocol/commands.d.ts +47 -87
- package/dist/types/voltra/protocol/commands.d.ts.map +1 -1
- package/dist/types/voltra/protocol/constants/ble-config.d.ts +16 -0
- package/dist/types/voltra/protocol/constants/ble-config.d.ts.map +1 -0
- package/dist/types/voltra/protocol/constants/connection-commands.d.ts +37 -0
- package/dist/types/voltra/protocol/constants/connection-commands.d.ts.map +1 -0
- package/dist/types/voltra/protocol/constants/enums.d.ts +72 -0
- package/dist/types/voltra/protocol/constants/enums.d.ts.map +1 -0
- package/dist/types/voltra/protocol/constants/index.d.ts +12 -0
- package/dist/types/voltra/protocol/constants/index.d.ts.map +1 -0
- package/dist/types/voltra/protocol/constants/message-types.d.ts +52 -0
- package/dist/types/voltra/protocol/constants/message-types.d.ts.map +1 -0
- package/dist/types/voltra/protocol/constants/timing.d.ts +18 -0
- package/dist/types/voltra/protocol/constants/timing.d.ts.map +1 -0
- package/dist/types/voltra/protocol/data/protocol-data.generated.d.ts +3 -0
- package/dist/types/voltra/protocol/data/protocol-data.generated.d.ts.map +1 -0
- package/dist/types/voltra/protocol/telemetry-decoder.d.ts +15 -2
- package/dist/types/voltra/protocol/telemetry-decoder.d.ts.map +1 -1
- package/dist/types/voltra/protocol/types.d.ts +247 -0
- package/dist/types/voltra/protocol/types.d.ts.map +1 -0
- package/package.json +9 -8
- package/dist/cjs/voltra/protocol/constants.js +0 -136
- package/dist/cjs/voltra/protocol/constants.js.map +0 -1
- package/dist/cjs/voltra/protocol/data/chains.json +0 -830
- package/dist/cjs/voltra/protocol/data/eccentric.json +0 -1598
- package/dist/cjs/voltra/protocol/data/protocol.json +0 -54
- package/dist/cjs/voltra/protocol/data/weights.json +0 -62
- package/dist/esm/voltra/protocol/constants.js +0 -130
- package/dist/esm/voltra/protocol/constants.js.map +0 -1
- package/dist/esm/voltra/protocol/data/chains.json +0 -830
- package/dist/esm/voltra/protocol/data/eccentric.json +0 -1598
- package/dist/esm/voltra/protocol/data/protocol.json +0 -54
- package/dist/esm/voltra/protocol/data/weights.json +0 -62
- package/dist/types/voltra/protocol/constants.d.ts +0 -103
- package/dist/types/voltra/protocol/constants.d.ts.map +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connection Commands
|
|
3
|
+
*
|
|
4
|
+
* Authentication, initialization, and workout control commands.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Device authentication identifiers.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Auth: {
|
|
10
|
+
/** Primary device identity */
|
|
11
|
+
readonly DEVICE_ID: Uint8Array<ArrayBufferLike>;
|
|
12
|
+
/** Alternative device identity */
|
|
13
|
+
readonly DEVICE_ID_IPAD: Uint8Array<ArrayBufferLike>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Device initialization sequence.
|
|
17
|
+
*/
|
|
18
|
+
export declare const Init: {
|
|
19
|
+
readonly SEQUENCE: Uint8Array<ArrayBufferLike>[];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Workout control commands.
|
|
23
|
+
*
|
|
24
|
+
* To start: set weight -> PREPARE -> SETUP -> GO
|
|
25
|
+
* To stop: STOP
|
|
26
|
+
*/
|
|
27
|
+
export declare const Workout: {
|
|
28
|
+
/** Prepare device for workout */
|
|
29
|
+
readonly PREPARE: Uint8Array<ArrayBufferLike>;
|
|
30
|
+
/** Configure workout mode */
|
|
31
|
+
readonly SETUP: Uint8Array<ArrayBufferLike>;
|
|
32
|
+
/** Start resistance/tracking */
|
|
33
|
+
readonly GO: Uint8Array<ArrayBufferLike>;
|
|
34
|
+
/** Stop resistance/tracking */
|
|
35
|
+
readonly STOP: Uint8Array<ArrayBufferLike>;
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=connection-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-commands.d.ts","sourceRoot":"","sources":["../../../../../src/voltra/protocol/constants/connection-commands.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH;;GAEG;AACH,eAAO,MAAM,IAAI;IACf,8BAA8B;;IAE9B,kCAAkC;;CAE1B,CAAC;AAMX;;GAEG;AACH,eAAO,MAAM,IAAI;;CAEP,CAAC;AAMX;;;;;GAKG;AACH,eAAO,MAAM,OAAO;IAClB,iCAAiC;;IAEjC,6BAA6B;;IAE7B,gCAAgC;;IAEhC,+BAA+B;;CAEvB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Protocol Enums
|
|
3
|
+
*
|
|
4
|
+
* Movement phases, training modes, and parameter IDs with
|
|
5
|
+
* their human-readable name maps.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Movement phase during workout.
|
|
9
|
+
* Values match protocol.json telemetry.phases.
|
|
10
|
+
*/
|
|
11
|
+
export declare enum MovementPhase {
|
|
12
|
+
IDLE = 0,// protocol.telemetry.phases.idle
|
|
13
|
+
CONCENTRIC = 1,// protocol.telemetry.phases.concentric - Pulling (muscle shortening)
|
|
14
|
+
HOLD = 2,// protocol.telemetry.phases.hold - Top of rep / transition
|
|
15
|
+
ECCENTRIC = 3,// protocol.telemetry.phases.eccentric - Releasing (muscle lengthening)
|
|
16
|
+
UNKNOWN = -1
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Human-readable phase names.
|
|
20
|
+
*/
|
|
21
|
+
export declare const PhaseNames: Record<MovementPhase, string>;
|
|
22
|
+
/**
|
|
23
|
+
* Parameter IDs for device commands.
|
|
24
|
+
* These identify which parameter is being set in 19-byte commands.
|
|
25
|
+
*/
|
|
26
|
+
export declare enum ParameterId {
|
|
27
|
+
/** Base weight setting */
|
|
28
|
+
BASE_WEIGHT = 34366,
|
|
29
|
+
/** Chains resistance */
|
|
30
|
+
CHAINS = 34622,
|
|
31
|
+
/** Eccentric adjustment */
|
|
32
|
+
ECCENTRIC = 34878,
|
|
33
|
+
/** Training mode */
|
|
34
|
+
TRAINING_MODE = 45135,
|
|
35
|
+
/** Inverse chains resistance */
|
|
36
|
+
INVERSE_CHAINS = 45139
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Human-readable parameter names.
|
|
40
|
+
*/
|
|
41
|
+
export declare const ParameterNames: Record<ParameterId, string>;
|
|
42
|
+
/**
|
|
43
|
+
* Training mode values for ParameterId.TRAINING_MODE.
|
|
44
|
+
* Values are 2-byte little-endian uint16.
|
|
45
|
+
*/
|
|
46
|
+
export declare enum TrainingMode {
|
|
47
|
+
/** Idle (0x0000) */
|
|
48
|
+
Idle = 0,
|
|
49
|
+
/** Weight Training (0x0001) */
|
|
50
|
+
WeightTraining = 1,
|
|
51
|
+
/** Resistance Band (0x0002) */
|
|
52
|
+
ResistanceBand = 2,
|
|
53
|
+
/** Rowing (0x0003) */
|
|
54
|
+
Rowing = 3,
|
|
55
|
+
/** Damper (0x0004) */
|
|
56
|
+
Damper = 4,
|
|
57
|
+
/** Custom Curves (0x0006) */
|
|
58
|
+
CustomCurves = 6,
|
|
59
|
+
/** Isokinetic (0x0007) */
|
|
60
|
+
Isokinetic = 7,
|
|
61
|
+
/** Isometric (0x0008) */
|
|
62
|
+
Isometric = 8
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Human-readable training mode names.
|
|
66
|
+
*/
|
|
67
|
+
export declare const TrainingModeNames: Record<TrainingMode, string>;
|
|
68
|
+
/**
|
|
69
|
+
* Valid training mode values (for validation).
|
|
70
|
+
*/
|
|
71
|
+
export declare const VALID_TRAINING_MODES: readonly TrainingMode[];
|
|
72
|
+
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../../src/voltra/protocol/constants/enums.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;;GAGG;AACH,oBAAY,aAAa;IACvB,IAAI,IAAI,CAAE,iCAAiC;IAC3C,UAAU,IAAI,CAAE,qEAAqE;IACrF,IAAI,IAAI,CAAE,2DAA2D;IACrE,SAAS,IAAI,CAAE,uEAAuE;IACtF,OAAO,KAAK;CACb;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAMpD,CAAC;AAMF;;;GAGG;AACH,oBAAY,WAAW;IACrB,0BAA0B;IAC1B,WAAW,QAAS;IACpB,wBAAwB;IACxB,MAAM,QAAS;IACf,2BAA2B;IAC3B,SAAS,QAAS;IAClB,oBAAoB;IACpB,aAAa,QAAS;IACtB,gCAAgC;IAChC,cAAc,QAAS;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAMtD,CAAC;AAMF;;;GAGG;AACH,oBAAY,YAAY;IACtB,oBAAoB;IACpB,IAAI,IAAS;IACb,+BAA+B;IAC/B,cAAc,IAAS;IACvB,+BAA+B;IAC/B,cAAc,IAAS;IACvB,sBAAsB;IACtB,MAAM,IAAS;IACf,sBAAsB;IACtB,MAAM,IAAS;IACf,6BAA6B;IAC7B,YAAY,IAAS;IACrB,0BAA0B;IAC1B,UAAU,IAAS;IACnB,yBAAyB;IACzB,SAAS,IAAS;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAS1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,YAAY,EAS9C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Protocol Constants
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all protocol constants from focused modules.
|
|
5
|
+
* Import from this barrel to keep existing import paths working.
|
|
6
|
+
*/
|
|
7
|
+
export { BLE } from './ble-config';
|
|
8
|
+
export { Timing } from './timing';
|
|
9
|
+
export { Auth, Init, Workout } from './connection-commands';
|
|
10
|
+
export { MessageTypes, TelemetryOffsets, NotificationConfigs, ParamIdHex, TrainingModeValues, } from './message-types';
|
|
11
|
+
export { MovementPhase, PhaseNames, ParameterId, ParameterNames, TrainingMode, TrainingModeNames, VALID_TRAINING_MODES, } from './enums';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/voltra/protocol/constants/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACV,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,UAAU,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Message Types & Telemetry Configuration
|
|
3
|
+
*
|
|
4
|
+
* Notification message identifiers, telemetry byte offsets,
|
|
5
|
+
* notification parsing configs, and parameter ID mappings.
|
|
6
|
+
* All values loaded from protocol.json for single source of truth.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Message type identifiers (first 4 bytes of notifications).
|
|
10
|
+
*/
|
|
11
|
+
export declare const MessageTypes: {
|
|
12
|
+
/** Real-time telemetry stream (~11 Hz) */
|
|
13
|
+
readonly TELEMETRY_STREAM: Uint8Array<ArrayBufferLike>;
|
|
14
|
+
/** Rep completion summary */
|
|
15
|
+
readonly REP_SUMMARY: Uint8Array<ArrayBufferLike>;
|
|
16
|
+
/** Set completion summary */
|
|
17
|
+
readonly SET_SUMMARY: Uint8Array<ArrayBufferLike>;
|
|
18
|
+
/** Status update */
|
|
19
|
+
readonly STATUS_UPDATE: Uint8Array<ArrayBufferLike>;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Byte offsets for parsing telemetry stream messages.
|
|
23
|
+
*/
|
|
24
|
+
export declare const TelemetryOffsets: {
|
|
25
|
+
readonly SEQUENCE: number;
|
|
26
|
+
readonly PHASE: number;
|
|
27
|
+
readonly POSITION: number;
|
|
28
|
+
readonly FORCE: number;
|
|
29
|
+
readonly VELOCITY: number;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Notification parsing configurations loaded from protocol.json.
|
|
33
|
+
* Used to parse various notification types from the device.
|
|
34
|
+
*/
|
|
35
|
+
export declare const NotificationConfigs: import("../types").NotificationsConfig;
|
|
36
|
+
/**
|
|
37
|
+
* Parameter IDs as hex strings (for matching in notifications).
|
|
38
|
+
*/
|
|
39
|
+
export declare const ParamIdHex: {
|
|
40
|
+
readonly BASE_WEIGHT: string;
|
|
41
|
+
readonly CHAINS: string;
|
|
42
|
+
readonly ECCENTRIC: string;
|
|
43
|
+
readonly TRAINING_MODE: string;
|
|
44
|
+
readonly INVERSE_CHAINS: string;
|
|
45
|
+
readonly UNKNOWN_893E: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Training mode values from protocol.json.
|
|
49
|
+
* These map to the TrainingMode enum values.
|
|
50
|
+
*/
|
|
51
|
+
export declare const TrainingModeValues: import("../types").TrainingModesConfig;
|
|
52
|
+
//# sourceMappingURL=message-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-types.d.ts","sourceRoot":"","sources":["../../../../../src/voltra/protocol/constants/message-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAYH;;GAEG;AACH,eAAO,MAAM,YAAY;IACvB,0CAA0C;;IAE1C,6BAA6B;;IAE7B,6BAA6B;;IAE7B,oBAAoB;;CAEZ,CAAC;AAMX;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;CAMnB,CAAC;AAMX;;;GAGG;AACH,eAAO,MAAM,mBAAmB,wCAAmC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;CAOb,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,kBAAkB,wCAAmC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Timing Configuration
|
|
3
|
+
*
|
|
4
|
+
* Delays and timeouts for device communication.
|
|
5
|
+
*/
|
|
6
|
+
export declare const Timing: {
|
|
7
|
+
/** Delay between init commands (ms) */
|
|
8
|
+
readonly INIT_COMMAND_DELAY_MS: 20;
|
|
9
|
+
/** Delay between dual commands like chains/eccentric (ms) */
|
|
10
|
+
readonly DUAL_COMMAND_DELAY_MS: 500;
|
|
11
|
+
/** Timeout for authentication response (ms) */
|
|
12
|
+
readonly AUTH_TIMEOUT_MS: 3000;
|
|
13
|
+
/** Minimum responses expected during auth */
|
|
14
|
+
readonly MIN_AUTH_RESPONSES: 2;
|
|
15
|
+
/** Minimum responses expected after commands */
|
|
16
|
+
readonly MIN_COMMAND_RESPONSES: 4;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=timing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timing.d.ts","sourceRoot":"","sources":["../../../../../src/voltra/protocol/constants/timing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,MAAM;IACjB,uCAAuC;;IAEvC,6DAA6D;;IAE7D,+CAA+C;;IAE/C,6CAA6C;;IAE7C,gDAAgD;;CAExC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol-data.generated.d.ts","sourceRoot":"","sources":["../../../../../src/voltra/protocol/data/protocol-data.generated.ts"],"names":[],"mappings":";AAIA,wBAEE"}
|
|
@@ -3,14 +3,18 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Low-level protocol decoder for Voltra BLE telemetry notifications.
|
|
5
5
|
* Only handles parsing bytes into typed data - no business logic.
|
|
6
|
+
* Uses offset-based lookups from protocol.json - no hardcoded byte positions.
|
|
6
7
|
*/
|
|
8
|
+
import { TrainingMode } from './constants';
|
|
7
9
|
import { type TelemetryFrame } from '../models/telemetry/frame';
|
|
10
|
+
import type { DeviceSettings } from './types';
|
|
8
11
|
/**
|
|
9
12
|
* Types of messages that can be decoded.
|
|
10
13
|
*/
|
|
11
|
-
export type MessageType = 'telemetry_stream' | 'rep_summary' | 'set_summary' | 'status_update' | 'unknown';
|
|
14
|
+
export type MessageType = 'telemetry_stream' | 'rep_summary' | 'set_summary' | 'status_update' | 'mode_confirmation' | 'multi_param' | 'settings_update' | 'device_init' | 'unknown';
|
|
12
15
|
/**
|
|
13
16
|
* Identify the message type from raw bytes.
|
|
17
|
+
* Uses header matching from protocol.json configurations.
|
|
14
18
|
*/
|
|
15
19
|
export declare function identifyMessageType(data: Uint8Array): MessageType;
|
|
16
20
|
/**
|
|
@@ -24,7 +28,16 @@ export type DecodeResult = {
|
|
|
24
28
|
} | {
|
|
25
29
|
type: 'set_boundary';
|
|
26
30
|
} | {
|
|
27
|
-
type: '
|
|
31
|
+
type: 'mode_confirmation';
|
|
32
|
+
mode: TrainingMode;
|
|
33
|
+
} | {
|
|
34
|
+
type: 'settings_update';
|
|
35
|
+
settings: DeviceSettings;
|
|
36
|
+
} | {
|
|
37
|
+
type: 'device_status';
|
|
38
|
+
battery: number;
|
|
39
|
+
} | {
|
|
40
|
+
type: 'unknown';
|
|
28
41
|
data: Uint8Array;
|
|
29
42
|
} | null;
|
|
30
43
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry-decoder.d.ts","sourceRoot":"","sources":["../../../../src/voltra/protocol/telemetry-decoder.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"telemetry-decoder.d.ts","sourceRoot":"","sources":["../../../../src/voltra/protocol/telemetry-decoder.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAML,YAAY,EAEb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA2C9C;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,kBAAkB,GAClB,aAAa,GACb,aAAa,GACb,eAAe,GACf,mBAAmB,GACnB,aAAa,GACb,iBAAiB,GACjB,aAAa,GACb,SAAS,CAAC;AAEd;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,CAgCjE;AAMD;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,cAAc,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,GACxB;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,GACxB;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,QAAQ,EAAE,cAAc,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GACrC,IAAI,CAAC;AAMT;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,GAAG,cAAc,GAAG,IAAI,CAuB5E;AAqGD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY,CA+BjE;AAMD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,GAAG,UAAU,CA0BtE"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript types for the consolidated protocol.json structure.
|
|
3
|
+
*
|
|
4
|
+
* These types define the shape of the public protocol data used for
|
|
5
|
+
* command lookup and notification parsing.
|
|
6
|
+
*/
|
|
7
|
+
import type { TrainingMode } from './constants';
|
|
8
|
+
/**
|
|
9
|
+
* Root protocol data structure.
|
|
10
|
+
*/
|
|
11
|
+
export interface ProtocolData {
|
|
12
|
+
/** Protocol version (semver) */
|
|
13
|
+
version: string;
|
|
14
|
+
/** BLE configuration */
|
|
15
|
+
ble: BleConfig;
|
|
16
|
+
/** Command definitions */
|
|
17
|
+
commands: CommandConfig;
|
|
18
|
+
/** Telemetry parsing configuration */
|
|
19
|
+
telemetry: TelemetryConfig;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* BLE service and characteristic UUIDs.
|
|
23
|
+
*/
|
|
24
|
+
export interface BleConfig {
|
|
25
|
+
/** Main service UUID for Voltra devices */
|
|
26
|
+
serviceUuid: string;
|
|
27
|
+
/** Characteristic UUID for receiving notifications */
|
|
28
|
+
notifyCharUuid: string;
|
|
29
|
+
/** Characteristic UUID for writing commands */
|
|
30
|
+
writeCharUuid: string;
|
|
31
|
+
/** Device name prefix for scanning (e.g., "VTR-") */
|
|
32
|
+
deviceNamePrefix: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* All command definitions.
|
|
36
|
+
*/
|
|
37
|
+
export interface CommandConfig {
|
|
38
|
+
/** Authentication commands */
|
|
39
|
+
auth: AuthCommands;
|
|
40
|
+
/** Initialization sequence */
|
|
41
|
+
init: string[];
|
|
42
|
+
/** Workout control commands */
|
|
43
|
+
workout: WorkoutCommands;
|
|
44
|
+
/** Training mode commands (mode name -> hex string) */
|
|
45
|
+
modes: ModeCommands;
|
|
46
|
+
/** Weight commands (lbs -> hex string) */
|
|
47
|
+
weights: Record<string, string>;
|
|
48
|
+
/** Chains commands (lbs -> hex string) */
|
|
49
|
+
chains: Record<string, string>;
|
|
50
|
+
/** Eccentric commands (value -> hex string) */
|
|
51
|
+
eccentric: Record<string, string>;
|
|
52
|
+
/** Inverse chains commands (lbs -> hex string) */
|
|
53
|
+
inverseChains: Record<string, string>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Training mode commands.
|
|
57
|
+
*/
|
|
58
|
+
export interface ModeCommands {
|
|
59
|
+
/** Idle mode (0x0000) */
|
|
60
|
+
idle: string;
|
|
61
|
+
/** Weight training mode (0x0001) */
|
|
62
|
+
weightTraining: string;
|
|
63
|
+
/** Resistance band mode (0x0002) */
|
|
64
|
+
resistanceBand: string;
|
|
65
|
+
/** Rowing mode (0x0003) */
|
|
66
|
+
rowing: string;
|
|
67
|
+
/** Damper mode (0x0004) */
|
|
68
|
+
damper: string;
|
|
69
|
+
/** Custom curves mode (0x0006) */
|
|
70
|
+
customCurves: string;
|
|
71
|
+
/** Isokinetic mode (0x0007) */
|
|
72
|
+
isokinetic: string;
|
|
73
|
+
/** Isometric mode (0x0008) */
|
|
74
|
+
isometric: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Authentication device IDs.
|
|
78
|
+
*/
|
|
79
|
+
export interface AuthCommands {
|
|
80
|
+
/** iPhone device ID (41-byte hex) */
|
|
81
|
+
iphone: string;
|
|
82
|
+
/** iPad device ID (41-byte hex) */
|
|
83
|
+
ipad: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Workout control commands.
|
|
87
|
+
*/
|
|
88
|
+
export interface WorkoutCommands {
|
|
89
|
+
/** Prepare for workout */
|
|
90
|
+
prepare: string;
|
|
91
|
+
/** Setup workout mode */
|
|
92
|
+
setup: string;
|
|
93
|
+
/** Start resistance (go) */
|
|
94
|
+
go: string;
|
|
95
|
+
/** Stop resistance */
|
|
96
|
+
stop: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Telemetry parsing configuration.
|
|
100
|
+
*/
|
|
101
|
+
export interface TelemetryConfig {
|
|
102
|
+
/** Message type identifiers (first 4 bytes) */
|
|
103
|
+
messageTypes: MessageTypeConfig;
|
|
104
|
+
/** Byte offsets for parsing telemetry stream */
|
|
105
|
+
offsets: OffsetConfig;
|
|
106
|
+
/** Movement phase values */
|
|
107
|
+
phases: PhaseConfig;
|
|
108
|
+
/** Notification type parsing configurations */
|
|
109
|
+
notifications: NotificationsConfig;
|
|
110
|
+
/** Known parameter IDs */
|
|
111
|
+
paramIds: ParamIdsConfig;
|
|
112
|
+
/** Training mode values */
|
|
113
|
+
trainingModes: TrainingModesConfig;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Message type header bytes (4-byte hex strings).
|
|
117
|
+
*/
|
|
118
|
+
export interface MessageTypeConfig {
|
|
119
|
+
/** Real-time telemetry stream (~11 Hz) */
|
|
120
|
+
stream: string;
|
|
121
|
+
/** Rep completion summary */
|
|
122
|
+
repSummary: string;
|
|
123
|
+
/** Set completion summary */
|
|
124
|
+
setSummary: string;
|
|
125
|
+
/** Status update */
|
|
126
|
+
statusUpdate: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Byte offsets for parsing telemetry stream messages.
|
|
130
|
+
*/
|
|
131
|
+
export interface OffsetConfig {
|
|
132
|
+
/** Sequence number (2 bytes, little-endian) */
|
|
133
|
+
sequence: number;
|
|
134
|
+
/** Movement phase (1 byte) */
|
|
135
|
+
phase: number;
|
|
136
|
+
/** Position (2 bytes, little-endian unsigned) */
|
|
137
|
+
position: number;
|
|
138
|
+
/** Force (2 bytes, little-endian signed) */
|
|
139
|
+
force: number;
|
|
140
|
+
/** Velocity (2 bytes, little-endian unsigned) */
|
|
141
|
+
velocity: number;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Movement phase byte values.
|
|
145
|
+
*/
|
|
146
|
+
export interface PhaseConfig {
|
|
147
|
+
/** Idle state */
|
|
148
|
+
idle: number;
|
|
149
|
+
/** Concentric phase (pulling/muscle shortening) */
|
|
150
|
+
concentric: number;
|
|
151
|
+
/** Hold phase (top of rep/transition) */
|
|
152
|
+
hold: number;
|
|
153
|
+
/** Eccentric phase (lowering/muscle lengthening) */
|
|
154
|
+
eccentric: number;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Configuration for parsing a specific notification type.
|
|
158
|
+
*/
|
|
159
|
+
export interface NotificationTypeConfig {
|
|
160
|
+
/** Header bytes to identify this notification type (hex string) */
|
|
161
|
+
header: string;
|
|
162
|
+
/** Expected message length in bytes */
|
|
163
|
+
length?: number;
|
|
164
|
+
/** Offset of parameter ID field */
|
|
165
|
+
paramIdOffset?: number;
|
|
166
|
+
/** Offset of value field */
|
|
167
|
+
valueOffset?: number;
|
|
168
|
+
/** Offset of integrity check value */
|
|
169
|
+
crcOffset?: number;
|
|
170
|
+
/** Offset of parameter count field (for multi-param messages) */
|
|
171
|
+
paramCountOffset?: number;
|
|
172
|
+
/** Offset of first parameter (for multi-param messages) */
|
|
173
|
+
firstParamOffset?: number;
|
|
174
|
+
/** Size of each param+value pair in bytes */
|
|
175
|
+
paramSize?: number;
|
|
176
|
+
/** Offset of battery level field */
|
|
177
|
+
batteryOffset?: number;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* All notification type configurations.
|
|
181
|
+
*/
|
|
182
|
+
export interface NotificationsConfig {
|
|
183
|
+
/** Mode change confirmation (0x12) */
|
|
184
|
+
modeConfirmation: NotificationTypeConfig;
|
|
185
|
+
/** Multi-parameter message (0x16) */
|
|
186
|
+
multiParam: NotificationTypeConfig;
|
|
187
|
+
/** Settings update with all parameters (0x2e) */
|
|
188
|
+
settingsUpdate: NotificationTypeConfig;
|
|
189
|
+
/** Device initialization info (0x23) */
|
|
190
|
+
deviceInit: NotificationTypeConfig;
|
|
191
|
+
/** Status/battery update (0x34) */
|
|
192
|
+
statusBattery: NotificationTypeConfig;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Known parameter IDs (hex strings, little-endian).
|
|
196
|
+
*/
|
|
197
|
+
export interface ParamIdsConfig {
|
|
198
|
+
/** Base weight parameter (0x863e) */
|
|
199
|
+
baseWeight: string;
|
|
200
|
+
/** Chains weight parameter (0x873e) */
|
|
201
|
+
chains: string;
|
|
202
|
+
/** Eccentric setting parameter (0x883e) */
|
|
203
|
+
eccentric: string;
|
|
204
|
+
/** Training mode parameter (0xb04f) */
|
|
205
|
+
trainingMode: string;
|
|
206
|
+
/** Inverse chains parameter (0xb053) */
|
|
207
|
+
inverseChains: string;
|
|
208
|
+
/** Unknown parameter observed in notifications */
|
|
209
|
+
unknown893e: string;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Training mode values.
|
|
213
|
+
*/
|
|
214
|
+
export interface TrainingModesConfig {
|
|
215
|
+
/** Idle state */
|
|
216
|
+
idle: number;
|
|
217
|
+
/** Weight training mode */
|
|
218
|
+
weightTraining: number;
|
|
219
|
+
/** Resistance band mode */
|
|
220
|
+
resistanceBand: number;
|
|
221
|
+
/** Rowing mode */
|
|
222
|
+
rowing: number;
|
|
223
|
+
/** Damper mode */
|
|
224
|
+
damper: number;
|
|
225
|
+
/** Custom curves mode */
|
|
226
|
+
customCurves: number;
|
|
227
|
+
/** Isokinetic mode */
|
|
228
|
+
isokinetic: number;
|
|
229
|
+
/** Isometric mode */
|
|
230
|
+
isometric: number;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Parsed device settings from notifications.
|
|
234
|
+
*/
|
|
235
|
+
export interface DeviceSettings {
|
|
236
|
+
/** Base weight in lbs */
|
|
237
|
+
baseWeight?: number;
|
|
238
|
+
/** Chains weight in lbs */
|
|
239
|
+
chains?: number;
|
|
240
|
+
/** Eccentric setting */
|
|
241
|
+
eccentric?: number;
|
|
242
|
+
/** Current training mode */
|
|
243
|
+
trainingMode?: TrainingMode;
|
|
244
|
+
/** Inverse chains setting */
|
|
245
|
+
inverseChains?: number;
|
|
246
|
+
}
|
|
247
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/voltra/protocol/types.ts"],"names":[],"mappings":"AAAA;;;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nB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,2BAA2B;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4BAA4B;IAC5B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,6BAA6B;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltras/node-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "SDK for connecting to and controlling Voltra fitness devices",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
45
45
|
"typecheck": "tsc --noEmit",
|
|
46
46
|
"docs:api": "typedoc --out docs/api src/index.ts",
|
|
47
|
+
"generate:protocol": "npx tsx ../voltra-private/generators/encode-protocol.ts",
|
|
47
48
|
"clean": "rm -rf dist",
|
|
48
49
|
"prepublishOnly": "npm run clean && npm run build && npm run test",
|
|
49
50
|
"prepare": "husky"
|
|
@@ -64,18 +65,18 @@
|
|
|
64
65
|
"webbluetooth": "^3.4.0"
|
|
65
66
|
},
|
|
66
67
|
"devDependencies": {
|
|
67
|
-
"@commitlint/cli": "^
|
|
68
|
-
"@commitlint/config-conventional": "^
|
|
69
|
-
"@types/node": "^
|
|
68
|
+
"@commitlint/cli": "^20.4.1",
|
|
69
|
+
"@commitlint/config-conventional": "^20.4.1",
|
|
70
|
+
"@types/node": "^25.2.3",
|
|
70
71
|
"@types/react": "^19.0.0",
|
|
71
72
|
"@types/web-bluetooth": "^0.0.21",
|
|
72
73
|
"@vitest/coverage-v8": "^4.0.0",
|
|
73
74
|
"eslint": "^9.18.0",
|
|
74
75
|
"husky": "^9.1.0",
|
|
75
|
-
"lint-staged": "^
|
|
76
|
+
"lint-staged": "^16.2.7",
|
|
76
77
|
"prettier": "^3.4.0",
|
|
77
|
-
"typedoc": "^0.
|
|
78
|
-
"typescript": "~5.
|
|
78
|
+
"typedoc": "^0.28.17",
|
|
79
|
+
"typescript": "~5.9.3",
|
|
79
80
|
"typescript-eslint": "^8.21.0",
|
|
80
81
|
"vitest": "^4.0.17"
|
|
81
82
|
},
|
|
@@ -106,6 +107,6 @@
|
|
|
106
107
|
"author": "Voltra",
|
|
107
108
|
"license": "MIT",
|
|
108
109
|
"engines": {
|
|
109
|
-
"node": ">=
|
|
110
|
+
"node": ">=20.0.0"
|
|
110
111
|
}
|
|
111
112
|
}
|