IAppraisal
interface IAppraisal {
address: string;
tokenId: string;
wrapperAddress: string;
collectionName: string;
appraisalValue: string;
}
IAppraisalError
interface IAppraisalError {
message: 'Error: Project is not supported yet.';
}
IBnplPrice
interface ICalcResponse {
vaultId: number;
tokenId: string;
collectionName: string;
wrapperAddress: string;
signature: string;
lastBlockNum: number;
totalNumOfPayments: number;
term: number;
image: string;
downpaymentRate: number;
interestRate: number;
interestRateApr: number;
serviceFeeRate: number;
price: BigNumber;
currency: string;
couponDiscountRate: number;
interestFee: BigNumber;
serviceFee: BigNumber;
downpaymentAmount: BigNumber;
totalPaymentAmount: BigNumber;
totalFinancingAmount?: BigNumber;
}
INextPayment
interface INextPayment {
payAmountForCollateral: string;
payAmountForInterest: string;
payAmountForService: string;
currentPayment: string;
nextPaymentDate?: Date;
}
IPawnPrice
interface IPawnAppraisal {
signature: string;
lastBlockNum: number;
unlockAmount: BigNumber;
totalNumOfPayments: number;
appraisalValue: BigNumber;
term: number;
tokenId: string;
vaultId: number;
wrapperAddress: string;
collectionName: string;
interestRate: number;
interestRateApr: number;
serviceFeeRate: number;
couponDiscountRate: number;
interestFee: BigNumber;
serviceFee: BigNumber;
downpaymentAmount: BigNumber;
totalPaymentAmount: BigNumber;
totalFinancingAmount?: BigNumber;
}
IPlan
const statusType = {
Pending: 0,
Funded: 1,
Activated: 2,
};
export interface IPlanStatus = typeof statusType[keyof typeof statusType];
interface IPlan {
owner: string;
totalNumOfPayments: number;
currentNumOfPayments: number;
status: IPlanStatus;
type: 'bnpl' | 'pawn';
wNFTContract: string;
wNFTTokenId: string;
paymentPlanContractAddress: string;
collectionAddress: string;
}