@axonfi/sdk 0.12.0 → 0.13.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
@@ -3224,6 +3224,13 @@ async function getOperatorCeilings(publicClient, vaultAddress) {
3224
3224
  minAiTriggerFloor
3225
3225
  };
3226
3226
  }
3227
+ function operatorMaxDrainPerDay(ceilings) {
3228
+ const { maxOperatorBots, maxBotDailyLimit, vaultDailyAggregate } = ceilings;
3229
+ if (maxOperatorBots === 0n || maxBotDailyLimit === 0n) return 0;
3230
+ const theoretical = maxOperatorBots * maxBotDailyLimit;
3231
+ const raw = vaultDailyAggregate > 0n && vaultDailyAggregate < theoretical ? vaultDailyAggregate : theoretical;
3232
+ return Number(raw) / 1e6;
3233
+ }
3227
3234
  async function isErc1271BotsEnabled(publicClient, vaultAddress) {
3228
3235
  return publicClient.readContract({
3229
3236
  address: vaultAddress,
@@ -4995,6 +5002,7 @@ exports.isDestinationAllowed = isDestinationAllowed;
4995
5002
  exports.isErc1271BotsEnabled = isErc1271BotsEnabled;
4996
5003
  exports.isRebalanceTokenWhitelisted = isRebalanceTokenWhitelisted;
4997
5004
  exports.isVaultPaused = isVaultPaused;
5005
+ exports.operatorMaxDrainPerDay = operatorMaxDrainPerDay;
4998
5006
  exports.parseAmount = parseAmount;
4999
5007
  exports.parseChainId = parseChainId;
5000
5008
  exports.parsePaymentRequired = parsePaymentRequired;