@curvefi/api 2.41.1 → 2.41.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.
package/lib/boosting.js CHANGED
@@ -516,7 +516,7 @@ var _sendBlockhash = function (block, chainId, estimateGas) { return __awaiter(v
516
516
  case 2:
517
517
  _a.sent();
518
518
  gasLimit = mulBy1_3(gas);
519
- return [4 /*yield*/, veOracleContract.deposit(curve.constants.ALIASES.voting_escrow_oracle, __assign(__assign({}, curve.options), { gasLimit: gasLimit }))];
519
+ return [4 /*yield*/, veOracleContract.send_blockhash(block, chainId, __assign(__assign({}, curve.options), { gasLimit: gasLimit }))];
520
520
  case 3: return [2 /*return*/, (_a.sent()).hash];
521
521
  }
522
522
  });
package/lib/curve.d.ts CHANGED
@@ -63,6 +63,7 @@ declare class Curve implements ICurve {
63
63
  init(providerType: 'JsonRpc' | 'Web3' | 'Infura' | 'Alchemy', providerSettings: {
64
64
  url?: string;
65
65
  privateKey?: string;
66
+ batchMaxCount?: number;
66
67
  } | {
67
68
  externalProvider: ethers.Eip1193Provider;
68
69
  } | {
package/lib/curve.js CHANGED
@@ -655,7 +655,7 @@ var Curve = /** @class */ (function () {
655
655
  var _a;
656
656
  if (options === void 0) { options = {}; }
657
657
  return __awaiter(this, void 0, void 0, function () {
658
- var _b, e_1, _c, network, poolId, _d, cTokens, yTokens, ycTokens, aTokens, customAbiTokens, _e, err_1, _i, _f, pool, _g, _h, coinAddr, _j, _k, coinAddr, _l, _m, coinAddr, _minterABI, addressProviderContract, _o, factoryContract, _p;
658
+ var jsonRpcApiProviderOptions, _b, e_1, _c, network, poolId, _d, cTokens, yTokens, ycTokens, aTokens, customAbiTokens, _e, err_1, _i, _f, pool, _g, _h, coinAddr, _j, _k, coinAddr, _l, _m, coinAddr, _minterABI, addressProviderContract, _o, factoryContract, _p;
659
659
  return __generator(this, function (_q) {
660
660
  switch (_q.label) {
661
661
  case 0:
@@ -690,11 +690,17 @@ var Curve = /** @class */ (function () {
690
690
  };
691
691
  if (!(providerType.toLowerCase() === 'JsonRpc'.toLowerCase())) return [3 /*break*/, 6];
692
692
  providerSettings = providerSettings;
693
+ jsonRpcApiProviderOptions = void 0;
694
+ if (providerSettings.batchMaxCount) {
695
+ jsonRpcApiProviderOptions = {
696
+ batchMaxCount: providerSettings.batchMaxCount,
697
+ };
698
+ }
693
699
  if (providerSettings.url) {
694
- this.provider = new ethers.JsonRpcProvider(providerSettings.url);
700
+ this.provider = new ethers.JsonRpcProvider(providerSettings.url, undefined, jsonRpcApiProviderOptions);
695
701
  }
696
702
  else {
697
- this.provider = new ethers.JsonRpcProvider('http://localhost:8545/');
703
+ this.provider = new ethers.JsonRpcProvider('http://localhost:8545/', undefined, jsonRpcApiProviderOptions);
698
704
  }
699
705
  if (!providerSettings.privateKey) return [3 /*break*/, 1];
700
706
  this.signer = new ethers.Wallet(providerSettings.privateKey, this.provider);
package/lib/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import { PoolTemplate } from "./pools/index.js";
3
3
  declare function init(providerType: 'JsonRpc' | 'Web3' | 'Infura' | 'Alchemy', providerSettings: {
4
4
  url?: string;
5
5
  privateKey?: string;
6
+ batchMaxCount?: number;
6
7
  } | {
7
8
  externalProvider: ethers.Eip1193Provider;
8
9
  } | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.41.1",
3
+ "version": "2.41.3",
4
4
  "description": "JavaScript library for curve.fi",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",