File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
modules/sdk-core/src/bitgo/staking Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,13 @@ export interface StakeOptions {
159159 depositSignature ?: string ;
160160}
161161
162+ export interface TronStakeOptions extends StakeOptions {
163+ /**
164+ * Tron staking resource type (Energy or Bandwidth)
165+ */
166+ resourceType ?: string ;
167+ }
168+
162169export interface UnstakeOptions {
163170 amount : string ;
164171 clientId ?: string ;
@@ -273,7 +280,7 @@ export interface StakingSignOptions {
273280export interface IStakingWallet {
274281 readonly walletId : string ;
275282 readonly coin : string ;
276- stake ( options : StakeOptions ) : Promise < StakingRequest > ;
283+ stake ( options : StakeOptions | TronStakeOptions ) : Promise < StakingRequest > ;
277284 unstake ( options : UnstakeOptions | EthUnstakeOptions ) : Promise < StakingRequest > ;
278285 switchValidator ( options : SwitchValidatorOptions ) : Promise < StakingRequest > ;
279286 claimRewards ( options : ClaimRewardsOptions ) : Promise < StakingRequest > ;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import {
1919 EthUnstakeOptions ,
2020 ClaimRewardsOptions ,
2121 StakingTxRequestPrebuildTransactionResult ,
22+ TronStakeOptions ,
2223} from './iStakingWallet' ;
2324import { BitGoBase } from '../bitgoBase' ;
2425import { IWallet , PrebuildTransactionResult } from '../wallet' ;
@@ -55,7 +56,7 @@ export class StakingWallet implements IStakingWallet {
5556 * @param options - stake options
5657 * @return StakingRequest
5758 */
58- async stake ( options : StakeOptions ) : Promise < StakingRequest > {
59+ async stake ( options : StakeOptions | TronStakeOptions ) : Promise < StakingRequest > {
5960 return await this . createStakingRequest ( options , 'STAKE' ) ;
6061 }
6162
@@ -283,7 +284,13 @@ export class StakingWallet implements IStakingWallet {
283284 }
284285
285286 private async createStakingRequest (
286- options : StakeOptions | UnstakeOptions | EthUnstakeOptions | SwitchValidatorOptions | ClaimRewardsOptions ,
287+ options :
288+ | StakeOptions
289+ | UnstakeOptions
290+ | EthUnstakeOptions
291+ | SwitchValidatorOptions
292+ | ClaimRewardsOptions
293+ | TronStakeOptions ,
287294 type : string
288295 ) : Promise < StakingRequest > {
289296 return await this . bitgo
You can’t perform that action at this time.
0 commit comments