@gearbox-protocol/sdk 3.0.0-vfour.21 → 3.0.0-vfour.23

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.
@@ -1,4 +1,4 @@
1
- import { Address, Block, Hex, Prettify, Client, Transport, Chain, TestActions, PublicClient, WalletClient, TestRpcSchema } from 'viem';
1
+ import { Address, TestRpcSchema, Hex, Block, Prettify, Client, Transport, Chain, TestActions, PublicClient, WalletClient } from 'viem';
2
2
  import { GearboxSDK, CreditAccountData, ILogger, CreditFactory } from '../sdk';
3
3
 
4
4
  /**
@@ -76,4 +76,4 @@ declare function evmMineDetailed(client: Client<any, any, any, AnvilRPCSchema, a
76
76
  */
77
77
  declare function setLTs(sdk: GearboxSDK, cm: CreditFactory, newLTs: Record<Address, number>, logger?: ILogger): Promise<void>;
78
78
 
79
- export { type AnvilActions, type AnvilClient, type AnvilClientConfig, calcLiquidatableLTs, createAnvilClient, evmMineDetailed, isAnvil, setLTs };
79
+ export { type AnvilActions, type AnvilClient, type AnvilClientConfig, type AnvilNodeInfo, type AnvilRPCSchema, calcLiquidatableLTs, createAnvilClient, evmMineDetailed, isAnvil, setLTs };
@@ -13232,7 +13232,8 @@ var CreditAccountsService = class extends SDKConstruct {
13232
13232
  maxHealthFactor = 65535,
13233
13233
  // TODO: this will change to bigint
13234
13234
  minHealthFactor = 0,
13235
- owner = ADDRESS_0X0
13235
+ owner = ADDRESS_0X0,
13236
+ batchLimit
13236
13237
  } = args ?? {};
13237
13238
  const arg0 = creditManager ?? {
13238
13239
  curators: [],
@@ -13251,7 +13252,9 @@ var CreditAccountsService = class extends SDKConstruct {
13251
13252
  let offset = 0n;
13252
13253
  do {
13253
13254
  const [accounts, newOffset] = await this.#getCreditAccounts(
13254
- [arg0, { ...caFilter, reverting }, offset],
13255
+ [arg0, { ...caFilter, reverting }, offset, batchLimit].filter(
13256
+ Boolean
13257
+ ),
13255
13258
  priceUpdateTxs,
13256
13259
  options
13257
13260
  );
@@ -14862,8 +14865,8 @@ var PriceFeedRegister = class extends SDKConstruct {
14862
14865
  this.logger = childLogger("PriceFeedRegister", sdk.logger);
14863
14866
  this.#redstoneUpdater = new RedstoneUpdater(sdk);
14864
14867
  }
14865
- addHook = this.#hooks.addHook.bind(this);
14866
- removeHook = this.#hooks.removeHook.bind(this);
14868
+ addHook = this.#hooks.addHook.bind(this.#hooks);
14869
+ removeHook = this.#hooks.removeHook.bind(this.#hooks);
14867
14870
  /**
14868
14871
  * Returns RawTxs to update price feeds
14869
14872
  * @param priceFeeds top-level price feeds, actual updatable price feeds will be derived. If not provided will use all price feeds that are attached
@@ -15431,8 +15434,8 @@ var RouterV3Contract = class extends BaseContract {
15431
15434
  });
15432
15435
  this.#connectors = sdkGov.getConnectors(sdk.provider.networkType);
15433
15436
  }
15434
- addHook = this.#hooks.addHook.bind(this);
15435
- removeHook = this.#hooks.removeHook.bind(this);
15437
+ addHook = this.#hooks.addHook.bind(this.#hooks);
15438
+ removeHook = this.#hooks.removeHook.bind(this.#hooks);
15436
15439
  /**
15437
15440
  * Finds all available swaps for NORMAL tokens
15438
15441
  * @param ca
@@ -17212,6 +17212,7 @@ interface CreditAccountFilter {
17212
17212
  includeZeroDebt?: boolean;
17213
17213
  minHealthFactor?: number;
17214
17214
  maxHealthFactor?: number;
17215
+ batchLimit?: bigint;
17215
17216
  }
17216
17217
  declare class CreditAccountsService extends SDKConstruct {
17217
17218
  #private;
@@ -1,4 +1,4 @@
1
- import { Address, Block, Hex, Prettify, Client, Transport, Chain, TestActions, PublicClient, WalletClient, TestRpcSchema } from 'viem';
1
+ import { Address, TestRpcSchema, Hex, Block, Prettify, Client, Transport, Chain, TestActions, PublicClient, WalletClient } from 'viem';
2
2
  import { GearboxSDK, CreditAccountData, ILogger, CreditFactory } from '../sdk';
3
3
 
4
4
  /**
@@ -76,4 +76,4 @@ declare function evmMineDetailed(client: Client<any, any, any, AnvilRPCSchema, a
76
76
  */
77
77
  declare function setLTs(sdk: GearboxSDK, cm: CreditFactory, newLTs: Record<Address, number>, logger?: ILogger): Promise<void>;
78
78
 
79
- export { type AnvilActions, type AnvilClient, type AnvilClientConfig, calcLiquidatableLTs, createAnvilClient, evmMineDetailed, isAnvil, setLTs };
79
+ export { type AnvilActions, type AnvilClient, type AnvilClientConfig, type AnvilNodeInfo, type AnvilRPCSchema, calcLiquidatableLTs, createAnvilClient, evmMineDetailed, isAnvil, setLTs };
@@ -17212,6 +17212,7 @@ interface CreditAccountFilter {
17212
17212
  includeZeroDebt?: boolean;
17213
17213
  minHealthFactor?: number;
17214
17214
  maxHealthFactor?: number;
17215
+ batchLimit?: bigint;
17215
17216
  }
17216
17217
  declare class CreditAccountsService extends SDKConstruct {
17217
17218
  #private;
@@ -13230,7 +13230,8 @@ var CreditAccountsService = class extends SDKConstruct {
13230
13230
  maxHealthFactor = 65535,
13231
13231
  // TODO: this will change to bigint
13232
13232
  minHealthFactor = 0,
13233
- owner = ADDRESS_0X0
13233
+ owner = ADDRESS_0X0,
13234
+ batchLimit
13234
13235
  } = args ?? {};
13235
13236
  const arg0 = creditManager ?? {
13236
13237
  curators: [],
@@ -13249,7 +13250,9 @@ var CreditAccountsService = class extends SDKConstruct {
13249
13250
  let offset = 0n;
13250
13251
  do {
13251
13252
  const [accounts, newOffset] = await this.#getCreditAccounts(
13252
- [arg0, { ...caFilter, reverting }, offset],
13253
+ [arg0, { ...caFilter, reverting }, offset, batchLimit].filter(
13254
+ Boolean
13255
+ ),
13253
13256
  priceUpdateTxs,
13254
13257
  options
13255
13258
  );
@@ -14860,8 +14863,8 @@ var PriceFeedRegister = class extends SDKConstruct {
14860
14863
  this.logger = childLogger("PriceFeedRegister", sdk.logger);
14861
14864
  this.#redstoneUpdater = new RedstoneUpdater(sdk);
14862
14865
  }
14863
- addHook = this.#hooks.addHook.bind(this);
14864
- removeHook = this.#hooks.removeHook.bind(this);
14866
+ addHook = this.#hooks.addHook.bind(this.#hooks);
14867
+ removeHook = this.#hooks.removeHook.bind(this.#hooks);
14865
14868
  /**
14866
14869
  * Returns RawTxs to update price feeds
14867
14870
  * @param priceFeeds top-level price feeds, actual updatable price feeds will be derived. If not provided will use all price feeds that are attached
@@ -15429,8 +15432,8 @@ var RouterV3Contract = class extends BaseContract {
15429
15432
  });
15430
15433
  this.#connectors = getConnectors(sdk.provider.networkType);
15431
15434
  }
15432
- addHook = this.#hooks.addHook.bind(this);
15433
- removeHook = this.#hooks.removeHook.bind(this);
15435
+ addHook = this.#hooks.addHook.bind(this.#hooks);
15436
+ removeHook = this.#hooks.removeHook.bind(this.#hooks);
15434
15437
  /**
15435
15438
  * Finds all available swaps for NORMAL tokens
15436
15439
  * @param ca
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "3.0.0-vfour.21",
3
+ "version": "3.0.0-vfour.23",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,