@firmachain/firma-js
Version:
The Official FirmaChain Javascript SDK written in Typescript
33 lines (32 loc) • 2.51 kB
TypeScript
import { DistributionTxClient, TxMisc, TotalRewardInfo } from "./firmachain/distribution";
import { FirmaWalletService } from "./FirmaWalletService";
import { FirmaConfig } from "./FirmaConfig";
import { BroadcastTxResponse } from "./firmachain/common/stargateclient";
import { Coin } from "cosmjs-types/cosmos/base/v1beta1/coin";
import { DelegationInfo } from "./firmachain/staking";
export declare class FirmaDistributionService {
private readonly config;
constructor(config: FirmaConfig);
getTxClient(wallet: FirmaWalletService): DistributionTxClient;
getGasEstimationSetWithdrawAddress(wallet: FirmaWalletService, withdrawAddress: string, txMisc?: TxMisc): Promise<number>;
getGasEstimationFundCommunityPool(wallet: FirmaWalletService, amount: number, txMisc?: TxMisc): Promise<number>;
getGasEstimationWithdrawValidatorCommission(wallet: FirmaWalletService, validatorAddress: string, txMisc?: TxMisc): Promise<number>;
getGasEstimationWithdrawAllRewardsFromAllValidator(wallet: FirmaWalletService, delegationList: DelegationInfo[], txMisc?: TxMisc): Promise<number>;
getGasEstimationWithdrawAllRewards(wallet: FirmaWalletService, validatorAddress: string, txMisc?: TxMisc): Promise<number>;
private getSignedTxWithdrawAllRewards;
private getSignedTxSetWithdrawAddress;
private getSignedTxFundCommunityPool;
private getSignedTxWithdrawValidatorCommission;
setWithdrawAddress(wallet: FirmaWalletService, withdrawAddress: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
fundCommunityPool(wallet: FirmaWalletService, amount: number, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
withdrawValidatorCommission(wallet: FirmaWalletService, validatorAddres: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
private getSignedTxwithdrawAllRewardsFromAllValidator;
withdrawAllRewardsFromAllValidator(wallet: FirmaWalletService, delegationList: DelegationInfo[], txMisc?: TxMisc): Promise<BroadcastTxResponse>;
withdrawAllRewards(wallet: FirmaWalletService, validatorAddress: string, txMisc?: TxMisc): Promise<BroadcastTxResponse>;
getRewardInfo(address: string, validatorAddress: string): Promise<string>;
getValidatorOutStandingReward(validatorAddress: string): Promise<Coin[]>;
getValidatorCommission(validatorAddress: string): Promise<Coin[]>;
getTotalRewardInfo(address: string): Promise<TotalRewardInfo>;
getCommunityPool(): Promise<string>;
getWithdrawAddress(address: string): Promise<string>;
}