@trustwallet/wallet-core 3.0.2 → 3.0.4
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/generated/core_proto.d.ts +364 -0
- package/dist/generated/core_proto.js +1013 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -1
- package/dist/lib/wallet-core.wasm +0 -0
- package/dist/src/keystore/default-impl.d.ts +19 -0
- package/dist/src/keystore/default-impl.js +127 -0
- package/dist/src/keystore/extension-storage.d.ts +12 -0
- package/dist/src/keystore/extension-storage.js +74 -0
- package/dist/src/keystore/fs-storage.d.ts +10 -0
- package/dist/src/keystore/fs-storage.js +39 -0
- package/dist/src/keystore/index.d.ts +4 -0
- package/dist/src/keystore/index.js +29 -0
- package/dist/src/keystore/types.d.ts +47 -0
- package/dist/src/keystore/types.js +24 -0
- package/dist/{wallet-core.d.ts → src/wallet-core.d.ts} +23 -0
- package/package.json +4 -2
@@ -4906,6 +4906,328 @@ export namespace TW {
|
|
4906
4906
|
public toJSON(): { [k: string]: any };
|
4907
4907
|
}
|
4908
4908
|
|
4909
|
+
/** Properties of a RegisterStakingKey. */
|
4910
|
+
interface IRegisterStakingKey {
|
4911
|
+
|
4912
|
+
/** RegisterStakingKey stakingAddress */
|
4913
|
+
stakingAddress?: (string|null);
|
4914
|
+
|
4915
|
+
/** RegisterStakingKey depositAmount */
|
4916
|
+
depositAmount?: (Long|null);
|
4917
|
+
}
|
4918
|
+
|
4919
|
+
/** Represents a RegisterStakingKey. */
|
4920
|
+
class RegisterStakingKey implements IRegisterStakingKey {
|
4921
|
+
|
4922
|
+
/**
|
4923
|
+
* Constructs a new RegisterStakingKey.
|
4924
|
+
* @param [properties] Properties to set
|
4925
|
+
*/
|
4926
|
+
constructor(properties?: TW.Cardano.Proto.IRegisterStakingKey);
|
4927
|
+
|
4928
|
+
/** RegisterStakingKey stakingAddress. */
|
4929
|
+
public stakingAddress: string;
|
4930
|
+
|
4931
|
+
/** RegisterStakingKey depositAmount. */
|
4932
|
+
public depositAmount: Long;
|
4933
|
+
|
4934
|
+
/**
|
4935
|
+
* Creates a new RegisterStakingKey instance using the specified properties.
|
4936
|
+
* @param [properties] Properties to set
|
4937
|
+
* @returns RegisterStakingKey instance
|
4938
|
+
*/
|
4939
|
+
public static create(properties?: TW.Cardano.Proto.IRegisterStakingKey): TW.Cardano.Proto.RegisterStakingKey;
|
4940
|
+
|
4941
|
+
/**
|
4942
|
+
* Encodes the specified RegisterStakingKey message. Does not implicitly {@link TW.Cardano.Proto.RegisterStakingKey.verify|verify} messages.
|
4943
|
+
* @param message RegisterStakingKey message or plain object to encode
|
4944
|
+
* @param [writer] Writer to encode to
|
4945
|
+
* @returns Writer
|
4946
|
+
*/
|
4947
|
+
public static encode(message: TW.Cardano.Proto.IRegisterStakingKey, writer?: $protobuf.Writer): $protobuf.Writer;
|
4948
|
+
|
4949
|
+
/**
|
4950
|
+
* Decodes a RegisterStakingKey message from the specified reader or buffer.
|
4951
|
+
* @param reader Reader or buffer to decode from
|
4952
|
+
* @param [length] Message length if known beforehand
|
4953
|
+
* @returns RegisterStakingKey
|
4954
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
4955
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
4956
|
+
*/
|
4957
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Cardano.Proto.RegisterStakingKey;
|
4958
|
+
|
4959
|
+
/**
|
4960
|
+
* Verifies a RegisterStakingKey message.
|
4961
|
+
* @param message Plain object to verify
|
4962
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
4963
|
+
*/
|
4964
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
4965
|
+
|
4966
|
+
/**
|
4967
|
+
* Creates a RegisterStakingKey message from a plain object. Also converts values to their respective internal types.
|
4968
|
+
* @param object Plain object
|
4969
|
+
* @returns RegisterStakingKey
|
4970
|
+
*/
|
4971
|
+
public static fromObject(object: { [k: string]: any }): TW.Cardano.Proto.RegisterStakingKey;
|
4972
|
+
|
4973
|
+
/**
|
4974
|
+
* Creates a plain object from a RegisterStakingKey message. Also converts values to other types if specified.
|
4975
|
+
* @param message RegisterStakingKey
|
4976
|
+
* @param [options] Conversion options
|
4977
|
+
* @returns Plain object
|
4978
|
+
*/
|
4979
|
+
public static toObject(message: TW.Cardano.Proto.RegisterStakingKey, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
4980
|
+
|
4981
|
+
/**
|
4982
|
+
* Converts this RegisterStakingKey to JSON.
|
4983
|
+
* @returns JSON object
|
4984
|
+
*/
|
4985
|
+
public toJSON(): { [k: string]: any };
|
4986
|
+
}
|
4987
|
+
|
4988
|
+
/** Properties of a DeregisterStakingKey. */
|
4989
|
+
interface IDeregisterStakingKey {
|
4990
|
+
|
4991
|
+
/** DeregisterStakingKey stakingAddress */
|
4992
|
+
stakingAddress?: (string|null);
|
4993
|
+
|
4994
|
+
/** DeregisterStakingKey undepositAmount */
|
4995
|
+
undepositAmount?: (Long|null);
|
4996
|
+
}
|
4997
|
+
|
4998
|
+
/** Represents a DeregisterStakingKey. */
|
4999
|
+
class DeregisterStakingKey implements IDeregisterStakingKey {
|
5000
|
+
|
5001
|
+
/**
|
5002
|
+
* Constructs a new DeregisterStakingKey.
|
5003
|
+
* @param [properties] Properties to set
|
5004
|
+
*/
|
5005
|
+
constructor(properties?: TW.Cardano.Proto.IDeregisterStakingKey);
|
5006
|
+
|
5007
|
+
/** DeregisterStakingKey stakingAddress. */
|
5008
|
+
public stakingAddress: string;
|
5009
|
+
|
5010
|
+
/** DeregisterStakingKey undepositAmount. */
|
5011
|
+
public undepositAmount: Long;
|
5012
|
+
|
5013
|
+
/**
|
5014
|
+
* Creates a new DeregisterStakingKey instance using the specified properties.
|
5015
|
+
* @param [properties] Properties to set
|
5016
|
+
* @returns DeregisterStakingKey instance
|
5017
|
+
*/
|
5018
|
+
public static create(properties?: TW.Cardano.Proto.IDeregisterStakingKey): TW.Cardano.Proto.DeregisterStakingKey;
|
5019
|
+
|
5020
|
+
/**
|
5021
|
+
* Encodes the specified DeregisterStakingKey message. Does not implicitly {@link TW.Cardano.Proto.DeregisterStakingKey.verify|verify} messages.
|
5022
|
+
* @param message DeregisterStakingKey message or plain object to encode
|
5023
|
+
* @param [writer] Writer to encode to
|
5024
|
+
* @returns Writer
|
5025
|
+
*/
|
5026
|
+
public static encode(message: TW.Cardano.Proto.IDeregisterStakingKey, writer?: $protobuf.Writer): $protobuf.Writer;
|
5027
|
+
|
5028
|
+
/**
|
5029
|
+
* Decodes a DeregisterStakingKey message from the specified reader or buffer.
|
5030
|
+
* @param reader Reader or buffer to decode from
|
5031
|
+
* @param [length] Message length if known beforehand
|
5032
|
+
* @returns DeregisterStakingKey
|
5033
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
5034
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5035
|
+
*/
|
5036
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Cardano.Proto.DeregisterStakingKey;
|
5037
|
+
|
5038
|
+
/**
|
5039
|
+
* Verifies a DeregisterStakingKey message.
|
5040
|
+
* @param message Plain object to verify
|
5041
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
5042
|
+
*/
|
5043
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
5044
|
+
|
5045
|
+
/**
|
5046
|
+
* Creates a DeregisterStakingKey message from a plain object. Also converts values to their respective internal types.
|
5047
|
+
* @param object Plain object
|
5048
|
+
* @returns DeregisterStakingKey
|
5049
|
+
*/
|
5050
|
+
public static fromObject(object: { [k: string]: any }): TW.Cardano.Proto.DeregisterStakingKey;
|
5051
|
+
|
5052
|
+
/**
|
5053
|
+
* Creates a plain object from a DeregisterStakingKey message. Also converts values to other types if specified.
|
5054
|
+
* @param message DeregisterStakingKey
|
5055
|
+
* @param [options] Conversion options
|
5056
|
+
* @returns Plain object
|
5057
|
+
*/
|
5058
|
+
public static toObject(message: TW.Cardano.Proto.DeregisterStakingKey, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
5059
|
+
|
5060
|
+
/**
|
5061
|
+
* Converts this DeregisterStakingKey to JSON.
|
5062
|
+
* @returns JSON object
|
5063
|
+
*/
|
5064
|
+
public toJSON(): { [k: string]: any };
|
5065
|
+
}
|
5066
|
+
|
5067
|
+
/** Properties of a Delegate. */
|
5068
|
+
interface IDelegate {
|
5069
|
+
|
5070
|
+
/** Delegate stakingAddress */
|
5071
|
+
stakingAddress?: (string|null);
|
5072
|
+
|
5073
|
+
/** Delegate poolId */
|
5074
|
+
poolId?: (Uint8Array|null);
|
5075
|
+
|
5076
|
+
/** Delegate depositAmount */
|
5077
|
+
depositAmount?: (Long|null);
|
5078
|
+
}
|
5079
|
+
|
5080
|
+
/** Represents a Delegate. */
|
5081
|
+
class Delegate implements IDelegate {
|
5082
|
+
|
5083
|
+
/**
|
5084
|
+
* Constructs a new Delegate.
|
5085
|
+
* @param [properties] Properties to set
|
5086
|
+
*/
|
5087
|
+
constructor(properties?: TW.Cardano.Proto.IDelegate);
|
5088
|
+
|
5089
|
+
/** Delegate stakingAddress. */
|
5090
|
+
public stakingAddress: string;
|
5091
|
+
|
5092
|
+
/** Delegate poolId. */
|
5093
|
+
public poolId: Uint8Array;
|
5094
|
+
|
5095
|
+
/** Delegate depositAmount. */
|
5096
|
+
public depositAmount: Long;
|
5097
|
+
|
5098
|
+
/**
|
5099
|
+
* Creates a new Delegate instance using the specified properties.
|
5100
|
+
* @param [properties] Properties to set
|
5101
|
+
* @returns Delegate instance
|
5102
|
+
*/
|
5103
|
+
public static create(properties?: TW.Cardano.Proto.IDelegate): TW.Cardano.Proto.Delegate;
|
5104
|
+
|
5105
|
+
/**
|
5106
|
+
* Encodes the specified Delegate message. Does not implicitly {@link TW.Cardano.Proto.Delegate.verify|verify} messages.
|
5107
|
+
* @param message Delegate message or plain object to encode
|
5108
|
+
* @param [writer] Writer to encode to
|
5109
|
+
* @returns Writer
|
5110
|
+
*/
|
5111
|
+
public static encode(message: TW.Cardano.Proto.IDelegate, writer?: $protobuf.Writer): $protobuf.Writer;
|
5112
|
+
|
5113
|
+
/**
|
5114
|
+
* Decodes a Delegate message from the specified reader or buffer.
|
5115
|
+
* @param reader Reader or buffer to decode from
|
5116
|
+
* @param [length] Message length if known beforehand
|
5117
|
+
* @returns Delegate
|
5118
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
5119
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5120
|
+
*/
|
5121
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Cardano.Proto.Delegate;
|
5122
|
+
|
5123
|
+
/**
|
5124
|
+
* Verifies a Delegate message.
|
5125
|
+
* @param message Plain object to verify
|
5126
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
5127
|
+
*/
|
5128
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
5129
|
+
|
5130
|
+
/**
|
5131
|
+
* Creates a Delegate message from a plain object. Also converts values to their respective internal types.
|
5132
|
+
* @param object Plain object
|
5133
|
+
* @returns Delegate
|
5134
|
+
*/
|
5135
|
+
public static fromObject(object: { [k: string]: any }): TW.Cardano.Proto.Delegate;
|
5136
|
+
|
5137
|
+
/**
|
5138
|
+
* Creates a plain object from a Delegate message. Also converts values to other types if specified.
|
5139
|
+
* @param message Delegate
|
5140
|
+
* @param [options] Conversion options
|
5141
|
+
* @returns Plain object
|
5142
|
+
*/
|
5143
|
+
public static toObject(message: TW.Cardano.Proto.Delegate, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
5144
|
+
|
5145
|
+
/**
|
5146
|
+
* Converts this Delegate to JSON.
|
5147
|
+
* @returns JSON object
|
5148
|
+
*/
|
5149
|
+
public toJSON(): { [k: string]: any };
|
5150
|
+
}
|
5151
|
+
|
5152
|
+
/** Properties of a Withdraw. */
|
5153
|
+
interface IWithdraw {
|
5154
|
+
|
5155
|
+
/** Withdraw stakingAddress */
|
5156
|
+
stakingAddress?: (string|null);
|
5157
|
+
|
5158
|
+
/** Withdraw withdrawAmount */
|
5159
|
+
withdrawAmount?: (Long|null);
|
5160
|
+
}
|
5161
|
+
|
5162
|
+
/** Represents a Withdraw. */
|
5163
|
+
class Withdraw implements IWithdraw {
|
5164
|
+
|
5165
|
+
/**
|
5166
|
+
* Constructs a new Withdraw.
|
5167
|
+
* @param [properties] Properties to set
|
5168
|
+
*/
|
5169
|
+
constructor(properties?: TW.Cardano.Proto.IWithdraw);
|
5170
|
+
|
5171
|
+
/** Withdraw stakingAddress. */
|
5172
|
+
public stakingAddress: string;
|
5173
|
+
|
5174
|
+
/** Withdraw withdrawAmount. */
|
5175
|
+
public withdrawAmount: Long;
|
5176
|
+
|
5177
|
+
/**
|
5178
|
+
* Creates a new Withdraw instance using the specified properties.
|
5179
|
+
* @param [properties] Properties to set
|
5180
|
+
* @returns Withdraw instance
|
5181
|
+
*/
|
5182
|
+
public static create(properties?: TW.Cardano.Proto.IWithdraw): TW.Cardano.Proto.Withdraw;
|
5183
|
+
|
5184
|
+
/**
|
5185
|
+
* Encodes the specified Withdraw message. Does not implicitly {@link TW.Cardano.Proto.Withdraw.verify|verify} messages.
|
5186
|
+
* @param message Withdraw message or plain object to encode
|
5187
|
+
* @param [writer] Writer to encode to
|
5188
|
+
* @returns Writer
|
5189
|
+
*/
|
5190
|
+
public static encode(message: TW.Cardano.Proto.IWithdraw, writer?: $protobuf.Writer): $protobuf.Writer;
|
5191
|
+
|
5192
|
+
/**
|
5193
|
+
* Decodes a Withdraw message from the specified reader or buffer.
|
5194
|
+
* @param reader Reader or buffer to decode from
|
5195
|
+
* @param [length] Message length if known beforehand
|
5196
|
+
* @returns Withdraw
|
5197
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
5198
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5199
|
+
*/
|
5200
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TW.Cardano.Proto.Withdraw;
|
5201
|
+
|
5202
|
+
/**
|
5203
|
+
* Verifies a Withdraw message.
|
5204
|
+
* @param message Plain object to verify
|
5205
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
5206
|
+
*/
|
5207
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
5208
|
+
|
5209
|
+
/**
|
5210
|
+
* Creates a Withdraw message from a plain object. Also converts values to their respective internal types.
|
5211
|
+
* @param object Plain object
|
5212
|
+
* @returns Withdraw
|
5213
|
+
*/
|
5214
|
+
public static fromObject(object: { [k: string]: any }): TW.Cardano.Proto.Withdraw;
|
5215
|
+
|
5216
|
+
/**
|
5217
|
+
* Creates a plain object from a Withdraw message. Also converts values to other types if specified.
|
5218
|
+
* @param message Withdraw
|
5219
|
+
* @param [options] Conversion options
|
5220
|
+
* @returns Plain object
|
5221
|
+
*/
|
5222
|
+
public static toObject(message: TW.Cardano.Proto.Withdraw, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
5223
|
+
|
5224
|
+
/**
|
5225
|
+
* Converts this Withdraw to JSON.
|
5226
|
+
* @returns JSON object
|
5227
|
+
*/
|
5228
|
+
public toJSON(): { [k: string]: any };
|
5229
|
+
}
|
5230
|
+
|
4909
5231
|
/** Properties of a TransactionPlan. */
|
4910
5232
|
interface ITransactionPlan {
|
4911
5233
|
|
@@ -4921,6 +5243,12 @@ export namespace TW {
|
|
4921
5243
|
/** TransactionPlan change */
|
4922
5244
|
change?: (Long|null);
|
4923
5245
|
|
5246
|
+
/** TransactionPlan deposit */
|
5247
|
+
deposit?: (Long|null);
|
5248
|
+
|
5249
|
+
/** TransactionPlan undeposit */
|
5250
|
+
undeposit?: (Long|null);
|
5251
|
+
|
4924
5252
|
/** TransactionPlan availableTokens */
|
4925
5253
|
availableTokens?: (TW.Cardano.Proto.ITokenAmount[]|null);
|
4926
5254
|
|
@@ -4958,6 +5286,12 @@ export namespace TW {
|
|
4958
5286
|
/** TransactionPlan change. */
|
4959
5287
|
public change: Long;
|
4960
5288
|
|
5289
|
+
/** TransactionPlan deposit. */
|
5290
|
+
public deposit: Long;
|
5291
|
+
|
5292
|
+
/** TransactionPlan undeposit. */
|
5293
|
+
public undeposit: Long;
|
5294
|
+
|
4961
5295
|
/** TransactionPlan availableTokens. */
|
4962
5296
|
public availableTokens: TW.Cardano.Proto.ITokenAmount[];
|
4963
5297
|
|
@@ -5039,6 +5373,18 @@ export namespace TW {
|
|
5039
5373
|
/** SigningInput transferMessage */
|
5040
5374
|
transferMessage?: (TW.Cardano.Proto.ITransfer|null);
|
5041
5375
|
|
5376
|
+
/** SigningInput registerStakingKey */
|
5377
|
+
registerStakingKey?: (TW.Cardano.Proto.IRegisterStakingKey|null);
|
5378
|
+
|
5379
|
+
/** SigningInput delegate */
|
5380
|
+
delegate?: (TW.Cardano.Proto.IDelegate|null);
|
5381
|
+
|
5382
|
+
/** SigningInput withdraw */
|
5383
|
+
withdraw?: (TW.Cardano.Proto.IWithdraw|null);
|
5384
|
+
|
5385
|
+
/** SigningInput deregisterStakingKey */
|
5386
|
+
deregisterStakingKey?: (TW.Cardano.Proto.IDeregisterStakingKey|null);
|
5387
|
+
|
5042
5388
|
/** SigningInput ttl */
|
5043
5389
|
ttl?: (Long|null);
|
5044
5390
|
|
@@ -5064,6 +5410,18 @@ export namespace TW {
|
|
5064
5410
|
/** SigningInput transferMessage. */
|
5065
5411
|
public transferMessage?: (TW.Cardano.Proto.ITransfer|null);
|
5066
5412
|
|
5413
|
+
/** SigningInput registerStakingKey. */
|
5414
|
+
public registerStakingKey?: (TW.Cardano.Proto.IRegisterStakingKey|null);
|
5415
|
+
|
5416
|
+
/** SigningInput delegate. */
|
5417
|
+
public delegate?: (TW.Cardano.Proto.IDelegate|null);
|
5418
|
+
|
5419
|
+
/** SigningInput withdraw. */
|
5420
|
+
public withdraw?: (TW.Cardano.Proto.IWithdraw|null);
|
5421
|
+
|
5422
|
+
/** SigningInput deregisterStakingKey. */
|
5423
|
+
public deregisterStakingKey?: (TW.Cardano.Proto.IDeregisterStakingKey|null);
|
5424
|
+
|
5067
5425
|
/** SigningInput ttl. */
|
5068
5426
|
public ttl: Long;
|
5069
5427
|
|
@@ -7511,6 +7869,9 @@ export namespace TW {
|
|
7511
7869
|
|
7512
7870
|
/** SigningOutput error */
|
7513
7871
|
error?: (string|null);
|
7872
|
+
|
7873
|
+
/** SigningOutput signatureJson */
|
7874
|
+
signatureJson?: (string|null);
|
7514
7875
|
}
|
7515
7876
|
|
7516
7877
|
/** Represents a SigningOutput. */
|
@@ -7534,6 +7895,9 @@ export namespace TW {
|
|
7534
7895
|
/** SigningOutput error. */
|
7535
7896
|
public error: string;
|
7536
7897
|
|
7898
|
+
/** SigningOutput signatureJson. */
|
7899
|
+
public signatureJson: string;
|
7900
|
+
|
7537
7901
|
/**
|
7538
7902
|
* Creates a new SigningOutput instance using the specified properties.
|
7539
7903
|
* @param [properties] Properties to set
|