@onekeyfe/hd-core 1.1.22 → 1.1.23
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/dist/api/cardano/CardanoSignMessage.d.ts.map +1 -1
- package/dist/api/tron/TronSignMessage.d.ts +3 -0
- package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +9 -0
- package/dist/types/api/cardanoSignMessage.d.ts +2 -0
- package/dist/types/api/cardanoSignMessage.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/cardano/CardanoSignMessage.ts +2 -0
- package/src/api/tron/TronSignMessage.ts +3 -0
- package/src/data/messages/messages.json +4 -0
- package/src/types/api/cardanoSignMessage.ts +6 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardanoSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/cardano/CardanoSignMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAEnF,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU,CAAC,wBAAwB,CAAC;IAClF,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,IAAI;
|
|
1
|
+
{"version":3,"file":"CardanoSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/cardano/CardanoSignMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAEnF,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU,CAAC,wBAAwB,CAAC;IAClF,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,IAAI;IA6BJ,eAAe;;;;;IAQf,0BAA0B;;;;;IAQpB,GAAG;CAcV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TronSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/tron/TronSignMessage.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,KAAK,EAAE,eAAe,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEzF,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU,CAAC,uBAAuB,CAAC;IAC9E,IAAI;IA+BJ,eAAe;;;;;IAQf,wBAAwB
|
|
1
|
+
{"version":3,"file":"TronSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/tron/TronSignMessage.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,KAAK,EAAE,eAAe,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEzF,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU,CAAC,uBAAuB,CAAC;IAC9E,IAAI;IA+BJ,eAAe;;;;;IAQf,wBAAwB;;;;;;;;;;;;;;IAiBlB,GAAG;CAmBV"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1766,6 +1766,7 @@ type CardanoSignMessageParams = {
|
|
|
1766
1766
|
derivation_type: number;
|
|
1767
1767
|
network_id: number;
|
|
1768
1768
|
address_type: number;
|
|
1769
|
+
protocol_magic?: number;
|
|
1769
1770
|
};
|
|
1770
1771
|
type CardanoSignMessageMethodParams = {
|
|
1771
1772
|
path: string;
|
|
@@ -1773,6 +1774,7 @@ type CardanoSignMessageMethodParams = {
|
|
|
1773
1774
|
derivationType: number;
|
|
1774
1775
|
networkId: number;
|
|
1775
1776
|
addressType?: Messages.CardanoAddressType;
|
|
1777
|
+
protocolMagic?: number;
|
|
1776
1778
|
};
|
|
1777
1779
|
declare function cardanoSignMessage(connectId: string, deviceId: string, params: CommonParams & CardanoSignMessageMethodParams): Response<CardanoMessageSignature>;
|
|
1778
1780
|
|
package/dist/index.js
CHANGED
|
@@ -4412,6 +4412,10 @@ var nested$1 = {
|
|
|
4412
4412
|
address_type: {
|
|
4413
4413
|
type: "CardanoAddressType",
|
|
4414
4414
|
id: 5
|
|
4415
|
+
},
|
|
4416
|
+
protocol_magic: {
|
|
4417
|
+
type: "uint32",
|
|
4418
|
+
id: 6
|
|
4415
4419
|
}
|
|
4416
4420
|
}
|
|
4417
4421
|
},
|
|
@@ -34851,6 +34855,9 @@ class TronSignMessage extends BaseMethod {
|
|
|
34851
34855
|
classic1s: {
|
|
34852
34856
|
min: '3.13.0',
|
|
34853
34857
|
},
|
|
34858
|
+
classic: {
|
|
34859
|
+
min: '3.12.0',
|
|
34860
|
+
},
|
|
34854
34861
|
};
|
|
34855
34862
|
}
|
|
34856
34863
|
run() {
|
|
@@ -37074,6 +37081,7 @@ class CardanoSignMessage extends BaseMethod {
|
|
|
37074
37081
|
{ name: 'derivationType', type: 'number' },
|
|
37075
37082
|
{ name: 'networkId', type: 'number', required: true },
|
|
37076
37083
|
{ name: 'addressType', type: 'number' },
|
|
37084
|
+
{ name: 'protocolMagic', type: 'number' },
|
|
37077
37085
|
]);
|
|
37078
37086
|
const addressN = validatePath(payload.path, 3);
|
|
37079
37087
|
this.params = {
|
|
@@ -37084,6 +37092,7 @@ class CardanoSignMessage extends BaseMethod {
|
|
|
37084
37092
|
: hdTransport.Messages.CardanoDerivationType.ICARUS,
|
|
37085
37093
|
network_id: payload.networkId,
|
|
37086
37094
|
address_type: payload.addressType,
|
|
37095
|
+
protocol_magic: payload.protocolMagic,
|
|
37087
37096
|
};
|
|
37088
37097
|
}
|
|
37089
37098
|
getVersionRange() {
|
|
@@ -7,6 +7,7 @@ export type CardanoSignMessageParams = {
|
|
|
7
7
|
derivation_type: number;
|
|
8
8
|
network_id: number;
|
|
9
9
|
address_type: number;
|
|
10
|
+
protocol_magic?: number;
|
|
10
11
|
};
|
|
11
12
|
export type CardanoSignMessageMethodParams = {
|
|
12
13
|
path: string;
|
|
@@ -14,6 +15,7 @@ export type CardanoSignMessageMethodParams = {
|
|
|
14
15
|
derivationType: number;
|
|
15
16
|
networkId: number;
|
|
16
17
|
addressType?: PROTO.CardanoAddressType;
|
|
18
|
+
protocolMagic?: number;
|
|
17
19
|
};
|
|
18
20
|
export declare function cardanoSignMessage(connectId: string, deviceId: string, params: CommonParams & CardanoSignMessageMethodParams): Response<CardanoMessageSignature>;
|
|
19
21
|
//# sourceMappingURL=cardanoSignMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cardanoSignMessage.d.ts","sourceRoot":"","sources":["../../../src/types/api/cardanoSignMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"cardanoSignMessage.d.ts","sourceRoot":"","sources":["../../../src/types/api/cardanoSignMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC;IAKvC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,YAAY,GAAG,8BAA8B,GACpD,QAAQ,CAAC,uBAAuB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.23",
|
|
4
4
|
"description": "Core processes and APIs for communicating with OneKey hardware devices.",
|
|
5
5
|
"author": "OneKey",
|
|
6
6
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@onekeyfe/hd-shared": "1.1.
|
|
29
|
-
"@onekeyfe/hd-transport": "1.1.
|
|
28
|
+
"@onekeyfe/hd-shared": "1.1.23",
|
|
29
|
+
"@onekeyfe/hd-transport": "1.1.23",
|
|
30
30
|
"axios": "1.12.2",
|
|
31
31
|
"bignumber.js": "^9.0.2",
|
|
32
32
|
"bytebuffer": "^5.0.1",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"@types/w3c-web-usb": "^1.0.10",
|
|
45
45
|
"@types/web-bluetooth": "^0.0.21"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "eb24e6d66c84185b820a82b880c9707f3f548131"
|
|
48
48
|
}
|
|
@@ -22,6 +22,7 @@ export default class CardanoSignMessage extends BaseMethod<CardanoSignMessagePar
|
|
|
22
22
|
{ name: 'derivationType', type: 'number' },
|
|
23
23
|
{ name: 'networkId', type: 'number', required: true },
|
|
24
24
|
{ name: 'addressType', type: 'number' },
|
|
25
|
+
{ name: 'protocolMagic', type: 'number' },
|
|
25
26
|
]);
|
|
26
27
|
|
|
27
28
|
const addressN = validatePath(payload.path, 3);
|
|
@@ -35,6 +36,7 @@ export default class CardanoSignMessage extends BaseMethod<CardanoSignMessagePar
|
|
|
35
36
|
: PROTO.CardanoDerivationType.ICARUS,
|
|
36
37
|
network_id: payload.networkId,
|
|
37
38
|
address_type: payload.addressType,
|
|
39
|
+
protocol_magic: payload.protocolMagic,
|
|
38
40
|
};
|
|
39
41
|
}
|
|
40
42
|
|
|
@@ -8,6 +8,7 @@ export type CardanoSignMessageParams = {
|
|
|
8
8
|
derivation_type: number;
|
|
9
9
|
network_id: number;
|
|
10
10
|
address_type: number;
|
|
11
|
+
protocol_magic?: number;
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export type CardanoSignMessageMethodParams = {
|
|
@@ -16,6 +17,11 @@ export type CardanoSignMessageMethodParams = {
|
|
|
16
17
|
derivationType: number;
|
|
17
18
|
networkId: number;
|
|
18
19
|
addressType?: PROTO.CardanoAddressType;
|
|
20
|
+
/**
|
|
21
|
+
* Testnet cip34:0-1097911063
|
|
22
|
+
* Mainnet cip34:1-764824073
|
|
23
|
+
*/
|
|
24
|
+
protocolMagic?: number;
|
|
19
25
|
};
|
|
20
26
|
|
|
21
27
|
export declare function cardanoSignMessage(
|