import type { Provider } from "@saberhq/solana-contrib"; import { TransactionEnvelope } from "@saberhq/solana-contrib"; import type { ProgramAccount } from "@saberhq/token-utils"; import { Token, u64 } from "@saberhq/token-utils"; import type { PublicKey } from "@solana/web3.js"; import type { MineProgram, MinerData, QuarryData, RewarderData } from "../../programs/mine"; import { QuarrySDK } from "../../sdk"; import { MinerWrapper } from "./miner"; import { Payroll } from "./payroll"; import type { PendingMiner } from "./types"; export declare class QuarryWrapper { readonly sdk: QuarrySDK; /** * The token being staked. */ readonly token: Token; /** * The data of the rewarder. */ readonly rewarderData: RewarderData; /** * The data of the quarry. */ readonly quarryData: QuarryData; /** * The key of the quarry. */ readonly key: PublicKey; constructor(sdk: QuarrySDK, /** * The token being staked. */ token: Token, /** * The data of the rewarder. */ rewarderData: RewarderData, /** * The data of the quarry. */ quarryData: QuarryData, /** * The key of the quarry. */ key: PublicKey); static fromData(provider: Provider, rewarder: ProgramAccount, quarry: ProgramAccount): QuarryWrapper; /** * The program. */ get program(): MineProgram; /** * The provider. */ get provider(): Provider; /** * Loads a quarry * @returns */ static load({ sdk, token, key, }: { sdk: QuarrySDK; /** * The quarry's key */ key: PublicKey; /** * The token being staked. */ token: Token; }): Promise; /** * Get the computed rewards rate of the quarry. * * This is used for tests, so you probably don't want this. * You want quarryData.annualRewardsRate. * * @returns annualRewardsRate */ computeAnnualRewardsRate(): u64; /** * Get the public key of the miner assocaited with the authority account * @param authority who owns the miner * @returns miner public key */ getMinerAddress(authority: PublicKey): Promise; /** * Get the miner data associated with the authority account * @param authority * @returns */ getMiner(authority: PublicKey): Promise; /** * Get the miner associated with the authority account * @param authority * @returns */ getMinerActions(authority?: PublicKey): Promise; /** * Creates a miner wrapper * @param authority * @param minerKey * @param tokenVaultKey * @param stakedTokenATA * @returns */ createMinerWrapper(authority: PublicKey, minerKey: PublicKey, tokenVaultKey: PublicKey, stakedTokenATA: PublicKey): MinerWrapper; /** * Sets the rewards share of this mine. */ setRewardsShare(share: u64): TransactionEnvelope; /** * Sets the famine timestampe for this mine. */ setFamine(famineTs: u64): TransactionEnvelope; /** * Creates the miner of the provided wallet. */ createMiner({ authority, }?: { authority?: PublicKey; }): Promise; /** * Payroll helper */ get payroll(): Payroll; } //# sourceMappingURL=quarry.d.ts.map