UNPKG

@kamino-finance/farms-sdk

Version:
31 lines 5.29 kB
import { Address, IInstruction, Option, TransactionSigner } from "@solana/kit"; import { FarmConfigOption, GlobalConfigOption } from "../@codegen/farms/types"; import { GlobalConfigFlagValueType } from "./utils"; import { RewardCurvePoint } from "../Farms"; export declare function initializeGlobalConfig(globalAdmin: TransactionSigner, globalConfig: Address, treasuryVaultAuthority: Address): IInstruction; export declare function updateGlobalConfig(globalAdmin: TransactionSigner, globalConfig: Address, mode: GlobalConfigOption, flagValue: string, flagValueType: GlobalConfigFlagValueType): IInstruction; export declare function updateGlobalConfigAdmin(pendingGlobalAdmin: TransactionSigner, globalConfig: Address): IInstruction; export declare function updateSecondDelegatedAuthority(globalConfigAdmin: TransactionSigner, globalConfig: Address, farm: Address, newSecondAuthority: Address): IInstruction; export declare function updateFarmAdmin(pendingFarmAdmin: TransactionSigner, farm: Address): IInstruction; export declare function initializeFarm(globalConfig: Address, farmAdmin: TransactionSigner, farmState: Address, farmVault: Address, farmVaultAuthority: Address, tokenMint: Address): IInstruction; export declare function initializeFarmDelegated(globalConfig: Address, farmAdmin: TransactionSigner, farmState: Address, farmVaultAuthority: Address, farmDelegate: TransactionSigner): IInstruction; export declare function initializeReward(globalConfig: Address, treasuryVaultAuthority: Address, treasuryVault: Address, farmAdmin: TransactionSigner, farmState: Address, rewardVault: Address, farmVaultAuthority: Address, rewardMint: Address, tokenProgram: Address): IInstruction; export declare function addReward(payer: TransactionSigner, farmState: Address, rewardVault: Address, farmVaultAuthority: Address, payerRewardAta: Address, rewardMint: Address, scopePrices: Option<Address>, rewardIndex: number, tokenProgram: Address, amount: bigint): IInstruction; export declare function rewardUserOnce(delegateAuthority: TransactionSigner, farmState: Address, userState: Address, rewardIndex: number, amount: bigint, expectedRewardsIssuedCumulative: bigint, userStateId: bigint): IInstruction; export declare function withdrawReward(admin: TransactionSigner, farmState: Address, rewardMint: Address, rewardVault: Address, farmVaultAuthority: Address, adminRewardAta: Address, scopePrices: Option<Address>, tokenProgram: Address, rewardIndex: number, amount: bigint): IInstruction; export declare function closeEmptyUserState(signer: TransactionSigner, userState: Address, farmState: Address, rentReceiver: Address): IInstruction; export declare function updateFarmConfig(farmAdmin: TransactionSigner, farmState: Address, scopePrices: Option<Address>, rewardIndex: number, mode: FarmConfigOption, value: number | Address | number[] | RewardCurvePoint[] | bigint): IInstruction; export declare function refreshFarm(farmState: Address, scopePrices: Option<Address>): IInstruction; export declare function initializeUser(farmState: Address, owner: Address, userState: Address, authority: TransactionSigner, delegatee?: Address): IInstruction; export declare function transferOwnership(oldOwner: TransactionSigner, oldUserState: Address, newOwner: Address, farmState: Address, newUserState: Address, scopePrices: Option<Address>, payer?: TransactionSigner): IInstruction; export declare function stake(owner: TransactionSigner, userState: Address, ownerTokenAta: Address, farmState: Address, farmVault: Address, tokenMint: Address, scopePrices: Option<Address>, amount: bigint): IInstruction; export declare function unstake(owner: TransactionSigner, userState: Address, farmState: Address, scopePrices: Option<Address>, amount: bigint): IInstruction; export declare function harvestReward(payer: TransactionSigner, userState: Address, userRewardAta: Address, globalConfig: Address, treasuryVault: Address, farmState: Address, rewardMint: Address, rewardVault: Address, farmVaultAuthority: Address, scopePrices: Option<Address>, tokenProgram: Address, rewardIndex: number): IInstruction; export declare function withdrawTreasury(globalAdmin: TransactionSigner, globalConfig: Address, treasuryVault: Address, treasuryVaultAuthority: Address, globalAdminWithdrawAta: Address, amount: bigint, rewardMint: Address): IInstruction; export declare function refreshUserState(userState: Address, farmState: Address, scopePrices: Option<Address>): IInstruction; export declare function withdrawUnstakedDeposit(owner: TransactionSigner, userState: Address, farmState: Address, userAta: Address, farmVault: Address, farmVaultsAuthority: Address): IInstruction; export declare function withdrawFromFarmVault(withdrawAuthority: TransactionSigner, farmState: Address, withdrawerTokenAccount: Address, farmVault: Address, farmVaultsAuthority: Address, amount: bigint): IInstruction; export declare function depositToFarmVault(depositor: TransactionSigner, farmState: Address, farmVault: Address, depositorAta: Address, amount: bigint): IInstruction; export declare function serializeConfigValue(reward_index: bigint, value: bigint): Uint8Array; export declare function serializeRewardCurvePoint(reward_index: number, points: RewardCurvePoint[]): Uint8Array; //# sourceMappingURL=operations.d.ts.map