UNPKG

banx-token-lending-sdk

Version:

Banx Token Lending sdk

34 lines (33 loc) 1.24 kB
import { BN, web3 } from '@coral-xyz/anchor'; import { GetInstructionsReturnType } from '../types'; import { BanxMarket } from '../../accounts/BanxMarket/BanxMarket'; type GetCreateListingIxnsRawParams = { args: { amountToBorrow: BN; amountOfCollateralToSend: BN; loanLiquidationLtv: number; lenderApr: number; }; connection: web3.Connection; accounts: { userPubkey: web3.PublicKey; market: web3.PublicKey; lendingTokenMint: web3.PublicKey; collateralMint: web3.PublicKey; }; }; type GetCreateListingIxnsReturnType = GetInstructionsReturnType<{ bondOffer: web3.PublicKey; bondLoan: web3.PublicKey; }>; export declare function getCreateListingIxnsRaw({ accounts, connection, args, }: GetCreateListingIxnsRawParams): Promise<GetCreateListingIxnsReturnType>; export type GetCreateListingIxnsParams = { args: GetCreateListingIxnsRawParams['args']; connection: web3.Connection; accounts: { banxMarket: BanxMarket; }; walletPublicKey: web3.PublicKey; }; export declare function getCreateListingIxns({ args, connection, accounts, walletPublicKey, }: GetCreateListingIxnsParams): Promise<GetCreateListingIxnsReturnType>; export {};