@panoptic-eng/sdk 1.0.37 → 1.0.39
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/dist/cow/index.d.ts +804 -6
- package/dist/cow/index.d.ts.map +1 -0
- package/dist/cow/index.js +5268 -5
- package/dist/cow/index.js.map +1 -0
- package/dist/{cow-aX6of9TS.js → cow-tRUtAUZy.js} +2 -3
- package/dist/deployments.d.ts +3 -2
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +4 -0
- package/dist/deployments.js.map +1 -1
- package/dist/{position-C8rkkKhi.js → getTrackedPositionIds-ms3W9dYB.js} +1085 -34
- package/dist/greeks-GysWXct-.js +1 -2
- package/dist/index.d.ts +5907 -39
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12192 -2117
- package/dist/index.js.map +1 -1
- package/dist/{irm-DnM96-X4.js → irm-SPC2KxLA.js} +6 -3
- package/dist/panoptic/v2/greeks/index.d.ts +277 -3
- package/dist/panoptic/v2/greeks/index.d.ts.map +1 -0
- package/dist/panoptic/v2/greeks/index.js +620 -2
- package/dist/panoptic/v2/greeks/index.js.map +1 -0
- package/dist/panoptic/v2/index.d.ts +14633 -8
- package/dist/panoptic/v2/index.d.ts.map +1 -0
- package/dist/panoptic/v2/index.js +27875 -8
- package/dist/panoptic/v2/index.js.map +1 -0
- package/dist/panoptic/v2/react-public.d.ts +14797 -17
- package/dist/panoptic/v2/react-public.d.ts.map +1 -1
- package/dist/panoptic/v2/react-public.js +29503 -89
- package/dist/panoptic/v2/react-public.js.map +1 -1
- package/dist/{router-DcoU2KmV.js → router-BTfbaRfg.js} +2 -3
- package/dist/{router-CS86ptMu.js → router-mLWy0MD9.js} +3 -4
- package/dist/test/index.d.ts +1 -1
- package/dist/test/index.js +2 -2
- package/dist/transactionFees-C_Qx07mx.js +174 -0
- package/dist/uniswap/index.d.ts +813 -79
- package/dist/uniswap/index.d.ts.map +1 -1
- package/dist/uniswap/index.js +5884 -13
- package/dist/uniswap/index.js.map +1 -1
- package/dist/{v2-D0dEatKb.js → v2-DG7qG6di.js} +3266 -2675
- package/dist/vault-transaction-fees.d.ts +63 -0
- package/dist/vault-transaction-fees.d.ts.map +1 -0
- package/dist/vault-transaction-fees.js +175 -0
- package/dist/vault-transaction-fees.js.map +1 -0
- package/dist/{writes-AupZCK4M.js → writes-Xp9Wa8GQ.js} +325 -1292
- package/package.json +8 -3
- package/dist/cow/types.d.ts +0 -3
- package/dist/cow/types.js +0 -0
- package/dist/cow-aX6of9TS.js.map +0 -1
- package/dist/greeks-GysWXct-.js.map +0 -1
- package/dist/index-CURXeKNy.d.ts +0 -9706
- package/dist/index-CURXeKNy.d.ts.map +0 -1
- package/dist/index-Cp-nCeV2.d.ts +0 -276
- package/dist/index-Cp-nCeV2.d.ts.map +0 -1
- package/dist/index-Zvu-rJpV.d.ts +0 -261
- package/dist/index-Zvu-rJpV.d.ts.map +0 -1
- package/dist/irm-CmgC1Mqi.d.ts +0 -5694
- package/dist/irm-CmgC1Mqi.d.ts.map +0 -1
- package/dist/irm-DnM96-X4.js.map +0 -1
- package/dist/position-BqIgubs5.d.ts +0 -199
- package/dist/position-BqIgubs5.d.ts.map +0 -1
- package/dist/position-C8rkkKhi.js.map +0 -1
- package/dist/quote-BxQkPBRg.d.ts +0 -718
- package/dist/quote-BxQkPBRg.d.ts.map +0 -1
- package/dist/router-CS86ptMu.js.map +0 -1
- package/dist/router-DcoU2KmV.js.map +0 -1
- package/dist/simulation-zM6-YUaw.d.ts +0 -258
- package/dist/simulation-zM6-YUaw.d.ts.map +0 -1
- package/dist/tx-CbDQ58Io.d.ts +0 -367
- package/dist/tx-CbDQ58Io.d.ts.map +0 -1
- package/dist/types-BHdnurYr.d.ts +0 -128
- package/dist/types-BHdnurYr.d.ts.map +0 -1
- package/dist/types-D_jcYss-.d.ts +0 -248
- package/dist/types-D_jcYss-.d.ts.map +0 -1
- package/dist/v2-D0dEatKb.js.map +0 -1
- package/dist/writes-AupZCK4M.js.map +0 -1
package/dist/tx-CbDQ58Io.d.ts
DELETED
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
import { Address, Hash } from "viem";
|
|
2
|
-
|
|
3
|
-
//#region src/panoptic/v2/types/events.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Supported Panoptic event types.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Supported Panoptic event types.
|
|
10
|
-
*/
|
|
11
|
-
type PanopticEventType = 'OptionMinted' | 'OptionBurnt' | 'AccountLiquidated' | 'ForcedExercised' | 'PremiumSettled' | 'Deposit' | 'Withdraw' | 'BorrowRateUpdated' | 'LiquidityChunkUpdated' | 'ProtocolLossRealized' | 'ModifyLiquidity' | 'Swap' | 'Donate';
|
|
12
|
-
/**
|
|
13
|
-
* Base event data common to all events.
|
|
14
|
-
*/
|
|
15
|
-
interface BaseEvent {
|
|
16
|
-
/** Event type */
|
|
17
|
-
type: PanopticEventType;
|
|
18
|
-
/** Transaction hash */
|
|
19
|
-
transactionHash: Hash;
|
|
20
|
-
/** Block number */
|
|
21
|
-
blockNumber: bigint;
|
|
22
|
-
/** Block hash */
|
|
23
|
-
blockHash: Hash;
|
|
24
|
-
/** Log index within the block */
|
|
25
|
-
logIndex: bigint;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* OptionMinted event data.
|
|
29
|
-
*/
|
|
30
|
-
interface OptionMintedEvent extends BaseEvent {
|
|
31
|
-
type: 'OptionMinted';
|
|
32
|
-
/** Recipient of the minted position */
|
|
33
|
-
recipient: Address;
|
|
34
|
-
/** TokenId of the minted position */
|
|
35
|
-
tokenId: bigint;
|
|
36
|
-
/** Position size */
|
|
37
|
-
positionSize: bigint;
|
|
38
|
-
/** Pool utilization for token 0 at mint */
|
|
39
|
-
poolUtilization0: bigint;
|
|
40
|
-
/** Pool utilization for token 1 at mint */
|
|
41
|
-
poolUtilization1: bigint;
|
|
42
|
-
/** Tick at mint */
|
|
43
|
-
tickAtMint: bigint;
|
|
44
|
-
/** Timestamp at mint (Unix seconds) */
|
|
45
|
-
timestampAtMint: bigint;
|
|
46
|
-
/** Block number at mint */
|
|
47
|
-
blockAtMint: bigint;
|
|
48
|
-
/** Whether a swap happened at mint */
|
|
49
|
-
swapAtMint: boolean;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* OptionBurnt event data.
|
|
53
|
-
*/
|
|
54
|
-
interface OptionBurntEvent extends BaseEvent {
|
|
55
|
-
type: 'OptionBurnt';
|
|
56
|
-
/** Recipient (owner) of the burnt position */
|
|
57
|
-
recipient: Address;
|
|
58
|
-
/** TokenId of the burnt position */
|
|
59
|
-
tokenId: bigint;
|
|
60
|
-
/** Position size that was burnt */
|
|
61
|
-
positionSize: bigint;
|
|
62
|
-
/** Premia settled for each leg (token0 right, token1 left per leg) */
|
|
63
|
-
premiaByLeg: readonly [bigint, bigint, bigint, bigint];
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* AccountLiquidated event data.
|
|
67
|
-
*/
|
|
68
|
-
interface AccountLiquidatedEvent extends BaseEvent {
|
|
69
|
-
type: 'AccountLiquidated';
|
|
70
|
-
/** Address of the liquidator */
|
|
71
|
-
liquidator: Address;
|
|
72
|
-
/** Address of the liquidated account */
|
|
73
|
-
liquidatee: Address;
|
|
74
|
-
/** Bonus paid to liquidator for token 0 */
|
|
75
|
-
bonusAmount0: bigint;
|
|
76
|
-
/** Bonus paid to liquidator for token 1 */
|
|
77
|
-
bonusAmount1: bigint;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* ForcedExercised event data.
|
|
81
|
-
*/
|
|
82
|
-
interface ForcedExercisedEvent extends BaseEvent {
|
|
83
|
-
type: 'ForcedExercised';
|
|
84
|
-
/** Address of the exerciser */
|
|
85
|
-
exercisor: Address;
|
|
86
|
-
/** Address of the position owner */
|
|
87
|
-
user: Address;
|
|
88
|
-
/** TokenId of the exercised position */
|
|
89
|
-
tokenId: bigint;
|
|
90
|
-
/** Exercise fee for token 0 (negative = cost to exerciser) */
|
|
91
|
-
exerciseFee0: bigint;
|
|
92
|
-
/** Exercise fee for token 1 (negative = cost to exerciser) */
|
|
93
|
-
exerciseFee1: bigint;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* PremiumSettled event data.
|
|
97
|
-
*/
|
|
98
|
-
interface PremiumSettledEvent extends BaseEvent {
|
|
99
|
-
type: 'PremiumSettled';
|
|
100
|
-
/** Position owner */
|
|
101
|
-
user: Address;
|
|
102
|
-
/** TokenId */
|
|
103
|
-
tokenId: bigint;
|
|
104
|
-
/** Leg index that was settled */
|
|
105
|
-
legIndex: bigint;
|
|
106
|
-
/** Settled amount for token 0 */
|
|
107
|
-
settledAmount0: bigint;
|
|
108
|
-
/** Settled amount for token 1 */
|
|
109
|
-
settledAmount1: bigint;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Deposit event data (ERC4626).
|
|
113
|
-
*/
|
|
114
|
-
interface DepositEvent extends BaseEvent {
|
|
115
|
-
type: 'Deposit';
|
|
116
|
-
/** Sender address */
|
|
117
|
-
sender: Address;
|
|
118
|
-
/** Owner address */
|
|
119
|
-
owner: Address;
|
|
120
|
-
/** Assets deposited */
|
|
121
|
-
assets: bigint;
|
|
122
|
-
/** Shares minted */
|
|
123
|
-
shares: bigint;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Withdraw event data (ERC4626).
|
|
127
|
-
*/
|
|
128
|
-
interface WithdrawEvent extends BaseEvent {
|
|
129
|
-
type: 'Withdraw';
|
|
130
|
-
/** Sender address */
|
|
131
|
-
sender: Address;
|
|
132
|
-
/** Receiver address */
|
|
133
|
-
receiver: Address;
|
|
134
|
-
/** Owner address */
|
|
135
|
-
owner: Address;
|
|
136
|
-
/** Assets withdrawn */
|
|
137
|
-
assets: bigint;
|
|
138
|
-
/** Shares burned */
|
|
139
|
-
shares: bigint;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* BorrowRateUpdated event data (RiskEngine).
|
|
143
|
-
*/
|
|
144
|
-
interface BorrowRateUpdatedEvent extends BaseEvent {
|
|
145
|
-
type: 'BorrowRateUpdated';
|
|
146
|
-
/** Collateral token address */
|
|
147
|
-
collateralToken: Address;
|
|
148
|
-
/** Average borrow rate */
|
|
149
|
-
avgBorrowRate: bigint;
|
|
150
|
-
/** Rate at target utilization */
|
|
151
|
-
rateAtTarget: bigint;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* LiquidityChunkUpdated event data (SFPM).
|
|
155
|
-
*/
|
|
156
|
-
interface LiquidityChunkUpdatedEvent extends BaseEvent {
|
|
157
|
-
type: 'LiquidityChunkUpdated';
|
|
158
|
-
/** Pool ID (bytes32) */
|
|
159
|
-
poolId: Hash;
|
|
160
|
-
/** Owner address */
|
|
161
|
-
owner: Address;
|
|
162
|
-
/** Token type (0 or 1) */
|
|
163
|
-
tokenType: bigint;
|
|
164
|
-
/** Lower tick */
|
|
165
|
-
tickLower: number;
|
|
166
|
-
/** Upper tick */
|
|
167
|
-
tickUpper: number;
|
|
168
|
-
/** Liquidity delta (positive = added, negative = removed) */
|
|
169
|
-
liquidityDelta: bigint;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* ProtocolLossRealized event data (CollateralTracker).
|
|
173
|
-
*/
|
|
174
|
-
interface ProtocolLossRealizedEvent extends BaseEvent {
|
|
175
|
-
type: 'ProtocolLossRealized';
|
|
176
|
-
/** Liquidated account */
|
|
177
|
-
liquidatee: Address;
|
|
178
|
-
/** Liquidator address */
|
|
179
|
-
liquidator: Address;
|
|
180
|
-
/** Protocol loss in assets */
|
|
181
|
-
protocolLossAssets: bigint;
|
|
182
|
-
/** Protocol loss in shares */
|
|
183
|
-
protocolLossShares: bigint;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* ModifyLiquidity event data (v4 PoolManager).
|
|
187
|
-
*/
|
|
188
|
-
interface ModifyLiquidityEvent extends BaseEvent {
|
|
189
|
-
type: 'ModifyLiquidity';
|
|
190
|
-
/** Pool ID (bytes32) */
|
|
191
|
-
id: Hash;
|
|
192
|
-
/** Sender address */
|
|
193
|
-
sender: Address;
|
|
194
|
-
/** Lower tick */
|
|
195
|
-
tickLower: number;
|
|
196
|
-
/** Upper tick */
|
|
197
|
-
tickUpper: number;
|
|
198
|
-
/** Liquidity delta */
|
|
199
|
-
liquidityDelta: bigint;
|
|
200
|
-
/** Salt */
|
|
201
|
-
salt: Hash;
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Swap event data (v4 PoolManager).
|
|
205
|
-
*/
|
|
206
|
-
interface SwapEvent extends BaseEvent {
|
|
207
|
-
type: 'Swap';
|
|
208
|
-
/** Pool ID (bytes32) */
|
|
209
|
-
id: Hash;
|
|
210
|
-
/** Sender address */
|
|
211
|
-
sender: Address;
|
|
212
|
-
/** Amount of token 0 */
|
|
213
|
-
amount0: bigint;
|
|
214
|
-
/** Amount of token 1 */
|
|
215
|
-
amount1: bigint;
|
|
216
|
-
/** Square root price X96 */
|
|
217
|
-
sqrtPriceX96: bigint;
|
|
218
|
-
/** Liquidity */
|
|
219
|
-
liquidity: bigint;
|
|
220
|
-
/** Tick */
|
|
221
|
-
tick: number;
|
|
222
|
-
/** Fee */
|
|
223
|
-
fee: number;
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Donate event data (v4 PoolManager).
|
|
227
|
-
*/
|
|
228
|
-
interface DonateEvent extends BaseEvent {
|
|
229
|
-
type: 'Donate';
|
|
230
|
-
/** Pool ID (bytes32) */
|
|
231
|
-
id: Hash;
|
|
232
|
-
/** Sender address */
|
|
233
|
-
sender: Address;
|
|
234
|
-
/** Amount of token 0 */
|
|
235
|
-
amount0: bigint;
|
|
236
|
-
/** Amount of token 1 */
|
|
237
|
-
amount1: bigint;
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Union of all Panoptic event types.
|
|
241
|
-
*/
|
|
242
|
-
type PanopticEvent = OptionMintedEvent | OptionBurntEvent | AccountLiquidatedEvent | ForcedExercisedEvent | PremiumSettledEvent | DepositEvent | WithdrawEvent | BorrowRateUpdatedEvent | LiquidityChunkUpdatedEvent | ProtocolLossRealizedEvent | ModifyLiquidityEvent | SwapEvent | DonateEvent;
|
|
243
|
-
/**
|
|
244
|
-
* Leg update data from events.
|
|
245
|
-
*/
|
|
246
|
-
interface LegUpdate {
|
|
247
|
-
/** Leg index */
|
|
248
|
-
legIndex: bigint;
|
|
249
|
-
/** Liquidity delta (positive = added, negative = removed) */
|
|
250
|
-
liquidityDelta: bigint;
|
|
251
|
-
/** Token 0 delta */
|
|
252
|
-
amount0Delta: bigint;
|
|
253
|
-
/** Token 1 delta */
|
|
254
|
-
amount1Delta: bigint;
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Event subscription handle.
|
|
258
|
-
*/
|
|
259
|
-
interface EventSubscription {
|
|
260
|
-
/** Unsubscribe from events */
|
|
261
|
-
unsubscribe: () => void;
|
|
262
|
-
/** Current connection status */
|
|
263
|
-
isConnected: () => boolean;
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Sync progress event for syncPositions callback.
|
|
267
|
-
*/
|
|
268
|
-
interface SyncEvent {
|
|
269
|
-
/** Current block being processed */
|
|
270
|
-
currentBlock: bigint;
|
|
271
|
-
/** Target block to sync to */
|
|
272
|
-
targetBlock: bigint;
|
|
273
|
-
/** Number of positions discovered so far */
|
|
274
|
-
positionsFound: bigint;
|
|
275
|
-
/** Percentage complete (0-100) */
|
|
276
|
-
progress: bigint;
|
|
277
|
-
} //#endregion
|
|
278
|
-
//#region src/panoptic/v2/types/tx.d.ts
|
|
279
|
-
/**
|
|
280
|
-
* Transaction result returned by write functions.
|
|
281
|
-
* Provides immediate access to hash and a wait function for confirmation.
|
|
282
|
-
*/
|
|
283
|
-
interface TxResult {
|
|
284
|
-
/** Transaction hash, available immediately */
|
|
285
|
-
hash: Hash;
|
|
286
|
-
/** Wait for transaction confirmation */
|
|
287
|
-
wait: (confirmations?: bigint) => Promise<TxReceipt>;
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* Transaction result with receipt already awaited.
|
|
291
|
-
* Returned by *AndWait convenience functions.
|
|
292
|
-
*/
|
|
293
|
-
interface TxResultWithReceipt extends TxResult {
|
|
294
|
-
/** The transaction receipt */
|
|
295
|
-
receipt: TxReceipt;
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
* Transaction receipt after confirmation.
|
|
299
|
-
*/
|
|
300
|
-
interface TxReceipt {
|
|
301
|
-
/** Transaction hash */
|
|
302
|
-
hash: Hash;
|
|
303
|
-
/** Block number */
|
|
304
|
-
blockNumber: bigint;
|
|
305
|
-
/** Block hash */
|
|
306
|
-
blockHash: Hash;
|
|
307
|
-
/** Gas used */
|
|
308
|
-
gasUsed: bigint;
|
|
309
|
-
/** Transaction status */
|
|
310
|
-
status: 'success' | 'reverted';
|
|
311
|
-
/** Parsed Panoptic events from the transaction */
|
|
312
|
-
events: PanopticEvent[];
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* Transaction broadcaster interface for private transaction support.
|
|
316
|
-
* Allows plugging in Flashbots or other MEV protection services.
|
|
317
|
-
*/
|
|
318
|
-
interface TxBroadcaster {
|
|
319
|
-
/**
|
|
320
|
-
* Broadcast a signed transaction.
|
|
321
|
-
* @param signedTx - The signed transaction bytes
|
|
322
|
-
* @returns The transaction hash
|
|
323
|
-
*/
|
|
324
|
-
broadcast: (signedTx: `0x${string}`) => Promise<Hash>;
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* Gas and transaction overrides for write operations.
|
|
328
|
-
* Supports EIP-1559 gas parameters, explicit nonce, and custom broadcasters.
|
|
329
|
-
*/
|
|
330
|
-
interface TxOverrides {
|
|
331
|
-
/** EIP-1559 max fee per gas */
|
|
332
|
-
maxFeePerGas?: bigint;
|
|
333
|
-
/** EIP-1559 max priority fee per gas (tip) */
|
|
334
|
-
maxPriorityFeePerGas?: bigint;
|
|
335
|
-
/** Gas limit override */
|
|
336
|
-
gas?: bigint;
|
|
337
|
-
/** Explicit nonce (for concurrent tx submission) */
|
|
338
|
-
nonce?: bigint;
|
|
339
|
-
/** Custom broadcaster for MEV protection (Flashbots, private mempool) */
|
|
340
|
-
broadcaster?: TxBroadcaster;
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Nonce manager for concurrent transaction submission.
|
|
344
|
-
*/
|
|
345
|
-
interface NonceManager {
|
|
346
|
-
/** Get the next nonce for an account */
|
|
347
|
-
getNextNonce: (account: Address) => Promise<bigint>;
|
|
348
|
-
/** Reset nonce tracking (e.g., after failure) */
|
|
349
|
-
reset: (account: Address) => void;
|
|
350
|
-
}
|
|
351
|
-
/**
|
|
352
|
-
* Dispatch call for raw multi-operation transactions.
|
|
353
|
-
*/
|
|
354
|
-
interface DispatchCall {
|
|
355
|
-
/** TokenId to operate on */
|
|
356
|
-
tokenId: bigint;
|
|
357
|
-
/** Position size change (positive = mint, negative = burn) */
|
|
358
|
-
positionSize: bigint;
|
|
359
|
-
/** Whether this is a long (true) or short (false) */
|
|
360
|
-
isLong: boolean;
|
|
361
|
-
/** Recipient address (usually the sender) */
|
|
362
|
-
recipient?: Address;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
//#endregion
|
|
366
|
-
export { AccountLiquidatedEvent, BaseEvent, DepositEvent, DispatchCall, EventSubscription, ForcedExercisedEvent, LegUpdate, NonceManager, OptionBurntEvent, OptionMintedEvent, PanopticEvent, PanopticEventType, PremiumSettledEvent, SyncEvent, TxBroadcaster, TxOverrides, TxReceipt, TxResult, TxResultWithReceipt, WithdrawEvent };
|
|
367
|
-
//# sourceMappingURL=tx-CbDQ58Io.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tx-CbDQ58Io.d.ts","names":["Address","Hash","PanopticEventType","BaseEvent","OptionMintedEvent","OptionBurntEvent","AccountLiquidatedEvent","ForcedExercisedEvent","PremiumSettledEvent","DepositEvent","WithdrawEvent","BorrowRateUpdatedEvent","LiquidityChunkUpdatedEvent","ProtocolLossRealizedEvent","ModifyLiquidityEvent","SwapEvent","DonateEvent","PanopticEvent","LegUpdate","EventSubscription","SyncEvent","Address","Hash","PanopticEvent","TxResult","TxReceipt","Promise","TxResultWithReceipt","TxBroadcaster","TxOverrides","NonceManager","DispatchCall"],"sources":["../src/panoptic/v2/types/events.d.ts","../src/panoptic/v2/types/tx.d.ts"],"sourcesContent":null,"mappings":";;;;;;;;AAQA;;KAAYE,iBAAAA;;AAIZ;;AAEUA,UAFOC,SAAAA,CAEPD;EAAiB;EAEF,IAIVoB,EANLpB,iBAMKoB;EAAI;mBAJEA;;;EAWJlB;EAAiB,SAAA,EAPnBkB,IAOmB;EAAA;EAGZ,QAHqBnB,EAAAA,MAAAA;AAAS;;;;AAwBnCE,UAxBAD,iBAAAA,SAA0BD,SAwBV,CAAA;EAAA,IAAA,EAAA,cAAA;EAAA;EAGX,SAHoBA,EArB3BkB,OAqB2BlB;EAAS;;;;EAclCG;EAAsB,gBAAA,EAAA,MAAA;EAAA;EAGhB,gBAEPe,EAAAA,MAAAA;EAAO;EALkC,UAAA,EAAA,MAAA;;;;EAcxCd,WAAAA,EAAAA,MAAAA;EAAoB;EAAA,UAGtBc,EAAAA,OAAAA;;;AAHwC;;UA5BtChB,gBAAAA,SAAyBF;;EA4CzBK;EAAmB,SAAA,EAzCrBa,OAyCqB;EAAA;EAGnB,OAH4BlB,EAAAA,MAAAA;EAAS;;;;AAgBtD;;;;AAAsCA,UA9CrBG,sBAAAA,SAA+BH,SA8CVA,CAAAA;EAAS,IAAA,EAAA,mBAAA;;cA3C/BkB;;EAyDCX,UAAAA,EAvDDW,OAuDc;EAAA;EAAA,YAGlBA,EAAAA,MAAAA;EAAO;EAEE,YAEVA,EAAAA,MAAAA;;AAPqC;;;UA9C/Bd,oBAAAA,SAA6BJ;EA8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pB,EAAAA;AAAS;;;;AAczD;AAAqC,UClCpByB,aAAAA,CDkCoB;EAAA;;;AAAkB;;0CC5BXF,QAAQJ;;AD4CpD;;;;AAAsD,UCtCrCO,WAAAA,CDsCqC;;;;EAgBrCpB,oBAAY,CAAA,EAAA,MAAA;EAAA;EAAA,GAGjBY,CAAAA,EAAAA,MAAAA;EAAO;EAED,KALoBlB,CAAAA,EAAAA,MAAAA;EAAS;gBC5C7ByB;;;AD0DlB;;AAGYP,UCxDKS,YAAAA,CDwDLT;EAAO;EAEE,YAEVA,EAAAA,CAAAA,OAAAA,EC1DiBA,OD0DjBA,EAAAA,GC1D6BK,OD0D7BL,CAAAA,MAAAA,CAAAA;EAAO;EAP8B,KAAA,EAAA,CAAA,OAAA,ECjD3BA,ODiD2B,EAAA,GAAA,IAAA;;;;AAgBhD;AAAuC,UC5DtBU,YAAAA,CD4DsB;EAAA;EAGX,OAHoB5B,EAAAA,MAAAA;EAAS;;;;EAYxCS;EAA0B,SAAA,CAAA,EChE3BS,ODgE2B"}
|
package/dist/types-BHdnurYr.d.ts
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { TxOverrides } from "./tx-CbDQ58Io.js";
|
|
2
|
-
import { Address, Hex, PublicClient, WalletClient } from "viem";
|
|
3
|
-
|
|
4
|
-
//#region src/cow/types.d.ts
|
|
5
|
-
/** Order kind: 'sell' = exact-in, 'buy' = exact-out. */
|
|
6
|
-
|
|
7
|
-
/** Order kind: 'sell' = exact-in, 'buy' = exact-out. */
|
|
8
|
-
type CowOrderKind = 'sell' | 'buy';
|
|
9
|
-
/** Order-book lifecycle states. */
|
|
10
|
-
type CowOrderStatus = 'presignaturePending' | 'open' | 'fulfilled' | 'cancelled' | 'expired';
|
|
11
|
-
/** Parameters for {@link quoteCowSwap}. */
|
|
12
|
-
interface QuoteCowSwapParams {
|
|
13
|
-
/** Chain ID (selects the order-book API). */
|
|
14
|
-
chainId: bigint;
|
|
15
|
-
/** ERC20 token to sell (native ETH not supported). */
|
|
16
|
-
sellToken: Address;
|
|
17
|
-
/** Token to buy. The zero address (native ETH) maps to the CoW buy sentinel. */
|
|
18
|
-
buyToken: Address;
|
|
19
|
-
/** 'sell' = exact-in (amount is sellAmountBeforeFee), 'buy' = exact-out (amount is buyAmountAfterFee). */
|
|
20
|
-
kind: CowOrderKind;
|
|
21
|
-
/** Exact amount being quoted (see `kind`). */
|
|
22
|
-
amount: bigint;
|
|
23
|
-
/** Order owner — the API validates balances/fees against this account. */
|
|
24
|
-
from: Address;
|
|
25
|
-
/** Slippage tolerance in bps applied to the signed limit amounts. */
|
|
26
|
-
slippageBps: bigint;
|
|
27
|
-
/** Order validity window in seconds (drives `validTo`). Defaults to 30 minutes. */
|
|
28
|
-
validForSeconds?: bigint;
|
|
29
|
-
/** Override the order-book API base URL (e.g. tests). */
|
|
30
|
-
apiUrl?: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Quote result data (carried inside a `SimulationResult`).
|
|
34
|
-
*
|
|
35
|
-
* `orderSellAmount`/`orderBuyAmount` are the limit amounts to sign: fee folded
|
|
36
|
-
* into the sell side (`feeAmount` is signed as 0 per the current fee model)
|
|
37
|
-
* and slippage applied to the non-exact side.
|
|
38
|
-
*/
|
|
39
|
-
interface CowQuote {
|
|
40
|
-
kind: CowOrderKind;
|
|
41
|
-
sellToken: Address;
|
|
42
|
-
buyToken: Address;
|
|
43
|
-
/** Quoted sell amount, excluding fee. */
|
|
44
|
-
sellAmount: bigint;
|
|
45
|
-
/** Quoted buy amount (net). */
|
|
46
|
-
buyAmount: bigint;
|
|
47
|
-
/** Quoted protocol fee, in the sell token. */
|
|
48
|
-
feeAmount: bigint;
|
|
49
|
-
/** Total sell-token outflow at the quoted price (sellAmount + feeAmount). */
|
|
50
|
-
sellAmountTotal: bigint;
|
|
51
|
-
/** Sell amount to sign (sell orders: gross; buy orders: slippage-padded max). */
|
|
52
|
-
orderSellAmount: bigint;
|
|
53
|
-
/** Buy amount to sign (sell orders: slippage-reduced min; buy orders: exact). */
|
|
54
|
-
orderBuyAmount: bigint;
|
|
55
|
-
/** Order expiry (unix seconds, uint32). */
|
|
56
|
-
validTo: bigint;
|
|
57
|
-
/** Order-book quote id, echoed on order submission for tracing. */
|
|
58
|
-
quoteId: number | null;
|
|
59
|
-
}
|
|
60
|
-
/** Parameters for {@link signAndSubmitCowOrder}. */
|
|
61
|
-
interface SignAndSubmitCowOrderParams {
|
|
62
|
-
walletClient: WalletClient;
|
|
63
|
-
/** Order owner (signer). */
|
|
64
|
-
account: Address;
|
|
65
|
-
chainId: bigint;
|
|
66
|
-
/** Quote to turn into a signed order. */
|
|
67
|
-
quote: CowQuote;
|
|
68
|
-
/** Recipient of the buy token. Defaults to `account`. */
|
|
69
|
-
receiver?: Address;
|
|
70
|
-
/** Override the order-book API base URL (e.g. tests). */
|
|
71
|
-
apiUrl?: string;
|
|
72
|
-
}
|
|
73
|
-
/** Result of posting an order: the order-book UID (not a tx hash). */
|
|
74
|
-
interface CowOrderResult {
|
|
75
|
-
orderUid: Hex;
|
|
76
|
-
}
|
|
77
|
-
/** Parameters for {@link cancelCowOrder}. */
|
|
78
|
-
interface CancelCowOrderParams {
|
|
79
|
-
walletClient: WalletClient;
|
|
80
|
-
account: Address;
|
|
81
|
-
chainId: bigint;
|
|
82
|
-
orderUid: Hex;
|
|
83
|
-
apiUrl?: string;
|
|
84
|
-
}
|
|
85
|
-
/** Parameters for {@link getCowOrderStatus}. */
|
|
86
|
-
interface GetCowOrderStatusParams {
|
|
87
|
-
chainId: bigint;
|
|
88
|
-
orderUid: Hex;
|
|
89
|
-
apiUrl?: string;
|
|
90
|
-
}
|
|
91
|
-
/** Result of {@link getCowOrderStatus}. */
|
|
92
|
-
interface CowOrderState {
|
|
93
|
-
status: CowOrderStatus;
|
|
94
|
-
/** Cumulative executed amounts (partial fills included). */
|
|
95
|
-
executedSellAmount: bigint;
|
|
96
|
-
executedBuyAmount: bigint;
|
|
97
|
-
/** Settlement tx hash, available once at least one trade has executed. */
|
|
98
|
-
settlementTxHash?: Hex;
|
|
99
|
-
}
|
|
100
|
-
/** Parameters for {@link checkCowApproval}. */
|
|
101
|
-
interface CheckCowApprovalParams {
|
|
102
|
-
client: PublicClient;
|
|
103
|
-
/** ERC20 token being sold. */
|
|
104
|
-
sellToken: Address;
|
|
105
|
-
/** Token owner. */
|
|
106
|
-
owner: Address;
|
|
107
|
-
/** Amount that must be spendable by the vault relayer. */
|
|
108
|
-
amount: bigint;
|
|
109
|
-
}
|
|
110
|
-
/** Result of {@link checkCowApproval}. */
|
|
111
|
-
interface CowApprovalStatus {
|
|
112
|
-
needsApproval: boolean;
|
|
113
|
-
/** Current ERC20 → VaultRelayer allowance. */
|
|
114
|
-
allowance: bigint;
|
|
115
|
-
}
|
|
116
|
-
/** Parameters for {@link approveErc20ForCow}. */
|
|
117
|
-
interface ApproveErc20ForCowParams {
|
|
118
|
-
client: PublicClient;
|
|
119
|
-
walletClient: WalletClient;
|
|
120
|
-
account: Address;
|
|
121
|
-
/** ERC20 token to approve to the vault relayer. */
|
|
122
|
-
sellToken: Address;
|
|
123
|
-
/** Amount to approve. Defaults to uint256 max. */
|
|
124
|
-
amount?: bigint;
|
|
125
|
-
txOverrides?: TxOverrides;
|
|
126
|
-
} //#endregion
|
|
127
|
-
export { ApproveErc20ForCowParams, CancelCowOrderParams, CheckCowApprovalParams, CowApprovalStatus, CowOrderKind, CowOrderResult, CowOrderState, CowOrderStatus, CowQuote, GetCowOrderStatusParams, QuoteCowSwapParams, SignAndSubmitCowOrderParams };
|
|
128
|
-
//# sourceMappingURL=types-BHdnurYr.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-BHdnurYr.d.ts","names":["Address","Hex","PublicClient","WalletClient","TxOverrides","CowOrderKind","CowOrderStatus","QuoteCowSwapParams","CowQuote","SignAndSubmitCowOrderParams","CowOrderResult","CancelCowOrderParams","GetCowOrderStatusParams","CowOrderState","CheckCowApprovalParams","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