@onekeyfe/hd-core 0.2.7 → 0.2.8
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/index.d.ts +3 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/sui/SuiGetAddress.d.ts +18 -0
- package/dist/api/sui/SuiGetAddress.d.ts.map +1 -0
- package/dist/api/sui/SuiGetPublicKey.d.ts +21 -0
- package/dist/api/sui/SuiGetPublicKey.d.ts.map +1 -0
- package/dist/api/sui/SuiSignTransaction.d.ts +15 -0
- package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -0
- package/dist/index.d.ts +41 -3
- package/dist/index.js +276 -2
- package/dist/inject.d.ts.map +1 -1
- package/dist/types/api/export.d.ts +3 -0
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +6 -0
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/suiGetAddress.d.ts +15 -0
- package/dist/types/api/suiGetAddress.d.ts.map +1 -0
- package/dist/types/api/suiGetPublicKey.d.ts +14 -0
- package/dist/types/api/suiGetPublicKey.d.ts.map +1 -0
- package/dist/types/api/suiSignTransaction.d.ts +11 -0
- package/dist/types/api/suiSignTransaction.d.ts.map +1 -0
- 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/index.ts +4 -0
- package/src/api/sui/SuiGetAddress.ts +97 -0
- package/src/api/sui/SuiGetPublicKey.ts +63 -0
- package/src/api/sui/SuiSignTransaction.ts +48 -0
- package/src/data/messages/messages.json +110 -1
- package/src/inject.ts +7 -0
- package/src/types/api/export.ts +4 -0
- package/src/types/api/index.ts +11 -0
- package/src/types/api/suiGetAddress.ts +24 -0
- package/src/types/api/suiGetPublicKey.ts +23 -0
- package/src/types/api/suiSignTransaction.ts +17 -0
package/dist/api/index.d.ts
CHANGED
|
@@ -66,4 +66,7 @@ export { default as cosmosGetPublicKey } from './cosmos/CosmosGetPublicKey';
|
|
|
66
66
|
export { default as cosmosSignTransaction } from './cosmos/CosmosSignTransaction';
|
|
67
67
|
export { default as xrpGetAddress } from './xrp/XrpGetAddress';
|
|
68
68
|
export { default as xrpSignTransaction } from './xrp/XrpSignTransaction';
|
|
69
|
+
export { default as suiGetAddress } from './sui/SuiGetAddress';
|
|
70
|
+
export { default as suiGetPublicKey } from './sui/SuiGetPublicKey';
|
|
71
|
+
export { default as suiSignTransaction } from './sui/SuiSignTransaction';
|
|
69
72
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,mCAAmC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OAAO,IAAI,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAE5E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAElF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEzE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SuiGetAddress as HardwareSuiGetAddress } from '@onekeyfe/hd-transport';
|
|
2
|
+
import { BaseMethod } from '../BaseMethod';
|
|
3
|
+
import { SuiAddress } from '../../types';
|
|
4
|
+
export default class SuiGetAddress extends BaseMethod<HardwareSuiGetAddress[]> {
|
|
5
|
+
hasBundle: boolean;
|
|
6
|
+
init(): void;
|
|
7
|
+
publicKeyToAddress(publicKey: string): string;
|
|
8
|
+
getVersionRange(): {
|
|
9
|
+
model_mini: {
|
|
10
|
+
min: string;
|
|
11
|
+
};
|
|
12
|
+
model_touch: {
|
|
13
|
+
min: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<SuiAddress | SuiAddress[]>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=SuiGetAddress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuiGetAddress.d.ts","sourceRoot":"","sources":["../../../src/api/sui/SuiGetAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAMhF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAuB,MAAM,aAAa,CAAC;AAI9D,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,UAAU,CAAC,qBAAqB,EAAE,CAAC;IAC5E,SAAS,UAAS;IAElB,IAAI;IA6BJ,kBAAkB,CAAC,SAAS,EAAE,MAAM;IASpC,eAAe;;;;;;;;IAWT,GAAG;CAgCV"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseMethod } from '../BaseMethod';
|
|
2
|
+
export default class SuiGetPublicKey extends BaseMethod<any> {
|
|
3
|
+
hasBundle: boolean;
|
|
4
|
+
init(): void;
|
|
5
|
+
getVersionRange(): {
|
|
6
|
+
model_mini: {
|
|
7
|
+
min: string;
|
|
8
|
+
};
|
|
9
|
+
model_touch: {
|
|
10
|
+
min: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<{
|
|
14
|
+
path: string;
|
|
15
|
+
publicKey: string;
|
|
16
|
+
} | {
|
|
17
|
+
path: string;
|
|
18
|
+
publicKey: string;
|
|
19
|
+
}[]>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=SuiGetPublicKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuiGetPublicKey.d.ts","sourceRoot":"","sources":["../../../src/api/sui/SuiGetPublicKey.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU,CAAC,GAAG,CAAC;IAC1D,SAAS,UAAS;IAElB,IAAI;IA6BJ,eAAe;;;;;;;;IAWT,GAAG;;;;;;;CAaV"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SuiSignTx as HardwareSuiSignTx } from '@onekeyfe/hd-transport';
|
|
2
|
+
import { BaseMethod } from '../BaseMethod';
|
|
3
|
+
export default class SuiSignTransaction extends BaseMethod<HardwareSuiSignTx> {
|
|
4
|
+
init(): void;
|
|
5
|
+
getVersionRange(): {
|
|
6
|
+
model_mini: {
|
|
7
|
+
min: string;
|
|
8
|
+
};
|
|
9
|
+
model_touch: {
|
|
10
|
+
min: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<import("@onekeyfe/hd-transport").SuiSignedTx>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=SuiSignTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuiSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/api/sui/SuiSignTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGxE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU,CAAC,iBAAiB,CAAC;IAC3E,IAAI;IAqBJ,eAAe;;;;;;;;IAWT,GAAG;CAOV"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import EventEmitter, { EventEmitter as EventEmitter$1 } from 'events';
|
|
2
2
|
import * as _onekeyfe_hd_transport from '@onekeyfe/hd-transport';
|
|
3
|
-
import { Messages, Success as Success$1, RecoveryDeviceType, SafetyCheckLevel, ResourceType, CipheredKeyValue as CipheredKeyValue$1, EthereumPublicKey, EthereumMessageSignature, Address, MultisigRedeemScriptType, InputScriptType, PublicKey, MessageSignature, PrevInput, TxOutputBinType, TxInput, TxOutputType, TxInputType, StarcoinAddress as StarcoinAddress$1, StarcoinPublicKey as StarcoinPublicKey$1, StarcoinMessageSignature, StarcoinSignedTx, NEMAddress as NEMAddress$1, NEMSignedTx, SolanaAddress as SolanaAddress$1, SolanaSignedTx as SolanaSignedTx$1, StellarAddress as StellarAddress$1, StellarSignedTx, TronAddress as TronAddress$1, UintType, TronSignedTx, TronMessageSignature, ConfluxAddress as ConfluxAddress$1, ConfluxMessageSignature, NearAddress as NearAddress$1, NearSignedTx, AptosAddress as AptosAddress$1, AptosMessageSignature as AptosMessageSignature$1, AptosSignedTx as AptosSignedTx$1, AlgorandAddress, AlgorandSignedTx, CosmosAddress as CosmosAddress$1, CosmosSignedTx as CosmosSignedTx$1, OneKeyDeviceInfo, Transport } from '@onekeyfe/hd-transport';
|
|
3
|
+
import { Messages, Success as Success$1, RecoveryDeviceType, SafetyCheckLevel, ResourceType, CipheredKeyValue as CipheredKeyValue$1, EthereumPublicKey, EthereumMessageSignature, Address, MultisigRedeemScriptType, InputScriptType, PublicKey, MessageSignature, PrevInput, TxOutputBinType, TxInput, TxOutputType, TxInputType, StarcoinAddress as StarcoinAddress$1, StarcoinPublicKey as StarcoinPublicKey$1, StarcoinMessageSignature, StarcoinSignedTx, NEMAddress as NEMAddress$1, NEMSignedTx, SolanaAddress as SolanaAddress$1, SolanaSignedTx as SolanaSignedTx$1, StellarAddress as StellarAddress$1, StellarSignedTx, TronAddress as TronAddress$1, UintType, TronSignedTx, TronMessageSignature, ConfluxAddress as ConfluxAddress$1, ConfluxMessageSignature, NearAddress as NearAddress$1, NearSignedTx, AptosAddress as AptosAddress$1, AptosMessageSignature as AptosMessageSignature$1, AptosSignedTx as AptosSignedTx$1, AlgorandAddress, AlgorandSignedTx, CosmosAddress as CosmosAddress$1, CosmosSignedTx as CosmosSignedTx$1, SuiAddress as SuiAddress$1, OneKeyDeviceInfo, Transport } from '@onekeyfe/hd-transport';
|
|
4
4
|
export { Messages as PROTO } from '@onekeyfe/hd-transport';
|
|
5
5
|
import { Deferred } from '@onekeyfe/hd-shared';
|
|
6
6
|
|
|
@@ -1163,6 +1163,41 @@ declare type XrpSignTransactionResponse = {
|
|
|
1163
1163
|
declare type XrpSignTransactionParams = Messages.RippleSignTx;
|
|
1164
1164
|
declare function xrpSignTransaction(connectId: string, deviceId: string, params: CommonParams & XrpSignTransactionParams): Response<XrpSignTransactionResponse>;
|
|
1165
1165
|
|
|
1166
|
+
declare type SuiAddress = {
|
|
1167
|
+
path: string;
|
|
1168
|
+
publicKey?: string;
|
|
1169
|
+
} & SuiAddress$1;
|
|
1170
|
+
declare type SuiGetAddressParams = {
|
|
1171
|
+
path: string | number[];
|
|
1172
|
+
showOnOneKey?: boolean;
|
|
1173
|
+
};
|
|
1174
|
+
declare function suiGetAddress(connectId: string, deviceId: string, params: CommonParams & SuiAddress$1): Response<SuiAddress>;
|
|
1175
|
+
declare function suiGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1176
|
+
bundle?: SuiAddress$1[];
|
|
1177
|
+
}): Response<Array<SuiAddress>>;
|
|
1178
|
+
|
|
1179
|
+
declare type SuiPublicKey = {
|
|
1180
|
+
path: string;
|
|
1181
|
+
publicKey: string;
|
|
1182
|
+
};
|
|
1183
|
+
declare type SuiGetPublicKeyParams = {
|
|
1184
|
+
path: string | number[];
|
|
1185
|
+
showOnOneKey?: boolean;
|
|
1186
|
+
};
|
|
1187
|
+
declare function suiGetPublicKey(connectId: string, deviceId: string, params: CommonParams & SuiGetPublicKeyParams): Response<SuiPublicKey>;
|
|
1188
|
+
declare function suiGetPublicKey(connectId: string, deviceId: string, params: CommonParams & {
|
|
1189
|
+
bundle?: SuiGetPublicKeyParams[];
|
|
1190
|
+
}): Response<Array<SuiPublicKey>>;
|
|
1191
|
+
|
|
1192
|
+
declare type SuiSignedTx = {
|
|
1193
|
+
path: string;
|
|
1194
|
+
} & AptosSignedTx$1;
|
|
1195
|
+
declare type SuiSignTransactionParams = {
|
|
1196
|
+
path: string | number[];
|
|
1197
|
+
rawTx?: string;
|
|
1198
|
+
};
|
|
1199
|
+
declare function suiSignTransaction(connectId: string, deviceId: string, params: CommonParams & SuiSignTransactionParams): Response<SuiSignedTx>;
|
|
1200
|
+
|
|
1166
1201
|
declare type CoreApi = {
|
|
1167
1202
|
init: typeof init$1;
|
|
1168
1203
|
on: typeof on;
|
|
@@ -1240,6 +1275,9 @@ declare type CoreApi = {
|
|
|
1240
1275
|
cosmosSignTransaction: typeof cosmosSignTransaction;
|
|
1241
1276
|
xrpGetAddress: typeof xrpGetAddress;
|
|
1242
1277
|
xrpSignTransaction: typeof xrpSignTransaction;
|
|
1278
|
+
suiGetAddress: typeof suiGetAddress;
|
|
1279
|
+
suiGetPublicKey: typeof suiGetPublicKey;
|
|
1280
|
+
suiSignTransaction: typeof suiSignTransaction;
|
|
1243
1281
|
};
|
|
1244
1282
|
|
|
1245
1283
|
declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
@@ -1705,7 +1743,7 @@ declare const normalizeVersionArray: (version: number[]) => number[];
|
|
|
1705
1743
|
declare const versionSplit: (version: string) => number[];
|
|
1706
1744
|
declare const versionCompare: (a: string | number[], b: string | number[]) => 0 | 1 | -1;
|
|
1707
1745
|
|
|
1708
|
-
declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"Address"> | TypedResponseMessage<"AptosMessagePayload"> | TypedResponseMessage<"BinanceInputOutput"> | TypedResponseMessage<"BinanceCoin"> | TypedResponseMessage<"HDNodePathType"> | TypedResponseMessage<"HDNodeType"> | TypedResponseMessage<"MultisigRedeemScriptType"> | TypedResponseMessage<"TxRequestDetailsType"> | TypedResponseMessage<"TxRequestSerializedType"> | TypedResponseMessage<"TxInputType"> | TypedResponseMessage<"TxOutputBinType"> | TypedResponseMessage<"TxOutputType"> | TypedResponseMessage<"TxAckInputWrapper"> | TypedResponseMessage<"TxAckOutputWrapper"> | TypedResponseMessage<"PrevTx"> | TypedResponseMessage<"TxAckPrevInputWrapper"> | TypedResponseMessage<"PrevInput"> | TypedResponseMessage<"TxAckPrevOutputWrapper"> | TypedResponseMessage<"PrevOutput"> | TypedResponseMessage<"TxAckPrevExtraDataWrapper"> | TypedResponseMessage<"BIP32Address"> | TypedResponseMessage<"CardanoNativeScript"> | TypedResponseMessage<"CardanoBlockchainPointerType"> | TypedResponseMessage<"CardanoAddressParametersType"> | TypedResponseMessage<"CardanoPoolOwner"> | TypedResponseMessage<"CardanoPoolRelayParameters"> | TypedResponseMessage<"CardanoPoolMetadataType"> | TypedResponseMessage<"CardanoPoolParametersType"> | TypedResponseMessage<"CardanoCatalystRegistrationParametersType"> | TypedResponseMessage<"CardanoTxInputType"> | TypedResponseMessage<"CardanoTxOutputType"> | TypedResponseMessage<"CardanoTxCertificateType"> | TypedResponseMessage<"CardanoTxWithdrawalType"> | TypedResponseMessage<"CardanoTxAuxiliaryDataType"> | TypedResponseMessage<"CardanoAssetGroupType"> | TypedResponseMessage<"CardanoTokenType"> | TypedResponseMessage<"IdentityType"> | TypedResponseMessage<"Path"> | TypedResponseMessage<"EosTxHeader"> | TypedResponseMessage<"EosActionCommon"> | TypedResponseMessage<"EosActionTransfer"> | TypedResponseMessage<"EosActionDelegate"> | TypedResponseMessage<"EosActionUndelegate"> | TypedResponseMessage<"EosActionRefund"> | TypedResponseMessage<"EosActionBuyRam"> | TypedResponseMessage<"EosActionBuyRamBytes"> | TypedResponseMessage<"EosActionSellRam"> | TypedResponseMessage<"EosActionVoteProducer"> | TypedResponseMessage<"EosActionUpdateAuth"> | TypedResponseMessage<"EosActionDeleteAuth"> | TypedResponseMessage<"EosActionLinkAuth"> | TypedResponseMessage<"EosActionUnlinkAuth"> | TypedResponseMessage<"EosActionNewAccount"> | TypedResponseMessage<"EosActionUnknown"> | TypedResponseMessage<"EosPermissionLevel"> | TypedResponseMessage<"EosAuthorizationKey"> | TypedResponseMessage<"EosAuthorizationAccount"> | TypedResponseMessage<"EosAuthorizationWait"> | TypedResponseMessage<"EosAsset"> | TypedResponseMessage<"EosAuthorization"> | TypedResponseMessage<"EthereumStructMember"> | TypedResponseMessage<"EthereumFieldType"> | TypedResponseMessage<"EthereumAccessList"> | TypedResponseMessage<"NEMTransactionCommon"> | TypedResponseMessage<"NEMTransfer"> | TypedResponseMessage<"NEMProvisionNamespace"> | TypedResponseMessage<"NEMMosaicCreation"> | TypedResponseMessage<"NEMMosaicSupplyChange"> | TypedResponseMessage<"NEMAggregateModification"> | TypedResponseMessage<"NEMImportanceTransfer"> | TypedResponseMessage<"NEMMosaic"> | TypedResponseMessage<"NEMMosaicDefinition"> | TypedResponseMessage<"NEMCosignatoryModification"> | TypedResponseMessage<"RipplePayment"> | TypedResponseMessage<"StellarAsset"> | TypedResponseMessage<"TezosRevealOp"> | TypedResponseMessage<"TezosTransactionOp"> | TypedResponseMessage<"TezosOriginationOp"> | TypedResponseMessage<"TezosDelegationOp"> | TypedResponseMessage<"TezosProposalOp"> | TypedResponseMessage<"TezosBallotOp"> | TypedResponseMessage<"TezosContractID"> | TypedResponseMessage<"TezosParametersManager"> | TypedResponseMessage<"TezosManagerTransfer"> | TypedResponseMessage<"TronContract"> | TypedResponseMessage<"TronTransferContract"> | TypedResponseMessage<"TronTriggerSmartContract"> | TypedResponseMessage<"AlgorandGetAddress"> | TypedResponseMessage<"AlgorandAddress"> | TypedResponseMessage<"AlgorandSignTx"> | TypedResponseMessage<"AlgorandSignedTx"> | TypedResponseMessage<"AptosGetAddress"> | TypedResponseMessage<"AptosAddress"> | TypedResponseMessage<"AptosSignTx"> | TypedResponseMessage<"AptosSignedTx"> | TypedResponseMessage<"AptosSignMessage"> | TypedResponseMessage<"AptosMessageSignature"> | TypedResponseMessage<"BinanceGetAddress"> | TypedResponseMessage<"BinanceAddress"> | TypedResponseMessage<"BinanceGetPublicKey"> | TypedResponseMessage<"BinancePublicKey"> | TypedResponseMessage<"BinanceSignTx"> | TypedResponseMessage<"BinanceTxRequest"> | TypedResponseMessage<"BinanceTransferMsg"> | TypedResponseMessage<"BinanceOrderMsg"> | TypedResponseMessage<"BinanceCancelMsg"> | TypedResponseMessage<"BinanceSignedTx"> | TypedResponseMessage<"GetPublicKey"> | TypedResponseMessage<"PublicKey"> | TypedResponseMessage<"GetAddress"> | TypedResponseMessage<"GetOwnershipId"> | TypedResponseMessage<"OwnershipId"> | TypedResponseMessage<"SignMessage"> | TypedResponseMessage<"MessageSignature"> | TypedResponseMessage<"VerifyMessage"> | TypedResponseMessage<"SignTx"> | TypedResponseMessage<"TxRequest"> | TypedResponseMessage<"TxAck"> | TypedResponseMessage<"TxAckInput"> | TypedResponseMessage<"TxAckOutput"> | TypedResponseMessage<"TxAckPrevMeta"> | TypedResponseMessage<"TxAckPrevInput"> | TypedResponseMessage<"TxAckPrevOutput"> | TypedResponseMessage<"TxAckPrevExtraData"> | TypedResponseMessage<"GetOwnershipProof"> | TypedResponseMessage<"OwnershipProof"> | TypedResponseMessage<"AuthorizeCoinJoin"> | TypedResponseMessage<"GetPublicKeyMultiple"> | TypedResponseMessage<"PublicKeyMultiple"> | TypedResponseMessage<"FirmwareErase"> | TypedResponseMessage<"FirmwareRequest"> | TypedResponseMessage<"FirmwareUpload"> | TypedResponseMessage<"SelfTest"> | TypedResponseMessage<"FirmwareErase_ex"> | TypedResponseMessage<"CardanoGetNativeScriptHash"> | TypedResponseMessage<"CardanoNativeScriptHash"> | TypedResponseMessage<"CardanoGetAddress"> | TypedResponseMessage<"CardanoAddress"> | TypedResponseMessage<"CardanoGetPublicKey"> | TypedResponseMessage<"CardanoPublicKey"> | TypedResponseMessage<"CardanoSignTxInit"> | TypedResponseMessage<"CardanoTxInput"> | TypedResponseMessage<"CardanoTxOutput"> | TypedResponseMessage<"CardanoAssetGroup"> | TypedResponseMessage<"CardanoToken"> | TypedResponseMessage<"CardanoTxCertificate"> | TypedResponseMessage<"CardanoTxWithdrawal"> | TypedResponseMessage<"CardanoTxAuxiliaryData"> | TypedResponseMessage<"CardanoTxMint"> | TypedResponseMessage<"CardanoTxItemAck"> | TypedResponseMessage<"CardanoTxAuxiliaryDataSupplement"> | TypedResponseMessage<"CardanoTxWitnessRequest"> | TypedResponseMessage<"CardanoTxWitnessResponse"> | TypedResponseMessage<"CardanoTxHostAck"> | TypedResponseMessage<"CardanoTxBodyHash"> | TypedResponseMessage<"CardanoSignTxFinished"> | TypedResponseMessage<"CardanoPoolOwnerType"> | TypedResponseMessage<"CardanoPoolRelayParametersType"> | TypedResponseMessage<"CardanoSignTx"> | TypedResponseMessage<"CardanoSignedTxChunk"> | TypedResponseMessage<"CardanoSignedTxChunkAck"> | TypedResponseMessage<"CardanoSignedTx"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"Failure"> | TypedResponseMessage<"ButtonRequest"> | TypedResponseMessage<"ButtonAck"> | TypedResponseMessage<"PinMatrixRequest"> | TypedResponseMessage<"PinMatrixAck"> | TypedResponseMessage<"PassphraseRequest"> | TypedResponseMessage<"PassphraseAck"> | TypedResponseMessage<"Deprecated_PassphraseStateRequest"> | TypedResponseMessage<"Deprecated_PassphraseStateAck"> | TypedResponseMessage<"BixinPinInputOnDevice"> | TypedResponseMessage<"ConfluxGetAddress"> | TypedResponseMessage<"ConfluxAddress"> | TypedResponseMessage<"ConfluxSignTx"> | TypedResponseMessage<"ConfluxTxRequest"> | TypedResponseMessage<"ConfluxTxAck"> | TypedResponseMessage<"ConfluxSignMessage"> | TypedResponseMessage<"ConfluxMessageSignature"> | TypedResponseMessage<"ConfluxSignMessageCIP23"> | TypedResponseMessage<"CosmosGetAddress"> | TypedResponseMessage<"CosmosAddress"> | TypedResponseMessage<"CosmosSignTx"> | TypedResponseMessage<"CosmosSignedTx"> | TypedResponseMessage<"CipherKeyValue"> | TypedResponseMessage<"CipheredKeyValue"> | TypedResponseMessage<"SignIdentity"> | TypedResponseMessage<"SignedIdentity"> | TypedResponseMessage<"GetECDHSessionKey"> | TypedResponseMessage<"ECDHSessionKey"> | TypedResponseMessage<"BatchGetPublickeys"> | TypedResponseMessage<"EcdsaPublicKeys"> | TypedResponseMessage<"EosGetPublicKey"> | TypedResponseMessage<"EosPublicKey"> | TypedResponseMessage<"EosSignTx"> | TypedResponseMessage<"EosTxActionRequest"> | TypedResponseMessage<"EosTxActionAck"> | TypedResponseMessage<"EosSignedTx"> | TypedResponseMessage<"EthereumSignTypedData"> | TypedResponseMessage<"EthereumTypedDataStructRequest"> | TypedResponseMessage<"EthereumTypedDataStructAck"> | TypedResponseMessage<"EthereumTypedDataValueRequest"> | TypedResponseMessage<"EthereumTypedDataValueAck"> | TypedResponseMessage<"EthereumGetPublicKey"> | TypedResponseMessage<"EthereumPublicKey"> | TypedResponseMessage<"EthereumGetAddress"> | TypedResponseMessage<"EthereumAddress"> | TypedResponseMessage<"EthereumSignTx"> | TypedResponseMessage<"EthereumSignTxEIP1559"> | TypedResponseMessage<"EthereumTxRequest"> | TypedResponseMessage<"EthereumTxAck"> | TypedResponseMessage<"EthereumSignMessage"> | TypedResponseMessage<"EthereumMessageSignature"> | TypedResponseMessage<"EthereumVerifyMessage"> | TypedResponseMessage<"EthereumSignMessageEIP712"> | TypedResponseMessage<"EthereumSignTypedHash"> | TypedResponseMessage<"EthereumTypedDataSignature"> | TypedResponseMessage<"Initialize"> | TypedResponseMessage<"GetFeatures"> | TypedResponseMessage<"Features"> | TypedResponseMessage<"LockDevice"> | TypedResponseMessage<"EndSession"> | TypedResponseMessage<"ApplySettings"> | TypedResponseMessage<"ApplyFlags"> | TypedResponseMessage<"ChangePin"> | TypedResponseMessage<"ChangeWipeCode"> | TypedResponseMessage<"SdProtect"> | TypedResponseMessage<"Ping"> | TypedResponseMessage<"Cancel"> | TypedResponseMessage<"GetEntropy"> | TypedResponseMessage<"Entropy"> | TypedResponseMessage<"WipeDevice"> | TypedResponseMessage<"ResetDevice"> | TypedResponseMessage<"BackupDevice"> | TypedResponseMessage<"EntropyRequest"> | TypedResponseMessage<"EntropyAck"> | TypedResponseMessage<"RecoveryDevice"> | TypedResponseMessage<"WordRequest"> | TypedResponseMessage<"WordAck"> | TypedResponseMessage<"SetU2FCounter"> | TypedResponseMessage<"GetNextU2FCounter"> | TypedResponseMessage<"NextU2FCounter"> | TypedResponseMessage<"DoPreauthorized"> | TypedResponseMessage<"PreauthorizedRequest"> | TypedResponseMessage<"CancelAuthorization"> | TypedResponseMessage<"BixinSeedOperate"> | TypedResponseMessage<"BixinMessageSE"> | TypedResponseMessage<"BixinOutMessageSE"> | TypedResponseMessage<"DeviceBackToBoot"> | TypedResponseMessage<"BixinBackupRequest"> | TypedResponseMessage<"BixinBackupAck"> | TypedResponseMessage<"BixinRestoreRequest"> | TypedResponseMessage<"BixinRestoreAck"> | TypedResponseMessage<"BixinVerifyDeviceRequest"> | TypedResponseMessage<"BixinVerifyDeviceAck"> | TypedResponseMessage<"BixinWhiteListRequest"> | TypedResponseMessage<"BixinWhiteListAck"> | TypedResponseMessage<"BixinLoadDevice"> | TypedResponseMessage<"BixinBackupDevice"> | TypedResponseMessage<"BixinBackupDeviceAck"> | TypedResponseMessage<"DeviceInfoSettings"> | TypedResponseMessage<"GetDeviceInfo"> | TypedResponseMessage<"DeviceInfo"> | TypedResponseMessage<"ReadSEPublicKey"> | TypedResponseMessage<"SEPublicKey"> | TypedResponseMessage<"WriteSEPublicCert"> | TypedResponseMessage<"ReadSEPublicCert"> | TypedResponseMessage<"SEPublicCert"> | TypedResponseMessage<"SpiFlashWrite"> | TypedResponseMessage<"SpiFlashRead"> | TypedResponseMessage<"SpiFlashData"> | TypedResponseMessage<"SESignMessage"> | TypedResponseMessage<"SEMessageSignature"> | TypedResponseMessage<"ResourceUpload"> | TypedResponseMessage<"ZoomRequest"> | TypedResponseMessage<"ResourceRequest"> | TypedResponseMessage<"ResourceAck"> | TypedResponseMessage<"ResourceUpdate"> | TypedResponseMessage<"NFTWriteInfo"> | TypedResponseMessage<"NFTWriteData"> | TypedResponseMessage<"RebootToBootloader"> | TypedResponseMessage<"NearGetAddress"> | TypedResponseMessage<"NearAddress"> | TypedResponseMessage<"NearSignTx"> | TypedResponseMessage<"NearSignedTx"> | TypedResponseMessage<"NEMGetAddress"> | TypedResponseMessage<"NEMAddress"> | TypedResponseMessage<"NEMSignTx"> | TypedResponseMessage<"NEMSignedTx"> | TypedResponseMessage<"NEMDecryptMessage"> | TypedResponseMessage<"NEMDecryptedMessage"> | TypedResponseMessage<"RippleGetAddress"> | TypedResponseMessage<"RippleAddress"> | TypedResponseMessage<"RippleSignTx"> | TypedResponseMessage<"RippleSignedTx"> | TypedResponseMessage<"SolanaGetAddress"> | TypedResponseMessage<"SolanaAddress"> | TypedResponseMessage<"SolanaSignTx"> | TypedResponseMessage<"SolanaSignedTx"> | TypedResponseMessage<"StarcoinGetAddress"> | TypedResponseMessage<"StarcoinAddress"> | TypedResponseMessage<"StarcoinGetPublicKey"> | TypedResponseMessage<"StarcoinPublicKey"> | TypedResponseMessage<"StarcoinSignTx"> | TypedResponseMessage<"StarcoinSignedTx"> | TypedResponseMessage<"StarcoinSignMessage"> | TypedResponseMessage<"StarcoinMessageSignature"> | TypedResponseMessage<"StarcoinVerifyMessage"> | TypedResponseMessage<"StellarGetAddress"> | TypedResponseMessage<"StellarAddress"> | TypedResponseMessage<"StellarSignTx"> | TypedResponseMessage<"StellarTxOpRequest"> | TypedResponseMessage<"StellarPaymentOp"> | TypedResponseMessage<"StellarCreateAccountOp"> | TypedResponseMessage<"StellarPathPaymentStrictReceiveOp"> | TypedResponseMessage<"StellarPathPaymentStrictSendOp"> | TypedResponseMessage<"StellarManageSellOfferOp"> | TypedResponseMessage<"StellarManageBuyOfferOp"> | TypedResponseMessage<"StellarCreatePassiveSellOfferOp"> | TypedResponseMessage<"StellarSetOptionsOp"> | TypedResponseMessage<"StellarChangeTrustOp"> | TypedResponseMessage<"StellarAllowTrustOp"> | TypedResponseMessage<"StellarAccountMergeOp"> | TypedResponseMessage<"StellarManageDataOp"> | TypedResponseMessage<"StellarBumpSequenceOp"> | TypedResponseMessage<"StellarSignedTx"> | TypedResponseMessage<"TezosGetAddress"> | TypedResponseMessage<"TezosAddress"> | TypedResponseMessage<"TezosGetPublicKey"> | TypedResponseMessage<"TezosPublicKey"> | TypedResponseMessage<"TezosSignTx"> | TypedResponseMessage<"TezosSignedTx"> | TypedResponseMessage<"TronGetAddress"> | TypedResponseMessage<"TronAddress"> | TypedResponseMessage<"TronSignTx"> | TypedResponseMessage<"TronSignedTx"> | TypedResponseMessage<"TronSignMessage"> | TypedResponseMessage<"TronMessageSignature"> | TypedResponseMessage<"facotry">;
|
|
1746
|
+
declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"Address"> | TypedResponseMessage<"AptosMessagePayload"> | TypedResponseMessage<"BinanceInputOutput"> | TypedResponseMessage<"BinanceCoin"> | TypedResponseMessage<"HDNodePathType"> | TypedResponseMessage<"HDNodeType"> | TypedResponseMessage<"MultisigRedeemScriptType"> | TypedResponseMessage<"TxRequestDetailsType"> | TypedResponseMessage<"TxRequestSerializedType"> | TypedResponseMessage<"TxInputType"> | TypedResponseMessage<"TxOutputBinType"> | TypedResponseMessage<"TxOutputType"> | TypedResponseMessage<"TxAckInputWrapper"> | TypedResponseMessage<"TxAckOutputWrapper"> | TypedResponseMessage<"PrevTx"> | TypedResponseMessage<"TxAckPrevInputWrapper"> | TypedResponseMessage<"PrevInput"> | TypedResponseMessage<"TxAckPrevOutputWrapper"> | TypedResponseMessage<"PrevOutput"> | TypedResponseMessage<"TxAckPrevExtraDataWrapper"> | TypedResponseMessage<"BIP32Address"> | TypedResponseMessage<"CardanoNativeScript"> | TypedResponseMessage<"CardanoBlockchainPointerType"> | TypedResponseMessage<"CardanoAddressParametersType"> | TypedResponseMessage<"CardanoPoolOwner"> | TypedResponseMessage<"CardanoPoolRelayParameters"> | TypedResponseMessage<"CardanoPoolMetadataType"> | TypedResponseMessage<"CardanoPoolParametersType"> | TypedResponseMessage<"CardanoCatalystRegistrationParametersType"> | TypedResponseMessage<"CardanoTxInputType"> | TypedResponseMessage<"CardanoTxOutputType"> | TypedResponseMessage<"CardanoTxCertificateType"> | TypedResponseMessage<"CardanoTxWithdrawalType"> | TypedResponseMessage<"CardanoTxAuxiliaryDataType"> | TypedResponseMessage<"CardanoAssetGroupType"> | TypedResponseMessage<"CardanoTokenType"> | TypedResponseMessage<"IdentityType"> | TypedResponseMessage<"Path"> | TypedResponseMessage<"EosTxHeader"> | TypedResponseMessage<"EosActionCommon"> | TypedResponseMessage<"EosActionTransfer"> | TypedResponseMessage<"EosActionDelegate"> | TypedResponseMessage<"EosActionUndelegate"> | TypedResponseMessage<"EosActionRefund"> | TypedResponseMessage<"EosActionBuyRam"> | TypedResponseMessage<"EosActionBuyRamBytes"> | TypedResponseMessage<"EosActionSellRam"> | TypedResponseMessage<"EosActionVoteProducer"> | TypedResponseMessage<"EosActionUpdateAuth"> | TypedResponseMessage<"EosActionDeleteAuth"> | TypedResponseMessage<"EosActionLinkAuth"> | TypedResponseMessage<"EosActionUnlinkAuth"> | TypedResponseMessage<"EosActionNewAccount"> | TypedResponseMessage<"EosActionUnknown"> | TypedResponseMessage<"EosPermissionLevel"> | TypedResponseMessage<"EosAuthorizationKey"> | TypedResponseMessage<"EosAuthorizationAccount"> | TypedResponseMessage<"EosAuthorizationWait"> | TypedResponseMessage<"EosAsset"> | TypedResponseMessage<"EosAuthorization"> | TypedResponseMessage<"EthereumStructMember"> | TypedResponseMessage<"EthereumFieldType"> | TypedResponseMessage<"EthereumAccessList"> | TypedResponseMessage<"FileInfo"> | TypedResponseMessage<"NEMTransactionCommon"> | TypedResponseMessage<"NEMTransfer"> | TypedResponseMessage<"NEMProvisionNamespace"> | TypedResponseMessage<"NEMMosaicCreation"> | TypedResponseMessage<"NEMMosaicSupplyChange"> | TypedResponseMessage<"NEMAggregateModification"> | TypedResponseMessage<"NEMImportanceTransfer"> | TypedResponseMessage<"NEMMosaic"> | TypedResponseMessage<"NEMMosaicDefinition"> | TypedResponseMessage<"NEMCosignatoryModification"> | TypedResponseMessage<"RipplePayment"> | TypedResponseMessage<"StellarAsset"> | TypedResponseMessage<"TezosRevealOp"> | TypedResponseMessage<"TezosTransactionOp"> | TypedResponseMessage<"TezosOriginationOp"> | TypedResponseMessage<"TezosDelegationOp"> | TypedResponseMessage<"TezosProposalOp"> | TypedResponseMessage<"TezosBallotOp"> | TypedResponseMessage<"TezosContractID"> | TypedResponseMessage<"TezosParametersManager"> | TypedResponseMessage<"TezosManagerTransfer"> | TypedResponseMessage<"TronContract"> | TypedResponseMessage<"TronTransferContract"> | TypedResponseMessage<"TronTriggerSmartContract"> | TypedResponseMessage<"AlgorandGetAddress"> | TypedResponseMessage<"AlgorandAddress"> | TypedResponseMessage<"AlgorandSignTx"> | TypedResponseMessage<"AlgorandSignedTx"> | TypedResponseMessage<"AptosGetAddress"> | TypedResponseMessage<"AptosAddress"> | TypedResponseMessage<"AptosSignTx"> | TypedResponseMessage<"AptosSignedTx"> | TypedResponseMessage<"AptosSignMessage"> | TypedResponseMessage<"AptosMessageSignature"> | TypedResponseMessage<"BinanceGetAddress"> | TypedResponseMessage<"BinanceAddress"> | TypedResponseMessage<"BinanceGetPublicKey"> | TypedResponseMessage<"BinancePublicKey"> | TypedResponseMessage<"BinanceSignTx"> | TypedResponseMessage<"BinanceTxRequest"> | TypedResponseMessage<"BinanceTransferMsg"> | TypedResponseMessage<"BinanceOrderMsg"> | TypedResponseMessage<"BinanceCancelMsg"> | TypedResponseMessage<"BinanceSignedTx"> | TypedResponseMessage<"GetPublicKey"> | TypedResponseMessage<"PublicKey"> | TypedResponseMessage<"GetAddress"> | TypedResponseMessage<"GetOwnershipId"> | TypedResponseMessage<"OwnershipId"> | TypedResponseMessage<"SignMessage"> | TypedResponseMessage<"MessageSignature"> | TypedResponseMessage<"VerifyMessage"> | TypedResponseMessage<"SignTx"> | TypedResponseMessage<"TxRequest"> | TypedResponseMessage<"TxAck"> | TypedResponseMessage<"TxAckInput"> | TypedResponseMessage<"TxAckOutput"> | TypedResponseMessage<"TxAckPrevMeta"> | TypedResponseMessage<"TxAckPrevInput"> | TypedResponseMessage<"TxAckPrevOutput"> | TypedResponseMessage<"TxAckPrevExtraData"> | TypedResponseMessage<"GetOwnershipProof"> | TypedResponseMessage<"OwnershipProof"> | TypedResponseMessage<"AuthorizeCoinJoin"> | TypedResponseMessage<"GetPublicKeyMultiple"> | TypedResponseMessage<"PublicKeyMultiple"> | TypedResponseMessage<"FirmwareErase"> | TypedResponseMessage<"FirmwareRequest"> | TypedResponseMessage<"FirmwareUpload"> | TypedResponseMessage<"SelfTest"> | TypedResponseMessage<"FirmwareErase_ex"> | TypedResponseMessage<"CardanoGetNativeScriptHash"> | TypedResponseMessage<"CardanoNativeScriptHash"> | TypedResponseMessage<"CardanoGetAddress"> | TypedResponseMessage<"CardanoAddress"> | TypedResponseMessage<"CardanoGetPublicKey"> | TypedResponseMessage<"CardanoPublicKey"> | TypedResponseMessage<"CardanoSignTxInit"> | TypedResponseMessage<"CardanoTxInput"> | TypedResponseMessage<"CardanoTxOutput"> | TypedResponseMessage<"CardanoAssetGroup"> | TypedResponseMessage<"CardanoToken"> | TypedResponseMessage<"CardanoTxCertificate"> | TypedResponseMessage<"CardanoTxWithdrawal"> | TypedResponseMessage<"CardanoTxAuxiliaryData"> | TypedResponseMessage<"CardanoTxMint"> | TypedResponseMessage<"CardanoTxItemAck"> | TypedResponseMessage<"CardanoTxAuxiliaryDataSupplement"> | TypedResponseMessage<"CardanoTxWitnessRequest"> | TypedResponseMessage<"CardanoTxWitnessResponse"> | TypedResponseMessage<"CardanoTxHostAck"> | TypedResponseMessage<"CardanoTxBodyHash"> | TypedResponseMessage<"CardanoSignTxFinished"> | TypedResponseMessage<"CardanoPoolOwnerType"> | TypedResponseMessage<"CardanoPoolRelayParametersType"> | TypedResponseMessage<"CardanoSignTx"> | TypedResponseMessage<"CardanoSignedTxChunk"> | TypedResponseMessage<"CardanoSignedTxChunkAck"> | TypedResponseMessage<"CardanoSignedTx"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"Failure"> | TypedResponseMessage<"ButtonRequest"> | TypedResponseMessage<"ButtonAck"> | TypedResponseMessage<"PinMatrixRequest"> | TypedResponseMessage<"PinMatrixAck"> | TypedResponseMessage<"PassphraseRequest"> | TypedResponseMessage<"PassphraseAck"> | TypedResponseMessage<"Deprecated_PassphraseStateRequest"> | TypedResponseMessage<"Deprecated_PassphraseStateAck"> | TypedResponseMessage<"BixinPinInputOnDevice"> | TypedResponseMessage<"ConfluxGetAddress"> | TypedResponseMessage<"ConfluxAddress"> | TypedResponseMessage<"ConfluxSignTx"> | TypedResponseMessage<"ConfluxTxRequest"> | TypedResponseMessage<"ConfluxTxAck"> | TypedResponseMessage<"ConfluxSignMessage"> | TypedResponseMessage<"ConfluxMessageSignature"> | TypedResponseMessage<"ConfluxSignMessageCIP23"> | TypedResponseMessage<"CosmosGetAddress"> | TypedResponseMessage<"CosmosAddress"> | TypedResponseMessage<"CosmosSignTx"> | TypedResponseMessage<"CosmosSignedTx"> | TypedResponseMessage<"CipherKeyValue"> | TypedResponseMessage<"CipheredKeyValue"> | TypedResponseMessage<"SignIdentity"> | TypedResponseMessage<"SignedIdentity"> | TypedResponseMessage<"GetECDHSessionKey"> | TypedResponseMessage<"ECDHSessionKey"> | TypedResponseMessage<"BatchGetPublickeys"> | TypedResponseMessage<"EcdsaPublicKeys"> | TypedResponseMessage<"EosGetPublicKey"> | TypedResponseMessage<"EosPublicKey"> | TypedResponseMessage<"EosSignTx"> | TypedResponseMessage<"EosTxActionRequest"> | TypedResponseMessage<"EosTxActionAck"> | TypedResponseMessage<"EosSignedTx"> | TypedResponseMessage<"EthereumSignTypedData"> | TypedResponseMessage<"EthereumTypedDataStructRequest"> | TypedResponseMessage<"EthereumTypedDataStructAck"> | TypedResponseMessage<"EthereumTypedDataValueRequest"> | TypedResponseMessage<"EthereumTypedDataValueAck"> | TypedResponseMessage<"EthereumGetPublicKey"> | TypedResponseMessage<"EthereumPublicKey"> | TypedResponseMessage<"EthereumGetAddress"> | TypedResponseMessage<"EthereumAddress"> | TypedResponseMessage<"EthereumSignTx"> | TypedResponseMessage<"EthereumSignTxEIP1559"> | TypedResponseMessage<"EthereumTxRequest"> | TypedResponseMessage<"EthereumTxAck"> | TypedResponseMessage<"EthereumSignMessage"> | TypedResponseMessage<"EthereumMessageSignature"> | TypedResponseMessage<"EthereumVerifyMessage"> | TypedResponseMessage<"EthereumSignMessageEIP712"> | TypedResponseMessage<"EthereumSignTypedHash"> | TypedResponseMessage<"EthereumTypedDataSignature"> | TypedResponseMessage<"Initialize"> | TypedResponseMessage<"GetFeatures"> | TypedResponseMessage<"Features"> | TypedResponseMessage<"LockDevice"> | TypedResponseMessage<"EndSession"> | TypedResponseMessage<"ApplySettings"> | TypedResponseMessage<"ApplyFlags"> | TypedResponseMessage<"ChangePin"> | TypedResponseMessage<"ChangeWipeCode"> | TypedResponseMessage<"SdProtect"> | TypedResponseMessage<"Ping"> | TypedResponseMessage<"Cancel"> | TypedResponseMessage<"GetEntropy"> | TypedResponseMessage<"Entropy"> | TypedResponseMessage<"WipeDevice"> | TypedResponseMessage<"ResetDevice"> | TypedResponseMessage<"BackupDevice"> | TypedResponseMessage<"EntropyRequest"> | TypedResponseMessage<"EntropyAck"> | TypedResponseMessage<"RecoveryDevice"> | TypedResponseMessage<"WordRequest"> | TypedResponseMessage<"WordAck"> | TypedResponseMessage<"SetU2FCounter"> | TypedResponseMessage<"GetNextU2FCounter"> | TypedResponseMessage<"NextU2FCounter"> | TypedResponseMessage<"DoPreauthorized"> | TypedResponseMessage<"PreauthorizedRequest"> | TypedResponseMessage<"CancelAuthorization"> | TypedResponseMessage<"BixinSeedOperate"> | TypedResponseMessage<"BixinMessageSE"> | TypedResponseMessage<"BixinOutMessageSE"> | TypedResponseMessage<"DeviceBackToBoot"> | TypedResponseMessage<"BixinBackupRequest"> | TypedResponseMessage<"BixinBackupAck"> | TypedResponseMessage<"BixinRestoreRequest"> | TypedResponseMessage<"BixinRestoreAck"> | TypedResponseMessage<"BixinVerifyDeviceRequest"> | TypedResponseMessage<"BixinVerifyDeviceAck"> | TypedResponseMessage<"BixinWhiteListRequest"> | TypedResponseMessage<"BixinWhiteListAck"> | TypedResponseMessage<"BixinLoadDevice"> | TypedResponseMessage<"BixinBackupDevice"> | TypedResponseMessage<"BixinBackupDeviceAck"> | TypedResponseMessage<"DeviceInfoSettings"> | TypedResponseMessage<"GetDeviceInfo"> | TypedResponseMessage<"DeviceInfo"> | TypedResponseMessage<"ReadSEPublicKey"> | TypedResponseMessage<"SEPublicKey"> | TypedResponseMessage<"WriteSEPublicCert"> | TypedResponseMessage<"ReadSEPublicCert"> | TypedResponseMessage<"SEPublicCert"> | TypedResponseMessage<"SpiFlashWrite"> | TypedResponseMessage<"SpiFlashRead"> | TypedResponseMessage<"SpiFlashData"> | TypedResponseMessage<"SESignMessage"> | TypedResponseMessage<"SEMessageSignature"> | TypedResponseMessage<"ResourceUpload"> | TypedResponseMessage<"ZoomRequest"> | TypedResponseMessage<"ResourceRequest"> | TypedResponseMessage<"ResourceAck"> | TypedResponseMessage<"ResourceUpdate"> | TypedResponseMessage<"NFTWriteInfo"> | TypedResponseMessage<"NFTWriteData"> | TypedResponseMessage<"RebootToBootloader"> | TypedResponseMessage<"RebootToBoardloader"> | TypedResponseMessage<"ListResDir"> | TypedResponseMessage<"FileInfoList"> | TypedResponseMessage<"DeviceEraseSector"> | TypedResponseMessage<"NearGetAddress"> | TypedResponseMessage<"NearAddress"> | TypedResponseMessage<"NearSignTx"> | TypedResponseMessage<"NearSignedTx"> | TypedResponseMessage<"NEMGetAddress"> | TypedResponseMessage<"NEMAddress"> | TypedResponseMessage<"NEMSignTx"> | TypedResponseMessage<"NEMSignedTx"> | TypedResponseMessage<"NEMDecryptMessage"> | TypedResponseMessage<"NEMDecryptedMessage"> | TypedResponseMessage<"RippleGetAddress"> | TypedResponseMessage<"RippleAddress"> | TypedResponseMessage<"RippleSignTx"> | TypedResponseMessage<"RippleSignedTx"> | TypedResponseMessage<"SolanaGetAddress"> | TypedResponseMessage<"SolanaAddress"> | TypedResponseMessage<"SolanaSignTx"> | TypedResponseMessage<"SolanaSignedTx"> | TypedResponseMessage<"StarcoinGetAddress"> | TypedResponseMessage<"StarcoinAddress"> | TypedResponseMessage<"StarcoinGetPublicKey"> | TypedResponseMessage<"StarcoinPublicKey"> | TypedResponseMessage<"StarcoinSignTx"> | TypedResponseMessage<"StarcoinSignedTx"> | TypedResponseMessage<"StarcoinSignMessage"> | TypedResponseMessage<"StarcoinMessageSignature"> | TypedResponseMessage<"StarcoinVerifyMessage"> | TypedResponseMessage<"StellarGetAddress"> | TypedResponseMessage<"StellarAddress"> | TypedResponseMessage<"StellarSignTx"> | TypedResponseMessage<"StellarTxOpRequest"> | TypedResponseMessage<"StellarPaymentOp"> | TypedResponseMessage<"StellarCreateAccountOp"> | TypedResponseMessage<"StellarPathPaymentStrictReceiveOp"> | TypedResponseMessage<"StellarPathPaymentStrictSendOp"> | TypedResponseMessage<"StellarManageSellOfferOp"> | TypedResponseMessage<"StellarManageBuyOfferOp"> | TypedResponseMessage<"StellarCreatePassiveSellOfferOp"> | TypedResponseMessage<"StellarSetOptionsOp"> | TypedResponseMessage<"StellarChangeTrustOp"> | TypedResponseMessage<"StellarAllowTrustOp"> | TypedResponseMessage<"StellarAccountMergeOp"> | TypedResponseMessage<"StellarManageDataOp"> | TypedResponseMessage<"StellarBumpSequenceOp"> | TypedResponseMessage<"StellarSignedTx"> | TypedResponseMessage<"SuiGetAddress"> | TypedResponseMessage<"SuiAddress"> | TypedResponseMessage<"SuiSignTx"> | TypedResponseMessage<"SuiSignedTx"> | TypedResponseMessage<"TezosGetAddress"> | TypedResponseMessage<"TezosAddress"> | TypedResponseMessage<"TezosGetPublicKey"> | TypedResponseMessage<"TezosPublicKey"> | TypedResponseMessage<"TezosSignTx"> | TypedResponseMessage<"TezosSignedTx"> | TypedResponseMessage<"TronGetAddress"> | TypedResponseMessage<"TronAddress"> | TypedResponseMessage<"TronSignTx"> | TypedResponseMessage<"TronSignedTx"> | TypedResponseMessage<"TronSignMessage"> | TypedResponseMessage<"TronMessageSignature"> | TypedResponseMessage<"facotry">;
|
|
1709
1747
|
|
|
1710
1748
|
declare const getDeviceType: (features?: _onekeyfe_hd_transport.Features | undefined) => IDeviceType;
|
|
1711
1749
|
declare const getDeviceTypeByBleName: (name?: string | undefined) => IDeviceType | null;
|
|
@@ -1797,4 +1835,4 @@ declare class DataManager {
|
|
|
1797
1835
|
|
|
1798
1836
|
declare const HardwareSdk: ({ init, call, dispose, eventEmitter, uiResponse, cancel, }: InjectApi) => CoreApi;
|
|
1799
1837
|
|
|
1800
|
-
export { AccountAddress, AccountAddresses, AlgoAddress, AlgoGetAddressParams, AlgoSignTransactionParams, AlgoSignedTx, AptosAddress, AptosGetAddressParams, AptosGetPublicKeyParams, AptosMessageSignature, AptosPublicKey, AptosSignMessageParams, AptosSignTransactionParams, AptosSignedTx, AssetsMap, BTCAddress, BTCGetAddressParams, BTCGetPublicKeyParams, BTCPublicKey, BTCSignMessageParams, BTCSignTransactionParams, BTCVerifyMessageParams, BleReleaseInfoEvent, BleReleaseInfoPayload, CORE_EVENT, CallMethod, CallMethodAnyResponse, CallMethodKeys, CallMethodPayload, CallMethodResponse, CallMethodUnion, CipheredKeyValue, CipheredKeyValueParams, CommonParams, ConfluxAddress, ConfluxGetAddressParams, ConfluxSignMessageCIP23Params, ConfluxSignMessageParams, ConfluxSignTransactionParams, ConfluxSignedTx, ConfluxTransaction, ConnectSettings, Core, CoreApi, CoreMessage, CosmosAddress, CosmosGetAddressParams, CosmosGetPublicKeyParams, CosmosPublicKey, CosmosSignTransactionParams, CosmosSignedTx, DEFAULT_PRIORITY, DEVICE, DEVICE_EVENT, DataManager, Device$1 as Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesPayload, DeviceFirmwareRange, DeviceFlagsParams, DeviceMode, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendSupportFeatures, DeviceSettingsParams, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceUploadResourceParams, DeviceVerifyParams, DeviceVerifySignature, EVMAccessList, EVMAddress, EVMGetAddressParams, EVMGetPublicKeyParams, EVMPublicKey, EVMSignMessageEIP712Params, EVMSignMessageParams, EVMSignTransactionParams, EVMSignTypedDataParams, EVMSignedTx, EVMTransaction, EVMTransactionEIP1559, EVMVerifyMessageParams, EthereumSignTypedDataMessage, EthereumSignTypedDataTypeProperty, EthereumSignTypedDataTypes, FIRMWARE, FIRMWARE_EVENT, Features, FirmwareEvent, FirmwareMessage, FirmwareProgress, FirmwareRange, FirmwareRelease$1 as FirmwareRelease, FirmwareTip, FirmwareUpdateBinaryParams, FirmwareUpdateParams, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareReleaseInfo, IFrameBridge, IFrameCallMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, ILocale, ITransportStatus, IVersionArray, KnownDevice, LOG, LOG_EVENT, LogEvent, LogEventMessage, LogOutput, LoggerNames, MajorVersion, MethodResponseMessage, NEMAddress, NEMAggregateModificationTransaction, NEMGetAddressParams, NEMImportanceTransaction, NEMMosaic, NEMMosaicCreationTransaction, NEMMultisigTransaction, NEMProvisionNamespaceTransaction, NEMSignTransactionParams, NEMSupplyChangeTransaction, NEMTransaction, NEMTransferTransaction, NearAddress, NearGetAddressParams, NearSignTransactionParams, Params, PostMessageEvent, RESPONSE_EVENT, RefTransaction, ReleaseInfo, ReleaseInfoEvent, ReleaseInfoPayload, RemoteConfigResponse, Response, SearchDevice, SignedTransaction, SolanaAddress, SolanaGetAddressParams, SolanaSignTransactionParams, SolanaSignedTx, StarcoinAddress, StarcoinGetAddressParams, StarcoinGetPublicKeyParams, StarcoinPublicKey, StarcoinSignMessageParams, StarcoinSignTransactionParams, StarcoinVerifyMessageParams, StellarAddress, StellarAsset, StellarGetAddressParams, StellarOperation, StellarSignTransactionParams, StellarTransaction, StrictFeatures, Success, SupportFeatureType, SupportFeatures, TransactionOptions, TransportReleaseStatus, TronAddress, TronGetAddressParams, TronSignMessageParams, TronSignTransactionParams, TronTransaction, TronTransactionContract, TronTransferContract, TronTriggerSmartContract, UI_EVENT, UI_REQUEST, UI_RESPONSE, UiEvent, UiEventMessage, UiPromise, UiPromiseResponse, UiRequestButton, UiRequestDeviceAction, UiRequestPassphrase, UiRequestPassphraseOnDevice, UiRequestWithoutPayload, UiResponseEvent, UiResponseMessage, UiResponsePassphrase, UiResponsePin, UnavailableCapabilities, UnavailableCapability, Unsuccessful, VersionArray, corsValidator, createDeviceMessage, createErrorMessage, createFirmwareMessage, createIFrameMessage, createLogMessage, createResponseMessage, createUiMessage, createUiResponse, HardwareSdk as default, enableLog, getDeviceLabel, getDeviceType, getDeviceTypeByBleName, getDeviceTypeByDeviceId, getDeviceUUID, getEnv, getHDPath, getLog, getLogger, getSDKVersion, getScriptType, getTimeStamp, httpRequest, init as initCore, isValidVersionArray, isValidVersionString, normalizeVersionArray, parseConnectSettings, parseMessage, patchFeatures, safeThrowError, setLoggerPostMessage, versionCompare, versionSplit, wait };
|
|
1838
|
+
export { AccountAddress, AccountAddresses, AlgoAddress, AlgoGetAddressParams, AlgoSignTransactionParams, AlgoSignedTx, AptosAddress, AptosGetAddressParams, AptosGetPublicKeyParams, AptosMessageSignature, AptosPublicKey, AptosSignMessageParams, AptosSignTransactionParams, AptosSignedTx, AssetsMap, BTCAddress, BTCGetAddressParams, BTCGetPublicKeyParams, BTCPublicKey, BTCSignMessageParams, BTCSignTransactionParams, BTCVerifyMessageParams, BleReleaseInfoEvent, BleReleaseInfoPayload, CORE_EVENT, CallMethod, CallMethodAnyResponse, CallMethodKeys, CallMethodPayload, CallMethodResponse, CallMethodUnion, CipheredKeyValue, CipheredKeyValueParams, CommonParams, ConfluxAddress, ConfluxGetAddressParams, ConfluxSignMessageCIP23Params, ConfluxSignMessageParams, ConfluxSignTransactionParams, ConfluxSignedTx, ConfluxTransaction, ConnectSettings, Core, CoreApi, CoreMessage, CosmosAddress, CosmosGetAddressParams, CosmosGetPublicKeyParams, CosmosPublicKey, CosmosSignTransactionParams, CosmosSignedTx, DEFAULT_PRIORITY, DEVICE, DEVICE_EVENT, DataManager, Device$1 as Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesPayload, DeviceFirmwareRange, DeviceFlagsParams, DeviceMode, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendSupportFeatures, DeviceSettingsParams, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceUploadResourceParams, DeviceVerifyParams, DeviceVerifySignature, EVMAccessList, EVMAddress, EVMGetAddressParams, EVMGetPublicKeyParams, EVMPublicKey, EVMSignMessageEIP712Params, EVMSignMessageParams, EVMSignTransactionParams, EVMSignTypedDataParams, EVMSignedTx, EVMTransaction, EVMTransactionEIP1559, EVMVerifyMessageParams, EthereumSignTypedDataMessage, EthereumSignTypedDataTypeProperty, EthereumSignTypedDataTypes, FIRMWARE, FIRMWARE_EVENT, Features, FirmwareEvent, FirmwareMessage, FirmwareProgress, FirmwareRange, FirmwareRelease$1 as FirmwareRelease, FirmwareTip, FirmwareUpdateBinaryParams, FirmwareUpdateParams, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareReleaseInfo, IFrameBridge, IFrameCallMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, ILocale, ITransportStatus, IVersionArray, KnownDevice, LOG, LOG_EVENT, LogEvent, LogEventMessage, LogOutput, LoggerNames, MajorVersion, MethodResponseMessage, NEMAddress, NEMAggregateModificationTransaction, NEMGetAddressParams, NEMImportanceTransaction, NEMMosaic, NEMMosaicCreationTransaction, NEMMultisigTransaction, NEMProvisionNamespaceTransaction, NEMSignTransactionParams, NEMSupplyChangeTransaction, NEMTransaction, NEMTransferTransaction, NearAddress, NearGetAddressParams, NearSignTransactionParams, Params, PostMessageEvent, RESPONSE_EVENT, RefTransaction, ReleaseInfo, ReleaseInfoEvent, ReleaseInfoPayload, RemoteConfigResponse, Response, SearchDevice, SignedTransaction, SolanaAddress, SolanaGetAddressParams, SolanaSignTransactionParams, SolanaSignedTx, StarcoinAddress, StarcoinGetAddressParams, StarcoinGetPublicKeyParams, StarcoinPublicKey, StarcoinSignMessageParams, StarcoinSignTransactionParams, StarcoinVerifyMessageParams, StellarAddress, StellarAsset, StellarGetAddressParams, StellarOperation, StellarSignTransactionParams, StellarTransaction, StrictFeatures, Success, SuiAddress, SuiGetAddressParams, SuiGetPublicKeyParams, SuiPublicKey, SuiSignTransactionParams, SuiSignedTx, SupportFeatureType, SupportFeatures, TransactionOptions, TransportReleaseStatus, TronAddress, TronGetAddressParams, TronSignMessageParams, TronSignTransactionParams, TronTransaction, TronTransactionContract, TronTransferContract, TronTriggerSmartContract, UI_EVENT, UI_REQUEST, UI_RESPONSE, UiEvent, UiEventMessage, UiPromise, UiPromiseResponse, UiRequestButton, UiRequestDeviceAction, UiRequestPassphrase, UiRequestPassphraseOnDevice, UiRequestWithoutPayload, UiResponseEvent, UiResponseMessage, UiResponsePassphrase, UiResponsePin, UnavailableCapabilities, UnavailableCapability, Unsuccessful, VersionArray, corsValidator, createDeviceMessage, createErrorMessage, createFirmwareMessage, createIFrameMessage, createLogMessage, createResponseMessage, createUiMessage, createUiResponse, HardwareSdk as default, enableLog, getDeviceLabel, getDeviceType, getDeviceTypeByBleName, getDeviceTypeByDeviceId, getDeviceUUID, getEnv, getHDPath, getLog, getLogger, getSDKVersion, getScriptType, getTimeStamp, httpRequest, init as initCore, isValidVersionArray, isValidVersionString, normalizeVersionArray, parseConnectSettings, parseMessage, patchFeatures, safeThrowError, setLoggerPostMessage, versionCompare, versionSplit, wait };
|
package/dist/index.js
CHANGED
|
@@ -105,6 +105,9 @@ const inject = ({ call, cancel, dispose, eventEmitter, init, uiResponse, }) => {
|
|
|
105
105
|
cosmosSignTransaction: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), { connectId, deviceId, method: 'cosmosSignTransaction' })),
|
|
106
106
|
xrpGetAddress: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), { connectId, deviceId, method: 'xrpGetAddress' })),
|
|
107
107
|
xrpSignTransaction: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), { connectId, deviceId, method: 'xrpSignTransaction' })),
|
|
108
|
+
suiGetAddress: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), { connectId, deviceId, method: 'suiGetAddress' })),
|
|
109
|
+
suiGetPublicKey: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), { connectId, deviceId, method: 'suiGetPublicKey' })),
|
|
110
|
+
suiSignTransaction: (connectId, deviceId, params) => call(Object.assign(Object.assign({}, params), { connectId, deviceId, method: 'suiSignTransaction' })),
|
|
108
111
|
};
|
|
109
112
|
return api;
|
|
110
113
|
};
|
|
@@ -6488,6 +6491,53 @@ var nested = {
|
|
|
6488
6491
|
fields: {
|
|
6489
6492
|
}
|
|
6490
6493
|
},
|
|
6494
|
+
RebootToBoardloader: {
|
|
6495
|
+
fields: {
|
|
6496
|
+
}
|
|
6497
|
+
},
|
|
6498
|
+
ListResDir: {
|
|
6499
|
+
fields: {
|
|
6500
|
+
path: {
|
|
6501
|
+
rule: "required",
|
|
6502
|
+
type: "string",
|
|
6503
|
+
id: 1
|
|
6504
|
+
}
|
|
6505
|
+
}
|
|
6506
|
+
},
|
|
6507
|
+
FileInfoList: {
|
|
6508
|
+
fields: {
|
|
6509
|
+
files: {
|
|
6510
|
+
rule: "repeated",
|
|
6511
|
+
type: "FileInfo",
|
|
6512
|
+
id: 1
|
|
6513
|
+
}
|
|
6514
|
+
},
|
|
6515
|
+
nested: {
|
|
6516
|
+
FileInfo: {
|
|
6517
|
+
fields: {
|
|
6518
|
+
name: {
|
|
6519
|
+
rule: "required",
|
|
6520
|
+
type: "string",
|
|
6521
|
+
id: 1
|
|
6522
|
+
},
|
|
6523
|
+
size: {
|
|
6524
|
+
rule: "required",
|
|
6525
|
+
type: "uint64",
|
|
6526
|
+
id: 2
|
|
6527
|
+
}
|
|
6528
|
+
}
|
|
6529
|
+
}
|
|
6530
|
+
}
|
|
6531
|
+
},
|
|
6532
|
+
DeviceEraseSector: {
|
|
6533
|
+
fields: {
|
|
6534
|
+
sector: {
|
|
6535
|
+
rule: "required",
|
|
6536
|
+
type: "uint32",
|
|
6537
|
+
id: 1
|
|
6538
|
+
}
|
|
6539
|
+
}
|
|
6540
|
+
},
|
|
6491
6541
|
MoneroTransactionSourceEntry: {
|
|
6492
6542
|
fields: {
|
|
6493
6543
|
outputs: {
|
|
@@ -8631,6 +8681,61 @@ var nested = {
|
|
|
8631
8681
|
}
|
|
8632
8682
|
}
|
|
8633
8683
|
},
|
|
8684
|
+
SuiGetAddress: {
|
|
8685
|
+
fields: {
|
|
8686
|
+
address_n: {
|
|
8687
|
+
rule: "repeated",
|
|
8688
|
+
type: "uint32",
|
|
8689
|
+
id: 1,
|
|
8690
|
+
options: {
|
|
8691
|
+
packed: false
|
|
8692
|
+
}
|
|
8693
|
+
},
|
|
8694
|
+
show_display: {
|
|
8695
|
+
type: "bool",
|
|
8696
|
+
id: 2
|
|
8697
|
+
}
|
|
8698
|
+
}
|
|
8699
|
+
},
|
|
8700
|
+
SuiAddress: {
|
|
8701
|
+
fields: {
|
|
8702
|
+
address: {
|
|
8703
|
+
type: "string",
|
|
8704
|
+
id: 1
|
|
8705
|
+
}
|
|
8706
|
+
}
|
|
8707
|
+
},
|
|
8708
|
+
SuiSignTx: {
|
|
8709
|
+
fields: {
|
|
8710
|
+
address_n: {
|
|
8711
|
+
rule: "repeated",
|
|
8712
|
+
type: "uint32",
|
|
8713
|
+
id: 1,
|
|
8714
|
+
options: {
|
|
8715
|
+
packed: false
|
|
8716
|
+
}
|
|
8717
|
+
},
|
|
8718
|
+
raw_tx: {
|
|
8719
|
+
rule: "required",
|
|
8720
|
+
type: "bytes",
|
|
8721
|
+
id: 2
|
|
8722
|
+
}
|
|
8723
|
+
}
|
|
8724
|
+
},
|
|
8725
|
+
SuiSignedTx: {
|
|
8726
|
+
fields: {
|
|
8727
|
+
public_key: {
|
|
8728
|
+
rule: "required",
|
|
8729
|
+
type: "bytes",
|
|
8730
|
+
id: 1
|
|
8731
|
+
},
|
|
8732
|
+
signature: {
|
|
8733
|
+
rule: "required",
|
|
8734
|
+
type: "bytes",
|
|
8735
|
+
id: 2
|
|
8736
|
+
}
|
|
8737
|
+
}
|
|
8738
|
+
},
|
|
8634
8739
|
TezosGetAddress: {
|
|
8635
8740
|
fields: {
|
|
8636
8741
|
address_n: {
|
|
@@ -9629,6 +9734,10 @@ var nested = {
|
|
|
9629
9734
|
MessageType_AlgorandAddress: 10901,
|
|
9630
9735
|
MessageType_AlgorandSignTx: 10902,
|
|
9631
9736
|
MessageType_AlgorandSignedTx: 10903,
|
|
9737
|
+
MessageType_SuiGetAddress: 11100,
|
|
9738
|
+
MessageType_SuiAddress: 11101,
|
|
9739
|
+
MessageType_SuiSignTx: 11102,
|
|
9740
|
+
MessageType_SuiSignedTx: 11103,
|
|
9632
9741
|
MessageType_DeviceBackToBoot: 903,
|
|
9633
9742
|
MessageType_DeviceInfoSettings: 10001,
|
|
9634
9743
|
MessageType_GetDeviceInfo: 10002,
|
|
@@ -9649,7 +9758,11 @@ var nested = {
|
|
|
9649
9758
|
MessageType_ZoomRequest: 10019,
|
|
9650
9759
|
MessageType_ResourceRequest: 10020,
|
|
9651
9760
|
MessageType_ResourceAck: 10021,
|
|
9652
|
-
MessageType_ResourceUpdate: 10022
|
|
9761
|
+
MessageType_ResourceUpdate: 10022,
|
|
9762
|
+
MessageType_ListResDir: 10023,
|
|
9763
|
+
MessageType_FileInfoList: 10024,
|
|
9764
|
+
MessageType_RebootToBoardloader: 10025,
|
|
9765
|
+
MessageType_DeviceEraseSector: 10026
|
|
9653
9766
|
}
|
|
9654
9767
|
},
|
|
9655
9768
|
google: {
|
|
@@ -16170,6 +16283,164 @@ class XrpGetAddress extends BaseMethod {
|
|
|
16170
16283
|
}
|
|
16171
16284
|
}
|
|
16172
16285
|
|
|
16286
|
+
class SuiGetAddress extends BaseMethod {
|
|
16287
|
+
constructor() {
|
|
16288
|
+
super(...arguments);
|
|
16289
|
+
this.hasBundle = false;
|
|
16290
|
+
}
|
|
16291
|
+
init() {
|
|
16292
|
+
var _a;
|
|
16293
|
+
this.checkDeviceId = true;
|
|
16294
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.INITIALIZE];
|
|
16295
|
+
this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
|
|
16296
|
+
const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
|
|
16297
|
+
validateParams(payload, [{ name: 'bundle', type: 'array' }]);
|
|
16298
|
+
this.params = [];
|
|
16299
|
+
payload.bundle.forEach((batch) => {
|
|
16300
|
+
var _a;
|
|
16301
|
+
const addressN = validatePath(batch.path, 3);
|
|
16302
|
+
validateParams(batch, [
|
|
16303
|
+
{ name: 'path', required: true },
|
|
16304
|
+
{ name: 'showOnOneKey', type: 'boolean' },
|
|
16305
|
+
]);
|
|
16306
|
+
const showOnOneKey = (_a = batch.showOnOneKey) !== null && _a !== void 0 ? _a : true;
|
|
16307
|
+
this.params.push({
|
|
16308
|
+
address_n: addressN,
|
|
16309
|
+
show_display: showOnOneKey,
|
|
16310
|
+
});
|
|
16311
|
+
});
|
|
16312
|
+
}
|
|
16313
|
+
publicKeyToAddress(publicKey) {
|
|
16314
|
+
const hash = sha3.sha3_256.create();
|
|
16315
|
+
hash.update('\x00');
|
|
16316
|
+
hash.update(hexToBytes(publicKey));
|
|
16317
|
+
return `0x${utils.bytesToHex(hash.digest().slice(0, 20))}`;
|
|
16318
|
+
}
|
|
16319
|
+
getVersionRange() {
|
|
16320
|
+
return {
|
|
16321
|
+
model_mini: {
|
|
16322
|
+
min: '2.9.0',
|
|
16323
|
+
},
|
|
16324
|
+
model_touch: {
|
|
16325
|
+
min: '3.5.0',
|
|
16326
|
+
},
|
|
16327
|
+
};
|
|
16328
|
+
}
|
|
16329
|
+
run() {
|
|
16330
|
+
var _a;
|
|
16331
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16332
|
+
if (this.hasBundle && supportBatchPublicKey((_a = this.device) === null || _a === void 0 ? void 0 : _a.features)) {
|
|
16333
|
+
const res = yield this.device.commands.typedCall('BatchGetPublickeys', 'EcdsaPublicKeys', {
|
|
16334
|
+
paths: this.params,
|
|
16335
|
+
ecdsa_curve_name: 'ed25519',
|
|
16336
|
+
});
|
|
16337
|
+
const result = res.message.public_keys.map((publicKey, index) => ({
|
|
16338
|
+
path: serializedPath(this.params[index].address_n),
|
|
16339
|
+
publicKey,
|
|
16340
|
+
address: this.publicKeyToAddress(publicKey),
|
|
16341
|
+
}));
|
|
16342
|
+
return Promise.resolve(result);
|
|
16343
|
+
}
|
|
16344
|
+
const responses = [];
|
|
16345
|
+
for (let i = 0; i < this.params.length; i++) {
|
|
16346
|
+
const param = this.params[i];
|
|
16347
|
+
const res = yield this.device.commands.typedCall('SuiGetAddress', 'SuiAddress', Object.assign({}, param));
|
|
16348
|
+
const { address } = res.message;
|
|
16349
|
+
responses.push({
|
|
16350
|
+
path: serializedPath(param.address_n),
|
|
16351
|
+
address: address === null || address === void 0 ? void 0 : address.toLowerCase(),
|
|
16352
|
+
});
|
|
16353
|
+
}
|
|
16354
|
+
return Promise.resolve(this.hasBundle ? responses : responses[0]);
|
|
16355
|
+
});
|
|
16356
|
+
}
|
|
16357
|
+
}
|
|
16358
|
+
|
|
16359
|
+
class SuiGetPublicKey extends BaseMethod {
|
|
16360
|
+
constructor() {
|
|
16361
|
+
super(...arguments);
|
|
16362
|
+
this.hasBundle = false;
|
|
16363
|
+
}
|
|
16364
|
+
init() {
|
|
16365
|
+
var _a;
|
|
16366
|
+
this.checkDeviceId = true;
|
|
16367
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.INITIALIZE];
|
|
16368
|
+
this.hasBundle = !!((_a = this.payload) === null || _a === void 0 ? void 0 : _a.bundle);
|
|
16369
|
+
const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
|
|
16370
|
+
validateParams(payload, [{ name: 'bundle', type: 'array' }]);
|
|
16371
|
+
this.params = [];
|
|
16372
|
+
payload.bundle.forEach((batch) => {
|
|
16373
|
+
var _a;
|
|
16374
|
+
const addressN = validatePath(batch.path, 3);
|
|
16375
|
+
validateParams(batch, [
|
|
16376
|
+
{ name: 'path', required: true },
|
|
16377
|
+
{ name: 'showOnOneKey', type: 'boolean' },
|
|
16378
|
+
]);
|
|
16379
|
+
const showOnOneKey = (_a = batch.showOnOneKey) !== null && _a !== void 0 ? _a : true;
|
|
16380
|
+
this.params.push({
|
|
16381
|
+
address_n: addressN,
|
|
16382
|
+
show_display: showOnOneKey,
|
|
16383
|
+
});
|
|
16384
|
+
});
|
|
16385
|
+
}
|
|
16386
|
+
getVersionRange() {
|
|
16387
|
+
return {
|
|
16388
|
+
model_mini: {
|
|
16389
|
+
min: '2.9.0',
|
|
16390
|
+
},
|
|
16391
|
+
model_touch: {
|
|
16392
|
+
min: '3.5.0',
|
|
16393
|
+
},
|
|
16394
|
+
};
|
|
16395
|
+
}
|
|
16396
|
+
run() {
|
|
16397
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16398
|
+
const res = yield this.device.commands.typedCall('BatchGetPublickeys', 'EcdsaPublicKeys', {
|
|
16399
|
+
paths: this.params,
|
|
16400
|
+
ecdsa_curve_name: 'ed25519',
|
|
16401
|
+
});
|
|
16402
|
+
const responses = res.message.public_keys.map((publicKey, index) => ({
|
|
16403
|
+
path: serializedPath(this.params[index].address_n),
|
|
16404
|
+
publicKey,
|
|
16405
|
+
}));
|
|
16406
|
+
return Promise.resolve(this.hasBundle ? responses : responses[0]);
|
|
16407
|
+
});
|
|
16408
|
+
}
|
|
16409
|
+
}
|
|
16410
|
+
|
|
16411
|
+
class SuiSignTransaction extends BaseMethod {
|
|
16412
|
+
init() {
|
|
16413
|
+
this.checkDeviceId = true;
|
|
16414
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.INITIALIZE];
|
|
16415
|
+
validateParams(this.payload, [
|
|
16416
|
+
{ name: 'path', required: true },
|
|
16417
|
+
{ name: 'rawTx', type: 'hexString', required: true },
|
|
16418
|
+
]);
|
|
16419
|
+
const { path, rawTx } = this.payload;
|
|
16420
|
+
const addressN = validatePath(path, 3);
|
|
16421
|
+
this.params = {
|
|
16422
|
+
address_n: addressN,
|
|
16423
|
+
raw_tx: formatAnyHex(rawTx),
|
|
16424
|
+
};
|
|
16425
|
+
}
|
|
16426
|
+
getVersionRange() {
|
|
16427
|
+
return {
|
|
16428
|
+
model_mini: {
|
|
16429
|
+
min: '2.9.0',
|
|
16430
|
+
},
|
|
16431
|
+
model_touch: {
|
|
16432
|
+
min: '3.5.0',
|
|
16433
|
+
},
|
|
16434
|
+
};
|
|
16435
|
+
}
|
|
16436
|
+
run() {
|
|
16437
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16438
|
+
const res = yield this.device.commands.typedCall('SuiSignTx', 'SuiSignedTx', Object.assign({}, this.params));
|
|
16439
|
+
return Promise.resolve(res.message);
|
|
16440
|
+
});
|
|
16441
|
+
}
|
|
16442
|
+
}
|
|
16443
|
+
|
|
16173
16444
|
var ApiMethods = /*#__PURE__*/Object.freeze({
|
|
16174
16445
|
__proto__: null,
|
|
16175
16446
|
searchDevices: SearchDevices,
|
|
@@ -16239,7 +16510,10 @@ var ApiMethods = /*#__PURE__*/Object.freeze({
|
|
|
16239
16510
|
cosmosGetPublicKey: CosmosGetPublicKey,
|
|
16240
16511
|
cosmosSignTransaction: CosmosSignTransaction,
|
|
16241
16512
|
xrpGetAddress: XrpGetAddress$1,
|
|
16242
|
-
xrpSignTransaction: XrpGetAddress
|
|
16513
|
+
xrpSignTransaction: XrpGetAddress,
|
|
16514
|
+
suiGetAddress: SuiGetAddress,
|
|
16515
|
+
suiGetPublicKey: SuiGetPublicKey,
|
|
16516
|
+
suiSignTransaction: SuiSignTransaction
|
|
16243
16517
|
});
|
|
16244
16518
|
|
|
16245
16519
|
function findMethod(message) {
|
package/dist/inject.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject.d.ts","sourceRoot":"","sources":["../src/inject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAClC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,MAAM,+DAOhB,SAAS,KAAG,
|
|
1
|
+
{"version":3,"file":"inject.d.ts","sourceRoot":"","sources":["../src/inject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,UAAU,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAClC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,MAAM,+DAOhB,SAAS,KAAG,OA6Ld,CAAC"}
|
|
@@ -49,4 +49,7 @@ export type { AlgoSignedTx, AlgoSignTransactionParams } from './algoSignTransact
|
|
|
49
49
|
export type { CosmosAddress, CosmosGetAddressParams } from './cosmosGetAddress';
|
|
50
50
|
export type { CosmosPublicKey, CosmosGetPublicKeyParams } from './cosmosGetPublicKey';
|
|
51
51
|
export type { CosmosSignedTx, CosmosSignTransactionParams } from './cosmosSignTransaction';
|
|
52
|
+
export type { SuiAddress, SuiGetAddressParams } from './suiGetAddress';
|
|
53
|
+
export type { SuiPublicKey, SuiGetPublicKeyParams } from './suiGetPublicKey';
|
|
54
|
+
export type { SuiSignedTx, SuiSignTransactionParams } from './suiSignTransaction';
|
|
52
55
|
//# sourceMappingURL=export.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../../src/types/api/export.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACvE,YAAY,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAA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