@binance/crypto-loan 2.0.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -10,7 +10,7 @@ import { ConfigurationRestAPI as ConfigurationRestAPI4, CRYPTO_LOAN_REST_API_PRO
10
10
 
11
11
  // package.json
12
12
  var name = "@binance/crypto-loan";
13
- var version = "2.0.0";
13
+ var version = "4.0.0";
14
14
 
15
15
  // src/rest-api/index.ts
16
16
  var rest_api_exports = {};
@@ -200,11 +200,12 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
200
200
  * @param {number} repayAmount repay amount of loanCoin
201
201
  * @param {boolean} [collateralReturn] Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order, and lower LTV.
202
202
  * @param {boolean} [fullRepayment] Default: FALSE. TRUE: Full repayment; FALSE: Partial repayment, based on loanAmount
203
+ * @param {number} [repaymentType] Default: 1. 1: Repayment with loan asset; 2: Repayment with collateral
203
204
  * @param {number} [recvWindow]
204
205
  *
205
206
  * @throws {RequiredError}
206
207
  */
207
- flexibleLoanRepay: async (loanCoin, collateralCoin, repayAmount, collateralReturn, fullRepayment, recvWindow) => {
208
+ flexibleLoanRepay: async (loanCoin, collateralCoin, repayAmount, collateralReturn, fullRepayment, repaymentType, recvWindow) => {
208
209
  assertParamExists("flexibleLoanRepay", "loanCoin", loanCoin);
209
210
  assertParamExists("flexibleLoanRepay", "collateralCoin", collateralCoin);
210
211
  assertParamExists("flexibleLoanRepay", "repayAmount", repayAmount);
@@ -224,6 +225,9 @@ var FlexibleRateApiAxiosParamCreator = function(configuration) {
224
225
  if (fullRepayment !== void 0 && fullRepayment !== null) {
225
226
  localVarQueryParameter["fullRepayment"] = fullRepayment;
226
227
  }
228
+ if (repaymentType !== void 0 && repaymentType !== null) {
229
+ localVarQueryParameter["repaymentType"] = repaymentType;
230
+ }
227
231
  if (recvWindow !== void 0 && recvWindow !== null) {
228
232
  localVarQueryParameter["recvWindow"] = recvWindow;
229
233
  }
@@ -677,6 +681,7 @@ var FlexibleRateApi = class {
677
681
  requestParameters?.repayAmount,
678
682
  requestParameters?.collateralReturn,
679
683
  requestParameters?.fullRepayment,
684
+ requestParameters?.repaymentType,
680
685
  requestParameters?.recvWindow
681
686
  );
682
687
  return sendRequest(