@onekeyfe/hd-transport 1.0.19 → 1.0.20-alpha.1
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/index.d.ts +75 -42
- package/dist/index.js +33 -22
- package/dist/types/messages.d.ts +50 -24
- package/dist/types/messages.d.ts.map +1 -1
- package/package.json +2 -2
- package/scripts/protobuf-patches/index.js +1 -0
- package/src/serialization/protobuf/decode.ts +3 -3
- package/src/serialization/protobuf/encode.ts +1 -1
- package/src/types/messages.ts +58 -27
package/src/types/messages.ts
CHANGED
|
@@ -141,7 +141,7 @@ export type BenfenGetAddress = {
|
|
|
141
141
|
|
|
142
142
|
// BenfenAddress
|
|
143
143
|
export type BenfenAddress = {
|
|
144
|
-
address
|
|
144
|
+
address?: string;
|
|
145
145
|
};
|
|
146
146
|
|
|
147
147
|
// BenfenSignTx
|
|
@@ -803,6 +803,16 @@ export enum CardanoCertificateType {
|
|
|
803
803
|
STAKE_DEREGISTRATION = 1,
|
|
804
804
|
STAKE_DELEGATION = 2,
|
|
805
805
|
STAKE_POOL_REGISTRATION = 3,
|
|
806
|
+
STAKE_REGISTRATION_CONWAY = 7,
|
|
807
|
+
STAKE_DEREGISTRATION_CONWAY = 8,
|
|
808
|
+
VOTE_DELEGATION = 9,
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
export enum CardanoDRepType {
|
|
812
|
+
KEY_HASH = 0,
|
|
813
|
+
SCRIPT_HASH = 1,
|
|
814
|
+
ABSTAIN = 2,
|
|
815
|
+
NO_CONFIDENCE = 3,
|
|
806
816
|
}
|
|
807
817
|
|
|
808
818
|
export enum CardanoPoolRelayType {
|
|
@@ -813,10 +823,10 @@ export enum CardanoPoolRelayType {
|
|
|
813
823
|
|
|
814
824
|
export enum CardanoTxAuxiliaryDataSupplementType {
|
|
815
825
|
NONE = 0,
|
|
816
|
-
|
|
826
|
+
CVOTE_REGISTRATION_SIGNATURE = 1,
|
|
817
827
|
}
|
|
818
828
|
|
|
819
|
-
export enum
|
|
829
|
+
export enum CardanoCVoteRegistrationFormat {
|
|
820
830
|
CIP15 = 0,
|
|
821
831
|
CIP36 = 1,
|
|
822
832
|
}
|
|
@@ -881,6 +891,7 @@ export type CardanoGetAddress = {
|
|
|
881
891
|
network_id: number;
|
|
882
892
|
address_parameters: CardanoAddressParametersType;
|
|
883
893
|
derivation_type: CardanoDerivationType;
|
|
894
|
+
chunkify?: boolean;
|
|
884
895
|
};
|
|
885
896
|
|
|
886
897
|
// CardanoAddress
|
|
@@ -924,6 +935,8 @@ export type CardanoSignTxInit = {
|
|
|
924
935
|
has_collateral_return?: boolean;
|
|
925
936
|
total_collateral?: UintType;
|
|
926
937
|
reference_inputs_count?: number;
|
|
938
|
+
chunkify?: boolean;
|
|
939
|
+
tag_cbor_sets?: boolean;
|
|
927
940
|
};
|
|
928
941
|
|
|
929
942
|
// CardanoTxInput
|
|
@@ -1002,6 +1015,13 @@ export type CardanoPoolParametersType = {
|
|
|
1002
1015
|
relays_count: number;
|
|
1003
1016
|
};
|
|
1004
1017
|
|
|
1018
|
+
// CardanoDRep
|
|
1019
|
+
export type CardanoDRep = {
|
|
1020
|
+
type: CardanoDRepType;
|
|
1021
|
+
key_hash?: string;
|
|
1022
|
+
script_hash?: string;
|
|
1023
|
+
};
|
|
1024
|
+
|
|
1005
1025
|
// CardanoTxCertificate
|
|
1006
1026
|
export type CardanoTxCertificate = {
|
|
1007
1027
|
type: CardanoCertificateType;
|
|
@@ -1010,6 +1030,8 @@ export type CardanoTxCertificate = {
|
|
|
1010
1030
|
pool_parameters?: CardanoPoolParametersType;
|
|
1011
1031
|
script_hash?: string;
|
|
1012
1032
|
key_hash?: string;
|
|
1033
|
+
deposit?: UintType;
|
|
1034
|
+
drep?: CardanoDRep;
|
|
1013
1035
|
};
|
|
1014
1036
|
|
|
1015
1037
|
// CardanoTxWithdrawal
|
|
@@ -1020,26 +1042,27 @@ export type CardanoTxWithdrawal = {
|
|
|
1020
1042
|
key_hash?: string;
|
|
1021
1043
|
};
|
|
1022
1044
|
|
|
1023
|
-
//
|
|
1024
|
-
export type
|
|
1025
|
-
|
|
1045
|
+
// CardanoCVoteRegistrationDelegation
|
|
1046
|
+
export type CardanoCVoteRegistrationDelegation = {
|
|
1047
|
+
vote_public_key: string;
|
|
1026
1048
|
weight: number;
|
|
1027
1049
|
};
|
|
1028
1050
|
|
|
1029
|
-
//
|
|
1030
|
-
export type
|
|
1031
|
-
|
|
1051
|
+
// CardanoCVoteRegistrationParametersType
|
|
1052
|
+
export type CardanoCVoteRegistrationParametersType = {
|
|
1053
|
+
vote_public_key?: string;
|
|
1032
1054
|
staking_path: number[];
|
|
1033
|
-
|
|
1055
|
+
payment_address_parameters?: CardanoAddressParametersType;
|
|
1034
1056
|
nonce: number;
|
|
1035
|
-
format?:
|
|
1036
|
-
delegations:
|
|
1057
|
+
format?: CardanoCVoteRegistrationFormat;
|
|
1058
|
+
delegations: CardanoCVoteRegistrationDelegation[];
|
|
1037
1059
|
voting_purpose?: number;
|
|
1060
|
+
payment_address?: string;
|
|
1038
1061
|
};
|
|
1039
1062
|
|
|
1040
1063
|
// CardanoTxAuxiliaryData
|
|
1041
1064
|
export type CardanoTxAuxiliaryData = {
|
|
1042
|
-
|
|
1065
|
+
cvote_registration_parameters?: CardanoCVoteRegistrationParametersType;
|
|
1043
1066
|
hash?: string;
|
|
1044
1067
|
};
|
|
1045
1068
|
|
|
@@ -1073,7 +1096,7 @@ export type CardanoTxItemAck = {};
|
|
|
1073
1096
|
export type CardanoTxAuxiliaryDataSupplement = {
|
|
1074
1097
|
type: CardanoTxAuxiliaryDataSupplementType;
|
|
1075
1098
|
auxiliary_data_hash?: string;
|
|
1076
|
-
|
|
1099
|
+
cvote_registration_signature?: string;
|
|
1077
1100
|
};
|
|
1078
1101
|
|
|
1079
1102
|
// CardanoTxWitnessRequest
|
|
@@ -3476,28 +3499,34 @@ export type SolanaSignedTx = {
|
|
|
3476
3499
|
signature?: string;
|
|
3477
3500
|
};
|
|
3478
3501
|
|
|
3479
|
-
export enum
|
|
3502
|
+
export enum SolanaOffChainMessageVersion {
|
|
3480
3503
|
MESSAGE_VERSION_0 = 0,
|
|
3481
3504
|
}
|
|
3482
3505
|
|
|
3483
|
-
export enum
|
|
3506
|
+
export enum SolanaOffChainMessageFormat {
|
|
3484
3507
|
V0_RESTRICTED_ASCII = 0,
|
|
3485
3508
|
V0_LIMITED_UTF8 = 1,
|
|
3486
3509
|
}
|
|
3487
3510
|
|
|
3488
|
-
//
|
|
3489
|
-
export type
|
|
3511
|
+
// SolanaSignOffChainMessage
|
|
3512
|
+
export type SolanaSignOffChainMessage = {
|
|
3490
3513
|
address_n: number[];
|
|
3491
3514
|
message: string;
|
|
3492
|
-
message_version?:
|
|
3493
|
-
message_format?:
|
|
3515
|
+
message_version?: SolanaOffChainMessageVersion;
|
|
3516
|
+
message_format?: SolanaOffChainMessageFormat;
|
|
3494
3517
|
application_domain?: string;
|
|
3495
3518
|
};
|
|
3496
3519
|
|
|
3497
|
-
//
|
|
3498
|
-
export type
|
|
3520
|
+
// SolanaSignUnsafeMessage
|
|
3521
|
+
export type SolanaSignUnsafeMessage = {
|
|
3522
|
+
address_n: number[];
|
|
3523
|
+
message: string;
|
|
3524
|
+
};
|
|
3525
|
+
|
|
3526
|
+
// SolanaMessageSignature
|
|
3527
|
+
export type SolanaMessageSignature = {
|
|
3499
3528
|
signature: string;
|
|
3500
|
-
public_key
|
|
3529
|
+
public_key?: string;
|
|
3501
3530
|
};
|
|
3502
3531
|
|
|
3503
3532
|
// StarcoinGetAddress
|
|
@@ -4218,10 +4247,11 @@ export type MessageType = {
|
|
|
4218
4247
|
CardanoPoolRelayParameters: CardanoPoolRelayParameters;
|
|
4219
4248
|
CardanoPoolMetadataType: CardanoPoolMetadataType;
|
|
4220
4249
|
CardanoPoolParametersType: CardanoPoolParametersType;
|
|
4250
|
+
CardanoDRep: CardanoDRep;
|
|
4221
4251
|
CardanoTxCertificate: CardanoTxCertificate;
|
|
4222
4252
|
CardanoTxWithdrawal: CardanoTxWithdrawal;
|
|
4223
|
-
|
|
4224
|
-
|
|
4253
|
+
CardanoCVoteRegistrationDelegation: CardanoCVoteRegistrationDelegation;
|
|
4254
|
+
CardanoCVoteRegistrationParametersType: CardanoCVoteRegistrationParametersType;
|
|
4225
4255
|
CardanoTxAuxiliaryData: CardanoTxAuxiliaryData;
|
|
4226
4256
|
CardanoTxMint: CardanoTxMint;
|
|
4227
4257
|
CardanoTxCollateralInput: CardanoTxCollateralInput;
|
|
@@ -4556,8 +4586,9 @@ export type MessageType = {
|
|
|
4556
4586
|
SolanaAddress: SolanaAddress;
|
|
4557
4587
|
SolanaSignTx: SolanaSignTx;
|
|
4558
4588
|
SolanaSignedTx: SolanaSignedTx;
|
|
4559
|
-
|
|
4560
|
-
|
|
4589
|
+
SolanaSignOffChainMessage: SolanaSignOffChainMessage;
|
|
4590
|
+
SolanaSignUnsafeMessage: SolanaSignUnsafeMessage;
|
|
4591
|
+
SolanaMessageSignature: SolanaMessageSignature;
|
|
4561
4592
|
StarcoinGetAddress: StarcoinGetAddress;
|
|
4562
4593
|
StarcoinAddress: StarcoinAddress;
|
|
4563
4594
|
StarcoinGetPublicKey: StarcoinGetPublicKey;
|