@onekeyfe/hd-core 0.2.14 → 0.2.15
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/data-manager/DataManager.d.ts.map +1 -1
- package/dist/index.d.ts +13 -2
- package/dist/index.js +4 -2
- package/dist/types/api/xrpSignTransaction.d.ts +15 -2
- package/dist/types/api/xrpSignTransaction.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/cardano/CardanoGetPublicKey.ts +1 -1
- package/src/data-manager/DataManager.ts +5 -1
- package/src/types/api/nearGetAddress.ts +2 -2
- package/src/types/api/xrpSignTransaction.ts +16 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataManager.d.ts","sourceRoot":"","sources":["../../src/data-manager/DataManager.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,SAAS,EAET,QAAQ,EACR,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAGlB,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,MAAM,CAAC,SAAS,EAAE,aAAa,CAiB7B;IAEF,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAAQ;IAEvC,MAAM,CAAC,QAAQ,EAAE,eAAe,CAAC;IAEjC,MAAM,CAAC,QAAQ,EAAE;QAAE,OAAO,EAAE,IAAI,CAAA;KAAE,CAEhC;IAEF,MAAM,CAAC,iBAAiB,aAAc,QAAQ,KAAG,qBAAqB,CAcpE;IAMF,MAAM,CAAC,4BAA4B,aAAc,QAAQ,+DAevD;IAMF,MAAM,CAAC,kBAAkB,aAAc,QAAQ,wBAS7C;IAEF,MAAM,CAAC,oBAAoB,aAAc,QAAQ;;;QAc/C;IAEF,MAAM,CAAC,wBAAwB,aAAc,QAAQ,yDAenD;IAEF,MAAM,CAAC,oBAAoB,aAAc,QAAQ,KAAG,wBAAwB,CAY1E;IAEF,MAAM,CAAC,u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C,EAAE,SAAS,GAAG,eAAe;IAEpD,MAAM,CAAC,WAAW,CAAC,CAAC,SAAS,MAAM,eAAe,EAAE,GAAG,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC;CAShF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1160,8 +1160,19 @@ declare type XrpSignTransactionResponse = {
|
|
|
1160
1160
|
serializedTx: string;
|
|
1161
1161
|
signature: string;
|
|
1162
1162
|
};
|
|
1163
|
-
declare type
|
|
1164
|
-
|
|
1163
|
+
declare type XrpPayment = {
|
|
1164
|
+
amount: string;
|
|
1165
|
+
destination: string;
|
|
1166
|
+
destinationTag?: number;
|
|
1167
|
+
};
|
|
1168
|
+
declare type XrpTransaction = {
|
|
1169
|
+
fee: string;
|
|
1170
|
+
flags?: number;
|
|
1171
|
+
sequence: number;
|
|
1172
|
+
maxLedgerVersion?: number;
|
|
1173
|
+
payment: XrpPayment;
|
|
1174
|
+
};
|
|
1175
|
+
declare function xrpSignTransaction(connectId: string, deviceId: string, params: CommonParams & XrpTransaction): Response<XrpSignTransactionResponse>;
|
|
1165
1176
|
|
|
1166
1177
|
declare type SuiAddress = {
|
|
1167
1178
|
path: string;
|
package/dist/index.js
CHANGED
|
@@ -11064,7 +11064,9 @@ class DataManager {
|
|
|
11064
11064
|
return __awaiter(this, void 0, void 0, function* () {
|
|
11065
11065
|
this.settings = settings;
|
|
11066
11066
|
try {
|
|
11067
|
-
const { data } = yield axios__default["default"].get(`https://data.onekey.so/config.json?noCache=${getTimeStamp()}
|
|
11067
|
+
const { data } = yield axios__default["default"].get(`https://data.onekey.so/config.json?noCache=${getTimeStamp()}`, {
|
|
11068
|
+
timeout: 7000,
|
|
11069
|
+
});
|
|
11068
11070
|
this.deviceMap = {
|
|
11069
11071
|
classic: data.classic,
|
|
11070
11072
|
mini: data.mini,
|
|
@@ -16925,7 +16927,7 @@ class CardanoGetPublicKey extends BaseMethod {
|
|
|
16925
16927
|
validateParams(batch, [
|
|
16926
16928
|
{ name: 'path', required: true },
|
|
16927
16929
|
{ name: 'derivationType', type: 'number' },
|
|
16928
|
-
{ name: '
|
|
16930
|
+
{ name: 'showOnOneKey', type: 'boolean' },
|
|
16929
16931
|
]);
|
|
16930
16932
|
const path = validatePath(batch.path, 3);
|
|
16931
16933
|
return {
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
import type { Messages } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { CommonParams, Response } from '../params';
|
|
3
|
+
export declare type XrpSignTransactionParams = Messages.RippleSignTx;
|
|
3
4
|
export declare type XrpSignTransactionResponse = {
|
|
4
5
|
serializedTx: string;
|
|
5
6
|
signature: string;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
declare type XrpPayment = {
|
|
9
|
+
amount: string;
|
|
10
|
+
destination: string;
|
|
11
|
+
destinationTag?: number;
|
|
12
|
+
};
|
|
13
|
+
declare type XrpTransaction = {
|
|
14
|
+
fee: string;
|
|
15
|
+
flags?: number;
|
|
16
|
+
sequence: number;
|
|
17
|
+
maxLedgerVersion?: number;
|
|
18
|
+
payment: XrpPayment;
|
|
19
|
+
};
|
|
20
|
+
export declare function xrpSignTransaction(connectId: string, deviceId: string, params: CommonParams & XrpTransaction): Response<XrpSignTransactionResponse>;
|
|
21
|
+
export {};
|
|
9
22
|
//# sourceMappingURL=xrpSignTransaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xrpSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/types/api/xrpSignTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,0BAA0B,GAAG;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"xrpSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/types/api/xrpSignTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,oBAAY,wBAAwB,GAAG,QAAQ,CAAC,YAAY,CAAC;AAE7D,oBAAY,0BAA0B,GAAG;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,aAAK,UAAU,GAAG;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,aAAK,cAAc,GAAG;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,YAAY,GAAG,cAAc,GACpC,QAAQ,CAAC,0BAA0B,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
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.15",
|
|
28
|
+
"@onekeyfe/hd-transport": "^0.2.15",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"bignumber.js": "^9.0.2",
|
|
31
31
|
"jszip": "^3.10.1",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"@types/semver": "^7.3.9",
|
|
43
43
|
"ripple-keypairs": "^1.1.4"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "81f195d70997b6875fee3c1f7f6d458e4223c78a"
|
|
46
46
|
}
|
|
@@ -22,7 +22,7 @@ export default class CardanoGetPublicKey extends BaseMethod<CardanoPublicKeyPara
|
|
|
22
22
|
validateParams(batch, [
|
|
23
23
|
{ name: 'path', required: true },
|
|
24
24
|
{ name: 'derivationType', type: 'number' },
|
|
25
|
-
{ name: '
|
|
25
|
+
{ name: 'showOnOneKey', type: 'boolean' },
|
|
26
26
|
]);
|
|
27
27
|
|
|
28
28
|
const path = validatePath(batch.path, 3);
|
|
@@ -177,7 +177,11 @@ export default class DataManager {
|
|
|
177
177
|
this.settings = settings;
|
|
178
178
|
try {
|
|
179
179
|
const { data } = await axios.get<RemoteConfigResponse>(
|
|
180
|
-
`https://data.onekey.so/config.json?noCache=${getTimeStamp()}
|
|
180
|
+
`https://data.onekey.so/config.json?noCache=${getTimeStamp()}`,
|
|
181
|
+
// because of iframe timeout is 10000
|
|
182
|
+
{
|
|
183
|
+
timeout: 7000,
|
|
184
|
+
}
|
|
181
185
|
);
|
|
182
186
|
this.deviceMap = {
|
|
183
187
|
classic: data.classic,
|
|
@@ -13,11 +13,11 @@ export type NearGetAddressParams = {
|
|
|
13
13
|
export declare function nearGetAddress(
|
|
14
14
|
connectId: string,
|
|
15
15
|
deviceId: string,
|
|
16
|
-
params: CommonParams & NearGetAddressParams
|
|
16
|
+
params: CommonParams & NearGetAddressParams
|
|
17
17
|
): Response<NearAddress>;
|
|
18
18
|
|
|
19
19
|
export declare function nearGetAddress(
|
|
20
20
|
connectId: string,
|
|
21
21
|
deviceId: string,
|
|
22
|
-
params: CommonParams & { bundle?: NearGetAddressParams[] }
|
|
22
|
+
params: CommonParams & { bundle?: NearGetAddressParams[] }
|
|
23
23
|
): Response<Array<NearAddress>>;
|
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
import type { Messages } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { CommonParams, Response } from '../params';
|
|
3
3
|
|
|
4
|
+
export type XrpSignTransactionParams = Messages.RippleSignTx;
|
|
5
|
+
|
|
4
6
|
export type XrpSignTransactionResponse = {
|
|
5
7
|
serializedTx: string;
|
|
6
8
|
signature: string;
|
|
7
9
|
};
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
type XrpPayment = {
|
|
12
|
+
amount: string;
|
|
13
|
+
destination: string;
|
|
14
|
+
destinationTag?: number;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
type XrpTransaction = {
|
|
18
|
+
fee: string;
|
|
19
|
+
flags?: number;
|
|
20
|
+
sequence: number;
|
|
21
|
+
maxLedgerVersion?: number; // Proto: "last_ledger_sequence"
|
|
22
|
+
payment: XrpPayment;
|
|
23
|
+
};
|
|
10
24
|
|
|
11
25
|
export declare function xrpSignTransaction(
|
|
12
26
|
connectId: string,
|
|
13
27
|
deviceId: string,
|
|
14
|
-
params: CommonParams &
|
|
28
|
+
params: CommonParams & XrpTransaction
|
|
15
29
|
): Response<XrpSignTransactionResponse>;
|