@kamino-finance/klend-sdk
Version:
Typescript SDK for interacting with the Kamino Lending (klend) protocol
123 lines • 3.8 kB
TypeScript
import { PublicKey } from '@solana/web3.js';
/**
* 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";
/**
* Encapsulates all the PDAs for a given reserve
*/
export interface ReservePdas {
liquiditySupplyVault: PublicKey;
collateralMint: PublicKey;
collateralSupplyVault: PublicKey;
feeVault: PublicKey;
}
/**
* Returns all the PDAs for the given reserve
* @param programId
* @param market
* @param mint
* @returns ReservePdas
*/
export declare function reservePdas(programId: PublicKey, market: PublicKey, mint: PublicKey): ReservePdas;
/**
* Returns the PDA and bump for the lending market authority
* @param lendingMarket
* @param programId
* @returns [authority, bump]
*/
export declare function lendingMarketAuthPda(lendingMarket: PublicKey, programId?: PublicKey): [PublicKey, number];
/**
* Returns the PDA and bump for the reserve liquidity supply
* @param lendingMarket
* @param mint
* @param programId
* @returns [pda, bump]
*/
export declare function reserveLiqSupplyPda(lendingMarket: PublicKey, mint: PublicKey, programId?: PublicKey): [PublicKey, number];
/**
* Returns the PDA and bump for the reserve fee vault
* @param lendingMarket
* @param mint
* @param programId
* @returns [vaultPda, bump]
*/
export declare function reserveFeeVaultPda(lendingMarket: PublicKey, mint: PublicKey, programId?: PublicKey): [PublicKey, number];
/**
* Returns the PDA and bump for the reserve collateral mint
* @param lendingMarket
* @param mint
* @param programId
* @returns [mintPda, bump]
*/
export declare function reserveCollateralMintPda(lendingMarket: PublicKey, mint: PublicKey, programId?: PublicKey): [PublicKey, number];
/**
* Returns the PDA and bump for the reserve collateral supply
* @param lendingMarket
* @param mint
* @param programId
* @returns [pda, bump]
*/
export declare function reserveCollateralSupplyPda(lendingMarket: PublicKey, mint: PublicKey, programId?: PublicKey): [PublicKey, number];
/**
* Returns the PDA and bump for the user metadata state
* @param user
* @param programId
* @returns [pda, bump]
*/
export declare function userMetadataPda(user: PublicKey, programId?: PublicKey): [PublicKey, number];
/**
* Returns the PDA and bump for the referrer account for a mint
* @param referrer
* @param mint
* @param programId
* @returns [pda, bump]
*/
export declare function referrerTokenStatePda(referrer: PublicKey, reserve: PublicKey, programId?: PublicKey): PublicKey[] | [PublicKey, number];
/**
* Returns the PDA and bump for the referrer state
* @param referrer
* @param programId
* @returns [pda, bump]
*/
export declare function referrerStatePda(referrer: PublicKey, programId?: PublicKey): [PublicKey, number];
/**
* Returns the PDA and bump for the short url
* @param shortUrl
* @param programId
* @returns [pda, bump]
*/
export declare function shortUrlPda(shortUrl: string, programId?: PublicKey): [PublicKey, number];
//# sourceMappingURL=seeds.d.ts.map