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 { MineProgram, MinerData } from "../../programs/mine"; import type { QuarrySDK } from "../../sdk"; import type { QuarryWrapper } from "./quarry"; import type { PendingMiner } from "./types"; declare type MineUserStakeAccounts = Parameters[0]; declare type MineUserClaimAccounts = Parameters[0]["claim"]; export declare class MinerWrapper { readonly quarry: QuarryWrapper; readonly authority: PublicKey; readonly minerKey: PublicKey; readonly tokenVaultKey: PublicKey; readonly stakedTokenATA: PublicKey; /** * * @param quarry * @param authority * @param minerKey * @param tokenVaultKey (associated w/ minerKey) * @param stakedTokenATA Staked token ATA (associated w/ authority) */ constructor(quarry: QuarryWrapper, authority: PublicKey, minerKey: PublicKey, tokenVaultKey: PublicKey, stakedTokenATA: PublicKey); /** * The program. */ get program(): MineProgram; /** * The provider. */ get provider(): Provider; /** * The mining SDK. */ get sdk(): QuarrySDK; /** * Creates the miner of the provided wallet. */ initialize(): PendingMiner; /** * Generates stake accounts for the user. * @returns */ get userStakeAccounts(): MineUserStakeAccounts; /** * Generates stake accounts for the user. * @returns */ get userClaimAccounts(): MineUserClaimAccounts; private _performStakeAction; private _getOrCreateStakedAssociatedTokenAccountInternal; /** * Creates the ATA of the user's staked token if it doesn't exist. */ createATAIfNotExists(): Promise; /** * Stakes the current wallet's tokens into the pool. * @param amount * @returns */ stake(amount: TokenAmount): TransactionEnvelope; /** * Withdraws the current wallet's tokens from the pool. * @param amount * @returns */ withdraw(amount: TokenAmount): TransactionEnvelope; /** * Fetches the data associated with the miner. * @returns */ fetchData(): Promise; /** * Claims an amount of tokens. * @returns */ claimV1(): Promise; /** * Claims an amount of tokens. * @returns */ claim(): Promise; } export {}; //# sourceMappingURL=miner.d.ts.map