UNPKG

@frakters/nft-lending-v2

Version:

Client library for interacting with nft lenging solana program

33 lines (32 loc) 1.36 kB
import { CollectionInfoView, DepositView, LiquidationLotView, LoanView, LotTicketView, NftAttemptView, PriceBasedLiquidityPoolView, TimeBasedLiquidityPoolView } from './../index'; import { PublicKey, Connection, ParsedTransactionWithMeta } from '@solana/web3.js'; export interface AccountsChanged { collectionInfos: CollectionInfoView[]; deposits: DepositView[]; timeBasedLiquidityPools: TimeBasedLiquidityPoolView[]; priceBasedLiquidityPools: PriceBasedLiquidityPoolView[]; loans: LoanView[]; liquidationLots: LiquidationLotView[]; lotTickets: LotTicketView[]; nftAttempts: NftAttemptView[]; } export interface TransactionAccountParserParams { transaction: ParsedTransactionWithMeta; programId: PublicKey; connection: Connection; } export declare const LOAN_STATE_PRIORITY: { proposed: number; rejected: number; activated: number; paidBack: number; liquidated: number; paidBackWithGrace: number; }; export declare const onAccountsChange: ({ programId, timeoutOfCalls, fromThisSignature, connection, onAccountsChange, }: { programId: PublicKey; timeoutOfCalls?: number | undefined; fromThisSignature?: string | undefined; connection: Connection; onAccountsChange: (changedAccounts: AccountsChanged, functionName?: string | undefined) => Promise<any>; }) => Promise<never>;