@@ -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
}
@@ -478,16 +492,20 @@ export type EdgeCurrencyWallet = {
478
492
getEnabledTokens ( ) : Promise < Array < string >> ,
479
493
addCustomToken ( token : EdgeTokenInfo ) : Promise < mixed > ,
480
494
481
- // Transactions :
495
+ // Transaction history :
482
496
getNumTransactions ( opts ?: EdgeCurrencyCodeOptions ) : Promise < number > ,
483
497
getTransactions (
484
498
opts ? : EdgeGetTransactionsOptions
485
499
) : Promise < Array < EdgeTransaction >> ,
500
+
501
+ // Addresses:
486
502
getReceiveAddress (
487
503
opts ? : EdgeCurrencyCodeOptions
488
504
) : Promise < EdgeReceiveAddress > ,
489
505
saveReceiveAddress ( receiveAddress : EdgeReceiveAddress ) : Promise < mixed > ,
490
506
lockReceiveAddress ( receiveAddress : EdgeReceiveAddress ) : Promise < mixed > ,
507
+
508
+ // Sending:
491
509
makeSpend ( spendInfo : EdgeSpendInfo ) : Promise < EdgeTransaction > ,
492
510
signTx ( tx : EdgeTransaction ) : Promise < EdgeTransaction > ,
493
511
broadcastTx ( tx : EdgeTransaction ) : Promise < EdgeTransaction > ,
@@ -503,6 +521,12 @@ export type EdgeCurrencyWallet = {
503
521
paymentProtocolUrl : string
504
522
) : Promise < EdgePaymentProtocolInfo > ,
505
523
524
+ // Staking:
525
+ + stakingSettings : EdgeStakingSettings ,
526
+ changeStakingSettings : (
527
+ stakingSettings : EdgeStakingSettings
528
+ ) = > Promise < EdgeTransaction > ,
529
+
506
530
// Wallet management:
507
531
resyncBlockchain ( ) : Promise < mixed > ,
508
532
dumpData ( ) : Promise < EdgeDataDump > ,
0 commit comments