@@ -137,6 +137,7 @@ export type EdgeCurrencyInfo = {
137
137
pluginName : string ,
138
138
denominations : Array < EdgeDenomination > ,
139
139
requiredConfirmations ? : number ,
140
+ supportsStaking ?: boolean ,
140
141
walletType : string ,
141
142
142
143
// Configuration options:
@@ -223,6 +224,13 @@ export type EdgeSpendInfo = {
223
224
otherParams ?: Object
224
225
}
225
226
227
+ export type EdgeStakingSettings =
228
+ | { stakingEnabled : false }
229
+ | {
230
+ stakingEnabled : true ,
231
+ delegateAddress : string
232
+ }
233
+
226
234
// query data ----------------------------------------------------------
227
235
228
236
export type EdgeDataDump = {
@@ -359,6 +367,12 @@ export type EdgeCurrencyEngine = {
359
367
paymentProtocolUrl : string
360
368
) => Promise < EdgePaymentProtocolInfo > ,
361
369
370
+ // Staking:
371
+ + stakingSettings ?: EdgeStakingSettings ,
372
+ changeStakingSettings ?: (
373
+ stakingSettings : EdgeStakingSettings
374
+ ) => Promise < EdgeTransaction > ,
375
+
362
376
// Escape hatch:
363
377
+ otherMethods ? : Object
364
378
}
@@ -477,16 +491,20 @@ export type EdgeCurrencyWallet = {
477
491
getEnabledTokens ( ) : Promise < Array < string >> ,
478
492
addCustomToken ( token : EdgeTokenInfo ) : Promise < mixed > ,
479
493
480
- // Transactions :
494
+ // Transaction history :
481
495
getNumTransactions ( opts ?: EdgeCurrencyCodeOptions ) : Promise < number > ,
482
496
getTransactions (
483
497
opts ? : EdgeGetTransactionsOptions
484
498
) : Promise < Array < EdgeTransaction >> ,
499
+
500
+ // Addresses:
485
501
getReceiveAddress (
486
502
opts ? : EdgeCurrencyCodeOptions
487
503
) : Promise < EdgeReceiveAddress > ,
488
504
saveReceiveAddress ( receiveAddress : EdgeReceiveAddress ) : Promise < mixed > ,
489
505
lockReceiveAddress ( receiveAddress : EdgeReceiveAddress ) : Promise < mixed > ,
506
+
507
+ // Sending:
490
508
makeSpend ( spendInfo : EdgeSpendInfo ) : Promise < EdgeTransaction > ,
491
509
signTx ( tx : EdgeTransaction ) : Promise < EdgeTransaction > ,
492
510
broadcastTx ( tx : EdgeTransaction ) : Promise < EdgeTransaction > ,
@@ -502,6 +520,12 @@ export type EdgeCurrencyWallet = {
502
520
paymentProtocolUrl : string
503
521
) : Promise < EdgePaymentProtocolInfo > ,
504
522
523
+ // Staking:
524
+ + stakingSettings : EdgeStakingSettings ,
525
+ changeStakingSettings : (
526
+ stakingSettings : EdgeStakingSettings
527
+ ) = > Promise < EdgeTransaction > ,
528
+
505
529
// Wallet management:
506
530
resyncBlockchain ( ) : Promise < mixed > ,
507
531
dumpData ( ) : Promise < EdgeDataDump > ,
0 commit comments