mango-v4/ts/client/src/types.ts

34 lines
798 B
TypeScript
Raw Normal View History

import { BN } from '@coral-xyz/anchor';
2022-11-20 20:50:08 -08:00
export type Modify<T, R> = Omit<T, keyof R> & R;
2022-06-23 01:19:33 -07:00
export class FlashLoanWithdraw {
static index: number;
static amount: BN;
}
export type FlashLoanType =
| { unknown: Record<string, never> }
| { swap: Record<string, never> }
| { swapWithoutFee: Record<string, never> };
// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace FlashLoanType {
export const unknown = { unknown: {} };
export const swap = { swap: {} };
export const swapWithoutFee = { swapWithoutFee: {} };
}
2022-09-02 00:42:47 -07:00
export class InterestRateParams {
util0: number;
rate0: number;
util1: number;
rate1: number;
maxRate: number;
adjustmentFactor: number;
}
export class OracleConfigParams {
confFilter: number;
maxStalenessSlots: number | null;
}