@@ -28,20 +28,23 @@ export class ZetaService extends Service {
2828 * @param validatorAddress validator address to delegate to
2929 * @param amountZeta how many tokens to stake in ZETA
3030 * @param restakeRewards If enabled, the rewards will be automatically restaked
31+ * @param granteeAddress validator grantee address
3132 */
3233 async craftStakeTx (
3334 accountId : string ,
3435 pubkey : string ,
3536 validatorAddress : string ,
3637 amountZeta : number ,
3738 restakeRewards : boolean = false ,
39+ granteeAddress ?: string ,
3840 ) : Promise < CosmosTx > {
3941 const { data } = await api . post < CosmosTx > ( `/v1/zeta/transaction/stake` , {
4042 account_id : accountId ,
4143 pubkey : pubkey ,
4244 validator : validatorAddress ,
4345 amount_azeta : this . zetaToAZeta ( amountZeta . toString ( ) ) ,
4446 restake_rewards : restakeRewards ,
47+ grantee_address : granteeAddress ,
4548 } ) ;
4649 return data ;
4750 }
@@ -63,11 +66,13 @@ export class ZetaService extends Service {
6366 * Craft a Zetachain restake rewards transaction
6467 * @param pubkey wallet pubkey, this is different from the wallet address
6568 * @param validatorAddress validator address to which the delegation has been made
69+ * @param granteeAddress validator grantee address
6670 */
67- async craftRestakeRewardsTx ( pubkey : string , validatorAddress : string ) : Promise < CosmosTx > {
71+ async craftRestakeRewardsTx ( pubkey : string , validatorAddress : string , granteeAddress : string ) : Promise < CosmosTx > {
6872 const { data } = await api . post < CosmosTx > ( `/v1/zeta/transaction/restake-rewards` , {
6973 pubkey : pubkey ,
7074 validator_address : validatorAddress ,
75+ grantee_address : granteeAddress ,
7176 } ) ;
7277 return data ;
7378 }
0 commit comments