@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,146 @@
1
+ import { BigintIsh, Token } from '@pancakeswap/swap-sdk-core';
2
+ import { Hash } from 'viem';
3
+ export interface StandardPermitArguments {
4
+ v: 0 | 1 | 27 | 28;
5
+ r: Hash;
6
+ s: Hash;
7
+ amount: BigintIsh;
8
+ deadline: BigintIsh;
9
+ }
10
+ export interface AllowedPermitArguments {
11
+ v: 0 | 1 | 27 | 28;
12
+ r: Hash;
13
+ s: Hash;
14
+ nonce: BigintIsh;
15
+ expiry: BigintIsh;
16
+ }
17
+ export type PermitOptions = StandardPermitArguments | AllowedPermitArguments;
18
+ export declare abstract class SelfPermit {
19
+ static ABI: readonly [{
20
+ readonly inputs: readonly [{
21
+ readonly internalType: "address";
22
+ readonly name: "token";
23
+ readonly type: "address";
24
+ }, {
25
+ readonly internalType: "uint256";
26
+ readonly name: "value";
27
+ readonly type: "uint256";
28
+ }, {
29
+ readonly internalType: "uint256";
30
+ readonly name: "deadline";
31
+ readonly type: "uint256";
32
+ }, {
33
+ readonly internalType: "uint8";
34
+ readonly name: "v";
35
+ readonly type: "uint8";
36
+ }, {
37
+ readonly internalType: "bytes32";
38
+ readonly name: "r";
39
+ readonly type: "bytes32";
40
+ }, {
41
+ readonly internalType: "bytes32";
42
+ readonly name: "s";
43
+ readonly type: "bytes32";
44
+ }];
45
+ readonly name: "selfPermit";
46
+ readonly outputs: readonly [];
47
+ readonly stateMutability: "payable";
48
+ readonly type: "function";
49
+ }, {
50
+ readonly inputs: readonly [{
51
+ readonly internalType: "address";
52
+ readonly name: "token";
53
+ readonly type: "address";
54
+ }, {
55
+ readonly internalType: "uint256";
56
+ readonly name: "nonce";
57
+ readonly type: "uint256";
58
+ }, {
59
+ readonly internalType: "uint256";
60
+ readonly name: "expiry";
61
+ readonly type: "uint256";
62
+ }, {
63
+ readonly internalType: "uint8";
64
+ readonly name: "v";
65
+ readonly type: "uint8";
66
+ }, {
67
+ readonly internalType: "bytes32";
68
+ readonly name: "r";
69
+ readonly type: "bytes32";
70
+ }, {
71
+ readonly internalType: "bytes32";
72
+ readonly name: "s";
73
+ readonly type: "bytes32";
74
+ }];
75
+ readonly name: "selfPermitAllowed";
76
+ readonly outputs: readonly [];
77
+ readonly stateMutability: "payable";
78
+ readonly type: "function";
79
+ }, {
80
+ readonly inputs: readonly [{
81
+ readonly internalType: "address";
82
+ readonly name: "token";
83
+ readonly type: "address";
84
+ }, {
85
+ readonly internalType: "uint256";
86
+ readonly name: "nonce";
87
+ readonly type: "uint256";
88
+ }, {
89
+ readonly internalType: "uint256";
90
+ readonly name: "expiry";
91
+ readonly type: "uint256";
92
+ }, {
93
+ readonly internalType: "uint8";
94
+ readonly name: "v";
95
+ readonly type: "uint8";
96
+ }, {
97
+ readonly internalType: "bytes32";
98
+ readonly name: "r";
99
+ readonly type: "bytes32";
100
+ }, {
101
+ readonly internalType: "bytes32";
102
+ readonly name: "s";
103
+ readonly type: "bytes32";
104
+ }];
105
+ readonly name: "selfPermitAllowedIfNecessary";
106
+ readonly outputs: readonly [];
107
+ readonly stateMutability: "payable";
108
+ readonly type: "function";
109
+ }, {
110
+ readonly inputs: readonly [{
111
+ readonly internalType: "address";
112
+ readonly name: "token";
113
+ readonly type: "address";
114
+ }, {
115
+ readonly internalType: "uint256";
116
+ readonly name: "value";
117
+ readonly type: "uint256";
118
+ }, {
119
+ readonly internalType: "uint256";
120
+ readonly name: "deadline";
121
+ readonly type: "uint256";
122
+ }, {
123
+ readonly internalType: "uint8";
124
+ readonly name: "v";
125
+ readonly type: "uint8";
126
+ }, {
127
+ readonly internalType: "bytes32";
128
+ readonly name: "r";
129
+ readonly type: "bytes32";
130
+ }, {
131
+ readonly internalType: "bytes32";
132
+ readonly name: "s";
133
+ readonly type: "bytes32";
134
+ }];
135
+ readonly name: "selfPermitIfNecessary";
136
+ readonly outputs: readonly [];
137
+ readonly stateMutability: "payable";
138
+ readonly type: "function";
139
+ }];
140
+ /**
141
+ * Cannot be constructed.
142
+ */
143
+ private constructor();
144
+ static encodePermit(token: Token, options: PermitOptions): `0x${string}`;
145
+ }
146
+ //# sourceMappingURL=selfPermit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selfPermit.d.ts","sourceRoot":"","sources":["../src/selfPermit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAsB,IAAI,EAAE,MAAM,MAAM,CAAA;AAG/C,MAAM,WAAW,uBAAuB;IACtC,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAA;IAClB,CAAC,EAAE,IAAI,CAAA;IACP,CAAC,EAAE,IAAI,CAAA;IACP,MAAM,EAAE,SAAS,CAAA;IACjB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAA;IAClB,CAAC,EAAE,IAAI,CAAA;IACP,CAAC,EAAE,IAAI,CAAA;IACP,KAAK,EAAE,SAAS,CAAA;IAChB,MAAM,EAAE,SAAS,CAAA;CAClB;AAED,MAAM,MAAM,aAAa,GAAG,uBAAuB,GAAG,sBAAsB,CAAA;AAM5E,8BAAsB,UAAU;IAC9B,OAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAgB;IAEjC;;OAEG;IACH,OAAO;WAEO,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa;CAahE"}