@bandz/protocol-js
Version:
Bandz protocol data aggregation tool
20 lines (19 loc) • 1.67 kB
TypeScript
import { IWBCHGateway } from '../contract-types';
import BaseDebtTokenInterface from '../interfaces/BaseDebtToken';
import IERC20ServiceInterface from '../interfaces/ERC20';
import WBCHGatewayInterface from '../interfaces/WBCHGateway';
import { Configuration, SmartBCHTransactionTypeExtended, LendingPoolMarketConfig } from '../types';
import { WBCHBorrowParamsType, WBCHDepositParamsType, WBCHRepayParamsType, WBCHWithdrawParamsType } from '../types/WbchGatewayMethodTypes';
import BaseService from './BaseService';
export default class WBCHGatewayService extends BaseService<IWBCHGateway> implements WBCHGatewayInterface {
readonly WBCHGatewayAddress: string;
readonly config: Configuration;
readonly baseDebtTokenService: BaseDebtTokenInterface;
readonly erc20Service: IERC20ServiceInterface;
readonly WBCHGatewayConfig: LendingPoolMarketConfig | undefined;
constructor(config: Configuration, baseDebtTokenService: BaseDebtTokenInterface, erc20Service: IERC20ServiceInterface, WBCHGatewayConfig: LendingPoolMarketConfig | undefined);
depositBCH({ lendingPool, user, amount, onBehalfOf, referralCode, }: WBCHDepositParamsType): Promise<SmartBCHTransactionTypeExtended[]>;
borrowBCH({ lendingPool, user, amount, debtTokenAddress, interestRateMode, referralCode, }: WBCHBorrowParamsType): Promise<SmartBCHTransactionTypeExtended[]>;
withdrawBCH({ lendingPool, user, amount, onBehalfOf, aTokenAddress, }: WBCHWithdrawParamsType): Promise<SmartBCHTransactionTypeExtended[]>;
repayBCH({ lendingPool, user, amount, interestRateMode, onBehalfOf, }: WBCHRepayParamsType): Promise<SmartBCHTransactionTypeExtended[]>;
}