import { BaseProvider } from '../providers/base'; import { Coin } from '@cryptoandcoffee/akash-jsdk-protobuf'; import { StakingResult } from '../types/results'; export interface Validator { operatorAddress: string; consensusPubkey?: { type: string; value: string; }; jailed: boolean; status: string; tokens: string; delegatorShares: string; description: { moniker: string; identity?: string; website?: string; securityContact?: string; details?: string; }; unbondingHeight?: string; unbondingTime?: string; commission: { commissionRates: { rate: string; maxRate: string; maxChangeRate: string; }; updateTime: string; }; minSelfDelegation: string; } export interface Delegation { delegatorAddress: string; validatorAddress: string; shares: string; balance: Coin; } export interface DelegationResponse { delegation: Delegation; balance: Coin; } export interface Rewards { rewards: Array<{ validatorAddress: string; reward: Coin[]; }>; total: Coin[]; } export interface UnbondingDelegation { delegatorAddress: string; validatorAddress: string; entries: Array<{ creationHeight: string; completionTime: string; initialBalance: string; balance: string; }>; } export interface RedelegationEntry { creationHeight: string; completionTime: string; initialBalance: string; sharesDst: string; } export interface Redelegation { delegatorAddress: string; validatorSrcAddress: string; validatorDstAddress: string; entries: RedelegationEntry[]; } export declare class StakingManager { private provider; private readonly DEFAULT_UNBONDING_PERIOD_DAYS; constructor(provider: BaseProvider); /** * Delegate tokens to a validator */ delegate(validatorAddress: string, amount: Coin, wallet?: any): Promise; /** * Undelegate tokens from a validator */ undelegate(validatorAddress: string, amount: Coin, wallet?: any): Promise; /** * Redelegate tokens from one validator to another */ redelegate(srcValidator: string, dstValidator: string, amount: Coin, wallet?: any): Promise; /** * Get all validators or filter by status from the blockchain * Queries the Cosmos staking module API endpoint */ getValidators(status?: 'BOND_STATUS_BONDED' | 'BOND_STATUS_UNBONDED' | 'BOND_STATUS_UNBONDING'): Promise; /** * Get validator details by address */ getValidator(address: string): Promise; /** * Get delegations for a delegator address */ getDelegations(delegatorAddress?: string): Promise; /** * Get a specific delegation between a delegator and validator */ getDelegation(delegatorAddress: string, validatorAddress: string): Promise; /** * Get unbonding delegations for a delegator */ getUnbondingDelegations(delegatorAddress?: string): Promise; /** * Get redelegations for a delegator */ getRedelegations(delegatorAddress?: string): Promise; /** * Get staking rewards for a delegator */ getRewards(delegatorAddress?: string): Promise; /** * Withdraw staking rewards from a validator */ withdrawRewards(validatorAddress: string, wallet?: any): Promise; /** * Withdraw all staking rewards from all validators */ withdrawAllRewards(delegatorAddress?: string): Promise; /** * Get staking pool information */ getPool(): Promise<{ bondedTokens: string; notBondedTokens: string; }>; /** * Get staking parameters */ getParams(): Promise<{ unbondingTime: string; maxValidators: number; maxEntries: number; historicalEntries: number; bondDenom: string; minCommissionRate: string; }>; /** * Generate a mock bech32 address suffix for testing */ private generateMockAddress; } export type { StakingResult }; //# sourceMappingURL=staking.d.ts.map