@t2000/sdk 1.6.0 → 1.8.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.cjs CHANGED
@@ -7468,6 +7468,9 @@ var WRITE_APPENDER_REGISTRY = {
7468
7468
  assetInfo.type,
7469
7469
  rawAmount
7470
7470
  );
7471
+ if (ctx.feeHooks?.save_deposit) {
7472
+ await ctx.feeHooks.save_deposit({ tx, coin, input, sender: ctx.sender });
7473
+ }
7471
7474
  await addSaveToTx(tx, ctx.client, ctx.sender, coin, { asset });
7472
7475
  return {
7473
7476
  toolName: "save_deposit",
@@ -7502,6 +7505,9 @@ var WRITE_APPENDER_REGISTRY = {
7502
7505
  input.amount,
7503
7506
  { asset, skipPythUpdate: ctx.sponsoredContext }
7504
7507
  );
7508
+ if (ctx.feeHooks?.borrow) {
7509
+ await ctx.feeHooks.borrow({ tx, coin, input, sender: ctx.sender });
7510
+ }
7505
7511
  tx.transferObjects([coin], ctx.sender);
7506
7512
  return { toolName: "borrow", effectiveAmount: input.amount, asset };
7507
7513
  },
@@ -7649,7 +7655,8 @@ async function composeTx(opts) {
7649
7655
  client: opts.client,
7650
7656
  sender: opts.sender,
7651
7657
  sponsoredContext: opts.sponsoredContext ?? false,
7652
- overlayFee: opts.overlayFee
7658
+ overlayFee: opts.overlayFee,
7659
+ feeHooks: opts.feeHooks
7653
7660
  };
7654
7661
  const previews = [];
7655
7662
  for (const step of opts.steps) {