@gearbox-protocol/sdk 14.5.9 → 14.6.0-next.1

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.
Files changed (100) hide show
  1. package/dist/cjs/abi/kyc/iDSToken.js +1907 -20
  2. package/dist/cjs/common-utils/utils/apy/bonus-apy-from-points.js +28 -0
  3. package/dist/cjs/common-utils/utils/apy/calculate-effective-borrow-rate.js +35 -0
  4. package/dist/cjs/common-utils/utils/apy/get-complex-apy-list.js +45 -0
  5. package/dist/cjs/common-utils/utils/apy/get-rate-with-fee.js +31 -0
  6. package/dist/cjs/common-utils/utils/apy/get-single-quota-borrow-rate.js +33 -0
  7. package/dist/cjs/common-utils/utils/apy/index.js +32 -0
  8. package/dist/cjs/common-utils/utils/apy/max-apy-formula.js +40 -0
  9. package/dist/cjs/common-utils/utils/index.js +5 -1
  10. package/dist/cjs/common-utils/utils/strategies/__test-utils.js +95 -0
  11. package/dist/cjs/common-utils/utils/strategies/availability/check-boolean.js +33 -0
  12. package/dist/cjs/common-utils/utils/strategies/availability/check-degen-nft.js +35 -0
  13. package/dist/cjs/common-utils/utils/strategies/availability/index.js +28 -0
  14. package/dist/cjs/common-utils/utils/strategies/availability/validate-open-account-pool-quota-status.js +40 -0
  15. package/dist/cjs/common-utils/utils/strategies/availability/validate-open-account-pool-status.js +76 -0
  16. package/dist/cjs/common-utils/utils/strategies/index.js +28 -0
  17. package/dist/cjs/common-utils/utils/strategies/leverage/calculate-loss-coefficient.js +31 -0
  18. package/dist/cjs/common-utils/utils/strategies/leverage/calculate-max-leverage-factor.js +45 -0
  19. package/dist/cjs/common-utils/utils/strategies/leverage/get-factor-from-leverage.js +31 -0
  20. package/dist/cjs/common-utils/utils/strategies/leverage/get-leverage-from-factor.js +31 -0
  21. package/dist/cjs/common-utils/utils/strategies/leverage/index.js +32 -0
  22. package/dist/cjs/common-utils/utils/strategies/leverage/max-leverage-threshold.js +42 -0
  23. package/dist/cjs/common-utils/utils/strategies/leverage/max-leverage.js +35 -0
  24. package/dist/cjs/common-utils/utils/strategies/sort-strategy-cms-by-availability/index.js +22 -0
  25. package/dist/cjs/common-utils/utils/strategies/sort-strategy-cms-by-availability/sort-strategy-cms-by-availability.js +64 -0
  26. package/dist/cjs/common-utils/utils/strategies/strategy-info/cm-availability-condition.js +63 -0
  27. package/dist/cjs/common-utils/utils/strategies/strategy-info/get-strategy-info.js +98 -0
  28. package/dist/cjs/common-utils/utils/strategies/strategy-info/get-strategy-max-apy.js +102 -0
  29. package/dist/cjs/common-utils/utils/strategies/strategy-info/index.js +30 -0
  30. package/dist/cjs/common-utils/utils/strategies/strategy-info/is-strategy-cm-disabled.js +33 -0
  31. package/dist/cjs/common-utils/utils/strategies/strategy-info/types.js +16 -0
  32. package/dist/cjs/plugins/adapters/abi/securitize/iBaseOnRamp.js +351 -0
  33. package/dist/cjs/plugins/adapters/contracts/SecuritizeOnRampAdapterContract.js +2 -1
  34. package/dist/esm/abi/kyc/iDSToken.js +1907 -20
  35. package/dist/esm/common-utils/utils/apy/bonus-apy-from-points.js +4 -0
  36. package/dist/esm/common-utils/utils/apy/calculate-effective-borrow-rate.js +11 -0
  37. package/dist/esm/common-utils/utils/apy/get-complex-apy-list.js +21 -0
  38. package/dist/esm/common-utils/utils/apy/get-rate-with-fee.js +7 -0
  39. package/dist/esm/common-utils/utils/apy/get-single-quota-borrow-rate.js +9 -0
  40. package/dist/esm/common-utils/utils/apy/index.js +6 -0
  41. package/dist/esm/common-utils/utils/apy/max-apy-formula.js +16 -0
  42. package/dist/esm/common-utils/utils/index.js +2 -0
  43. package/dist/esm/common-utils/utils/strategies/__test-utils.js +65 -0
  44. package/dist/esm/common-utils/utils/strategies/availability/check-boolean.js +9 -0
  45. package/dist/esm/common-utils/utils/strategies/availability/check-degen-nft.js +11 -0
  46. package/dist/esm/common-utils/utils/strategies/availability/index.js +4 -0
  47. package/dist/esm/common-utils/utils/strategies/availability/validate-open-account-pool-quota-status.js +16 -0
  48. package/dist/esm/common-utils/utils/strategies/availability/validate-open-account-pool-status.js +52 -0
  49. package/dist/esm/common-utils/utils/strategies/index.js +4 -0
  50. package/dist/esm/common-utils/utils/strategies/leverage/calculate-loss-coefficient.js +7 -0
  51. package/dist/esm/common-utils/utils/strategies/leverage/calculate-max-leverage-factor.js +21 -0
  52. package/dist/esm/common-utils/utils/strategies/leverage/get-factor-from-leverage.js +7 -0
  53. package/dist/esm/common-utils/utils/strategies/leverage/get-leverage-from-factor.js +7 -0
  54. package/dist/esm/common-utils/utils/strategies/leverage/index.js +6 -0
  55. package/dist/esm/common-utils/utils/strategies/leverage/max-leverage-threshold.js +18 -0
  56. package/dist/esm/common-utils/utils/strategies/leverage/max-leverage.js +11 -0
  57. package/dist/esm/common-utils/utils/strategies/sort-strategy-cms-by-availability/index.js +1 -0
  58. package/dist/esm/common-utils/utils/strategies/sort-strategy-cms-by-availability/sort-strategy-cms-by-availability.js +43 -0
  59. package/dist/esm/common-utils/utils/strategies/strategy-info/cm-availability-condition.js +43 -0
  60. package/dist/esm/common-utils/utils/strategies/strategy-info/get-strategy-info.js +74 -0
  61. package/dist/esm/common-utils/utils/strategies/strategy-info/get-strategy-max-apy.js +85 -0
  62. package/dist/esm/common-utils/utils/strategies/strategy-info/index.js +5 -0
  63. package/dist/esm/common-utils/utils/strategies/strategy-info/is-strategy-cm-disabled.js +9 -0
  64. package/dist/esm/common-utils/utils/strategies/strategy-info/types.js +0 -0
  65. package/dist/esm/plugins/adapters/abi/securitize/iBaseOnRamp.js +327 -0
  66. package/dist/esm/plugins/adapters/contracts/SecuritizeOnRampAdapterContract.js +2 -1
  67. package/dist/types/abi/kyc/iDSToken.d.ts +1446 -13
  68. package/dist/types/common-utils/utils/apy/bonus-apy-from-points.d.ts +4 -0
  69. package/dist/types/common-utils/utils/apy/calculate-effective-borrow-rate.d.ts +6 -0
  70. package/dist/types/common-utils/utils/apy/get-complex-apy-list.d.ts +5 -0
  71. package/dist/types/common-utils/utils/apy/get-rate-with-fee.d.ts +7 -0
  72. package/dist/types/common-utils/utils/apy/get-single-quota-borrow-rate.d.ts +9 -0
  73. package/dist/types/common-utils/utils/apy/index.d.ts +6 -0
  74. package/dist/types/common-utils/utils/apy/max-apy-formula.d.ts +6 -0
  75. package/dist/types/common-utils/utils/index.d.ts +2 -0
  76. package/dist/types/common-utils/utils/strategies/__test-utils.d.ts +11 -0
  77. package/dist/types/common-utils/utils/strategies/availability/check-boolean.d.ts +1 -0
  78. package/dist/types/common-utils/utils/strategies/availability/check-degen-nft.d.ts +5 -0
  79. package/dist/types/common-utils/utils/strategies/availability/index.d.ts +4 -0
  80. package/dist/types/common-utils/utils/strategies/availability/validate-open-account-pool-quota-status.d.ts +6 -0
  81. package/dist/types/common-utils/utils/strategies/availability/validate-open-account-pool-status.d.ts +24 -0
  82. package/dist/types/common-utils/utils/strategies/index.d.ts +4 -0
  83. package/dist/types/common-utils/utils/strategies/leverage/calculate-loss-coefficient.d.ts +1 -0
  84. package/dist/types/common-utils/utils/strategies/leverage/calculate-max-leverage-factor.d.ts +12 -0
  85. package/dist/types/common-utils/utils/strategies/leverage/get-factor-from-leverage.d.ts +4 -0
  86. package/dist/types/common-utils/utils/strategies/leverage/get-leverage-from-factor.d.ts +2 -0
  87. package/dist/types/common-utils/utils/strategies/leverage/index.d.ts +6 -0
  88. package/dist/types/common-utils/utils/strategies/leverage/max-leverage-threshold.d.ts +5 -0
  89. package/dist/types/common-utils/utils/strategies/leverage/max-leverage.d.ts +9 -0
  90. package/dist/types/common-utils/utils/strategies/sort-strategy-cms-by-availability/index.d.ts +1 -0
  91. package/dist/types/common-utils/utils/strategies/sort-strategy-cms-by-availability/sort-strategy-cms-by-availability.d.ts +13 -0
  92. package/dist/types/common-utils/utils/strategies/strategy-info/cm-availability-condition.d.ts +3 -0
  93. package/dist/types/common-utils/utils/strategies/strategy-info/get-strategy-info.d.ts +2 -0
  94. package/dist/types/common-utils/utils/strategies/strategy-info/get-strategy-max-apy.d.ts +13 -0
  95. package/dist/types/common-utils/utils/strategies/strategy-info/index.d.ts +5 -0
  96. package/dist/types/common-utils/utils/strategies/strategy-info/is-strategy-cm-disabled.d.ts +2 -0
  97. package/dist/types/common-utils/utils/strategies/strategy-info/types.d.ts +80 -0
  98. package/dist/types/plugins/adapters/abi/securitize/iBaseOnRamp.d.ts +255 -0
  99. package/dist/types/plugins/adapters/contracts/SecuritizeOnRampAdapterContract.d.ts +254 -0
  100. package/package.json +1 -1
@@ -0,0 +1,351 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var iBaseOnRamp_exports = {};
20
+ __export(iBaseOnRamp_exports, {
21
+ iBaseOnRampAbi: () => iBaseOnRampAbi
22
+ });
23
+ module.exports = __toCommonJS(iBaseOnRamp_exports);
24
+ const iBaseOnRampAbi = [
25
+ {
26
+ inputs: [],
27
+ name: "InsufficientERC20BalanceError",
28
+ type: "error"
29
+ },
30
+ {
31
+ inputs: [],
32
+ name: "InvalidEIP712SignatureError",
33
+ type: "error"
34
+ },
35
+ {
36
+ inputs: [],
37
+ name: "InvestorNotRegisteredError",
38
+ type: "error"
39
+ },
40
+ {
41
+ inputs: [],
42
+ name: "InvestorSubscriptionDisabledError",
43
+ type: "error"
44
+ },
45
+ {
46
+ inputs: [],
47
+ name: "MinSubscriptionAmountError",
48
+ type: "error"
49
+ },
50
+ {
51
+ inputs: [],
52
+ name: "NonPositiveAmountError",
53
+ type: "error"
54
+ },
55
+ {
56
+ inputs: [],
57
+ name: "NonZeroAddressError",
58
+ type: "error"
59
+ },
60
+ {
61
+ inputs: [],
62
+ name: "NonZeroNavRateError",
63
+ type: "error"
64
+ },
65
+ {
66
+ inputs: [],
67
+ name: "SameValueError",
68
+ type: "error"
69
+ },
70
+ {
71
+ inputs: [],
72
+ name: "SignatureDeadlineExpiredError",
73
+ type: "error"
74
+ },
75
+ {
76
+ inputs: [],
77
+ name: "SlippageControlError",
78
+ type: "error"
79
+ },
80
+ {
81
+ anonymous: false,
82
+ inputs: [
83
+ {
84
+ indexed: true,
85
+ internalType: "address",
86
+ name: "oldProvider",
87
+ type: "address"
88
+ },
89
+ {
90
+ indexed: true,
91
+ internalType: "address",
92
+ name: "newProvider",
93
+ type: "address"
94
+ }
95
+ ],
96
+ name: "AssetProviderUpdated",
97
+ type: "event"
98
+ },
99
+ {
100
+ anonymous: false,
101
+ inputs: [
102
+ {
103
+ indexed: false,
104
+ internalType: "uint16",
105
+ name: "chainId",
106
+ type: "uint16"
107
+ },
108
+ {
109
+ indexed: false,
110
+ internalType: "address",
111
+ name: "bridge",
112
+ type: "address"
113
+ }
114
+ ],
115
+ name: "BridgeParamsUpdated",
116
+ type: "event"
117
+ },
118
+ {
119
+ anonymous: false,
120
+ inputs: [
121
+ {
122
+ indexed: false,
123
+ internalType: "bool",
124
+ name: "newValue",
125
+ type: "bool"
126
+ }
127
+ ],
128
+ name: "InvestorSubscriptionUpdated",
129
+ type: "event"
130
+ },
131
+ {
132
+ anonymous: false,
133
+ inputs: [
134
+ {
135
+ indexed: false,
136
+ internalType: "uint256",
137
+ name: "oldValue",
138
+ type: "uint256"
139
+ },
140
+ {
141
+ indexed: false,
142
+ internalType: "uint256",
143
+ name: "newValue",
144
+ type: "uint256"
145
+ }
146
+ ],
147
+ name: "MinSubscriptionAmountUpdated",
148
+ type: "event"
149
+ },
150
+ {
151
+ anonymous: false,
152
+ inputs: [
153
+ {
154
+ indexed: true,
155
+ internalType: "address",
156
+ name: "oldProvider",
157
+ type: "address"
158
+ },
159
+ {
160
+ indexed: true,
161
+ internalType: "address",
162
+ name: "newProvider",
163
+ type: "address"
164
+ }
165
+ ],
166
+ name: "NavProviderUpdated",
167
+ type: "event"
168
+ },
169
+ {
170
+ anonymous: false,
171
+ inputs: [
172
+ {
173
+ indexed: true,
174
+ internalType: "address",
175
+ name: "from",
176
+ type: "address"
177
+ },
178
+ {
179
+ indexed: false,
180
+ internalType: "uint256",
181
+ name: "dsTokenValue",
182
+ type: "uint256"
183
+ },
184
+ {
185
+ indexed: false,
186
+ internalType: "uint256",
187
+ name: "liquidityValue",
188
+ type: "uint256"
189
+ },
190
+ {
191
+ indexed: true,
192
+ internalType: "address",
193
+ name: "newWalletTo",
194
+ type: "address"
195
+ },
196
+ {
197
+ indexed: false,
198
+ internalType: "uint256",
199
+ name: "rate",
200
+ type: "uint256"
201
+ },
202
+ {
203
+ indexed: false,
204
+ internalType: "uint256",
205
+ name: "fee",
206
+ type: "uint256"
207
+ },
208
+ {
209
+ indexed: true,
210
+ internalType: "address",
211
+ name: "liquidityToken",
212
+ type: "address"
213
+ }
214
+ ],
215
+ name: "Swap",
216
+ type: "event"
217
+ },
218
+ {
219
+ anonymous: false,
220
+ inputs: [
221
+ {
222
+ indexed: false,
223
+ internalType: "bool",
224
+ name: "newValue",
225
+ type: "bool"
226
+ }
227
+ ],
228
+ name: "TwoStepTransferUpdated",
229
+ type: "event"
230
+ },
231
+ {
232
+ inputs: [
233
+ {
234
+ internalType: "address",
235
+ name: "_dsToken",
236
+ type: "address"
237
+ },
238
+ {
239
+ internalType: "address",
240
+ name: "_liquidity",
241
+ type: "address"
242
+ },
243
+ {
244
+ internalType: "address",
245
+ name: "_navProvider",
246
+ type: "address"
247
+ },
248
+ {
249
+ internalType: "address",
250
+ name: "_feeManager",
251
+ type: "address"
252
+ },
253
+ {
254
+ internalType: "address",
255
+ name: "_custodianWallet",
256
+ type: "address"
257
+ }
258
+ ],
259
+ name: "initialize",
260
+ outputs: [],
261
+ stateMutability: "nonpayable",
262
+ type: "function"
263
+ },
264
+ {
265
+ inputs: [
266
+ {
267
+ internalType: "bool",
268
+ name: "_investorSubscription",
269
+ type: "bool"
270
+ }
271
+ ],
272
+ name: "toggleInvestorSubscription",
273
+ outputs: [],
274
+ stateMutability: "nonpayable",
275
+ type: "function"
276
+ },
277
+ {
278
+ inputs: [
279
+ {
280
+ internalType: "bool",
281
+ name: "_twoStepTransfer",
282
+ type: "bool"
283
+ }
284
+ ],
285
+ name: "toggleTwoStepTransfer",
286
+ outputs: [],
287
+ stateMutability: "nonpayable",
288
+ type: "function"
289
+ },
290
+ {
291
+ inputs: [
292
+ {
293
+ internalType: "address",
294
+ name: "_assetProvider",
295
+ type: "address"
296
+ }
297
+ ],
298
+ name: "updateAssetProvider",
299
+ outputs: [],
300
+ stateMutability: "nonpayable",
301
+ type: "function"
302
+ },
303
+ {
304
+ inputs: [
305
+ {
306
+ internalType: "uint16",
307
+ name: "_chainId",
308
+ type: "uint16"
309
+ },
310
+ {
311
+ internalType: "address",
312
+ name: "_bridge",
313
+ type: "address"
314
+ }
315
+ ],
316
+ name: "updateBridgeParams",
317
+ outputs: [],
318
+ stateMutability: "nonpayable",
319
+ type: "function"
320
+ },
321
+ {
322
+ inputs: [
323
+ {
324
+ internalType: "uint256",
325
+ name: "_minSubscriptionAmount",
326
+ type: "uint256"
327
+ }
328
+ ],
329
+ name: "updateMinSubscriptionAmount",
330
+ outputs: [],
331
+ stateMutability: "nonpayable",
332
+ type: "function"
333
+ },
334
+ {
335
+ inputs: [
336
+ {
337
+ internalType: "address",
338
+ name: "_navProvider",
339
+ type: "address"
340
+ }
341
+ ],
342
+ name: "updateNavProvider",
343
+ outputs: [],
344
+ stateMutability: "nonpayable",
345
+ type: "function"
346
+ }
347
+ ];
348
+ // Annotate the CommonJS export names for ESM import in node:
349
+ 0 && (module.exports = {
350
+ iBaseOnRampAbi
351
+ });
@@ -23,11 +23,12 @@ __export(SecuritizeOnRampAdapterContract_exports, {
23
23
  module.exports = __toCommonJS(SecuritizeOnRampAdapterContract_exports);
24
24
  var import_viem = require("viem");
25
25
  var import_sdk = require("../../../sdk/index.js");
26
+ var import_iBaseOnRamp = require("../abi/securitize/iBaseOnRamp.js");
26
27
  var import_iSecuritizeOnRamp = require("../abi/securitize/iSecuritizeOnRamp.js");
27
28
  var import_iSecuritizeOnRampAdapter = require("../abi/securitize/iSecuritizeOnRampAdapter.js");
28
29
  var import_AbstractAdapter = require("./AbstractAdapter.js");
29
30
  const abi = import_iSecuritizeOnRampAdapter.iSecuritizeOnRampAdapterAbi;
30
- const protocolAbi = import_iSecuritizeOnRamp.iSecuritizeOnRampAbi;
31
+ const protocolAbi = [...import_iSecuritizeOnRamp.iSecuritizeOnRampAbi, ...import_iBaseOnRamp.iBaseOnRampAbi];
31
32
  class SecuritizeOnRampAdapterContract extends import_AbstractAdapter.AbstractAdapterContract {
32
33
  #dsToken;
33
34
  #liquidityToken;