@panoptic-eng/sdk 1.0.63 → 1.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/StateView-q4yMpBY6.js +323 -0
- package/dist/cow/index.d.ts +1 -1
- package/dist/cow/index.js +1 -1
- package/dist/cow/index.js.map +1 -1
- package/dist/{cow-BsSaoahK.js → cow-BU9YOHkh.js} +1 -1
- package/dist/index.d.ts +34 -34
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/{irm-BDlcUNgJ.js → irm-DGyKOQXz.js} +4 -326
- package/dist/panoptic/v2/index.d.ts +161 -137
- package/dist/panoptic/v2/index.d.ts.map +1 -1
- package/dist/panoptic/v2/index.js +61 -51
- package/dist/panoptic/v2/index.js.map +1 -1
- package/dist/panoptic/v2/react-public.d.ts +168 -144
- package/dist/panoptic/v2/react-public.d.ts.map +1 -1
- package/dist/panoptic/v2/react-public.js +64 -54
- package/dist/panoptic/v2/react-public.js.map +1 -1
- package/dist/{rates-BwZnK0tG.js → rates-Y0Pbv1_x.js} +4 -4
- package/dist/{router-pm9PDlyH.js → router-CheXbrfz.js} +2 -2
- package/dist/{router-Dejb6MWu.js → router-DxE-iwYF.js} +304 -6
- package/dist/{transactionFees-aXQlx-lq.js → transactionFees-BF033Mob.js} +1 -1
- package/dist/uniswap/index.d.ts +194 -4
- package/dist/uniswap/index.d.ts.map +1 -1
- package/dist/uniswap/index.js +1316 -789
- package/dist/uniswap/index.js.map +1 -1
- package/dist/{v2-ccGPXWvq.js → v2-QFSAShVj.js} +29 -316
- package/dist/{writes--fM_8ggw.js → writes-BA21eyGF.js} +38 -38
- package/dist/zodiac/index.d.ts +3 -3
- package/dist/zodiac/index.js +3 -3
- package/dist/zodiac/index.js.map +1 -1
- package/package.json +1 -1
- /package/dist/{chainDeployments-BhXMBZ4B.js → chainDeployments-Do4NaZA_.js} +0 -0
- /package/dist/{greeks-CNi1-cnp.js → greeks-CGtgLUyh.js} +0 -0
- /package/dist/{providers-1WdiaRbY.js → providers-DubVMHWU.js} +0 -0
package/README.md
CHANGED
|
@@ -124,7 +124,7 @@ await openPositionAndWait({
|
|
|
124
124
|
| **Events** | WebSocket watcher, resilient subscription with auto-reconnect, HTTP polling |
|
|
125
125
|
| **Position Tracking** | Event-based sync with resumable checkpoints; file and memory storage adapters |
|
|
126
126
|
| **Trade History** | Local trade history with filters, realized PnL aggregation |
|
|
127
|
-
| **Price History** | Historical tick/sqrtPriceX96 data, streamia (
|
|
127
|
+
| **Price History** | Historical tick/sqrtPriceX96 data, streamia (streaming premium) history, Uniswap fee history |
|
|
128
128
|
| **Bot Utilities** | Data freshness assertions, pool health checks, safe mode guards, RPC error classifiers |
|
|
129
129
|
| **Oracle** | Oracle state reads, poke with epoch rate-limit handling |
|
|
130
130
|
| **Pool Deployment** | Mine vanity pool addresses, simulate and deploy new Panoptic pools |
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
//#region src/abis/StateView.ts
|
|
2
|
+
const StateViewAbi = [
|
|
3
|
+
{
|
|
4
|
+
inputs: [{
|
|
5
|
+
internalType: "contract IPoolManager",
|
|
6
|
+
name: "_poolManager",
|
|
7
|
+
type: "address"
|
|
8
|
+
}],
|
|
9
|
+
stateMutability: "nonpayable",
|
|
10
|
+
type: "constructor"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
inputs: [{
|
|
14
|
+
internalType: "PoolId",
|
|
15
|
+
name: "poolId",
|
|
16
|
+
type: "bytes32"
|
|
17
|
+
}],
|
|
18
|
+
name: "getFeeGrowthGlobals",
|
|
19
|
+
outputs: [{
|
|
20
|
+
internalType: "uint256",
|
|
21
|
+
name: "feeGrowthGlobal0",
|
|
22
|
+
type: "uint256"
|
|
23
|
+
}, {
|
|
24
|
+
internalType: "uint256",
|
|
25
|
+
name: "feeGrowthGlobal1",
|
|
26
|
+
type: "uint256"
|
|
27
|
+
}],
|
|
28
|
+
stateMutability: "view",
|
|
29
|
+
type: "function"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
inputs: [
|
|
33
|
+
{
|
|
34
|
+
internalType: "PoolId",
|
|
35
|
+
name: "poolId",
|
|
36
|
+
type: "bytes32"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
internalType: "int24",
|
|
40
|
+
name: "tickLower",
|
|
41
|
+
type: "int24"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
internalType: "int24",
|
|
45
|
+
name: "tickUpper",
|
|
46
|
+
type: "int24"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
name: "getFeeGrowthInside",
|
|
50
|
+
outputs: [{
|
|
51
|
+
internalType: "uint256",
|
|
52
|
+
name: "feeGrowthInside0X128",
|
|
53
|
+
type: "uint256"
|
|
54
|
+
}, {
|
|
55
|
+
internalType: "uint256",
|
|
56
|
+
name: "feeGrowthInside1X128",
|
|
57
|
+
type: "uint256"
|
|
58
|
+
}],
|
|
59
|
+
stateMutability: "view",
|
|
60
|
+
type: "function"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
inputs: [{
|
|
64
|
+
internalType: "PoolId",
|
|
65
|
+
name: "poolId",
|
|
66
|
+
type: "bytes32"
|
|
67
|
+
}],
|
|
68
|
+
name: "getLiquidity",
|
|
69
|
+
outputs: [{
|
|
70
|
+
internalType: "uint128",
|
|
71
|
+
name: "liquidity",
|
|
72
|
+
type: "uint128"
|
|
73
|
+
}],
|
|
74
|
+
stateMutability: "view",
|
|
75
|
+
type: "function"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
inputs: [{
|
|
79
|
+
internalType: "PoolId",
|
|
80
|
+
name: "poolId",
|
|
81
|
+
type: "bytes32"
|
|
82
|
+
}, {
|
|
83
|
+
internalType: "bytes32",
|
|
84
|
+
name: "positionId",
|
|
85
|
+
type: "bytes32"
|
|
86
|
+
}],
|
|
87
|
+
name: "getPositionInfo",
|
|
88
|
+
outputs: [
|
|
89
|
+
{
|
|
90
|
+
internalType: "uint128",
|
|
91
|
+
name: "liquidity",
|
|
92
|
+
type: "uint128"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
internalType: "uint256",
|
|
96
|
+
name: "feeGrowthInside0LastX128",
|
|
97
|
+
type: "uint256"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
internalType: "uint256",
|
|
101
|
+
name: "feeGrowthInside1LastX128",
|
|
102
|
+
type: "uint256"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
stateMutability: "view",
|
|
106
|
+
type: "function"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
inputs: [
|
|
110
|
+
{
|
|
111
|
+
internalType: "PoolId",
|
|
112
|
+
name: "poolId",
|
|
113
|
+
type: "bytes32"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
internalType: "address",
|
|
117
|
+
name: "owner",
|
|
118
|
+
type: "address"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
internalType: "int24",
|
|
122
|
+
name: "tickLower",
|
|
123
|
+
type: "int24"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
internalType: "int24",
|
|
127
|
+
name: "tickUpper",
|
|
128
|
+
type: "int24"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
internalType: "bytes32",
|
|
132
|
+
name: "salt",
|
|
133
|
+
type: "bytes32"
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
name: "getPositionInfo",
|
|
137
|
+
outputs: [
|
|
138
|
+
{
|
|
139
|
+
internalType: "uint128",
|
|
140
|
+
name: "liquidity",
|
|
141
|
+
type: "uint128"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
internalType: "uint256",
|
|
145
|
+
name: "feeGrowthInside0LastX128",
|
|
146
|
+
type: "uint256"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
internalType: "uint256",
|
|
150
|
+
name: "feeGrowthInside1LastX128",
|
|
151
|
+
type: "uint256"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
stateMutability: "view",
|
|
155
|
+
type: "function"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
inputs: [{
|
|
159
|
+
internalType: "PoolId",
|
|
160
|
+
name: "poolId",
|
|
161
|
+
type: "bytes32"
|
|
162
|
+
}, {
|
|
163
|
+
internalType: "bytes32",
|
|
164
|
+
name: "positionId",
|
|
165
|
+
type: "bytes32"
|
|
166
|
+
}],
|
|
167
|
+
name: "getPositionLiquidity",
|
|
168
|
+
outputs: [{
|
|
169
|
+
internalType: "uint128",
|
|
170
|
+
name: "liquidity",
|
|
171
|
+
type: "uint128"
|
|
172
|
+
}],
|
|
173
|
+
stateMutability: "view",
|
|
174
|
+
type: "function"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
inputs: [{
|
|
178
|
+
internalType: "PoolId",
|
|
179
|
+
name: "poolId",
|
|
180
|
+
type: "bytes32"
|
|
181
|
+
}],
|
|
182
|
+
name: "getSlot0",
|
|
183
|
+
outputs: [
|
|
184
|
+
{
|
|
185
|
+
internalType: "uint160",
|
|
186
|
+
name: "sqrtPriceX96",
|
|
187
|
+
type: "uint160"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
internalType: "int24",
|
|
191
|
+
name: "tick",
|
|
192
|
+
type: "int24"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
internalType: "uint24",
|
|
196
|
+
name: "protocolFee",
|
|
197
|
+
type: "uint24"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
internalType: "uint24",
|
|
201
|
+
name: "lpFee",
|
|
202
|
+
type: "uint24"
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
stateMutability: "view",
|
|
206
|
+
type: "function"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
inputs: [{
|
|
210
|
+
internalType: "PoolId",
|
|
211
|
+
name: "poolId",
|
|
212
|
+
type: "bytes32"
|
|
213
|
+
}, {
|
|
214
|
+
internalType: "int16",
|
|
215
|
+
name: "tick",
|
|
216
|
+
type: "int16"
|
|
217
|
+
}],
|
|
218
|
+
name: "getTickBitmap",
|
|
219
|
+
outputs: [{
|
|
220
|
+
internalType: "uint256",
|
|
221
|
+
name: "tickBitmap",
|
|
222
|
+
type: "uint256"
|
|
223
|
+
}],
|
|
224
|
+
stateMutability: "view",
|
|
225
|
+
type: "function"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
inputs: [{
|
|
229
|
+
internalType: "PoolId",
|
|
230
|
+
name: "poolId",
|
|
231
|
+
type: "bytes32"
|
|
232
|
+
}, {
|
|
233
|
+
internalType: "int24",
|
|
234
|
+
name: "tick",
|
|
235
|
+
type: "int24"
|
|
236
|
+
}],
|
|
237
|
+
name: "getTickFeeGrowthOutside",
|
|
238
|
+
outputs: [{
|
|
239
|
+
internalType: "uint256",
|
|
240
|
+
name: "feeGrowthOutside0X128",
|
|
241
|
+
type: "uint256"
|
|
242
|
+
}, {
|
|
243
|
+
internalType: "uint256",
|
|
244
|
+
name: "feeGrowthOutside1X128",
|
|
245
|
+
type: "uint256"
|
|
246
|
+
}],
|
|
247
|
+
stateMutability: "view",
|
|
248
|
+
type: "function"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
inputs: [{
|
|
252
|
+
internalType: "PoolId",
|
|
253
|
+
name: "poolId",
|
|
254
|
+
type: "bytes32"
|
|
255
|
+
}, {
|
|
256
|
+
internalType: "int24",
|
|
257
|
+
name: "tick",
|
|
258
|
+
type: "int24"
|
|
259
|
+
}],
|
|
260
|
+
name: "getTickInfo",
|
|
261
|
+
outputs: [
|
|
262
|
+
{
|
|
263
|
+
internalType: "uint128",
|
|
264
|
+
name: "liquidityGross",
|
|
265
|
+
type: "uint128"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
internalType: "int128",
|
|
269
|
+
name: "liquidityNet",
|
|
270
|
+
type: "int128"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
internalType: "uint256",
|
|
274
|
+
name: "feeGrowthOutside0X128",
|
|
275
|
+
type: "uint256"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
internalType: "uint256",
|
|
279
|
+
name: "feeGrowthOutside1X128",
|
|
280
|
+
type: "uint256"
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
stateMutability: "view",
|
|
284
|
+
type: "function"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
inputs: [{
|
|
288
|
+
internalType: "PoolId",
|
|
289
|
+
name: "poolId",
|
|
290
|
+
type: "bytes32"
|
|
291
|
+
}, {
|
|
292
|
+
internalType: "int24",
|
|
293
|
+
name: "tick",
|
|
294
|
+
type: "int24"
|
|
295
|
+
}],
|
|
296
|
+
name: "getTickLiquidity",
|
|
297
|
+
outputs: [{
|
|
298
|
+
internalType: "uint128",
|
|
299
|
+
name: "liquidityGross",
|
|
300
|
+
type: "uint128"
|
|
301
|
+
}, {
|
|
302
|
+
internalType: "int128",
|
|
303
|
+
name: "liquidityNet",
|
|
304
|
+
type: "int128"
|
|
305
|
+
}],
|
|
306
|
+
stateMutability: "view",
|
|
307
|
+
type: "function"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
inputs: [],
|
|
311
|
+
name: "poolManager",
|
|
312
|
+
outputs: [{
|
|
313
|
+
internalType: "contract IPoolManager",
|
|
314
|
+
name: "",
|
|
315
|
+
type: "address"
|
|
316
|
+
}],
|
|
317
|
+
stateMutability: "view",
|
|
318
|
+
type: "function"
|
|
319
|
+
}
|
|
320
|
+
];
|
|
321
|
+
|
|
322
|
+
//#endregion
|
|
323
|
+
export { StateViewAbi };
|
package/dist/cow/index.d.ts
CHANGED
|
@@ -93,7 +93,7 @@ interface OptionBurntEvent extends BaseEvent {
|
|
|
93
93
|
tokenId: bigint;
|
|
94
94
|
/** Position size that was burnt */
|
|
95
95
|
positionSize: bigint;
|
|
96
|
-
/**
|
|
96
|
+
/** Streamia settled for each leg (token0 right, token1 left per leg) */
|
|
97
97
|
premiaByLeg: readonly [bigint, bigint, bigint, bigint];
|
|
98
98
|
}
|
|
99
99
|
/**
|
package/dist/cow/index.js
CHANGED
|
@@ -3438,7 +3438,7 @@ var NoLegsExercisableError = class extends PanopticError {
|
|
|
3438
3438
|
var NotALongLegError = class extends PanopticError {
|
|
3439
3439
|
name = "NotALongLegError";
|
|
3440
3440
|
constructor(cause) {
|
|
3441
|
-
super("Cannot settle
|
|
3441
|
+
super("Cannot settle streamia for non-long leg", cause);
|
|
3442
3442
|
}
|
|
3443
3443
|
};
|
|
3444
3444
|
/**
|