@gearbox-protocol/sdk 9.10.6 → 9.10.8

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.
@@ -18,9 +18,7 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var eventOrTx_exports = {};
20
20
  __export(eventOrTx_exports, {
21
- EVMEvent: () => EVMEvent,
22
- EVMTx: () => EVMTx,
23
- EventOrTx: () => EventOrTx
21
+ EVMTx: () => EVMTx
24
22
  });
25
23
  module.exports = __toCommonJS(eventOrTx_exports);
26
24
  class EventOrTx {
@@ -28,11 +26,13 @@ class EventOrTx {
28
26
  txHash;
29
27
  timestamp;
30
28
  _txStatus;
31
- constructor({ block, txHash, txStatus, timestamp = 0 }) {
32
- this.block = block;
33
- this.txHash = txHash;
34
- this._txStatus = txStatus;
35
- this.timestamp = timestamp;
29
+ _customEventString;
30
+ constructor(props) {
31
+ this.block = props.block;
32
+ this.txHash = props.txHash;
33
+ this._txStatus = props.txStatus;
34
+ this.timestamp = props.timestamp ?? 0;
35
+ this._customEventString = props.eventString;
36
36
  }
37
37
  get isPending() {
38
38
  return this._txStatus === "pending";
@@ -49,12 +49,8 @@ class EventOrTx {
49
49
  }
50
50
  return item.block - this.block;
51
51
  }
52
- }
53
- class EVMEvent extends EventOrTx {
54
- logId;
55
- constructor(opts) {
56
- super({ ...opts, txStatus: "success" });
57
- this.logId = opts.logId;
52
+ toString() {
53
+ return this._customEventString ? this._customEventString : this._toString();
58
54
  }
59
55
  }
60
56
  class EVMTx extends EventOrTx {
@@ -62,13 +58,15 @@ class EVMTx extends EventOrTx {
62
58
  txHash,
63
59
  block = 0,
64
60
  txStatus = "pending",
65
- timestamp = 0
61
+ timestamp = 0,
62
+ ...rest
66
63
  }) {
67
64
  super({
68
65
  block,
69
66
  txStatus,
70
67
  txHash,
71
- timestamp
68
+ timestamp,
69
+ ...rest
72
70
  });
73
71
  if (this.txStatus !== "pending" && this.block === 0) {
74
72
  throw new Error("Block not specified for non-pending tx");
@@ -85,7 +83,5 @@ class EVMTx extends EventOrTx {
85
83
  }
86
84
  // Annotate the CommonJS export names for ESM import in node:
87
85
  0 && (module.exports = {
88
- EVMEvent,
89
- EVMTx,
90
- EventOrTx
86
+ EVMTx
91
87
  });
@@ -130,7 +130,7 @@ class TxAddLiquidity extends import_eventOrTx.EVMTx {
130
130
  this.token = opts.tokensList[opts.token];
131
131
  this.poolName = opts.poolName;
132
132
  }
133
- toString() {
133
+ _toString() {
134
134
  const { title, decimals = 18 } = this.token;
135
135
  return `${this.poolName}: Deposit ${(0, import_utils.formatBN)(
136
136
  this.amount,
@@ -154,7 +154,7 @@ class TxRemoveLiquidity extends import_eventOrTx.EVMTx {
154
154
  this.token = opts.tokensList[opts.token];
155
155
  this.poolName = opts.poolName;
156
156
  }
157
- toString() {
157
+ _toString() {
158
158
  const { title, decimals = 18 } = this.token;
159
159
  return `${this.poolName}: Withdraw ${(0, import_utils.formatBN)(
160
160
  this.amount,
@@ -180,7 +180,7 @@ class TxStakeDiesel extends import_eventOrTx.EVMTx {
180
180
  this.tokenTo = opts.tokensList[opts.tokenTo];
181
181
  this.poolName = opts.poolName;
182
182
  }
183
- toString() {
183
+ _toString() {
184
184
  const { title: fromSymbol, decimals: fromDecimals = 18 } = this.tokenFrom;
185
185
  const { title: toSymbol } = this.tokenTo;
186
186
  return `${this.poolName}: Stake ${(0, import_utils.formatBN)(
@@ -207,7 +207,7 @@ class TxUnstakeDiesel extends import_eventOrTx.EVMTx {
207
207
  this.tokenTo = opts.tokensList[opts.tokenTo];
208
208
  this.poolName = opts.poolName;
209
209
  }
210
- toString() {
210
+ _toString() {
211
211
  const { title: fromSymbol, decimals: fromDecimals = 18 } = this.tokenFrom;
212
212
  const { title: toSymbol } = this.tokenTo;
213
213
  return `${this.poolName}: Unstake ${(0, import_utils.formatBN)(
@@ -238,7 +238,7 @@ class TXSwap extends import_eventOrTx.EVMTx {
238
238
  this.tokenTo = opts.tokenTo ? opts.tokensList[opts.tokenTo] : void 0;
239
239
  this.creditManagerName = opts.creditManagerName;
240
240
  }
241
- toString() {
241
+ _toString() {
242
242
  let toPart = "";
243
243
  if (this.tokenTo && this.amountTo) {
244
244
  const { title: toSymbol, decimals: toDecimals = 18 } = this.tokenTo;
@@ -264,7 +264,7 @@ class TxAddCollateral extends import_eventOrTx.EVMTx {
264
264
  this.token = opts.tokensList[opts.token];
265
265
  this.creditManagerName = opts.creditManagerName;
266
266
  }
267
- toString() {
267
+ _toString() {
268
268
  const { title: addedSymbol, decimals: addedDecimals = 18 } = this.token;
269
269
  return `Credit Account ${this.creditManagerName}: Added ${(0, import_utils.formatBN)(
270
270
  this.amount,
@@ -288,7 +288,7 @@ class TxIncreaseBorrowAmount extends import_eventOrTx.EVMTx {
288
288
  this.token = opts.tokensList[opts.token];
289
289
  this.creditManagerName = opts.creditManagerName;
290
290
  }
291
- toString() {
291
+ _toString() {
292
292
  const { title: tokenSymbol, decimals: tokenDecimals } = this.token;
293
293
  return `Credit Account ${this.creditManagerName}: Borrowed amount was increased for ${(0, import_utils.formatBN)(
294
294
  this.amount,
@@ -312,7 +312,7 @@ class TxDecreaseBorrowAmount extends import_eventOrTx.EVMTx {
312
312
  this.token = opts.tokensList[opts.token];
313
313
  this.creditManagerName = opts.creditManagerName;
314
314
  }
315
- toString() {
315
+ _toString() {
316
316
  const { title: tokenSymbol, decimals: tokenDecimals } = this.token;
317
317
  return `Credit Account ${this.creditManagerName}: Borrowed amount was decreased for ${(0, import_utils.formatBN)(
318
318
  this.amount,
@@ -340,7 +340,7 @@ class TxOpenMultitokenAccount extends import_eventOrTx.EVMTx {
340
340
  this.assets = opts.assets.map((a) => opts.tokensList[a]);
341
341
  this.withdrawDebt = opts.withdrawDebt;
342
342
  }
343
- toString() {
343
+ _toString() {
344
344
  const assetSymbols = this.assets.reduce((acc, asset) => {
345
345
  const { title: tokenSymbol } = asset;
346
346
  const skip = this.withdrawDebt && this.underlyingToken.address === asset.address;
@@ -368,7 +368,7 @@ class TxOpenMultitokenAccount extends import_eventOrTx.EVMTx {
368
368
  }
369
369
  }
370
370
  class TxClaimNFT extends import_eventOrTx.EVMTx {
371
- toString() {
371
+ _toString() {
372
372
  return `NFT claimed`;
373
373
  }
374
374
  serialize() {
@@ -387,7 +387,7 @@ class TxClaimRewards extends import_eventOrTx.EVMTx {
387
387
  balance
388
388
  }));
389
389
  }
390
- toString() {
390
+ _toString() {
391
391
  const rewardsString = this.rewards.length <= 2 ? this.rewards.map(({ token, balance }) => {
392
392
  const { title, decimals = 18 } = token;
393
393
  return `${(0, import_utils.formatBN)(balance, decimals)} ${title}`;
@@ -422,7 +422,7 @@ class TxStartDelayedWithdrawal extends import_eventOrTx.EVMTx {
422
422
  })
423
423
  );
424
424
  }
425
- toString() {
425
+ _toString() {
426
426
  const total = this.instantWithdrawals.length + this.delayedWithdrawals.length;
427
427
  const instantString = total <= 2 ? this.instantWithdrawals.map(({ token, balance }) => {
428
428
  const { title, decimals = 18 } = token;
@@ -455,7 +455,7 @@ class TxMigrateCreditAccount extends import_eventOrTx.EVMTx {
455
455
  super(opts);
456
456
  this.targetCreditManager = `${opts.targetCreditManager.name} (${opts.curatorName})`;
457
457
  }
458
- toString() {
458
+ _toString() {
459
459
  return `Successfully migrated Credit Account to ${this.targetCreditManager}`;
460
460
  }
461
461
  serialize() {
@@ -471,7 +471,7 @@ class TxRepayAccount extends import_eventOrTx.EVMTx {
471
471
  super(opts);
472
472
  this.creditManagerName = opts.creditManagerName;
473
473
  }
474
- toString() {
474
+ _toString() {
475
475
  return `Credit Account ${this.creditManagerName}: Repaying account`;
476
476
  }
477
477
  serialize() {
@@ -487,7 +487,7 @@ class TxLiquidateAccount extends import_eventOrTx.EVMTx {
487
487
  super(opts);
488
488
  this.creditManagerName = opts.creditManagerName;
489
489
  }
490
- toString() {
490
+ _toString() {
491
491
  return `Credit Account ${this.creditManagerName}: Liquidated`;
492
492
  }
493
493
  serialize() {
@@ -503,7 +503,7 @@ class TxCloseAccount extends import_eventOrTx.EVMTx {
503
503
  super(opts);
504
504
  this.creditManagerName = opts.creditManagerName;
505
505
  }
506
- toString() {
506
+ _toString() {
507
507
  return `Credit Account ${this.creditManagerName}: Closing account`;
508
508
  }
509
509
  serialize() {
@@ -519,7 +519,7 @@ class TxApprove extends import_eventOrTx.EVMTx {
519
519
  super(opts);
520
520
  this.token = opts.tokensList[opts.token];
521
521
  }
522
- toString() {
522
+ _toString() {
523
523
  const { title: symbol } = this.token;
524
524
  return `Approve ${symbol}`;
525
525
  }
@@ -543,7 +543,7 @@ class TxUpdateQuota extends import_eventOrTx.EVMTx {
543
543
  this.creditManagerName = opts.creditManagerName;
544
544
  this.underlyingToken = opts.tokensList[opts.underlyingToken];
545
545
  }
546
- toString() {
546
+ _toString() {
547
547
  const { decimals: underlyingDecimals } = this.underlyingToken;
548
548
  const quota = this.updatedQuotas.map(({ token, balance }) => {
549
549
  const { title: tokenSymbol } = token;
@@ -569,7 +569,7 @@ class TxGaugeStake extends import_eventOrTx.EVMTx {
569
569
  super(opts);
570
570
  this.amount = opts.amount;
571
571
  }
572
- toString() {
572
+ _toString() {
573
573
  const amountString = (0, import_utils.formatBN)(import_math.BigIntMath.abs(this.amount), GEAR_DECIMALS);
574
574
  return `Gauge: staked ${amountString} GEAR`;
575
575
  }
@@ -586,7 +586,7 @@ class TxGaugeUnstake extends import_eventOrTx.EVMTx {
586
586
  super(opts);
587
587
  this.amount = opts.amount;
588
588
  }
589
- toString() {
589
+ _toString() {
590
590
  const amountString = (0, import_utils.formatBN)(import_math.BigIntMath.abs(this.amount), GEAR_DECIMALS);
591
591
  return `Gauge: unstaked ${amountString} GEAR`;
592
592
  }
@@ -598,7 +598,7 @@ class TxGaugeUnstake extends import_eventOrTx.EVMTx {
598
598
  }
599
599
  }
600
600
  class TxGaugeClaim extends import_eventOrTx.EVMTx {
601
- toString() {
601
+ _toString() {
602
602
  return `Gauge: withdrawals claimed`;
603
603
  }
604
604
  serialize() {
@@ -614,7 +614,7 @@ class TxGaugeVote extends import_eventOrTx.EVMTx {
614
614
  super(opts);
615
615
  this.tokens = opts.tokens.map((t) => opts.tokensList[t.token]);
616
616
  }
617
- toString() {
617
+ _toString() {
618
618
  const votes = this.tokens.map(({ title }) => {
619
619
  return title;
620
620
  });
@@ -639,7 +639,7 @@ class TxWithdrawCollateral extends import_eventOrTx.EVMTx {
639
639
  this.to = opts.to;
640
640
  this.creditManagerName = opts.creditManagerName;
641
641
  }
642
- toString() {
642
+ _toString() {
643
643
  const { title: symbol, decimals } = this.token;
644
644
  return `Credit Account ${this.creditManagerName}: withdrawn ${(0, import_utils.formatBN)(
645
645
  this.amount,
@@ -659,7 +659,7 @@ class TxAddBot extends import_eventOrTx.EVMTx {
659
659
  super(opts);
660
660
  this.creditManagerName = opts.creditManagerName;
661
661
  }
662
- toString() {
662
+ _toString() {
663
663
  return `Credit Account ${this.creditManagerName}: bot enabled`;
664
664
  }
665
665
  serialize() {
@@ -675,7 +675,7 @@ class TxRemoveBot extends import_eventOrTx.EVMTx {
675
675
  super(opts);
676
676
  this.creditManagerName = opts.creditManagerName;
677
677
  }
678
- toString() {
678
+ _toString() {
679
679
  return `Credit Account ${this.creditManagerName}: bot disabled`;
680
680
  }
681
681
  serialize() {
@@ -695,7 +695,7 @@ class TxEnableTokens extends import_eventOrTx.EVMTx {
695
695
  this.disabledTokens = opts.disabledTokens.map((a) => opts.tokensList[a]);
696
696
  this.creditManagerName = opts.creditManagerName;
697
697
  }
698
- toString() {
698
+ _toString() {
699
699
  const enabledSymbols = this.enabledTokens.map((t) => t?.title);
700
700
  const disabledSymbols = this.disabledTokens.map((t) => t?.title);
701
701
  const currentSentences = [
@@ -723,7 +723,7 @@ class TxFillOrder extends import_eventOrTx.EVMTx {
723
723
  this.token = opts.tokensList[opts.token];
724
724
  this.network = opts.network;
725
725
  }
726
- toString() {
726
+ _toString() {
727
727
  const { title, decimals = 18 } = this.token;
728
728
  return `Order opened [${this.network}]: ${(0, import_utils.formatBN)(
729
729
  this.amount,
@@ -49,6 +49,11 @@ const HUMAN_READABLE_TITLES = {
49
49
  "PT-wstUSR-25SEP2025": "pt.wstUSR(25.09.25)",
50
50
  "PT-yUSD-27NOV2025": "pt.yUSD(27.11.25)",
51
51
  "PT-pUSDe-16OCT2025": "pt.pUSDe(16.10.25)",
52
+ "PT-USDe-15JAN2026": "pt.USDe(15.01.26)",
53
+ "PT-sUSDe-15JAN2026": "pt.sUSDe(15.01.26)",
54
+ "PT-syrupUSDT-29JAN2026": "pt.syrupUSDT(29.01.26)",
55
+ "PT-USDai-19MAR2026": "pt.USDai(19.03.26)",
56
+ "PT-sUSDai-19MAR2026": "pt.sUSDai(19.03.26)",
52
57
  ["0xab7d50fc2486a1ac06516e2ece9dadc95ba8cd20".toLowerCase()]: "cp0xLRT\xA0\u2192\xA0wstETH",
53
58
  ["0x6252467c2fefb61cb55180282943139baeea36c5".toLowerCase()]: "rstETH\xA0\u2192\xA0wstETH",
54
59
  ["0xd412ca00d177eba2843348f9c50dd17bfce32c40".toLowerCase()]: "pzETH\xA0\u2192\xA0wstETH",
@@ -3,11 +3,13 @@ class EventOrTx {
3
3
  txHash;
4
4
  timestamp;
5
5
  _txStatus;
6
- constructor({ block, txHash, txStatus, timestamp = 0 }) {
7
- this.block = block;
8
- this.txHash = txHash;
9
- this._txStatus = txStatus;
10
- this.timestamp = timestamp;
6
+ _customEventString;
7
+ constructor(props) {
8
+ this.block = props.block;
9
+ this.txHash = props.txHash;
10
+ this._txStatus = props.txStatus;
11
+ this.timestamp = props.timestamp ?? 0;
12
+ this._customEventString = props.eventString;
11
13
  }
12
14
  get isPending() {
13
15
  return this._txStatus === "pending";
@@ -24,12 +26,8 @@ class EventOrTx {
24
26
  }
25
27
  return item.block - this.block;
26
28
  }
27
- }
28
- class EVMEvent extends EventOrTx {
29
- logId;
30
- constructor(opts) {
31
- super({ ...opts, txStatus: "success" });
32
- this.logId = opts.logId;
29
+ toString() {
30
+ return this._customEventString ? this._customEventString : this._toString();
33
31
  }
34
32
  }
35
33
  class EVMTx extends EventOrTx {
@@ -37,13 +35,15 @@ class EVMTx extends EventOrTx {
37
35
  txHash,
38
36
  block = 0,
39
37
  txStatus = "pending",
40
- timestamp = 0
38
+ timestamp = 0,
39
+ ...rest
41
40
  }) {
42
41
  super({
43
42
  block,
44
43
  txStatus,
45
44
  txHash,
46
- timestamp
45
+ timestamp,
46
+ ...rest
47
47
  });
48
48
  if (this.txStatus !== "pending" && this.block === 0) {
49
49
  throw new Error("Block not specified for non-pending tx");
@@ -59,7 +59,5 @@ class EVMTx extends EventOrTx {
59
59
  }
60
60
  }
61
61
  export {
62
- EVMEvent,
63
- EVMTx,
64
- EventOrTx
62
+ EVMTx
65
63
  };
@@ -80,7 +80,7 @@ class TxAddLiquidity extends EVMTx {
80
80
  this.token = opts.tokensList[opts.token];
81
81
  this.poolName = opts.poolName;
82
82
  }
83
- toString() {
83
+ _toString() {
84
84
  const { title, decimals = 18 } = this.token;
85
85
  return `${this.poolName}: Deposit ${formatBN(
86
86
  this.amount,
@@ -104,7 +104,7 @@ class TxRemoveLiquidity extends EVMTx {
104
104
  this.token = opts.tokensList[opts.token];
105
105
  this.poolName = opts.poolName;
106
106
  }
107
- toString() {
107
+ _toString() {
108
108
  const { title, decimals = 18 } = this.token;
109
109
  return `${this.poolName}: Withdraw ${formatBN(
110
110
  this.amount,
@@ -130,7 +130,7 @@ class TxStakeDiesel extends EVMTx {
130
130
  this.tokenTo = opts.tokensList[opts.tokenTo];
131
131
  this.poolName = opts.poolName;
132
132
  }
133
- toString() {
133
+ _toString() {
134
134
  const { title: fromSymbol, decimals: fromDecimals = 18 } = this.tokenFrom;
135
135
  const { title: toSymbol } = this.tokenTo;
136
136
  return `${this.poolName}: Stake ${formatBN(
@@ -157,7 +157,7 @@ class TxUnstakeDiesel extends EVMTx {
157
157
  this.tokenTo = opts.tokensList[opts.tokenTo];
158
158
  this.poolName = opts.poolName;
159
159
  }
160
- toString() {
160
+ _toString() {
161
161
  const { title: fromSymbol, decimals: fromDecimals = 18 } = this.tokenFrom;
162
162
  const { title: toSymbol } = this.tokenTo;
163
163
  return `${this.poolName}: Unstake ${formatBN(
@@ -188,7 +188,7 @@ class TXSwap extends EVMTx {
188
188
  this.tokenTo = opts.tokenTo ? opts.tokensList[opts.tokenTo] : void 0;
189
189
  this.creditManagerName = opts.creditManagerName;
190
190
  }
191
- toString() {
191
+ _toString() {
192
192
  let toPart = "";
193
193
  if (this.tokenTo && this.amountTo) {
194
194
  const { title: toSymbol, decimals: toDecimals = 18 } = this.tokenTo;
@@ -214,7 +214,7 @@ class TxAddCollateral extends EVMTx {
214
214
  this.token = opts.tokensList[opts.token];
215
215
  this.creditManagerName = opts.creditManagerName;
216
216
  }
217
- toString() {
217
+ _toString() {
218
218
  const { title: addedSymbol, decimals: addedDecimals = 18 } = this.token;
219
219
  return `Credit Account ${this.creditManagerName}: Added ${formatBN(
220
220
  this.amount,
@@ -238,7 +238,7 @@ class TxIncreaseBorrowAmount extends EVMTx {
238
238
  this.token = opts.tokensList[opts.token];
239
239
  this.creditManagerName = opts.creditManagerName;
240
240
  }
241
- toString() {
241
+ _toString() {
242
242
  const { title: tokenSymbol, decimals: tokenDecimals } = this.token;
243
243
  return `Credit Account ${this.creditManagerName}: Borrowed amount was increased for ${formatBN(
244
244
  this.amount,
@@ -262,7 +262,7 @@ class TxDecreaseBorrowAmount extends EVMTx {
262
262
  this.token = opts.tokensList[opts.token];
263
263
  this.creditManagerName = opts.creditManagerName;
264
264
  }
265
- toString() {
265
+ _toString() {
266
266
  const { title: tokenSymbol, decimals: tokenDecimals } = this.token;
267
267
  return `Credit Account ${this.creditManagerName}: Borrowed amount was decreased for ${formatBN(
268
268
  this.amount,
@@ -290,7 +290,7 @@ class TxOpenMultitokenAccount extends EVMTx {
290
290
  this.assets = opts.assets.map((a) => opts.tokensList[a]);
291
291
  this.withdrawDebt = opts.withdrawDebt;
292
292
  }
293
- toString() {
293
+ _toString() {
294
294
  const assetSymbols = this.assets.reduce((acc, asset) => {
295
295
  const { title: tokenSymbol } = asset;
296
296
  const skip = this.withdrawDebt && this.underlyingToken.address === asset.address;
@@ -318,7 +318,7 @@ class TxOpenMultitokenAccount extends EVMTx {
318
318
  }
319
319
  }
320
320
  class TxClaimNFT extends EVMTx {
321
- toString() {
321
+ _toString() {
322
322
  return `NFT claimed`;
323
323
  }
324
324
  serialize() {
@@ -337,7 +337,7 @@ class TxClaimRewards extends EVMTx {
337
337
  balance
338
338
  }));
339
339
  }
340
- toString() {
340
+ _toString() {
341
341
  const rewardsString = this.rewards.length <= 2 ? this.rewards.map(({ token, balance }) => {
342
342
  const { title, decimals = 18 } = token;
343
343
  return `${formatBN(balance, decimals)} ${title}`;
@@ -372,7 +372,7 @@ class TxStartDelayedWithdrawal extends EVMTx {
372
372
  })
373
373
  );
374
374
  }
375
- toString() {
375
+ _toString() {
376
376
  const total = this.instantWithdrawals.length + this.delayedWithdrawals.length;
377
377
  const instantString = total <= 2 ? this.instantWithdrawals.map(({ token, balance }) => {
378
378
  const { title, decimals = 18 } = token;
@@ -405,7 +405,7 @@ class TxMigrateCreditAccount extends EVMTx {
405
405
  super(opts);
406
406
  this.targetCreditManager = `${opts.targetCreditManager.name} (${opts.curatorName})`;
407
407
  }
408
- toString() {
408
+ _toString() {
409
409
  return `Successfully migrated Credit Account to ${this.targetCreditManager}`;
410
410
  }
411
411
  serialize() {
@@ -421,7 +421,7 @@ class TxRepayAccount extends EVMTx {
421
421
  super(opts);
422
422
  this.creditManagerName = opts.creditManagerName;
423
423
  }
424
- toString() {
424
+ _toString() {
425
425
  return `Credit Account ${this.creditManagerName}: Repaying account`;
426
426
  }
427
427
  serialize() {
@@ -437,7 +437,7 @@ class TxLiquidateAccount extends EVMTx {
437
437
  super(opts);
438
438
  this.creditManagerName = opts.creditManagerName;
439
439
  }
440
- toString() {
440
+ _toString() {
441
441
  return `Credit Account ${this.creditManagerName}: Liquidated`;
442
442
  }
443
443
  serialize() {
@@ -453,7 +453,7 @@ class TxCloseAccount extends EVMTx {
453
453
  super(opts);
454
454
  this.creditManagerName = opts.creditManagerName;
455
455
  }
456
- toString() {
456
+ _toString() {
457
457
  return `Credit Account ${this.creditManagerName}: Closing account`;
458
458
  }
459
459
  serialize() {
@@ -469,7 +469,7 @@ class TxApprove extends EVMTx {
469
469
  super(opts);
470
470
  this.token = opts.tokensList[opts.token];
471
471
  }
472
- toString() {
472
+ _toString() {
473
473
  const { title: symbol } = this.token;
474
474
  return `Approve ${symbol}`;
475
475
  }
@@ -493,7 +493,7 @@ class TxUpdateQuota extends EVMTx {
493
493
  this.creditManagerName = opts.creditManagerName;
494
494
  this.underlyingToken = opts.tokensList[opts.underlyingToken];
495
495
  }
496
- toString() {
496
+ _toString() {
497
497
  const { decimals: underlyingDecimals } = this.underlyingToken;
498
498
  const quota = this.updatedQuotas.map(({ token, balance }) => {
499
499
  const { title: tokenSymbol } = token;
@@ -519,7 +519,7 @@ class TxGaugeStake extends EVMTx {
519
519
  super(opts);
520
520
  this.amount = opts.amount;
521
521
  }
522
- toString() {
522
+ _toString() {
523
523
  const amountString = formatBN(BigIntMath.abs(this.amount), GEAR_DECIMALS);
524
524
  return `Gauge: staked ${amountString} GEAR`;
525
525
  }
@@ -536,7 +536,7 @@ class TxGaugeUnstake extends EVMTx {
536
536
  super(opts);
537
537
  this.amount = opts.amount;
538
538
  }
539
- toString() {
539
+ _toString() {
540
540
  const amountString = formatBN(BigIntMath.abs(this.amount), GEAR_DECIMALS);
541
541
  return `Gauge: unstaked ${amountString} GEAR`;
542
542
  }
@@ -548,7 +548,7 @@ class TxGaugeUnstake extends EVMTx {
548
548
  }
549
549
  }
550
550
  class TxGaugeClaim extends EVMTx {
551
- toString() {
551
+ _toString() {
552
552
  return `Gauge: withdrawals claimed`;
553
553
  }
554
554
  serialize() {
@@ -564,7 +564,7 @@ class TxGaugeVote extends EVMTx {
564
564
  super(opts);
565
565
  this.tokens = opts.tokens.map((t) => opts.tokensList[t.token]);
566
566
  }
567
- toString() {
567
+ _toString() {
568
568
  const votes = this.tokens.map(({ title }) => {
569
569
  return title;
570
570
  });
@@ -589,7 +589,7 @@ class TxWithdrawCollateral extends EVMTx {
589
589
  this.to = opts.to;
590
590
  this.creditManagerName = opts.creditManagerName;
591
591
  }
592
- toString() {
592
+ _toString() {
593
593
  const { title: symbol, decimals } = this.token;
594
594
  return `Credit Account ${this.creditManagerName}: withdrawn ${formatBN(
595
595
  this.amount,
@@ -609,7 +609,7 @@ class TxAddBot extends EVMTx {
609
609
  super(opts);
610
610
  this.creditManagerName = opts.creditManagerName;
611
611
  }
612
- toString() {
612
+ _toString() {
613
613
  return `Credit Account ${this.creditManagerName}: bot enabled`;
614
614
  }
615
615
  serialize() {
@@ -625,7 +625,7 @@ class TxRemoveBot extends EVMTx {
625
625
  super(opts);
626
626
  this.creditManagerName = opts.creditManagerName;
627
627
  }
628
- toString() {
628
+ _toString() {
629
629
  return `Credit Account ${this.creditManagerName}: bot disabled`;
630
630
  }
631
631
  serialize() {
@@ -645,7 +645,7 @@ class TxEnableTokens extends EVMTx {
645
645
  this.disabledTokens = opts.disabledTokens.map((a) => opts.tokensList[a]);
646
646
  this.creditManagerName = opts.creditManagerName;
647
647
  }
648
- toString() {
648
+ _toString() {
649
649
  const enabledSymbols = this.enabledTokens.map((t) => t?.title);
650
650
  const disabledSymbols = this.disabledTokens.map((t) => t?.title);
651
651
  const currentSentences = [
@@ -673,7 +673,7 @@ class TxFillOrder extends EVMTx {
673
673
  this.token = opts.tokensList[opts.token];
674
674
  this.network = opts.network;
675
675
  }
676
- toString() {
676
+ _toString() {
677
677
  const { title, decimals = 18 } = this.token;
678
678
  return `Order opened [${this.network}]: ${formatBN(
679
679
  this.amount,
@@ -26,6 +26,11 @@ const HUMAN_READABLE_TITLES = {
26
26
  "PT-wstUSR-25SEP2025": "pt.wstUSR(25.09.25)",
27
27
  "PT-yUSD-27NOV2025": "pt.yUSD(27.11.25)",
28
28
  "PT-pUSDe-16OCT2025": "pt.pUSDe(16.10.25)",
29
+ "PT-USDe-15JAN2026": "pt.USDe(15.01.26)",
30
+ "PT-sUSDe-15JAN2026": "pt.sUSDe(15.01.26)",
31
+ "PT-syrupUSDT-29JAN2026": "pt.syrupUSDT(29.01.26)",
32
+ "PT-USDai-19MAR2026": "pt.USDai(19.03.26)",
33
+ "PT-sUSDai-19MAR2026": "pt.sUSDai(19.03.26)",
29
34
  ["0xab7d50fc2486a1ac06516e2ece9dadc95ba8cd20".toLowerCase()]: "cp0xLRT\xA0\u2192\xA0wstETH",
30
35
  ["0x6252467c2fefb61cb55180282943139baeea36c5".toLowerCase()]: "rstETH\xA0\u2192\xA0wstETH",
31
36
  ["0xd412ca00d177eba2843348f9c50dd17bfce32c40".toLowerCase()]: "pzETH\xA0\u2192\xA0wstETH",
@@ -1,38 +1,35 @@
1
1
  import type { Address } from "viem";
2
2
  import type { TokenData } from "../tokens/tokenData.js";
3
3
  import type { TxSerialized } from "./transactions.js";
4
- export interface Display {
4
+ interface Display {
5
5
  toString: (tokenData: Record<string, TokenData>) => string;
6
6
  }
7
7
  export type TxStatus = "pending" | "success" | "reverted";
8
- export interface EventOrTxProps {
8
+ interface EventOrTxProps {
9
9
  block: number;
10
10
  txHash: Address;
11
11
  txStatus: TxStatus;
12
12
  timestamp: number;
13
+ eventString?: string;
13
14
  }
14
- export declare abstract class EventOrTx implements Display {
15
+ declare abstract class EventOrTx implements Display {
15
16
  block: number;
16
17
  readonly txHash: Address;
17
18
  readonly timestamp: number;
18
19
  protected _txStatus: TxStatus;
19
- constructor({ block, txHash, txStatus, timestamp }: EventOrTxProps);
20
+ protected _customEventString: string | undefined;
21
+ constructor(props: EventOrTxProps);
20
22
  get isPending(): boolean;
21
23
  get txStatus(): TxStatus;
22
24
  compare(item: EventOrTx): number;
23
- abstract toString(): string;
24
- }
25
- export type EVMEventProps = Omit<EventOrTxProps, "txStatus"> & {
26
- logId?: number;
27
- };
28
- export declare abstract class EVMEvent extends EventOrTx {
29
- logId?: number;
30
- constructor(opts: EVMEventProps);
25
+ toString(): string;
26
+ protected abstract _toString(): string;
31
27
  }
32
28
  export type EVMTxProps = Omit<EventOrTxProps, "block" | "txStatus"> & Partial<Pick<EventOrTxProps, "block" | "txStatus">>;
33
29
  export declare abstract class EVMTx extends EventOrTx {
34
- constructor({ txHash, block, txStatus, timestamp, }: EVMTxProps);
30
+ constructor({ txHash, block, txStatus, timestamp, ...rest }: EVMTxProps);
35
31
  abstract serialize(): TxSerialized;
36
32
  revert(block: number): void;
37
33
  success(block: number): void;
38
34
  }
35
+ export {};
@@ -23,7 +23,7 @@ export declare class TxAddLiquidity extends EVMTx {
23
23
  readonly token: TokenData;
24
24
  readonly poolName: string;
25
25
  constructor(opts: AddLiquidityProps);
26
- toString(): string;
26
+ _toString(): string;
27
27
  serialize(): TxSerialized;
28
28
  }
29
29
  interface RemoveLiquidityProps extends EVMTxProps {
@@ -37,7 +37,7 @@ export declare class TxRemoveLiquidity extends EVMTx {
37
37
  readonly token: TokenData;
38
38
  readonly poolName: string;
39
39
  constructor(opts: RemoveLiquidityProps);
40
- toString(): string;
40
+ _toString(): string;
41
41
  serialize(): TxSerialized;
42
42
  }
43
43
  interface TxStakeDieselProps extends EVMTxProps {
@@ -53,7 +53,7 @@ export declare class TxStakeDiesel extends EVMTx {
53
53
  readonly tokenTo: TokenData;
54
54
  readonly poolName: string;
55
55
  constructor(opts: TxStakeDieselProps);
56
- toString(): string;
56
+ _toString(): string;
57
57
  serialize(): TxSerialized;
58
58
  }
59
59
  export declare class TxUnstakeDiesel extends EVMTx {
@@ -62,7 +62,7 @@ export declare class TxUnstakeDiesel extends EVMTx {
62
62
  readonly tokenTo: TokenData;
63
63
  readonly poolName: string;
64
64
  constructor(opts: TxStakeDieselProps);
65
- toString(): string;
65
+ _toString(): string;
66
66
  serialize(): TxSerialized;
67
67
  }
68
68
  interface SwapProps extends EVMTxProps {
@@ -82,7 +82,7 @@ export declare class TXSwap extends EVMTx {
82
82
  readonly tokenTo?: TokenData;
83
83
  readonly creditManagerName: string;
84
84
  constructor(opts: SwapProps);
85
- toString(): string;
85
+ _toString(): string;
86
86
  serialize(): TxSerialized;
87
87
  }
88
88
  interface AddCollateralProps extends EVMTxProps {
@@ -96,7 +96,7 @@ export declare class TxAddCollateral extends EVMTx {
96
96
  readonly token: TokenData;
97
97
  readonly creditManagerName: string;
98
98
  constructor(opts: AddCollateralProps);
99
- toString(): string;
99
+ _toString(): string;
100
100
  serialize(): TxSerialized;
101
101
  }
102
102
  interface IncreaseBorrowAmountProps extends EVMTxProps {
@@ -110,7 +110,7 @@ export declare class TxIncreaseBorrowAmount extends EVMTx {
110
110
  readonly token: TokenData;
111
111
  readonly creditManagerName: string;
112
112
  constructor(opts: IncreaseBorrowAmountProps);
113
- toString(): string;
113
+ _toString(): string;
114
114
  serialize(): TxSerialized;
115
115
  }
116
116
  interface DecreaseBorrowAmountProps extends EVMTxProps {
@@ -124,7 +124,7 @@ export declare class TxDecreaseBorrowAmount extends EVMTx {
124
124
  readonly token: TokenData;
125
125
  readonly creditManagerName: string;
126
126
  constructor(opts: DecreaseBorrowAmountProps);
127
- toString(): string;
127
+ _toString(): string;
128
128
  serialize(): TxSerialized;
129
129
  }
130
130
  interface TxOpenMultitokenAccountProps extends EVMTxProps {
@@ -142,11 +142,11 @@ export declare class TxOpenMultitokenAccount extends EVMTx {
142
142
  readonly assets: Array<TokenData>;
143
143
  readonly withdrawDebt: boolean;
144
144
  constructor(opts: TxOpenMultitokenAccountProps);
145
- toString(): string;
145
+ _toString(): string;
146
146
  serialize(): TxSerialized;
147
147
  }
148
148
  export declare class TxClaimNFT extends EVMTx {
149
- toString(): string;
149
+ _toString(): string;
150
150
  serialize(): TxSerialized;
151
151
  }
152
152
  interface TxClaimRewardsProps extends EVMTxProps {
@@ -158,7 +158,7 @@ export declare class TxClaimRewards extends EVMTx {
158
158
  token: TokenData;
159
159
  }>;
160
160
  constructor(opts: TxClaimRewardsProps);
161
- toString(): string;
161
+ _toString(): string;
162
162
  serialize(): TxSerialized;
163
163
  }
164
164
  interface TxStartDelayedWithdrawalProps extends EVMTxProps {
@@ -174,7 +174,7 @@ export declare class TxStartDelayedWithdrawal extends EVMTx {
174
174
  token: TokenData;
175
175
  }>;
176
176
  constructor(opts: TxStartDelayedWithdrawalProps);
177
- toString(): string;
177
+ _toString(): string;
178
178
  serialize(): TxSerialized;
179
179
  }
180
180
  interface TxMigrateCreditAccountProps extends EVMTxProps {
@@ -185,7 +185,7 @@ interface TxMigrateCreditAccountProps extends EVMTxProps {
185
185
  export declare class TxMigrateCreditAccount extends EVMTx {
186
186
  readonly targetCreditManager: string;
187
187
  constructor(opts: TxMigrateCreditAccountProps);
188
- toString(): string;
188
+ _toString(): string;
189
189
  serialize(): TxSerialized;
190
190
  }
191
191
  interface RepayAccountProps extends EVMTxProps {
@@ -194,7 +194,7 @@ interface RepayAccountProps extends EVMTxProps {
194
194
  export declare class TxRepayAccount extends EVMTx {
195
195
  readonly creditManagerName: string;
196
196
  constructor(opts: RepayAccountProps);
197
- toString(): string;
197
+ _toString(): string;
198
198
  serialize(): TxSerialized;
199
199
  }
200
200
  interface LiquidateAccountProps extends EVMTxProps {
@@ -203,7 +203,7 @@ interface LiquidateAccountProps extends EVMTxProps {
203
203
  export declare class TxLiquidateAccount extends EVMTx {
204
204
  readonly creditManagerName: string;
205
205
  constructor(opts: LiquidateAccountProps);
206
- toString(): string;
206
+ _toString(): string;
207
207
  serialize(): TxSerialized;
208
208
  }
209
209
  interface CloseAccountProps extends EVMTxProps {
@@ -212,7 +212,7 @@ interface CloseAccountProps extends EVMTxProps {
212
212
  export declare class TxCloseAccount extends EVMTx {
213
213
  readonly creditManagerName: string;
214
214
  constructor(opts: CloseAccountProps);
215
- toString(): string;
215
+ _toString(): string;
216
216
  serialize(): TxSerialized;
217
217
  }
218
218
  interface ApproveProps extends EVMTxProps {
@@ -222,7 +222,7 @@ interface ApproveProps extends EVMTxProps {
222
222
  export declare class TxApprove extends EVMTx {
223
223
  readonly token: TokenData;
224
224
  constructor(opts: ApproveProps);
225
- toString(): string;
225
+ _toString(): string;
226
226
  serialize(): TxSerialized;
227
227
  }
228
228
  interface TxUpdateQuotaProps extends EVMTxProps {
@@ -238,7 +238,7 @@ export declare class TxUpdateQuota extends EVMTx {
238
238
  readonly underlyingToken: TokenData;
239
239
  readonly creditManagerName: string;
240
240
  constructor(opts: TxUpdateQuotaProps);
241
- toString(): string;
241
+ _toString(): string;
242
242
  serialize(): TxSerialized;
243
243
  }
244
244
  interface TxGaugeStakeProps extends EVMTxProps {
@@ -247,7 +247,7 @@ interface TxGaugeStakeProps extends EVMTxProps {
247
247
  export declare class TxGaugeStake extends EVMTx {
248
248
  readonly amount: bigint;
249
249
  constructor(opts: TxGaugeStakeProps);
250
- toString(): string;
250
+ _toString(): string;
251
251
  serialize(): TxSerialized;
252
252
  }
253
253
  interface TxGaugeUnstakeProps extends EVMTxProps {
@@ -256,11 +256,11 @@ interface TxGaugeUnstakeProps extends EVMTxProps {
256
256
  export declare class TxGaugeUnstake extends EVMTx {
257
257
  readonly amount: bigint;
258
258
  constructor(opts: TxGaugeUnstakeProps);
259
- toString(): string;
259
+ _toString(): string;
260
260
  serialize(): TxSerialized;
261
261
  }
262
262
  export declare class TxGaugeClaim extends EVMTx {
263
- toString(): string;
263
+ _toString(): string;
264
264
  serialize(): TxSerialized;
265
265
  }
266
266
  interface TxGaugeVoteProps extends EVMTxProps {
@@ -272,7 +272,7 @@ interface TxGaugeVoteProps extends EVMTxProps {
272
272
  export declare class TxGaugeVote extends EVMTx {
273
273
  readonly tokens: Array<TokenData>;
274
274
  constructor(opts: TxGaugeVoteProps);
275
- toString(): string;
275
+ _toString(): string;
276
276
  serialize(): TxSerialized;
277
277
  }
278
278
  interface WithdrawCollateralProps extends EVMTxProps {
@@ -288,7 +288,7 @@ export declare class TxWithdrawCollateral extends EVMTx {
288
288
  readonly to: Address;
289
289
  readonly creditManagerName: string;
290
290
  constructor(opts: WithdrawCollateralProps);
291
- toString(): string;
291
+ _toString(): string;
292
292
  serialize(): TxSerialized;
293
293
  }
294
294
  interface TxAddBotProps extends EVMTxProps {
@@ -297,13 +297,13 @@ interface TxAddBotProps extends EVMTxProps {
297
297
  export declare class TxAddBot extends EVMTx {
298
298
  readonly creditManagerName: string;
299
299
  constructor(opts: TxAddBotProps);
300
- toString(): string;
300
+ _toString(): string;
301
301
  serialize(): TxSerialized;
302
302
  }
303
303
  export declare class TxRemoveBot extends EVMTx {
304
304
  readonly creditManagerName: string;
305
305
  constructor(opts: TxAddBotProps);
306
- toString(): string;
306
+ _toString(): string;
307
307
  serialize(): TxSerialized;
308
308
  }
309
309
  interface EnableTokensProps extends EVMTxProps {
@@ -317,7 +317,7 @@ export declare class TxEnableTokens extends EVMTx {
317
317
  readonly disabledTokens: Array<TokenData>;
318
318
  readonly creditManagerName: string;
319
319
  constructor(opts: EnableTokensProps);
320
- toString(): string;
320
+ _toString(): string;
321
321
  serialize(): TxSerialized;
322
322
  }
323
323
  interface TxFillOrderProps extends EVMTxProps {
@@ -331,7 +331,7 @@ export declare class TxFillOrder extends EVMTx {
331
331
  readonly token: TokenData;
332
332
  readonly network: string;
333
333
  constructor(opts: TxFillOrderProps);
334
- toString(): string;
334
+ _toString(): string;
335
335
  serialize(): TxSerialized;
336
336
  }
337
337
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "9.10.6",
3
+ "version": "9.10.8",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",