@t2000/cli 1.24.1 → 1.24.3

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.
@@ -21624,14 +21624,35 @@ var naviDescriptor = {
21624
21624
  packages: [],
21625
21625
  dynamicPackageId: true,
21626
21626
  actionMap: {
21627
+ // Deposit variants (entry_deposit / deposit + account-cap form for
21628
+ // harvest's internal save leg)
21627
21629
  "incentive_v3::entry_deposit": "save",
21628
21630
  "incentive_v3::deposit": "save",
21631
+ "incentive_v3::deposit_with_account_cap": "save",
21632
+ // Withdraw variants
21629
21633
  "incentive_v3::withdraw_v2": "withdraw",
21630
21634
  "incentive_v3::entry_withdraw": "withdraw",
21635
+ "incentive_v3::withdraw_with_account_cap": "withdraw",
21636
+ "incentive_v3::withdraw_with_account_cap_v": "withdraw",
21637
+ "incentive_v3::withdraw": "withdraw",
21638
+ "incentive_v3::withdraw_v": "withdraw",
21639
+ // Borrow variants
21631
21640
  "incentive_v3::borrow_v2": "borrow",
21632
21641
  "incentive_v3::entry_borrow": "borrow",
21642
+ "incentive_v3::borrow": "borrow",
21643
+ "incentive_v3::borrow_v": "borrow",
21644
+ "incentive_v3::borrow_with_account_cap": "borrow",
21645
+ "incentive_v3::borrow_with_account_cap_v": "borrow",
21646
+ // Repay variants
21633
21647
  "incentive_v3::entry_repay": "repay",
21634
- "incentive_v3::repay": "repay"
21648
+ "incentive_v3::repay": "repay",
21649
+ "incentive_v3::repay_with_account_cap": "repay",
21650
+ // Claim-reward variants — required for `claim_rewards` tagging AND for
21651
+ // `harvest` compound-op detection in the indexer (paired with a save
21652
+ // target, classified as `harvest` instead of `claim`).
21653
+ "incentive_v3::claim_reward": "claim",
21654
+ "incentive_v3::claim_reward_entry": "claim",
21655
+ "incentive_v3::claim_reward_with_account_cap": "claim"
21635
21656
  }
21636
21657
  };
21637
21658
  var allDescriptors = [
@@ -23292,7 +23313,8 @@ async function addHarvestToTx(tx, client, address, options = {}) {
23292
23313
  amount: aggRow.amount,
23293
23314
  slippage,
23294
23315
  inputCoin: coin,
23295
- providers: options.providers
23316
+ providers: options.providers,
23317
+ overlayFee: options.overlayFee
23296
23318
  });
23297
23319
  usdcHandles.push(swapResult.coin);
23298
23320
  expectedUsdcDeposited += swapResult.expectedAmountOut;
@@ -23326,6 +23348,14 @@ async function addHarvestToTx(tx, client, address, options = {}) {
23326
23348
  tx.mergeCoins(primary, rest);
23327
23349
  depositCoin = primary;
23328
23350
  }
23351
+ if (options.saveFeeHook) {
23352
+ await options.saveFeeHook({
23353
+ tx,
23354
+ coin: depositCoin,
23355
+ input: { asset: "USDC", amount: expectedUsdcDeposited },
23356
+ sender: address
23357
+ });
23358
+ }
23329
23359
  try {
23330
23360
  await addSaveToTx(tx, client, address, depositCoin, { asset: "USDC" });
23331
23361
  } catch (err) {
@@ -23561,7 +23591,9 @@ var WRITE_APPENDER_REGISTRY = {
23561
23591
  const plan = await addHarvestToTx(tx, ctx.client, ctx.sender, {
23562
23592
  slippage: input.slippage,
23563
23593
  minRewardUsd: input.minRewardUsd,
23564
- providers
23594
+ providers,
23595
+ overlayFee: ctx.overlayFee,
23596
+ saveFeeHook: ctx.feeHooks?.save_deposit
23565
23597
  });
23566
23598
  return {
23567
23599
  preview: {
@@ -23725,7 +23757,7 @@ var FEE_RATES = {
23725
23757
  function calculateFee(operation, amount) {
23726
23758
  const bps = FEE_RATES[operation];
23727
23759
  const feeAmount = amount * Number(bps) / Number(BPS_DENOMINATOR);
23728
- const rawAmount = usdcToRaw(feeAmount);
23760
+ const rawAmount = stableToRaw(feeAmount, USDC_DECIMALS);
23729
23761
  return {
23730
23762
  amount: feeAmount,
23731
23763
  asset: "USDC",
@@ -23733,11 +23765,11 @@ function calculateFee(operation, amount) {
23733
23765
  rawAmount
23734
23766
  };
23735
23767
  }
23736
- function addFeeTransfer(tx, paymentCoin, feeBps, receiver, amount) {
23768
+ function addFeeTransfer(tx, paymentCoin, feeBps, receiver, amount, decimals = USDC_DECIMALS) {
23737
23769
  if (feeBps <= 0n) return;
23738
23770
  if (amount <= 0) return;
23739
23771
  const feeAmount = amount * Number(feeBps) / Number(BPS_DENOMINATOR);
23740
- const rawFee = usdcToRaw(feeAmount);
23772
+ const rawFee = stableToRaw(feeAmount, decimals);
23741
23773
  if (rawFee <= 0n) return;
23742
23774
  const [feeCoin] = tx.splitCoins(paymentCoin, [tx.pure.u64(rawFee)]);
23743
23775
  tx.transferObjects([feeCoin], tx.pure.address(receiver));
@@ -24130,4 +24162,4 @@ axios/dist/node/axios.cjs:
24130
24162
  @scure/bip39/index.js:
24131
24163
  (*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) *)
24132
24164
  */
24133
- //# sourceMappingURL=chunk-HMCFZXVY.js.map
24165
+ //# sourceMappingURL=chunk-P7CVUSZI.js.map