@onekeyfe/hd-core 0.2.44 → 0.2.45
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardanoGetAddress.d.ts","sourceRoot":"","sources":["../../../src/api/cardano/CardanoGetAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAU3C,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"CardanoGetAddress.d.ts","sourceRoot":"","sources":["../../../src/api/cardano/CardanoGetAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAU3C,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAG5F,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,UAAU,CAAC,uBAAuB,EAAE,CAAC;IAClF,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,IAAI;IAqCJ,eAAe;;;;;;;;IAWT,GAAG;CAmEV"}
|
package/dist/index.js
CHANGED
|
@@ -17347,11 +17347,13 @@ const modifyAddressParametersForBackwardsCompatibility = (address_parameters) =>
|
|
|
17347
17347
|
|
|
17348
17348
|
class CardanoGetAddress extends BaseMethod {
|
|
17349
17349
|
init() {
|
|
17350
|
-
var _a, _b;
|
|
17350
|
+
var _a, _b, _c;
|
|
17351
17351
|
this.checkDeviceId = true;
|
|
17352
17352
|
this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
|
|
17353
17353
|
this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
|
|
17354
|
-
this.isCheck =
|
|
17354
|
+
this.isCheck = this.hasBundle
|
|
17355
|
+
? !!((_b = this.payload) === null || _b === void 0 ? void 0 : _b.bundle.every((i) => !!i.isCheck))
|
|
17356
|
+
: !!((_c = this.payload) === null || _c === void 0 ? void 0 : _c.isCheck);
|
|
17355
17357
|
const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
|
|
17356
17358
|
this.params = payload.bundle.map((batch) => {
|
|
17357
17359
|
validateParams(batch, [
|
|
@@ -17403,7 +17405,7 @@ class CardanoGetAddress extends BaseMethod {
|
|
|
17403
17405
|
const publicKeyRes = yield this.device.commands.typedCall('CardanoGetPublicKey', 'CardanoPublicKey', {
|
|
17404
17406
|
address_n: address_parameters.address_n.slice(0, 3),
|
|
17405
17407
|
derivation_type,
|
|
17406
|
-
show_display,
|
|
17408
|
+
show_display: false,
|
|
17407
17409
|
});
|
|
17408
17410
|
xpub = publicKeyRes.message.xpub;
|
|
17409
17411
|
const stakeAddressRes = yield this.device.commands.typedCall('CardanoGetAddress', 'CardanoAddress', {
|
|
@@ -17415,7 +17417,7 @@ class CardanoGetAddress extends BaseMethod {
|
|
|
17415
17417
|
protocol_magic,
|
|
17416
17418
|
network_id,
|
|
17417
17419
|
derivation_type,
|
|
17418
|
-
show_display,
|
|
17420
|
+
show_display: false,
|
|
17419
17421
|
});
|
|
17420
17422
|
stakeAddress = stakeAddressRes.message.address;
|
|
17421
17423
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.45",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "OneKey",
|
|
6
6
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@onekeyfe/hd-shared": "^0.2.
|
|
28
|
-
"@onekeyfe/hd-transport": "^0.2.
|
|
27
|
+
"@onekeyfe/hd-shared": "^0.2.45",
|
|
28
|
+
"@onekeyfe/hd-transport": "^0.2.45",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"bignumber.js": "^9.0.2",
|
|
31
31
|
"bytebuffer": "^5.0.1",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"@types/semver": "^7.3.9",
|
|
44
44
|
"ripple-keypairs": "^1.1.4"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "d37564501697fb03f6388ec699ad884c8d5dd96a"
|
|
47
47
|
}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from './helper/addressParameters';
|
|
10
10
|
import { serializedPath } from '../helpers/pathUtils';
|
|
11
11
|
import { CardanoGetAddressParams, CardanoAddress } from '../../types/api/cardanoGetAddress';
|
|
12
|
+
import { CardanoGetAddressMethodParams } from '../../types';
|
|
12
13
|
|
|
13
14
|
export default class CardanoGetAddress extends BaseMethod<CardanoGetAddressParams[]> {
|
|
14
15
|
hasBundle?: boolean;
|
|
@@ -20,7 +21,9 @@ export default class CardanoGetAddress extends BaseMethod<CardanoGetAddressParam
|
|
|
20
21
|
this.notAllowDeviceMode = [...this.notAllowDeviceMode, UI_REQUEST.INITIALIZE];
|
|
21
22
|
|
|
22
23
|
this.hasBundle = !!this.payload?.bundle;
|
|
23
|
-
this.isCheck =
|
|
24
|
+
this.isCheck = this.hasBundle
|
|
25
|
+
? !!this.payload?.bundle.every((i: CardanoGetAddressMethodParams) => !!i.isCheck)
|
|
26
|
+
: !!this.payload?.isCheck;
|
|
24
27
|
const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
|
|
25
28
|
|
|
26
29
|
this.params = payload.bundle.map((batch: any) => {
|
|
@@ -84,7 +87,7 @@ export default class CardanoGetAddress extends BaseMethod<CardanoGetAddressParam
|
|
|
84
87
|
{
|
|
85
88
|
address_n: address_parameters.address_n.slice(0, 3),
|
|
86
89
|
derivation_type,
|
|
87
|
-
show_display,
|
|
90
|
+
show_display: false,
|
|
88
91
|
}
|
|
89
92
|
);
|
|
90
93
|
xpub = publicKeyRes.message.xpub;
|
|
@@ -101,7 +104,7 @@ export default class CardanoGetAddress extends BaseMethod<CardanoGetAddressParam
|
|
|
101
104
|
protocol_magic,
|
|
102
105
|
network_id,
|
|
103
106
|
derivation_type,
|
|
104
|
-
show_display,
|
|
107
|
+
show_display: false,
|
|
105
108
|
}
|
|
106
109
|
);
|
|
107
110
|
|