@kamino-finance/klend-sdk
Version:
Typescript SDK for interacting with the Kamino Lending (klend) protocol
161 lines • 4.89 kB
TypeScript
import { Address, ProgramDerivedAddress } from '@solana/kit';
import { Buffer } from 'buffer';
/**
* Lending market authority seed
*/
export declare const LENDING_MARKET_AUTH_SEED = "lma";
/**
* Reserve liquidity supply seed
*/
export declare const RESERVE_LIQ_SUPPLY_SEED = "reserve_liq_supply";
/**
* Reserve fee vault seed
*/
export declare const FEE_RECEIVER_SEED = "fee_receiver";
/**
* Reserve collateral mint seed
*/
export declare const RESERVE_COLL_MINT_SEED = "reserve_coll_mint";
/**
* Reserve collateral supply seed
*/
export declare const RESERVE_COLL_SUPPLY_SEED = "reserve_coll_supply";
/**
* User metadata seed
*/
export declare const BASE_SEED_USER_METADATA = "user_meta";
/**
* Referrer token state seed
*/
export declare const BASE_SEED_REFERRER_TOKEN_STATE = "referrer_acc";
/**
* Referrer state seed
*/
export declare const BASE_SEED_REFERRER_STATE = "ref_state";
/**
* Short url seed
*/
export declare const BASE_SEED_SHORT_URL = "short_url";
/**
* Short url seed
*/
export declare const BASE_SEED_GLOBAL_CONFIG_STATE = "global_config";
/**
* Farm user state seed
*/
export declare const BASE_SEED_USER_STATE = "user";
/**
* User farm state seed
*/
export declare const BASE_SEED_FARM_USER_STATE: Buffer<ArrayBuffer>;
/**
* Encapsulates all the PDAs for a given reserve
*/
export interface ReservePdas {
liquiditySupplyVault: Address;
collateralMint: Address;
collateralSupplyVault: Address;
feeVault: Address;
}
/**
* Returns all the PDAs for the given reserve
* @param programId
* @param market
* @param mint
* @returns ReservePdas
*/
export declare function reservePdas(programId: Address, market: Address, mint: Address): Promise<ReservePdas>;
/**
* Returns the PDA and bump for the lending market authority
* @param lendingMarket
* @param programId
* @returns [authority, bump]
*/
export declare function lendingMarketAuthPda(lendingMarket: Address, programId?: Address): Promise<ProgramDerivedAddress>;
/**
* Returns the PDA and bump for the reserve liquidity supply
* @param lendingMarket
* @param mint
* @param programId
* @returns [pda, bump]
*/
export declare function reserveLiqSupplyPda(lendingMarket: Address, mint: Address, programId?: Address): Promise<ProgramDerivedAddress>;
/**
* Returns the PDA and bump for the reserve fee vault
* @param lendingMarket
* @param mint
* @param programId
* @returns [vaultPda, bump]
*/
export declare function reserveFeeVaultPda(lendingMarket: Address, mint: Address, programId?: Address): Promise<ProgramDerivedAddress>;
/**
* Returns the PDA and bump for the reserve collateral mint
* @param lendingMarket
* @param mint
* @param programId
* @returns [mintPda, bump]
*/
export declare function reserveCollateralMintPda(lendingMarket: Address, mint: Address, programId?: Address): Promise<ProgramDerivedAddress>;
/**
* Returns the PDA and bump for the reserve collateral supply
* @param lendingMarket
* @param mint
* @param programId
* @returns [pda, bump]
*/
export declare function reserveCollateralSupplyPda(lendingMarket: Address, mint: Address, programId?: Address): Promise<ProgramDerivedAddress>;
/**
* Returns the PDA and bump for the user metadata state
* @param user
* @param programId
* @returns [pda, bump]
*/
export declare function userMetadataPda(user: Address, programId?: Address): Promise<ProgramDerivedAddress>;
/**
* Returns the PDA and bump for the referrer account for a mint
* @param referrer
* @param reserve
* @param programId
* @returns pda
*/
export declare function referrerTokenStatePda(referrer: Address, reserve: Address, programId?: Address): Promise<Address>;
/**
* Returns the PDA and bump for the referrer state
* @param referrer
* @param programId
* @returns [pda, bump]
*/
export declare function referrerStatePda(referrer: Address, programId?: Address): Promise<ProgramDerivedAddress>;
/**
* Returns the PDA and bump for the short url
* @param shortUrl
* @param programId
* @returns pda
*/
export declare function shortUrlPda(shortUrl: string, programId?: Address): Promise<Address>;
/**
* Returns the PDA and bump for the global config state.
* @param programId
* @returns pda
*/
export declare function globalConfigPda(programId?: Address): Promise<Address>;
/**
* Returns the PDA and bump for the program data.
* @param programId
* @returns pda
*/
export declare function programDataPda(programId?: Address): Promise<Address>;
/**
* Returns the PDA for the obligation farm state
* @param farm
* @param obligation
* @returns pda
*/
export declare function obligationFarmStatePda(farm: Address, obligation: Address): Promise<Address>;
/**
* Returns the PDA for the kVault shares metadata
* @param mint
* @returns [pda, bump]
*/
export declare function getKVaultSharesMetadataPda(mint: Address): Promise<ProgramDerivedAddress>;
//# sourceMappingURL=seeds.d.ts.map