///
///
import { PublicKey } from '@solana/web3.js';
import BigNumber from 'bignumber.js';
import { BeetStruct } from '@metaplex-foundation/beet';
export type PodU32 = {
array: number[];
};
export declare const podU32Struct: BeetStruct>;
export type Duration = {
duration: PodU32;
duration_type: number;
};
export declare const durationStruct: BeetStruct>;
export type PodDecimal = {
array: number[];
};
export declare const podDecimalStruct: BeetStruct>;
export type PodU128 = {
array: number[];
};
export declare const podU128Struct: BeetStruct>;
export type PodU32CBPS = {
array: number[];
};
export declare const podU32CBPSStruct: BeetStruct>;
export type PodU64 = {
array: number[];
};
export declare const podU64Struct: BeetStruct>;
export type PodU64CBPS = {
array: number[];
};
export declare const podU64CBPSStruct: BeetStruct>;
export type PodBool = {
value: number;
};
export declare const podBoolStruct: BeetStruct>;
export type Vault = {
accountDiscriminator: number[];
manager: PublicKey;
nonce: PublicKey;
bump: number;
lp_supply: PodU64;
lp_mint: PublicKey;
principal_mint: PublicKey;
cumulative_principal_deposited: PodU64;
deposits_enabled: PodBool;
max_early_unstake_fee: PodU64CBPS;
};
export declare const vaultStruct: BeetStruct>;
export type VaultStake = {
accountDiscriminator: number[];
vault: PublicKey;
nonce: PublicKey;
bump: number;
user: PublicKey;
amount: PodU64;
duration: Duration;
start_time: PodU64;
end_time: PodU64;
unstake_time: PodU64;
unstake_fee_applied: PodU64;
};
export declare const vaultStakeStruct: BeetStruct>;
export type Ledger = {
status: number;
strategy: PublicKey;
principal_mint: PublicKey;
market_information: PublicKey;
principal_due: PodU64;
principal_repaid: PodU64;
interest_due: PodU64;
interest_repaid: PodU64;
duration: Duration;
interest_per_second: PodDecimal;
start_time: PodU64;
end_time: PodU64;
apy: PodU64CBPS;
};
export declare const ledgerStruct: BeetStruct>;
export type Strategy = {
accountDiscriminator: number[];
version: number;
nonce: PublicKey;
bump: number;
principal_mint: PublicKey;
lender: PublicKey;
originations_enabled: PodBool;
external_yield_source: number;
interest_per_second: PodDecimal;
last_accrued_timestamp: PodU64;
liquidity_buffer: PodU64CBPS;
token_balance: PodU64;
interest_fee: PodU64CBPS;
principal_fee: PodU64CBPS;
origination_fee: PodU64CBPS;
origination_cap: PodU64;
external_yield_amount: PodU64;
current_deployed_amount: PodU64;
outstanding_interest_amount: PodU64;
fee_claimable: PodU64;
cumulative_principal_originated: PodU128;
cumulative_interest_accrued: PodU128;
cumulative_loan_count: PodU64;
active_loan_count: PodU64;
market_information: PublicKey;
collateral_map: PodU64[][];
};
export declare const strategyStruct: BeetStruct>;
export type CollateralData = {
asset_mint: PublicKey;
amount: PodU64;
asset_type: number;
asset_identifier: PublicKey;
};
export declare const collateralDataStruct: BeetStruct>;
export declare enum LoanType {
Borrowing = 0,
Unknown = 1,
YieldLoop = 2
}
export type Loan = {
accountDiscriminator: number[];
version: number;
bump: number;
loan_type: LoanType;
borrower: PublicKey;
nonce: BigNumber;
start_time: PodU64;
ledgers: Ledger[];
collateral: CollateralData[];
weight_matrix: PodU32CBPS[][];
ltv_matrix: PodU32CBPS[][];
lqt_matrix: PodU32CBPS[][];
};
export declare const loanStruct: BeetStruct>;