import type { AugmentedProvider } from "@saberhq/solana-contrib"; import { TransactionEnvelope } from "@saberhq/solana-contrib"; import type { TokenAccountData } from "@saberhq/token-utils"; import { u64 } from "@saberhq/token-utils"; import type { Connection } from "@solana/web3.js"; import type { PublicKey } from "@solana/web3.js"; import { Keypair } from "@solana/web3.js"; import Decimal from "decimal.js"; import { QuarrySDK } from "../.."; import type { SwapPosition, TokenSwapAccount, UserSwapPoition } from "../../programs/cremaSwap"; import type { ExchangeRate } from "../../programs/exchangeRate"; import type { PositionData, PositionWrapperDetail, PositionWrapperInfo, PositionWrapperProgram } from "../../programs/positionWrapper"; import type { PendingMintAndStake, PendingMintWrapTokens, PendingPositionWrapper } from "./types"; export declare class PositionWrapper { readonly sdk: QuarrySDK; readonly program: PositionWrapperProgram; constructor(sdk: QuarrySDK); get provider(): AugmentedProvider; newWrapper({ etrMin, etrMax, swap, baseKP, tokenProgram, admin, payer, }: { etrMin: number; etrMax: number; swap: PublicKey; baseKP?: Keypair; tokenProgram?: PublicKey; admin?: PublicKey; payer?: PublicKey; }): Promise; updateWrapper(wrapper: PublicKey, etrMin: number, etrMax: number, authority: PublicKey): TransactionEnvelope; transferAdmin(wrapper: PublicKey, nextAdmin: PublicKey): TransactionEnvelope; acceptAdmin(wrapper: PublicKey): TransactionEnvelope; mintWrapTokens({ wrapper, positionInfo, authority, tokenProgram, }: { wrapper: PositionWrapperInfo; positionInfo: UserSwapPoition; authority?: PublicKey; tokenProgram?: PublicKey; }): Promise; mintAndStake({ wrapper, nftMint, rewarderKey, authority, tokenProgram, }: { wrapper: PositionWrapperInfo; nftMint: PublicKey; rewarderKey: PublicKey; authority?: PublicKey; tokenProgram?: PublicKey; }): Promise; burnWrapTokens({ wrapper, nftMint, nftAccount, authority, tokenProgram, }: { wrapper: PositionWrapperInfo; nftMint: PublicKey; nftAccount: PublicKey; authority?: PublicKey; tokenProgram?: PublicKey; }): Promise; unstakeAndBurn({ wrapper, nftMint, rewarderKey, isClaim, authority, tokenProgram, }: { wrapper: PositionWrapperInfo; nftMint: PublicKey; rewarderKey: PublicKey; isClaim?: boolean; authority?: PublicKey; tokenProgram?: PublicKey; }): Promise; static fetchPositionWrapper(wrapper: PublicKey, connection: Connection): Promise; static fetchStakePosition(position: PublicKey, connection: Connection): Promise; static fetchStakePositions(wrapper: PublicKey | null, owner: PublicKey | null, connection: Connection, hold?: boolean): Promise>; static fetchCremaSwap(swapKey: PublicKey, connection: Connection): Promise; static fetchCremaSwaps(swapList: PublicKey[], connection: Connection): Promise>; static fetchSwapPositionByIndex(swapPosition: PublicKey, index: number, connection: Connection): Promise; static fetchSwapPositionByNFT(swapKey: PublicKey, nftMint: PublicKey, connection: Connection): Promise; static fetchSwapPositions(swapKey: PublicKey, connection: Connection): Promise>; static fetchSwapPositionsByOwner(swapKey: PublicKey, owner: PublicKey, connection: Connection): Promise>; static fetchSwapPositionByOwner(swapKey: PublicKey, nftMint: PublicKey, owner: PublicKey, connection: Connection): Promise; static fetchWrappers(connection: Connection): Promise>; static fetchWrapperWithDetail(wrapper: PositionWrapperInfo, exchangeRate: ExchangeRate, quote: string | PublicKey, connection: Connection): Promise; static fetchWrappersWithDetail(exchangeRate: ExchangeRate, quote: string | PublicKey, connection: Connection): Promise>; static calculatePositionWrapperAPR(rewarderKey: PublicKey, wrapMint: PublicKey, tvl: Decimal, exchangeRate: ExchangeRate, quote: string | PublicKey, connection: Connection): Promise<{ apr: Decimal; annualRewardsRate: Decimal; totalRewardsShares: Decimal; rewardShare: Decimal; }>; static calculateWrapAmount(wrapper: PositionWrapperInfo, position: SwapPosition): u64; static getTokenAccount(provider: AugmentedProvider, addr: PublicKey): Promise; } //# sourceMappingURL=positionWrapper.d.ts.map