@pancakeswap/v3-sdk 1.0.0 → 3.0.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.
Files changed (102) hide show
  1. package/LICENSE +674 -0
  2. package/dist/abi/MasterChefV3.d.ts +1222 -0
  3. package/dist/abi/MasterChefV3.d.ts.map +1 -0
  4. package/dist/abi/NonfungiblePositionManager.d.ts +962 -0
  5. package/dist/abi/NonfungiblePositionManager.d.ts.map +1 -0
  6. package/dist/abi/PeripheryPaymentsWithFee.d.ts +88 -0
  7. package/dist/abi/PeripheryPaymentsWithFee.d.ts.map +1 -0
  8. package/dist/abi/Quoter.d.ts +162 -0
  9. package/dist/abi/Quoter.d.ts.map +1 -0
  10. package/dist/abi/QuoterV2.d.ts +220 -0
  11. package/dist/abi/QuoterV2.d.ts.map +1 -0
  12. package/dist/abi/SelfPermit.d.ts +122 -0
  13. package/dist/abi/SelfPermit.d.ts.map +1 -0
  14. package/dist/abi/SwapRouter.d.ts +453 -0
  15. package/dist/abi/SwapRouter.d.ts.map +1 -0
  16. package/dist/abi/V3Staker.d.ts +547 -0
  17. package/dist/abi/V3Staker.d.ts.map +1 -0
  18. package/dist/constants.d.ts +26 -0
  19. package/dist/constants.d.ts.map +1 -0
  20. package/dist/entities/index.d.ts +8 -0
  21. package/dist/entities/index.d.ts.map +1 -0
  22. package/dist/entities/pool.d.ts +83 -0
  23. package/dist/entities/pool.d.ts.map +1 -0
  24. package/dist/entities/position.d.ts +131 -0
  25. package/dist/entities/position.d.ts.map +1 -0
  26. package/dist/entities/route.d.ts +27 -0
  27. package/dist/entities/route.d.ts.map +1 -0
  28. package/dist/entities/tick.d.ts +13 -0
  29. package/dist/entities/tick.d.ts.map +1 -0
  30. package/dist/entities/tickDataProvider.d.ts +32 -0
  31. package/dist/entities/tickDataProvider.d.ts.map +1 -0
  32. package/dist/entities/tickListDataProvider.d.ts +16 -0
  33. package/dist/entities/tickListDataProvider.d.ts.map +1 -0
  34. package/dist/entities/trade.d.ts +221 -0
  35. package/dist/entities/trade.d.ts.map +1 -0
  36. package/dist/index.d.ts +20 -1223
  37. package/dist/index.d.ts.map +1 -0
  38. package/dist/index.js +1167 -1092
  39. package/dist/index.mjs +1158 -1093
  40. package/dist/internalConstants.d.ts +11 -0
  41. package/dist/internalConstants.d.ts.map +1 -0
  42. package/dist/masterchefV3.d.ts +1258 -0
  43. package/dist/masterchefV3.d.ts.map +1 -0
  44. package/dist/multicall.d.ts +23 -0
  45. package/dist/multicall.d.ts.map +1 -0
  46. package/dist/nonfungiblePositionManager.d.ts +1115 -0
  47. package/dist/nonfungiblePositionManager.d.ts.map +1 -0
  48. package/dist/payments.d.ts +113 -0
  49. package/dist/payments.d.ts.map +1 -0
  50. package/dist/quoter.d.ts +419 -0
  51. package/dist/quoter.d.ts.map +1 -0
  52. package/dist/selfPermit.d.ts +146 -0
  53. package/dist/selfPermit.d.ts.map +1 -0
  54. package/dist/staker.d.ts +648 -0
  55. package/dist/staker.d.ts.map +1 -0
  56. package/dist/swapRouter.d.ts +502 -0
  57. package/dist/swapRouter.d.ts.map +1 -0
  58. package/dist/utils/calldata.d.ts +22 -0
  59. package/dist/utils/calldata.d.ts.map +1 -0
  60. package/dist/utils/computePoolAddress.d.ts +20 -0
  61. package/dist/utils/computePoolAddress.d.ts.map +1 -0
  62. package/dist/utils/encodeRouteToPath.d.ts +10 -0
  63. package/dist/utils/encodeRouteToPath.d.ts.map +1 -0
  64. package/dist/utils/encodeSqrtRatioX96.d.ts +9 -0
  65. package/dist/utils/encodeSqrtRatioX96.d.ts.map +1 -0
  66. package/dist/utils/feeCalculator.d.ts +65 -0
  67. package/dist/utils/feeCalculator.d.ts.map +1 -0
  68. package/dist/utils/fullMath.d.ts +8 -0
  69. package/dist/utils/fullMath.d.ts.map +1 -0
  70. package/dist/utils/index.d.ts +22 -0
  71. package/dist/utils/index.d.ts.map +1 -0
  72. package/dist/utils/isSorted.d.ts +8 -0
  73. package/dist/utils/isSorted.d.ts.map +1 -0
  74. package/dist/utils/liquidityMath.d.ts +8 -0
  75. package/dist/utils/liquidityMath.d.ts.map +1 -0
  76. package/dist/utils/maxLiquidityForAmounts.d.ts +14 -0
  77. package/dist/utils/maxLiquidityForAmounts.d.ts.map +1 -0
  78. package/dist/utils/mostSignificantBit.d.ts +2 -0
  79. package/dist/utils/mostSignificantBit.d.ts.map +1 -0
  80. package/dist/utils/nearestUsableTick.d.ts +7 -0
  81. package/dist/utils/nearestUsableTick.d.ts.map +1 -0
  82. package/dist/utils/parseProtocolFees.d.ts +3 -0
  83. package/dist/utils/parseProtocolFees.d.ts.map +1 -0
  84. package/dist/utils/position.d.ts +8 -0
  85. package/dist/utils/position.d.ts.map +1 -0
  86. package/dist/utils/positionMath.d.ts +8 -0
  87. package/dist/utils/positionMath.d.ts.map +1 -0
  88. package/dist/utils/priceTickConversions.d.ts +16 -0
  89. package/dist/utils/priceTickConversions.d.ts.map +1 -0
  90. package/dist/utils/sqrtPriceMath.d.ts +13 -0
  91. package/dist/utils/sqrtPriceMath.d.ts.map +1 -0
  92. package/dist/utils/sqrtRatioX96ToPrice.d.ts +3 -0
  93. package/dist/utils/sqrtRatioX96ToPrice.d.ts.map +1 -0
  94. package/dist/utils/swapMath.d.ts +9 -0
  95. package/dist/utils/swapMath.d.ts.map +1 -0
  96. package/dist/utils/tickLibrary.d.ts +14 -0
  97. package/dist/utils/tickLibrary.d.ts.map +1 -0
  98. package/dist/utils/tickList.d.ts +25 -0
  99. package/dist/utils/tickList.d.ts.map +1 -0
  100. package/dist/utils/tickMath.d.ts +34 -0
  101. package/dist/utils/tickMath.d.ts.map +1 -0
  102. package/package.json +17 -23
@@ -0,0 +1,547 @@
1
+ export declare const v3StakerABI: readonly [{
2
+ readonly inputs: readonly [{
3
+ readonly internalType: "contract IUniswapV3Factory";
4
+ readonly name: "_factory";
5
+ readonly type: "address";
6
+ }, {
7
+ readonly internalType: "contract INonfungiblePositionManager";
8
+ readonly name: "_nonfungiblePositionManager";
9
+ readonly type: "address";
10
+ }, {
11
+ readonly internalType: "uint256";
12
+ readonly name: "_maxIncentiveStartLeadTime";
13
+ readonly type: "uint256";
14
+ }, {
15
+ readonly internalType: "uint256";
16
+ readonly name: "_maxIncentiveDuration";
17
+ readonly type: "uint256";
18
+ }];
19
+ readonly stateMutability: "nonpayable";
20
+ readonly type: "constructor";
21
+ }, {
22
+ readonly anonymous: false;
23
+ readonly inputs: readonly [{
24
+ readonly indexed: true;
25
+ readonly internalType: "uint256";
26
+ readonly name: "tokenId";
27
+ readonly type: "uint256";
28
+ }, {
29
+ readonly indexed: true;
30
+ readonly internalType: "address";
31
+ readonly name: "oldOwner";
32
+ readonly type: "address";
33
+ }, {
34
+ readonly indexed: true;
35
+ readonly internalType: "address";
36
+ readonly name: "newOwner";
37
+ readonly type: "address";
38
+ }];
39
+ readonly name: "DepositTransferred";
40
+ readonly type: "event";
41
+ }, {
42
+ readonly anonymous: false;
43
+ readonly inputs: readonly [{
44
+ readonly indexed: true;
45
+ readonly internalType: "contract IERC20Minimal";
46
+ readonly name: "rewardToken";
47
+ readonly type: "address";
48
+ }, {
49
+ readonly indexed: true;
50
+ readonly internalType: "contract IUniswapV3Pool";
51
+ readonly name: "pool";
52
+ readonly type: "address";
53
+ }, {
54
+ readonly indexed: false;
55
+ readonly internalType: "uint256";
56
+ readonly name: "startTime";
57
+ readonly type: "uint256";
58
+ }, {
59
+ readonly indexed: false;
60
+ readonly internalType: "uint256";
61
+ readonly name: "endTime";
62
+ readonly type: "uint256";
63
+ }, {
64
+ readonly indexed: false;
65
+ readonly internalType: "address";
66
+ readonly name: "refundee";
67
+ readonly type: "address";
68
+ }, {
69
+ readonly indexed: false;
70
+ readonly internalType: "uint256";
71
+ readonly name: "reward";
72
+ readonly type: "uint256";
73
+ }];
74
+ readonly name: "IncentiveCreated";
75
+ readonly type: "event";
76
+ }, {
77
+ readonly anonymous: false;
78
+ readonly inputs: readonly [{
79
+ readonly indexed: true;
80
+ readonly internalType: "bytes32";
81
+ readonly name: "incentiveId";
82
+ readonly type: "bytes32";
83
+ }, {
84
+ readonly indexed: false;
85
+ readonly internalType: "uint256";
86
+ readonly name: "refund";
87
+ readonly type: "uint256";
88
+ }];
89
+ readonly name: "IncentiveEnded";
90
+ readonly type: "event";
91
+ }, {
92
+ readonly anonymous: false;
93
+ readonly inputs: readonly [{
94
+ readonly indexed: true;
95
+ readonly internalType: "address";
96
+ readonly name: "to";
97
+ readonly type: "address";
98
+ }, {
99
+ readonly indexed: false;
100
+ readonly internalType: "uint256";
101
+ readonly name: "reward";
102
+ readonly type: "uint256";
103
+ }];
104
+ readonly name: "RewardClaimed";
105
+ readonly type: "event";
106
+ }, {
107
+ readonly anonymous: false;
108
+ readonly inputs: readonly [{
109
+ readonly indexed: true;
110
+ readonly internalType: "uint256";
111
+ readonly name: "tokenId";
112
+ readonly type: "uint256";
113
+ }, {
114
+ readonly indexed: true;
115
+ readonly internalType: "bytes32";
116
+ readonly name: "incentiveId";
117
+ readonly type: "bytes32";
118
+ }, {
119
+ readonly indexed: false;
120
+ readonly internalType: "uint128";
121
+ readonly name: "liquidity";
122
+ readonly type: "uint128";
123
+ }];
124
+ readonly name: "TokenStaked";
125
+ readonly type: "event";
126
+ }, {
127
+ readonly anonymous: false;
128
+ readonly inputs: readonly [{
129
+ readonly indexed: true;
130
+ readonly internalType: "uint256";
131
+ readonly name: "tokenId";
132
+ readonly type: "uint256";
133
+ }, {
134
+ readonly indexed: true;
135
+ readonly internalType: "bytes32";
136
+ readonly name: "incentiveId";
137
+ readonly type: "bytes32";
138
+ }];
139
+ readonly name: "TokenUnstaked";
140
+ readonly type: "event";
141
+ }, {
142
+ readonly inputs: readonly [{
143
+ readonly internalType: "contract IERC20Minimal";
144
+ readonly name: "rewardToken";
145
+ readonly type: "address";
146
+ }, {
147
+ readonly internalType: "address";
148
+ readonly name: "to";
149
+ readonly type: "address";
150
+ }, {
151
+ readonly internalType: "uint256";
152
+ readonly name: "amountRequested";
153
+ readonly type: "uint256";
154
+ }];
155
+ readonly name: "claimReward";
156
+ readonly outputs: readonly [{
157
+ readonly internalType: "uint256";
158
+ readonly name: "reward";
159
+ readonly type: "uint256";
160
+ }];
161
+ readonly stateMutability: "nonpayable";
162
+ readonly type: "function";
163
+ }, {
164
+ readonly inputs: readonly [{
165
+ readonly components: readonly [{
166
+ readonly internalType: "contract IERC20Minimal";
167
+ readonly name: "rewardToken";
168
+ readonly type: "address";
169
+ }, {
170
+ readonly internalType: "contract IUniswapV3Pool";
171
+ readonly name: "pool";
172
+ readonly type: "address";
173
+ }, {
174
+ readonly internalType: "uint256";
175
+ readonly name: "startTime";
176
+ readonly type: "uint256";
177
+ }, {
178
+ readonly internalType: "uint256";
179
+ readonly name: "endTime";
180
+ readonly type: "uint256";
181
+ }, {
182
+ readonly internalType: "address";
183
+ readonly name: "refundee";
184
+ readonly type: "address";
185
+ }];
186
+ readonly internalType: "struct IUniswapV3Staker.IncentiveKey";
187
+ readonly name: "key";
188
+ readonly type: "tuple";
189
+ }, {
190
+ readonly internalType: "uint256";
191
+ readonly name: "reward";
192
+ readonly type: "uint256";
193
+ }];
194
+ readonly name: "createIncentive";
195
+ readonly outputs: readonly [];
196
+ readonly stateMutability: "nonpayable";
197
+ readonly type: "function";
198
+ }, {
199
+ readonly inputs: readonly [{
200
+ readonly internalType: "uint256";
201
+ readonly name: "";
202
+ readonly type: "uint256";
203
+ }];
204
+ readonly name: "deposits";
205
+ readonly outputs: readonly [{
206
+ readonly internalType: "address";
207
+ readonly name: "owner";
208
+ readonly type: "address";
209
+ }, {
210
+ readonly internalType: "uint48";
211
+ readonly name: "numberOfStakes";
212
+ readonly type: "uint48";
213
+ }, {
214
+ readonly internalType: "int24";
215
+ readonly name: "tickLower";
216
+ readonly type: "int24";
217
+ }, {
218
+ readonly internalType: "int24";
219
+ readonly name: "tickUpper";
220
+ readonly type: "int24";
221
+ }];
222
+ readonly stateMutability: "view";
223
+ readonly type: "function";
224
+ }, {
225
+ readonly inputs: readonly [{
226
+ readonly components: readonly [{
227
+ readonly internalType: "contract IERC20Minimal";
228
+ readonly name: "rewardToken";
229
+ readonly type: "address";
230
+ }, {
231
+ readonly internalType: "contract IUniswapV3Pool";
232
+ readonly name: "pool";
233
+ readonly type: "address";
234
+ }, {
235
+ readonly internalType: "uint256";
236
+ readonly name: "startTime";
237
+ readonly type: "uint256";
238
+ }, {
239
+ readonly internalType: "uint256";
240
+ readonly name: "endTime";
241
+ readonly type: "uint256";
242
+ }, {
243
+ readonly internalType: "address";
244
+ readonly name: "refundee";
245
+ readonly type: "address";
246
+ }];
247
+ readonly internalType: "struct IUniswapV3Staker.IncentiveKey";
248
+ readonly name: "key";
249
+ readonly type: "tuple";
250
+ }];
251
+ readonly name: "endIncentive";
252
+ readonly outputs: readonly [{
253
+ readonly internalType: "uint256";
254
+ readonly name: "refund";
255
+ readonly type: "uint256";
256
+ }];
257
+ readonly stateMutability: "nonpayable";
258
+ readonly type: "function";
259
+ }, {
260
+ readonly inputs: readonly [];
261
+ readonly name: "factory";
262
+ readonly outputs: readonly [{
263
+ readonly internalType: "contract IUniswapV3Factory";
264
+ readonly name: "";
265
+ readonly type: "address";
266
+ }];
267
+ readonly stateMutability: "view";
268
+ readonly type: "function";
269
+ }, {
270
+ readonly inputs: readonly [{
271
+ readonly components: readonly [{
272
+ readonly internalType: "contract IERC20Minimal";
273
+ readonly name: "rewardToken";
274
+ readonly type: "address";
275
+ }, {
276
+ readonly internalType: "contract IUniswapV3Pool";
277
+ readonly name: "pool";
278
+ readonly type: "address";
279
+ }, {
280
+ readonly internalType: "uint256";
281
+ readonly name: "startTime";
282
+ readonly type: "uint256";
283
+ }, {
284
+ readonly internalType: "uint256";
285
+ readonly name: "endTime";
286
+ readonly type: "uint256";
287
+ }, {
288
+ readonly internalType: "address";
289
+ readonly name: "refundee";
290
+ readonly type: "address";
291
+ }];
292
+ readonly internalType: "struct IUniswapV3Staker.IncentiveKey";
293
+ readonly name: "key";
294
+ readonly type: "tuple";
295
+ }, {
296
+ readonly internalType: "uint256";
297
+ readonly name: "tokenId";
298
+ readonly type: "uint256";
299
+ }];
300
+ readonly name: "getRewardInfo";
301
+ readonly outputs: readonly [{
302
+ readonly internalType: "uint256";
303
+ readonly name: "reward";
304
+ readonly type: "uint256";
305
+ }, {
306
+ readonly internalType: "uint160";
307
+ readonly name: "secondsInsideX128";
308
+ readonly type: "uint160";
309
+ }];
310
+ readonly stateMutability: "view";
311
+ readonly type: "function";
312
+ }, {
313
+ readonly inputs: readonly [{
314
+ readonly internalType: "bytes32";
315
+ readonly name: "";
316
+ readonly type: "bytes32";
317
+ }];
318
+ readonly name: "incentives";
319
+ readonly outputs: readonly [{
320
+ readonly internalType: "uint256";
321
+ readonly name: "totalRewardUnclaimed";
322
+ readonly type: "uint256";
323
+ }, {
324
+ readonly internalType: "uint160";
325
+ readonly name: "totalSecondsClaimedX128";
326
+ readonly type: "uint160";
327
+ }, {
328
+ readonly internalType: "uint96";
329
+ readonly name: "numberOfStakes";
330
+ readonly type: "uint96";
331
+ }];
332
+ readonly stateMutability: "view";
333
+ readonly type: "function";
334
+ }, {
335
+ readonly inputs: readonly [];
336
+ readonly name: "maxIncentiveDuration";
337
+ readonly outputs: readonly [{
338
+ readonly internalType: "uint256";
339
+ readonly name: "";
340
+ readonly type: "uint256";
341
+ }];
342
+ readonly stateMutability: "view";
343
+ readonly type: "function";
344
+ }, {
345
+ readonly inputs: readonly [];
346
+ readonly name: "maxIncentiveStartLeadTime";
347
+ readonly outputs: readonly [{
348
+ readonly internalType: "uint256";
349
+ readonly name: "";
350
+ readonly type: "uint256";
351
+ }];
352
+ readonly stateMutability: "view";
353
+ readonly type: "function";
354
+ }, {
355
+ readonly inputs: readonly [{
356
+ readonly internalType: "bytes[]";
357
+ readonly name: "data";
358
+ readonly type: "bytes[]";
359
+ }];
360
+ readonly name: "multicall";
361
+ readonly outputs: readonly [{
362
+ readonly internalType: "bytes[]";
363
+ readonly name: "results";
364
+ readonly type: "bytes[]";
365
+ }];
366
+ readonly stateMutability: "payable";
367
+ readonly type: "function";
368
+ }, {
369
+ readonly inputs: readonly [];
370
+ readonly name: "nonfungiblePositionManager";
371
+ readonly outputs: readonly [{
372
+ readonly internalType: "contract INonfungiblePositionManager";
373
+ readonly name: "";
374
+ readonly type: "address";
375
+ }];
376
+ readonly stateMutability: "view";
377
+ readonly type: "function";
378
+ }, {
379
+ readonly inputs: readonly [{
380
+ readonly internalType: "address";
381
+ readonly name: "";
382
+ readonly type: "address";
383
+ }, {
384
+ readonly internalType: "address";
385
+ readonly name: "from";
386
+ readonly type: "address";
387
+ }, {
388
+ readonly internalType: "uint256";
389
+ readonly name: "tokenId";
390
+ readonly type: "uint256";
391
+ }, {
392
+ readonly internalType: "bytes";
393
+ readonly name: "data";
394
+ readonly type: "bytes";
395
+ }];
396
+ readonly name: "onERC721Received";
397
+ readonly outputs: readonly [{
398
+ readonly internalType: "bytes4";
399
+ readonly name: "";
400
+ readonly type: "bytes4";
401
+ }];
402
+ readonly stateMutability: "nonpayable";
403
+ readonly type: "function";
404
+ }, {
405
+ readonly inputs: readonly [{
406
+ readonly internalType: "contract IERC20Minimal";
407
+ readonly name: "";
408
+ readonly type: "address";
409
+ }, {
410
+ readonly internalType: "address";
411
+ readonly name: "";
412
+ readonly type: "address";
413
+ }];
414
+ readonly name: "rewards";
415
+ readonly outputs: readonly [{
416
+ readonly internalType: "uint256";
417
+ readonly name: "";
418
+ readonly type: "uint256";
419
+ }];
420
+ readonly stateMutability: "view";
421
+ readonly type: "function";
422
+ }, {
423
+ readonly inputs: readonly [{
424
+ readonly components: readonly [{
425
+ readonly internalType: "contract IERC20Minimal";
426
+ readonly name: "rewardToken";
427
+ readonly type: "address";
428
+ }, {
429
+ readonly internalType: "contract IUniswapV3Pool";
430
+ readonly name: "pool";
431
+ readonly type: "address";
432
+ }, {
433
+ readonly internalType: "uint256";
434
+ readonly name: "startTime";
435
+ readonly type: "uint256";
436
+ }, {
437
+ readonly internalType: "uint256";
438
+ readonly name: "endTime";
439
+ readonly type: "uint256";
440
+ }, {
441
+ readonly internalType: "address";
442
+ readonly name: "refundee";
443
+ readonly type: "address";
444
+ }];
445
+ readonly internalType: "struct IUniswapV3Staker.IncentiveKey";
446
+ readonly name: "key";
447
+ readonly type: "tuple";
448
+ }, {
449
+ readonly internalType: "uint256";
450
+ readonly name: "tokenId";
451
+ readonly type: "uint256";
452
+ }];
453
+ readonly name: "stakeToken";
454
+ readonly outputs: readonly [];
455
+ readonly stateMutability: "nonpayable";
456
+ readonly type: "function";
457
+ }, {
458
+ readonly inputs: readonly [{
459
+ readonly internalType: "uint256";
460
+ readonly name: "tokenId";
461
+ readonly type: "uint256";
462
+ }, {
463
+ readonly internalType: "bytes32";
464
+ readonly name: "incentiveId";
465
+ readonly type: "bytes32";
466
+ }];
467
+ readonly name: "stakes";
468
+ readonly outputs: readonly [{
469
+ readonly internalType: "uint160";
470
+ readonly name: "secondsPerLiquidityInsideInitialX128";
471
+ readonly type: "uint160";
472
+ }, {
473
+ readonly internalType: "uint128";
474
+ readonly name: "liquidity";
475
+ readonly type: "uint128";
476
+ }];
477
+ readonly stateMutability: "view";
478
+ readonly type: "function";
479
+ }, {
480
+ readonly inputs: readonly [{
481
+ readonly internalType: "uint256";
482
+ readonly name: "tokenId";
483
+ readonly type: "uint256";
484
+ }, {
485
+ readonly internalType: "address";
486
+ readonly name: "to";
487
+ readonly type: "address";
488
+ }];
489
+ readonly name: "transferDeposit";
490
+ readonly outputs: readonly [];
491
+ readonly stateMutability: "nonpayable";
492
+ readonly type: "function";
493
+ }, {
494
+ readonly inputs: readonly [{
495
+ readonly components: readonly [{
496
+ readonly internalType: "contract IERC20Minimal";
497
+ readonly name: "rewardToken";
498
+ readonly type: "address";
499
+ }, {
500
+ readonly internalType: "contract IUniswapV3Pool";
501
+ readonly name: "pool";
502
+ readonly type: "address";
503
+ }, {
504
+ readonly internalType: "uint256";
505
+ readonly name: "startTime";
506
+ readonly type: "uint256";
507
+ }, {
508
+ readonly internalType: "uint256";
509
+ readonly name: "endTime";
510
+ readonly type: "uint256";
511
+ }, {
512
+ readonly internalType: "address";
513
+ readonly name: "refundee";
514
+ readonly type: "address";
515
+ }];
516
+ readonly internalType: "struct IUniswapV3Staker.IncentiveKey";
517
+ readonly name: "key";
518
+ readonly type: "tuple";
519
+ }, {
520
+ readonly internalType: "uint256";
521
+ readonly name: "tokenId";
522
+ readonly type: "uint256";
523
+ }];
524
+ readonly name: "unstakeToken";
525
+ readonly outputs: readonly [];
526
+ readonly stateMutability: "nonpayable";
527
+ readonly type: "function";
528
+ }, {
529
+ readonly inputs: readonly [{
530
+ readonly internalType: "uint256";
531
+ readonly name: "tokenId";
532
+ readonly type: "uint256";
533
+ }, {
534
+ readonly internalType: "address";
535
+ readonly name: "to";
536
+ readonly type: "address";
537
+ }, {
538
+ readonly internalType: "bytes";
539
+ readonly name: "data";
540
+ readonly type: "bytes";
541
+ }];
542
+ readonly name: "withdrawToken";
543
+ readonly outputs: readonly [];
544
+ readonly stateMutability: "nonpayable";
545
+ readonly type: "function";
546
+ }];
547
+ //# sourceMappingURL=V3Staker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"V3Staker.d.ts","sourceRoot":"","sources":["../../src/abi/V3Staker.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAisBd,CAAA"}
@@ -0,0 +1,26 @@
1
+ export declare const FACTORY_ADDRESS = "0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865";
2
+ export declare const DEPLOYER_ADDRESS = "0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9";
3
+ export declare const DEPLOYER_ADDRESSES: {
4
+ readonly 1: "0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9";
5
+ readonly 5: "0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9";
6
+ readonly 56: "0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9";
7
+ readonly 97: "0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9";
8
+ };
9
+ export declare const ADDRESS_ZERO = "0x0000000000000000000000000000000000000000";
10
+ export declare const POOL_INIT_CODE_HASH = "0x6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2";
11
+ /**
12
+ * The default factory enabled fee amounts, denominated in hundredths of bips.
13
+ */
14
+ export declare enum FeeAmount {
15
+ LOWEST = 100,
16
+ LOW = 500,
17
+ MEDIUM = 2500,
18
+ HIGH = 10000
19
+ }
20
+ /**
21
+ * The default factory tick spacings by fee amount.
22
+ */
23
+ export declare const TICK_SPACINGS: {
24
+ [amount in FeeAmount]: number;
25
+ };
26
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,+CAA+C,CAAA;AAE3E,eAAO,MAAM,gBAAgB,+CAA+C,CAAA;AAC5E,eAAO,MAAM,kBAAkB;;;;;CAKc,CAAA;AAE7C,eAAO,MAAM,YAAY,+CAA+C,CAAA;AAExE,eAAO,MAAM,mBAAmB,uEAAuE,CAAA;AAEvG;;GAEG;AACH,oBAAY,SAAS;IACnB,MAAM,MAAM;IACZ,GAAG,MAAM;IACT,MAAM,OAAO;IACb,IAAI,QAAQ;CACb;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE;KAAG,MAAM,IAAI,SAAS,GAAG,MAAM;CAK1D,CAAA"}
@@ -0,0 +1,8 @@
1
+ export * from './pool';
2
+ export * from './position';
3
+ export * from './route';
4
+ export * from './tick';
5
+ export * from './trade';
6
+ export * from './tickDataProvider';
7
+ export * from './tickListDataProvider';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA"}
@@ -0,0 +1,83 @@
1
+ import { BigintIsh, CurrencyAmount, Price, Token } from '@pancakeswap/sdk';
2
+ import { Address, Hash } from 'viem';
3
+ import { FeeAmount } from '../constants';
4
+ import { Tick, TickConstructorArgs } from './tick';
5
+ import { TickDataProvider } from './tickDataProvider';
6
+ /**
7
+ * Represents a V3 pool
8
+ */
9
+ export declare class Pool {
10
+ readonly token0: Token;
11
+ readonly token1: Token;
12
+ readonly fee: FeeAmount;
13
+ readonly sqrtRatioX96: bigint;
14
+ readonly liquidity: bigint;
15
+ readonly tickCurrent: number;
16
+ readonly tickDataProvider: TickDataProvider;
17
+ feeProtocol?: number;
18
+ private _token0Price?;
19
+ private _token1Price?;
20
+ static getAddress(tokenA: Token, tokenB: Token, fee: FeeAmount, initCodeHashManualOverride?: Hash, deployerAddressOverride?: Address): `0x${string}`;
21
+ /**
22
+ * Construct a pool
23
+ * @param tokenA One of the tokens in the pool
24
+ * @param tokenB The other token in the pool
25
+ * @param fee The fee in hundredths of a bips of the input amount of every swap that is collected by the pool
26
+ * @param sqrtRatioX96 The sqrt of the current ratio of amounts of token1 to token0
27
+ * @param liquidity The current value of in range liquidity
28
+ * @param tickCurrent The current tick of the pool
29
+ * @param ticks The current state of the pool ticks or a data provider that can return tick data
30
+ */
31
+ constructor(tokenA: Token, tokenB: Token, fee: FeeAmount, sqrtRatioX96: BigintIsh, liquidity: BigintIsh, tickCurrent: number, ticks?: TickDataProvider | (Tick | TickConstructorArgs)[]);
32
+ /**
33
+ * Returns true if the token is either token0 or token1
34
+ * @param token The token to check
35
+ * @returns True if token is either token0 or token
36
+ */
37
+ involvesToken(token: Token): boolean;
38
+ /**
39
+ * Returns the current mid price of the pool in terms of token0, i.e. the ratio of token1 over token0
40
+ */
41
+ get token0Price(): Price<Token, Token>;
42
+ /**
43
+ * Returns the current mid price of the pool in terms of token1, i.e. the ratio of token0 over token1
44
+ */
45
+ get token1Price(): Price<Token, Token>;
46
+ /**
47
+ * Return the price of the given token in terms of the other token in the pool.
48
+ * @param token The token to return price of
49
+ * @returns The price of the given token, in terms of the other.
50
+ */
51
+ priceOf(token: Token): Price<Token, Token>;
52
+ /**
53
+ * Returns the chain ID of the tokens in the pool.
54
+ */
55
+ get chainId(): number;
56
+ /**
57
+ * Given an input amount of a token, return the computed output amount, and a pool with state updated after the trade
58
+ * @param inputAmount The input amount for which to quote the output amount
59
+ * @param sqrtPriceLimitX96 The Q64.96 sqrt price limit
60
+ * @returns The output amount and the pool with updated state
61
+ */
62
+ getOutputAmount(inputAmount: CurrencyAmount<Token>, sqrtPriceLimitX96?: bigint): Promise<[CurrencyAmount<Token>, Pool]>;
63
+ /**
64
+ * Given a desired output amount of a token, return the computed input amount and a pool with state updated after the trade
65
+ * @param outputAmount the output amount for which to quote the input amount
66
+ * @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this value after the swap. If one for zero, the price cannot be greater than this value after the swap
67
+ * @returns The input amount and the pool with updated state
68
+ */
69
+ getInputAmount(outputAmount: CurrencyAmount<Token>, sqrtPriceLimitX96?: bigint): Promise<[CurrencyAmount<Token>, Pool]>;
70
+ /**
71
+ * Executes a swap
72
+ * @param zeroForOne Whether the amount in is token0 or token1
73
+ * @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)
74
+ * @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this value after the swap. If one for zero, the price cannot be greater than this value after the swap
75
+ * @returns amountCalculated
76
+ * @returns sqrtRatioX96
77
+ * @returns liquidity
78
+ * @returns tickCurrent
79
+ */
80
+ private swap;
81
+ get tickSpacing(): number;
82
+ }
83
+ //# sourceMappingURL=pool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pool.d.ts","sourceRoot":"","sources":["../../src/entities/pool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAW,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAEnF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AACpC,OAAO,EAAE,SAAS,EAAqC,MAAM,cAAc,CAAA;AAM3E,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAA;AAClD,OAAO,EAAsB,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAkBzE;;GAEG;AACH,qBAAa,IAAI;IACf,SAAgB,MAAM,EAAE,KAAK,CAAA;IAE7B,SAAgB,MAAM,EAAE,KAAK,CAAA;IAE7B,SAAgB,GAAG,EAAE,SAAS,CAAA;IAE9B,SAAgB,YAAY,EAAE,MAAM,CAAA;IAEpC,SAAgB,SAAS,EAAE,MAAM,CAAA;IAEjC,SAAgB,WAAW,EAAE,MAAM,CAAA;IAEnC,SAAgB,gBAAgB,EAAE,gBAAgB,CAAA;IAE3C,WAAW,CAAC,EAAE,MAAM,CAAA;IAE3B,OAAO,CAAC,YAAY,CAAC,CAAqB;IAE1C,OAAO,CAAC,YAAY,CAAC,CAAqB;WAE5B,UAAU,CACtB,MAAM,EAAE,KAAK,EACb,MAAM,EAAE,KAAK,EACb,GAAG,EAAE,SAAS,EACd,0BAA0B,CAAC,EAAE,IAAI,EACjC,uBAAuB,CAAC,EAAE,OAAO,GAChC,KAAK,MAAM,EAAE;IAUhB;;;;;;;;;OASG;gBAED,MAAM,EAAE,KAAK,EACb,MAAM,EAAE,KAAK,EACb,GAAG,EAAE,SAAS,EACd,YAAY,EAAE,SAAS,EACvB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,MAAM,EACnB,KAAK,GAAE,gBAAgB,GAAG,CAAC,IAAI,GAAG,mBAAmB,CAAC,EAAkC;IAsB1F;;;;OAIG;IACI,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO;IAI3C;;OAEG;IACH,IAAW,WAAW,IAAI,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAK5C;IAED;;OAEG;IACH,IAAW,WAAW,IAAI,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAK5C;IAED;;;;OAIG;IACI,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC;IAKjD;;OAEG;IACH,IAAW,OAAO,IAAI,MAAM,CAE3B;IAED;;;;;OAKG;IACU,eAAe,CAC1B,WAAW,EAAE,cAAc,CAAC,KAAK,CAAC,EAClC,iBAAiB,CAAC,EAAE,MAAM,GACzB,OAAO,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;IAkBzC;;;;;OAKG;IACU,cAAc,CACzB,YAAY,EAAE,cAAc,CAAC,KAAK,CAAC,EACnC,iBAAiB,CAAC,EAAE,MAAM,GACzB,OAAO,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;IAsBzC;;;;;;;;;OASG;YACW,IAAI;IAsGlB,IAAW,WAAW,IAAI,MAAM,CAE/B;CACF"}