@suilend/sdk 14.3.0 → 16.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.
Files changed (28) hide show
  1. package/_generated/_dependencies/pyth-2/price-identifier/structs.d.ts +5 -1
  2. package/_generated/_dependencies/std/ascii/structs.d.ts +8 -2
  3. package/_generated/_dependencies/std/option/structs.d.ts +6 -1
  4. package/_generated/_dependencies/std/type-name/structs.d.ts +7 -1
  5. package/_generated/_dependencies/sui/bag/structs.d.ts +8 -1
  6. package/_generated/_dependencies/sui/balance/structs.d.ts +6 -2
  7. package/_generated/_dependencies/sui/object/structs.d.ts +8 -2
  8. package/_generated/_dependencies/sui/object-table/structs.d.ts +8 -1
  9. package/_generated/_envs/mainnet.js +39 -3
  10. package/_generated/suilend/cell/structs.d.ts +8 -1
  11. package/_generated/suilend/decimal/structs.d.ts +3 -1
  12. package/_generated/suilend/lending-market/functions.d.ts +185 -64
  13. package/_generated/suilend/lending-market/functions.js +227 -65
  14. package/_generated/suilend/lending-market/structs.d.ts +764 -25
  15. package/_generated/suilend/lending-market/structs.js +491 -3
  16. package/_generated/suilend/liquidity-mining/structs.d.ts +169 -5
  17. package/_generated/suilend/obligation/structs.d.ts +338 -7
  18. package/_generated/suilend/rate-limiter/functions.d.ts +6 -0
  19. package/_generated/suilend/rate-limiter/functions.js +12 -0
  20. package/_generated/suilend/rate-limiter/structs.d.ts +17 -2
  21. package/_generated/suilend/reserve/structs.d.ts +664 -17
  22. package/_generated/suilend/reserve/structs.js +623 -4
  23. package/_generated/suilend/reserve-config/functions.d.ts +64 -9
  24. package/_generated/suilend/reserve-config/functions.js +88 -11
  25. package/_generated/suilend/reserve-config/structs.d.ts +45 -3
  26. package/client.d.ts +4 -7
  27. package/client.js +15 -9
  28. package/package.json +1 -1
@@ -271,6 +271,9 @@ export function depositCtokensIntoObligation(tx, typeArgs, args, options) {
271
271
  * This function will panic if:
272
272
  * * The `lending_market` version is not `CURRENT_VERSION` (EIncorrectVersion).
273
273
  * * The borrow amount is zero (ETooSmall).
274
+ * * The market is paused (EMarketPaused).
275
+ * * The reserve is paused (EReservePaused).
276
+ * * Borrow is held by `hold_operation_until` (EOperationHeld).
274
277
  * * The `coin_type` of the reserve does not match the type of the asset being borrowed (EWrongType).
275
278
  * * The reserve's price is stale (`EPriceStale` from the `reserve` module).
276
279
  * * The borrow would exceed the reserve's borrow limit (`EBorrowLimitExceeded` from the `reserve` module).
@@ -339,6 +342,9 @@ export function refreshObligation(tx, typeArg, args, options) {
339
342
  * This function will panic if:
340
343
  * * The `lending_market` version is not `CURRENT_VERSION` (EIncorrectVersion).
341
344
  * * The borrow amount is zero (ETooSmall).
345
+ * * The market is paused (EMarketPaused).
346
+ * * The reserve is paused (EReservePaused).
347
+ * * Borrow is held by `hold_operation_until` (EOperationHeld).
342
348
  * * The `coin_type` of the reserve does not match the type of the asset being borrowed (EWrongType).
343
349
  * * The reserve's price is stale (`EPriceStale` from the `reserve` module).
344
350
  * * The borrow would exceed the reserve's borrow limit (`EBorrowLimitExceeded` from the `reserve` module).
@@ -420,6 +426,10 @@ export function fulfillLiquidityRequest(tx, typeArgs, args, options) {
420
426
  * This function will panic if:
421
427
  * * The `lending_market` version is not `CURRENT_VERSION` (EIncorrectVersion).
422
428
  * * The withdraw amount is zero (ETooSmall).
429
+ * * The market is paused (EMarketPaused).
430
+ * * The reserve is paused (EReservePaused).
431
+ * * Withdraw is held by `hold_operation_until` and the obligation is not exempted by
432
+ * `set_withdraw_hold_exempt` (EOperationHeld).
423
433
  * * The `coin_type` of the reserve does not match the type of the cTokens being withdrawn (EWrongType).
424
434
  * * The obligation has stale oracle prices.
425
435
  * * The withdrawal would leave the obligation in an unhealthy state.
@@ -464,6 +474,9 @@ export function withdrawCtokens(tx, typeArgs, args, options) {
464
474
  * This function will panic if:
465
475
  * * The `lending_market` version is not `CURRENT_VERSION` (EIncorrectVersion).
466
476
  * * The repay amount is zero (ETooSmall).
477
+ * * The market is paused (EMarketPaused).
478
+ * * The repay or withdraw reserve is paused (EReservePaused).
479
+ * * Liquidate is held by `hold_operation_until` (EOperationHeld).
467
480
  * * The obligation is not unhealthy.
468
481
  * * The obligation has stale oracle prices.
469
482
  * * The `coin_type` of the repay reserve does not match the type of the repay coin.
@@ -652,13 +665,6 @@ export function claimRewardsAndDeposit(tx, typeArgs, args, options) {
652
665
  * to participate in staking and earn rewards. It can only be called by the owner of the
653
666
  * lending market.
654
667
  *
655
- * # Arguments
656
- *
657
- * * `lending_market` - A mutable reference to the `LendingMarket`.
658
- * * `_` - The `LendingMarketOwnerCap` to authorize the operation.
659
- * * `sui_reserve_array_index` - The index of the SUI reserve to initialize the staker for.
660
- * * `treasury_cap` - The `TreasuryCap` for the staker.
661
- *
662
668
  * # Panics
663
669
  *
664
670
  * This function will panic if:
@@ -709,6 +715,19 @@ export function rebalanceStaker(tx, typeArg, args, options) {
709
715
  ],
710
716
  });
711
717
  }
718
+ export function setStakerValidator(tx, typeArg, args, options) {
719
+ return tx.moveCall({
720
+ target: `${getPublishedAt('suilend', options?.env)}::lending_market::set_staker_validator`,
721
+ typeArguments: [typeArg],
722
+ arguments: [
723
+ obj(tx, args.lendingMarket),
724
+ obj(tx, args.lendingMarketOwnerCap),
725
+ pure(tx, args.suiReserveArrayIndex, `u64`),
726
+ pure(tx, args.validator, `address`),
727
+ obj(tx, args.systemState),
728
+ ],
729
+ });
730
+ }
712
731
  /**
713
732
  * Unstakes SUI from a staker.
714
733
  *
@@ -761,6 +780,13 @@ export function maxBorrowAmount(tx, typeArg, args, options) {
761
780
  ],
762
781
  });
763
782
  }
783
+ export function chargesRateLimiter(tx, typeArg, reserve, options) {
784
+ return tx.moveCall({
785
+ target: `${getPublishedAt('suilend', options?.env)}::lending_market::charges_rate_limiter`,
786
+ typeArguments: [typeArg],
787
+ arguments: [obj(tx, reserve)],
788
+ });
789
+ }
764
790
  export function maxWithdrawAmount(tx, typeArg, args, options) {
765
791
  return tx.moveCall({
766
792
  target: `${getPublishedAt('suilend', options?.env)}::lending_market::max_withdraw_amount`,
@@ -929,14 +955,8 @@ export function addReserveV2ProCompatible(tx, typeArgs, args, options) {
929
955
  * Updates the configuration of a reserve.
930
956
  *
931
957
  * This function allows the owner of the lending market to update the configuration of a specific reserve.
932
- * It can only be called by the owner of the lending market.
933
- *
934
- * # Arguments
935
- *
936
- * * `_` - The `LendingMarketOwnerCap` to authorize the operation.
937
- * * `lending_market` - A mutable reference to the `LendingMarket`.
938
- * * `reserve_array_index` - The index of the reserve to update.
939
- * * `config` - The new configuration for the reserve.
958
+ * It can only be called by the owner of the lending market. Un-retiring a reserve clears its
959
+ * rate-limiter exemption and emits `ReserveRateLimiterExemptEvent`; retiring it again leaves it charged.
940
960
  *
941
961
  * # Panics
942
962
  *
@@ -957,6 +977,32 @@ export function updateReserveConfig(tx, typeArgs, args, options) {
957
977
  ],
958
978
  });
959
979
  }
980
+ /**
981
+ * Exempts a retired reserve's redeems from the market's rate limiter, or charges them
982
+ * again. An exempt reserve's max withdraw is not capped by the remaining outflow. A
983
+ * config update that gives the reserve any open or close LTV, deposit limit or borrow
984
+ * limit clears the exemption, so it never outlives the reserve's retirement.
985
+ *
986
+ * # Panics
987
+ *
988
+ * This function will panic if:
989
+ * * The `lending_market` version is not `CURRENT_VERSION` (EIncorrectVersion).
990
+ * * `reserve_array_index` is out of bounds.
991
+ * * The `coin_type` of the reserve does not match the type `T` (EWrongType).
992
+ * * `exempt` is true and the reserve is not retired (EReserveNotRetired).
993
+ */
994
+ export function setReserveRateLimiterExempt(tx, typeArgs, args, options) {
995
+ return tx.moveCall({
996
+ target: `${getPublishedAt('suilend', options?.env)}::lending_market::set_reserve_rate_limiter_exempt`,
997
+ typeArguments: typeArgs,
998
+ arguments: [
999
+ obj(tx, args.lendingMarketOwnerCap),
1000
+ obj(tx, args.lendingMarket),
1001
+ pure(tx, args.reserveArrayIndex, `u64`),
1002
+ pure(tx, args.exempt, `bool`),
1003
+ ],
1004
+ });
1005
+ }
960
1006
  /**
961
1007
  * Sets a reserve's price guard, bounding how far its price and smoothed price may
962
1008
  * move per `min_update_interval_s`. Seeds both anchors from the reserve's current
@@ -1027,17 +1073,6 @@ export function changeReservePriceFeedProCompatible(tx, typeArgs, args, options)
1027
1073
  * This function allows the owner of the lending market to incentivize users by adding rewards
1028
1074
  * to a specific reserve. The rewards are distributed over a specified time period.
1029
1075
  *
1030
- * # Arguments
1031
- *
1032
- * * `_` - The `LendingMarketOwnerCap` to authorize the operation.
1033
- * * `lending_market` - A mutable reference to the `LendingMarket`.
1034
- * * `reserve_array_index` - The index of the reserve to add the reward pool to.
1035
- * * `is_deposit_reward` - A boolean indicating whether the reward is for deposits (`true`) or borrows (`false`).
1036
- * * `rewards` - The `Coin` containing the total amount of rewards to be distributed.
1037
- * * `start_time_ms` - The timestamp in milliseconds when the reward distribution starts.
1038
- * * `end_time_ms` - The timestamp in milliseconds when the reward distribution ends.
1039
- * * `clock` - A reference to the `Clock`.
1040
- *
1041
1076
  * # Panics
1042
1077
  *
1043
1078
  * This function will panic if:
@@ -1068,15 +1103,6 @@ export function addPoolReward(tx, typeArgs, args, options) {
1068
1103
  * that is currently active. When a reward pool is cancelled, any unallocated rewards are
1069
1104
  * returned to the owner.
1070
1105
  *
1071
- * # Arguments
1072
- *
1073
- * * `_` - The `LendingMarketOwnerCap` to authorize the operation.
1074
- * * `lending_market` - A mutable reference to the `LendingMarket`.
1075
- * * `reserve_array_index` - The index of the reserve to cancel the reward pool from.
1076
- * * `is_deposit_reward` - A boolean indicating whether the reward is for deposits (`true`) or borrows (`false`).
1077
- * * `reward_index` - The index of the reward pool to cancel.
1078
- * * `clock` - A reference to the `Clock`.
1079
- *
1080
1106
  * # Returns
1081
1107
  *
1082
1108
  * * `Coin<RewardType>` - A `Coin` containing the unallocated rewards from the cancelled pool.
@@ -1110,15 +1136,6 @@ export function cancelPoolReward(tx, typeArgs, args, options) {
1110
1136
  * due to rounding or other factors are returned to the owner. This function can only be called
1111
1137
  * after the pool's `end_time_ms` has passed.
1112
1138
  *
1113
- * # Arguments
1114
- *
1115
- * * `_` - The `LendingMarketOwnerCap` to authorize the operation.
1116
- * * `lending_market` - A mutable reference to the `LendingMarket`.
1117
- * * `reserve_array_index` - The index of the reserve to close the reward pool from.
1118
- * * `is_deposit_reward` - A boolean indicating whether the reward is for deposits (`true`) or borrows (`false`).
1119
- * * `reward_index` - The index of the reward pool to close.
1120
- * * `clock` - A reference to the `Clock`.
1121
- *
1122
1139
  * # Returns
1123
1140
  *
1124
1141
  * * `Coin<RewardType>` - A `Coin` containing the unallocated rewards from the closed pool.
@@ -1169,13 +1186,6 @@ export function drainPointsReward(tx, typeArgs, args, options) {
1169
1186
  * This is an admin-only function that allows the lending market owner to update the rate
1170
1187
  * limiter configuration. The new configuration will replace the existing one.
1171
1188
  *
1172
- * # Arguments
1173
- *
1174
- * * `_` - The `LendingMarketOwnerCap` to authorize the operation.
1175
- * * `lending_market` - A mutable reference to the `LendingMarket`.
1176
- * * `clock` - A reference to the `Clock` to get the current timestamp.
1177
- * * `config` - The new `RateLimiterConfig` to apply.
1178
- *
1179
1189
  * # Panics
1180
1190
  *
1181
1191
  * This function will panic if:
@@ -1200,13 +1210,6 @@ export function updateRateLimiterConfig(tx, typeArg, args, options) {
1200
1210
  * and their respective weights for distributing protocol fees. The fees are distributed
1201
1211
  * proportionally based on these weights.
1202
1212
  *
1203
- * # Arguments
1204
- *
1205
- * * `_` - The `LendingMarketOwnerCap` to authorize the operation.
1206
- * * `lending_market` - A mutable reference to the `LendingMarket`.
1207
- * * `receivers` - A vector of addresses that will receive the fees.
1208
- * * `weights` - A vector of weights corresponding to each receiver.
1209
- *
1210
1213
  * # Panics
1211
1214
  *
1212
1215
  * This function will panic if:
@@ -1267,12 +1270,6 @@ export function claimFees(tx, typeArgs, args, options) {
1267
1270
  * `ObligationOwnerCap` for an obligation that already exists. This can be useful for
1268
1271
  * recovery purposes or administrative actions where a new capability object is needed.
1269
1272
  *
1270
- * # Arguments
1271
- *
1272
- * * `_` - The `LendingMarketOwnerCap` to authorize the operation.
1273
- * * `lending_market` - A reference to the `LendingMarket`.
1274
- * * `obligation_id` - The ID of the obligation to create a new owner cap for.
1275
- *
1276
1273
  * # Returns
1277
1274
  *
1278
1275
  * * `ObligationOwnerCap<P>` - The newly created ownership capability for the specified obligation.
@@ -1302,13 +1299,14 @@ export function newObligationOwnerCap(tx, typeArg, args, options) {
1302
1299
  *
1303
1300
  * This function will panic if:
1304
1301
  * * The `lending_market` version is not `CURRENT_VERSION` (EIncorrectVersion).
1302
+ * * `owner_cap` was not minted for this `lending_market` (EWrongLendingMarket).
1305
1303
  */
1306
1304
  export function newPauseCap(tx, typeArg, args, options) {
1307
1305
  return tx.moveCall({
1308
1306
  target: `${getPublishedAt('suilend', options?.env)}::lending_market::new_pause_cap`,
1309
1307
  typeArguments: [typeArg],
1310
1308
  arguments: [
1311
- obj(tx, args.lendingMarketOwnerCap),
1309
+ obj(tx, args.ownerCap),
1312
1310
  obj(tx, args.lendingMarket),
1313
1311
  pure(tx, args.recipient, `address`),
1314
1312
  ],
@@ -1360,6 +1358,170 @@ export function setReservePaused(tx, typeArg, args, options) {
1360
1358
  ],
1361
1359
  });
1362
1360
  }
1361
+ /**
1362
+ * Lowers one reserve's protocol liquidation fee, so liquidators keep more of a capped
1363
+ * bonus and stay paid deeper into a drawdown. Gated on the current-generation
1364
+ * `EmergencyPauseCap` rather than the owner cap so it is reachable within the hour;
1365
+ * it can only lower the fee, so raising it back stays with the owner cap. Only the fee
1366
+ * field changes: the rest of the config is not rebuilt or re-validated against live
1367
+ * oracle state, so the cut still works when confidence has widened. A cut emits
1368
+ * `ProtocolLiquidationFeeLoweredEvent`; passing the current fee changes nothing and emits
1369
+ * nothing.
1370
+ *
1371
+ * # Panics
1372
+ *
1373
+ * This function will panic if:
1374
+ * * The `lending_market` version is not `CURRENT_VERSION` (EIncorrectVersion).
1375
+ * * `cap` was not minted for this `lending_market` (EWrongLendingMarket).
1376
+ * * `cap`'s generation has been superseded by a later `new_pause_cap` call (EStalePauseCap).
1377
+ * * `reserve_array_index` is out of bounds.
1378
+ * * The `coin_type` of the reserve does not match the type `T` (EWrongType).
1379
+ * * `protocol_liquidation_fee_bps` is above the reserve's current fee
1380
+ * (EProtocolLiquidationFeeNotLowered).
1381
+ */
1382
+ export function lowerProtocolLiquidationFee(tx, typeArgs, args, options) {
1383
+ return tx.moveCall({
1384
+ target: `${getPublishedAt('suilend', options?.env)}::lending_market::lower_protocol_liquidation_fee`,
1385
+ typeArguments: typeArgs,
1386
+ arguments: [
1387
+ obj(tx, args.cap),
1388
+ obj(tx, args.lendingMarket),
1389
+ pure(tx, args.reserveArrayIndex, `u64`),
1390
+ pure(tx, args.protocolLiquidationFeeBps, `u64`),
1391
+ ],
1392
+ });
1393
+ }
1394
+ /**
1395
+ * Holds one operation across the whole market until `until_ms`, independently of the
1396
+ * market and reserve pauses. The hold lapses by itself once the clock reaches `until_ms`;
1397
+ * a later call replaces it, and `until_ms = 0` lifts it at once. Every call starts a new
1398
+ * hold generation for the operation, which ends withdraw exemptions granted under an
1399
+ * earlier call. Holding borrow and liquidate while the market itself is unpaused reopens
1400
+ * repay, deposit, withdraw and redeem first, so positions can be topped up before they can
1401
+ * be liquidated.
1402
+ *
1403
+ * # Panics
1404
+ *
1405
+ * This function will panic if:
1406
+ * * The `lending_market` version is not `CURRENT_VERSION` (EIncorrectVersion).
1407
+ * * `cap` was not minted for this `lending_market` (EWrongLendingMarket).
1408
+ * * `cap`'s generation has been superseded by a later `new_pause_cap` call (EStalePauseCap).
1409
+ * * `operation` is not 0 (borrow), 1 (liquidate) or 2 (withdraw) (EInvalidOperation).
1410
+ * * `until_ms` is more than `MAX_OPERATION_HOLD_MS` past the clock (EHoldTooLong).
1411
+ * * `until_ms` is not 0 and is at or before the clock (EHoldInPast).
1412
+ */
1413
+ export function holdOperationUntil(tx, typeArg, args, options) {
1414
+ return tx.moveCall({
1415
+ target: `${getPublishedAt('suilend', options?.env)}::lending_market::hold_operation_until`,
1416
+ typeArguments: [typeArg],
1417
+ arguments: [
1418
+ obj(tx, args.cap),
1419
+ obj(tx, args.lendingMarket),
1420
+ pure(tx, args.operation, `u8`),
1421
+ pure(tx, args.untilMs, `u64`),
1422
+ obj(tx, args.clock),
1423
+ ],
1424
+ });
1425
+ }
1426
+ /**
1427
+ * Exempts one obligation from the current withdraw hold, or removes its exemption. An
1428
+ * exempt obligation can still `withdraw_ctokens` while that hold lasts. The
1429
+ * exemption records the hold's generation and lapses with it: once the hold ends, or any
1430
+ * later `hold_operation_until` call replaces or lifts it, the obligation is held again
1431
+ * until it is exempted anew, even under a new hold with the same `until_ms`. Setting the
1432
+ * state the obligation already has emits nothing, and removing a lapsed exemption clears
1433
+ * it without an event.
1434
+ *
1435
+ * # Panics
1436
+ *
1437
+ * This function will panic if:
1438
+ * * The `lending_market` version is not `CURRENT_VERSION` (EIncorrectVersion).
1439
+ * * `cap` was not minted for this `lending_market` (EWrongLendingMarket).
1440
+ * * `cap`'s generation has been superseded by a later `new_pause_cap` call (EStalePauseCap).
1441
+ * * The `obligation_id` is not found in the lending market's obligations (EInvalidObligationId).
1442
+ * * `exempt` is true and withdraw is not held (EWithdrawNotHeld).
1443
+ */
1444
+ export function setWithdrawHoldExempt(tx, typeArg, args, options) {
1445
+ return tx.moveCall({
1446
+ target: `${getPublishedAt('suilend', options?.env)}::lending_market::set_withdraw_hold_exempt`,
1447
+ typeArguments: [typeArg],
1448
+ arguments: [
1449
+ obj(tx, args.cap),
1450
+ obj(tx, args.lendingMarket),
1451
+ pure(tx, args.obligationId, `${ID.$typeName}`),
1452
+ pure(tx, args.exempt, `bool`),
1453
+ obj(tx, args.clock),
1454
+ ],
1455
+ });
1456
+ }
1457
+ /**
1458
+ * Aborts with `EOperationHeld` while withdraw is held, unless the obligation is exempt.
1459
+ * Debt-free obligations are held too: otherwise a borrower could repay in full, withdraw
1460
+ * and borrow again in one PTB at the same pushed price.
1461
+ */
1462
+ export function assertWithdrawNotHeld(tx, typeArg, args, options) {
1463
+ return tx.moveCall({
1464
+ target: `${getPublishedAt('suilend', options?.env)}::lending_market::assert_withdraw_not_held`,
1465
+ typeArguments: [typeArg],
1466
+ arguments: [
1467
+ obj(tx, args.lendingMarket),
1468
+ pure(tx, args.obligationId, `${ID.$typeName}`),
1469
+ obj(tx, args.clock),
1470
+ ],
1471
+ });
1472
+ }
1473
+ /** True if `obligation_id` was exempted under the withdraw hold that is active now. */
1474
+ export function isWithdrawHoldExempt(tx, typeArg, args, options) {
1475
+ return tx.moveCall({
1476
+ target: `${getPublishedAt('suilend', options?.env)}::lending_market::is_withdraw_hold_exempt`,
1477
+ typeArguments: [typeArg],
1478
+ arguments: [
1479
+ obj(tx, args.lendingMarket),
1480
+ pure(tx, args.obligationId, `${ID.$typeName}`),
1481
+ obj(tx, args.clock),
1482
+ ],
1483
+ });
1484
+ }
1485
+ export function withdrawHoldGeneration(tx, typeArg, lendingMarket, options) {
1486
+ return tx.moveCall({
1487
+ target: `${getPublishedAt('suilend', options?.env)}::lending_market::withdraw_hold_generation`,
1488
+ typeArguments: [typeArg],
1489
+ arguments: [obj(tx, lendingMarket)],
1490
+ });
1491
+ }
1492
+ /** The operation code that holds borrow. */
1493
+ export function operationBorrow(tx, options) {
1494
+ return tx.moveCall({
1495
+ target: `${getPublishedAt('suilend', options?.env)}::lending_market::operation_borrow`,
1496
+ arguments: [],
1497
+ });
1498
+ }
1499
+ /** The operation code that holds liquidate. */
1500
+ export function operationLiquidate(tx, options) {
1501
+ return tx.moveCall({
1502
+ target: `${getPublishedAt('suilend', options?.env)}::lending_market::operation_liquidate`,
1503
+ arguments: [],
1504
+ });
1505
+ }
1506
+ /** The operation code that holds withdrawing collateral from obligations. */
1507
+ export function operationWithdraw(tx, options) {
1508
+ return tx.moveCall({
1509
+ target: `${getPublishedAt('suilend', options?.env)}::lending_market::operation_withdraw`,
1510
+ arguments: [],
1511
+ });
1512
+ }
1513
+ /** True while a hold on `operation` has not yet lapsed. Absent the dynamic field, it is not. */
1514
+ export function isOperationHeld(tx, typeArg, args, options) {
1515
+ return tx.moveCall({
1516
+ target: `${getPublishedAt('suilend', options?.env)}::lending_market::is_operation_held`,
1517
+ typeArguments: [typeArg],
1518
+ arguments: [
1519
+ obj(tx, args.lendingMarket),
1520
+ pure(tx, args.operation, `u8`),
1521
+ obj(tx, args.clock),
1522
+ ],
1523
+ });
1524
+ }
1363
1525
  /**
1364
1526
  * True if the market has been paused. Absent the dynamic field, the market is
1365
1527
  * unpaused. Pure: no aborts, no side effects. Public so a UI or bot can check