UNPKG

@frakt-protocol/frakt-sdk

Version:

Frakt SDK for interacting with frakt.xyz protocols

31 lines (30 loc) 1.26 kB
import { CollectionInfoView, DepositView, LiquidationLotView, LoanView, PriceBasedLiquidityPoolView, TimeBasedLiquidityPoolView } from '../types'; import { PublicKey, Connection, ParsedTransactionWithMeta } from '@solana/web3.js'; export interface AccountsChanged { collectionInfos: CollectionInfoView[]; deposits: DepositView[]; timeBasedLiquidityPools: TimeBasedLiquidityPoolView[]; priceBasedLiquidityPools: PriceBasedLiquidityPoolView[]; loans: LoanView[]; liquidationLots: LiquidationLotView[]; } 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>;