import type { Provider } from "@saberhq/solana-contrib"; import { TransactionEnvelope } from "@saberhq/solana-contrib"; import type { TokenAmount } from "@saberhq/token-utils"; import type { PublicKey } from "@solana/web3.js"; import type { MergeMinerData, MergePoolData, QuarryMergeMineProgram, QuarryStakeAccounts } from "../../programs"; import type { MergeMine } from "./quarryMergeMine"; export declare class MergeMiner { readonly mergeMine: MergeMine; readonly pool: { key: PublicKey; data: MergePoolData; }; readonly mm: { key: PublicKey; data: MergeMinerData; }; constructor(mergeMine: MergeMine, pool: { key: PublicKey; data: MergePoolData; }, mm: { key: PublicKey; data: MergeMinerData; }); get provider(): Provider; get program(): QuarryMergeMineProgram; get primaryMint(): PublicKey; get replicaMint(): PublicKey; /** * Deposit primary tokens into the merge miner. * @param amount * @returns */ deposit({ amount, rewarder, }: { amount: TokenAmount; rewarder: PublicKey; }): Promise; /** * Deposits tokens into the primary quarry. * (Not recommended-- you probably want {@link MergeMiner#deposit}.) * @returns */ stakePrimaryMiner(rewarder: PublicKey): Promise; /** * Stakes replica tokens into a miner. * @returns */ stakeReplicaMiner(rewarder: PublicKey): Promise; /** * Withdraw staked tokens from a merge miner. * @param amount * @returns */ withdraw({ amount, rewarder, }: { amount: TokenAmount; rewarder: PublicKey; }): Promise; /** * Unstakes all replica tokens from a quarry. * You must call this function for each replica miner before unstaking the primary. * @returns */ unstakeAllReplica(rewarder: PublicKey): Promise; /** * Withdraws primary tokens from the quarry. * (Not recommended-- you probably want {@link MergeMiner#withdraw}.) * @returns */ unstakePrimaryMiner(rewarder: PublicKey, amount: TokenAmount): Promise; /** * Withdraws unstaked primary tokens from the merge miner. * (Not recommended-- you probably want {@link MergeMiner#withdraw}.) * @returns */ withdrawPrimaryFromMM(): Promise; /** * Withdraws a specific mint from the merge miner. * @param withdrawMint * @returns */ withdrawTokens(withdrawMint: PublicKey): Promise; /** * Claims rewards for a primary account. * @param rewarder * @returns */ claimPrimaryRewards(rewarder: PublicKey): Promise; /** * Claims rewards for a replica account. * @returns */ claimReplicaRewards(rewarder: PublicKey): Promise; /** * Claims internal mining rewards. * @param amount * @returns */ claimRewardsCommon(quarryMint: PublicKey, stake: QuarryStakeAccounts, mmOwner?: PublicKey): Promise; getReplicaStakeAccounts(rewarder: PublicKey): Promise; getPrimaryStakeAccounts(rewarder: PublicKey): Promise; get commonStakeAccounts(): Pick; } //# sourceMappingURL=mergeMiner.d.ts.map