@onekeyfe/hd-core 0.2.16 → 0.2.18
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/helper/cardanoInputs.d.ts.map +1 -1
- package/dist/api/device/DeviceUploadResource.d.ts.map +1 -1
- package/dist/api/evm/EVMGetAddress.d.ts.map +1 -1
- package/dist/api/evm/EVMGetPublicKey.d.ts.map +1 -1
- package/dist/api/evm/EVMSignMessage.d.ts.map +1 -1
- package/dist/api/evm/EVMSignTypedData.d.ts +1 -0
- package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -1
- package/dist/api/evm/EVMVerifyMessage.d.ts.map +1 -1
- package/dist/api/filecoin/FilecoinGetAddress.d.ts +17 -0
- package/dist/api/filecoin/FilecoinGetAddress.d.ts.map +1 -0
- package/dist/api/filecoin/FilecoinSignTransaction.d.ts +19 -0
- package/dist/api/filecoin/FilecoinSignTransaction.d.ts.map +1 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/stellar/StellarSignTransaction.d.ts.map +1 -1
- package/dist/index.d.ts +34 -3
- package/dist/index.js +433 -276
- package/dist/inject.d.ts.map +1 -1
- package/dist/types/api/cardano.d.ts.map +1 -1
- package/dist/types/api/evmGetAddress.d.ts +1 -0
- package/dist/types/api/evmGetAddress.d.ts.map +1 -1
- package/dist/types/api/evmGetPublicKey.d.ts +1 -0
- package/dist/types/api/evmGetPublicKey.d.ts.map +1 -1
- package/dist/types/api/evmSignMessage.d.ts +1 -0
- package/dist/types/api/evmSignMessage.d.ts.map +1 -1
- package/dist/types/api/evmSignTypedData.d.ts +1 -0
- package/dist/types/api/evmSignTypedData.d.ts.map +1 -1
- package/dist/types/api/evmVerifyMessage.d.ts +1 -0
- package/dist/types/api/evmVerifyMessage.d.ts.map +1 -1
- package/dist/types/api/export.d.ts +2 -0
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/types/api/filecoinGetAddress.d.ts +14 -0
- package/dist/types/api/filecoinGetAddress.d.ts.map +1 -0
- package/dist/types/api/filecoinSignTransaction.d.ts +14 -0
- package/dist/types/api/filecoinSignTransaction.d.ts.map +1 -0
- package/dist/types/api/index.d.ts +4 -0
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/dist/utils/patch.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/device/DeviceUploadResource.ts +6 -0
- package/src/api/evm/EVMGetAddress.ts +2 -0
- package/src/api/evm/EVMGetPublicKey.ts +2 -0
- package/src/api/evm/EVMSignMessage.ts +3 -1
- package/src/api/evm/EVMSignTypedData.ts +8 -3
- package/src/api/evm/EVMVerifyMessage.ts +2 -0
- package/src/api/filecoin/FilecoinGetAddress.ts +71 -0
- package/src/api/filecoin/FilecoinSignTransaction.ts +54 -0
- package/src/api/helpers/stringUtils.ts +1 -1
- package/src/api/index.ts +3 -0
- package/src/api/stellar/StellarSignTransaction.ts +5 -2
- package/src/api/xrp/XrpGetAddress.ts +1 -1
- package/src/api/xrp/XrpSignTransaction.ts +1 -1
- package/src/data/messages/messages.json +463 -419
- package/src/inject.ts +5 -0
- package/src/types/api/cardano.ts +0 -1
- package/src/types/api/evmGetAddress.ts +1 -0
- package/src/types/api/evmGetPublicKey.ts +1 -0
- package/src/types/api/evmSignMessage.ts +1 -0
- package/src/types/api/evmSignTypedData.ts +1 -0
- package/src/types/api/evmVerifyMessage.ts +1 -0
- package/src/types/api/export.ts +3 -0
- package/src/types/api/filecoinGetAddress.ts +23 -0
- package/src/types/api/filecoinSignTransaction.ts +23 -0
- package/src/types/api/index.ts +9 -0
- package/src/types/api/nearSignTransaction.ts +1 -1
- package/src/types/api/tronGetAddress.ts +2 -2
- package/src/types/api/tronSignTransaction.ts +1 -1
package/src/inject.ts
CHANGED
|
@@ -214,6 +214,11 @@ export const inject = ({
|
|
|
214
214
|
call({ ...params, connectId, deviceId, method: 'cardanoGetPublicKey' }),
|
|
215
215
|
cardanoSignTransaction: (connectId, deviceId, params) =>
|
|
216
216
|
call({ ...params, connectId, deviceId, method: 'cardanoSignTransaction' }),
|
|
217
|
+
|
|
218
|
+
filecoinGetAddress: (connectId, deviceId, params) =>
|
|
219
|
+
call({ ...params, connectId, deviceId, method: 'filecoinGetAddress' }),
|
|
220
|
+
filecoinSignTransaction: (connectId, deviceId, params) =>
|
|
221
|
+
call({ ...params, connectId, deviceId, method: 'filecoinSignTransaction' }),
|
|
217
222
|
};
|
|
218
223
|
return api;
|
|
219
224
|
};
|
package/src/types/api/cardano.ts
CHANGED
package/src/types/api/export.ts
CHANGED
|
@@ -118,3 +118,6 @@ export type {
|
|
|
118
118
|
} from './cardanoGetAddress';
|
|
119
119
|
|
|
120
120
|
export type { CardanoSignTransaction, CardanoSignedTxData } from './cardano';
|
|
121
|
+
|
|
122
|
+
export type { FilecoinAddress, FilecoinGetAddressParams } from './filecoinGetAddress';
|
|
123
|
+
export type { FilecoinSignTransactionParams, FilecoinSignedTx } from './filecoinSignTransaction';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FilecoinAddress as HardwareFilecoinAddress } from '@onekeyfe/hd-transport';
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
|
|
4
|
+
export type FilecoinAddress = {
|
|
5
|
+
path: string;
|
|
6
|
+
} & HardwareFilecoinAddress;
|
|
7
|
+
|
|
8
|
+
export type FilecoinGetAddressParams = {
|
|
9
|
+
path: string | number[];
|
|
10
|
+
showOnOneKey?: boolean;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export declare function filecoinGetAddress(
|
|
14
|
+
connectId: string,
|
|
15
|
+
deviceId: string,
|
|
16
|
+
params: CommonParams & FilecoinGetAddressParams
|
|
17
|
+
): Response<FilecoinAddress>;
|
|
18
|
+
|
|
19
|
+
export declare function filecoinGetAddress(
|
|
20
|
+
connectId: string,
|
|
21
|
+
deviceId: string,
|
|
22
|
+
params: CommonParams & { bundle?: FilecoinGetAddressParams[] }
|
|
23
|
+
): Response<Array<FilecoinAddress>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FilecoinSignedTx as HardwareFilecoinSignedTx } from '@onekeyfe/hd-transport';
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
|
|
4
|
+
export type FilecoinSignedTx = {
|
|
5
|
+
path: string;
|
|
6
|
+
} & HardwareFilecoinSignedTx;
|
|
7
|
+
|
|
8
|
+
export type FilecoinSignTransactionParams = {
|
|
9
|
+
path: string | number[];
|
|
10
|
+
rawTx?: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export declare function filecoinSignTransaction(
|
|
14
|
+
connectId: string,
|
|
15
|
+
deviceId: string,
|
|
16
|
+
params: CommonParams & FilecoinSignTransactionParams
|
|
17
|
+
): Response<FilecoinSignedTx>;
|
|
18
|
+
|
|
19
|
+
export declare function filecoinSignTransaction(
|
|
20
|
+
connectId: string,
|
|
21
|
+
deviceId: string,
|
|
22
|
+
params: CommonParams & { bundle?: FilecoinSignTransactionParams[] }
|
|
23
|
+
): Response<Array<FilecoinSignedTx>>;
|
package/src/types/api/index.ts
CHANGED
|
@@ -95,6 +95,9 @@ import { cardanoGetAddress } from './cardanoGetAddress';
|
|
|
95
95
|
import { cardanoGetPublicKey } from './cardanoGetPublicKey';
|
|
96
96
|
import { cardanoSignTransaction } from './cardanoSignTransaction';
|
|
97
97
|
|
|
98
|
+
import { filecoinGetAddress } from './filecoinGetAddress';
|
|
99
|
+
import { filecoinSignTransaction } from './filecoinSignTransaction';
|
|
100
|
+
|
|
98
101
|
export * from './export';
|
|
99
102
|
|
|
100
103
|
export type CoreApi = {
|
|
@@ -253,4 +256,10 @@ export type CoreApi = {
|
|
|
253
256
|
cardanoGetAddress: typeof cardanoGetAddress;
|
|
254
257
|
cardanoGetPublicKey: typeof cardanoGetPublicKey;
|
|
255
258
|
cardanoSignTransaction: typeof cardanoSignTransaction;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Filecoin function
|
|
262
|
+
*/
|
|
263
|
+
filecoinGetAddress: typeof filecoinGetAddress;
|
|
264
|
+
filecoinSignTransaction: typeof filecoinSignTransaction;
|
|
256
265
|
};
|
|
@@ -13,11 +13,11 @@ export type TronGetAddressParams = {
|
|
|
13
13
|
export declare function tronGetAddress(
|
|
14
14
|
connectId: string,
|
|
15
15
|
deviceId: string,
|
|
16
|
-
params: CommonParams & TronGetAddressParams
|
|
16
|
+
params: CommonParams & TronGetAddressParams
|
|
17
17
|
): Response<TronAddress>;
|
|
18
18
|
|
|
19
19
|
export declare function tronGetAddress(
|
|
20
20
|
connectId: string,
|
|
21
21
|
deviceId: string,
|
|
22
|
-
params: CommonParams & { bundle?: TronGetAddressParams[] }
|
|
22
|
+
params: CommonParams & { bundle?: TronGetAddressParams[] }
|
|
23
23
|
): Response<Array<TronAddress>>;
|
|
@@ -37,5 +37,5 @@ export type TronSignTransactionParams = {
|
|
|
37
37
|
export declare function tronSignTransaction(
|
|
38
38
|
connectId: string,
|
|
39
39
|
deviceId: string,
|
|
40
|
-
params: CommonParams & TronSignTransactionParams
|
|
40
|
+
params: CommonParams & TronSignTransactionParams
|
|
41
41
|
): Response<TronSignedTx>;
|