carbon-js-sdk 0.4.27 → 0.4.28
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.
|
@@ -12,6 +12,7 @@ declare class CosmosLedger {
|
|
|
12
12
|
private isReady;
|
|
13
13
|
connect(timeout?: number): Promise<this>;
|
|
14
14
|
disconnect(): Promise<void>;
|
|
15
|
+
getDeviceName(): Promise<any>;
|
|
15
16
|
getCosmosAppVersion(): Promise<string>;
|
|
16
17
|
isCosmosAppOpen(): Promise<void>;
|
|
17
18
|
getOpenApp(): Promise<any>;
|
|
@@ -146,6 +146,16 @@ class CosmosLedger {
|
|
|
146
146
|
yield this.cosmosApp.transport.close();
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
+
getDeviceName() {
|
|
150
|
+
var _a, _b;
|
|
151
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
152
|
+
const deviceName = yield ((_b = (_a = this.cosmosApp.transport) === null || _a === void 0 ? void 0 : _a.deviceModel) === null || _b === void 0 ? void 0 : _b.productName);
|
|
153
|
+
if (deviceName) {
|
|
154
|
+
return deviceName;
|
|
155
|
+
}
|
|
156
|
+
return undefined;
|
|
157
|
+
});
|
|
158
|
+
}
|
|
149
159
|
// returns the cosmos app version as a string like "1.1.0"
|
|
150
160
|
getCosmosAppVersion() {
|
|
151
161
|
return __awaiter(this, void 0, void 0, function* () {
|