@panoptic-eng/sdk 1.0.22 → 1.0.24

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 (54) hide show
  1. package/dist/cow/index.d.ts +4 -4
  2. package/dist/cow/index.js +3 -3
  3. package/dist/cow/types.d.ts +2 -3
  4. package/dist/{cow-C_SGXoWr.js → cow-DW6LjXES.js} +2 -2
  5. package/dist/{cow-C_SGXoWr.js.map → cow-DW6LjXES.js.map} +1 -1
  6. package/dist/{index-BuJcj5aO.d.ts → index-CIlr4SNh.d.ts} +4 -3
  7. package/dist/index-CIlr4SNh.d.ts.map +1 -0
  8. package/dist/index.d.ts +75 -20
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +116 -3
  11. package/dist/index.js.map +1 -1
  12. package/dist/{irm-C7OUVANR.d.ts → irm-CSJX9BsU.d.ts} +56 -3
  13. package/dist/{irm-C7OUVANR.d.ts.map → irm-CSJX9BsU.d.ts.map} +1 -1
  14. package/dist/{irm-DNK3N7qk.js → irm-Dw6fa-DV.js} +34 -3
  15. package/dist/irm-Dw6fa-DV.js.map +1 -0
  16. package/dist/panoptic/v2/index.d.ts +569 -12
  17. package/dist/panoptic/v2/index.d.ts.map +1 -1
  18. package/dist/panoptic/v2/index.js +378 -21
  19. package/dist/panoptic/v2/index.js.map +1 -1
  20. package/dist/{position-BK4a-Yyu.js → position-GYsTTl71.js} +51 -2
  21. package/dist/position-GYsTTl71.js.map +1 -0
  22. package/dist/{router-BZvOeloX.js → router-_vB5ArjF.js} +2 -2
  23. package/dist/{router-BZvOeloX.js.map → router-_vB5ArjF.js.map} +1 -1
  24. package/dist/simulation-4SzTI-xf.d.ts +435 -0
  25. package/dist/simulation-4SzTI-xf.d.ts.map +1 -0
  26. package/dist/test/index.d.ts +2 -2
  27. package/dist/test/index.d.ts.map +1 -1
  28. package/dist/tx-Banz1S18.d.ts +367 -0
  29. package/dist/tx-Banz1S18.d.ts.map +1 -0
  30. package/dist/{types-CRvvn2ce.d.ts → types-Bzw_7NJv.d.ts} +2 -2
  31. package/dist/{types-CRvvn2ce.d.ts.map → types-Bzw_7NJv.d.ts.map} +1 -1
  32. package/dist/types-CspUPolV.d.ts +892 -0
  33. package/dist/types-CspUPolV.d.ts.map +1 -0
  34. package/dist/uniswap/index.d.ts +3 -3
  35. package/dist/uniswap/index.js +3 -3
  36. package/dist/{writes-DymnVbiE.js → writes-h-IX3XQq.js} +77 -12
  37. package/dist/writes-h-IX3XQq.js.map +1 -0
  38. package/dist/zodiac/index.d.ts +1 -6
  39. package/dist/zodiac/index.d.ts.map +1 -1
  40. package/dist/zodiac/index.js +1 -6
  41. package/dist/zodiac/index.js.map +1 -1
  42. package/package.json +1 -1
  43. package/dist/index-BuJcj5aO.d.ts.map +0 -1
  44. package/dist/index-DVMjZi1E.d.ts +0 -1801
  45. package/dist/index-DVMjZi1E.d.ts.map +0 -1
  46. package/dist/irm-CGykVo3q.d.ts +0 -32
  47. package/dist/irm-CGykVo3q.d.ts.map +0 -1
  48. package/dist/irm-DNK3N7qk.js.map +0 -1
  49. package/dist/panoptic/v2/types/index.d.ts +0 -3
  50. package/dist/panoptic/v2/types/index.js +0 -0
  51. package/dist/position-BK4a-Yyu.js.map +0 -1
  52. package/dist/types-BQejAFnu.d.ts +0 -245
  53. package/dist/types-BQejAFnu.d.ts.map +0 -1
  54. package/dist/writes-DymnVbiE.js.map +0 -1
@@ -1,245 +0,0 @@
1
- import { PoolKey, TxOverrides } from "./index-DVMjZi1E.js";
2
- import { Address, PublicClient, WalletClient } from "viem";
3
-
4
- //#region src/uniswap/v4/addresses.d.ts
5
- /**
6
- * Uniswap v4 contract addresses required for a Universal Router spot swap.
7
- */
8
-
9
- /**
10
- * Uniswap v4 contract addresses required for a Universal Router spot swap.
11
- */
12
- interface UniswapV4Addresses {
13
- /** Universal Router (v4-capable build) — entrypoint for `execute(...)`. */
14
- universalRouter: Address;
15
- /** V4Quoter — `quoteExactInputSingle` (revert/staticcall-based). */
16
- v4Quoter: Address;
17
- /** Uniswap v4 PoolManager (singleton). */
18
- poolManager: Address;
19
- /** Canonical Permit2 (same address on every chain). */
20
- permit2: Address;
21
- }
22
- /**
23
- * Canonical Permit2, identical across all chains.
24
- */
25
- declare const PERMIT2_ADDRESS: Address;
26
- /**
27
- * Verified Uniswap v4 deployment addresses keyed by chainId.
28
- *
29
- * Sourced from the official Uniswap v4 deployments. Add a chain here only after
30
- * verifying each address against the canonical Uniswap deployment listing —
31
- * Universal Router in particular is NOT the same address across chains.
32
- */
33
- declare const UNISWAP_V4_ADDRESSES: Record<number, UniswapV4Addresses>;
34
- /**
35
- * Resolve the Uniswap v4 addresses for a chain, applying optional overrides.
36
- *
37
- * @param chainId - Target chain ID.
38
- * @param overrides - Partial override of any address (e.g. for fork tests).
39
- * @returns Fully-resolved {@link UniswapV4Addresses}.
40
- * @throws {UnsupportedChainError} when the chain is not listed and the
41
- * overrides do not supply every required address.
42
- */
43
- declare function getUniswapV4Addresses(chainId: bigint, overrides?: Partial<UniswapV4Addresses>): UniswapV4Addresses;
44
- //#endregion
45
- //#region src/uniswap/v4/router/types.d.ts
46
- /**
47
- * Parameters for {@link swapExactInViaRouter}.
48
- */
49
- interface SwapExactInViaRouterParams {
50
- /** Public client for reads + receipts. */
51
- client: PublicClient;
52
- /** Wallet client for signing. */
53
- walletClient: WalletClient;
54
- /** Account address. */
55
- account: Address;
56
- /** PanopticPool address — used to resolve the underlying v4 PoolKey. */
57
- poolAddress: Address;
58
- /** Chain ID (selects per-chain Uniswap v4 addresses). */
59
- chainId: bigint;
60
- /** Token to sell. `address(0)` (zero address) for native ETH. */
61
- tokenIn: Address;
62
- /** Exact amount of `tokenIn` to spend (must fit uint128). */
63
- amountIn: bigint;
64
- /** Slippage tolerance in bps (e.g. 500n = 5%). */
65
- slippageBps: bigint;
66
- /** Absolute deadline (unix seconds). If omitted, derived from block timestamp. */
67
- deadline?: bigint;
68
- /** Recipient of the output. Defaults to `account`. */
69
- recipient?: Address;
70
- /** Gas and transaction overrides. */
71
- txOverrides?: TxOverrides;
72
- /** Override per-chain Uniswap v4 addresses (e.g. fork tests). */
73
- addresses?: Partial<UniswapV4Addresses>;
74
- }
75
- /**
76
- * Parameters for {@link quoteSwapExactInViaRouter}.
77
- */
78
- interface QuoteSwapExactInViaRouterParams {
79
- /** Public client. */
80
- client: PublicClient;
81
- /** PanopticPool address — used to resolve the underlying v4 PoolKey. */
82
- poolAddress: Address;
83
- /** Chain ID. */
84
- chainId: bigint;
85
- /** Token to sell. `address(0)` for native ETH. */
86
- tokenIn: Address;
87
- /** Exact amount of `tokenIn` to spend (must fit uint128). */
88
- amountIn: bigint;
89
- /** Slippage tolerance in bps (used to compute `amountOutMinimum`). */
90
- slippageBps: bigint;
91
- /** Optional block number for the quote. */
92
- blockNumber?: bigint;
93
- /** Override per-chain Uniswap v4 addresses (e.g. fork tests). */
94
- addresses?: Partial<UniswapV4Addresses>;
95
- }
96
- /**
97
- * Quote result data (carried inside a `SimulationResult`).
98
- */
99
- interface SwapExactInQuote {
100
- /** Quoted output amount of `tokenOut`. */
101
- amountOut: bigint;
102
- /** Minimum acceptable output after applying slippage. */
103
- amountOutMinimum: bigint;
104
- /** Whether the swap goes currency0 → currency1. */
105
- zeroForOne: boolean;
106
- /** Output token address (`address(0)` for native ETH). */
107
- tokenOut: Address;
108
- /** Resolved v4 PoolKey (reused by the swap calldata builder). */
109
- poolKey: PoolKey;
110
- /** Quoter's gas estimate. */
111
- gasEstimate: bigint;
112
- }
113
- /**
114
- * Parameters for {@link swapExactOutViaRouter}.
115
- */
116
- interface SwapExactOutViaRouterParams {
117
- /** Public client for reads + receipts. */
118
- client: PublicClient;
119
- /** Wallet client for signing. */
120
- walletClient: WalletClient;
121
- /** Account address. */
122
- account: Address;
123
- /** PanopticPool address — used to resolve the underlying v4 PoolKey. */
124
- poolAddress: Address;
125
- /** Chain ID (selects per-chain Uniswap v4 addresses). */
126
- chainId: bigint;
127
- /** Token to sell (the pay token). `address(0)` (zero address) for native ETH. */
128
- tokenIn: Address;
129
- /** Exact amount of the output token to receive (must fit uint128). */
130
- amountOut: bigint;
131
- /** Slippage tolerance in bps (e.g. 500n = 5%); caps the input. */
132
- slippageBps: bigint;
133
- /** Absolute deadline (unix seconds). If omitted, derived from block timestamp. */
134
- deadline?: bigint;
135
- /** Recipient of the output. Defaults to `account`. */
136
- recipient?: Address;
137
- /** Gas and transaction overrides. */
138
- txOverrides?: TxOverrides;
139
- /** Override per-chain Uniswap v4 addresses (e.g. fork tests). */
140
- addresses?: Partial<UniswapV4Addresses>;
141
- }
142
- /**
143
- * Parameters for {@link quoteSwapExactOutViaRouter}.
144
- */
145
- interface QuoteSwapExactOutViaRouterParams {
146
- /** Public client. */
147
- client: PublicClient;
148
- /** PanopticPool address — used to resolve the underlying v4 PoolKey. */
149
- poolAddress: Address;
150
- /** Chain ID. */
151
- chainId: bigint;
152
- /** Token to sell (the pay token). `address(0)` for native ETH. */
153
- tokenIn: Address;
154
- /** Exact amount of the output token to receive (must fit uint128). */
155
- amountOut: bigint;
156
- /** Slippage tolerance in bps (used to compute `amountInMaximum`). */
157
- slippageBps: bigint;
158
- /** Optional block number for the quote. */
159
- blockNumber?: bigint;
160
- /** Override per-chain Uniswap v4 addresses (e.g. fork tests). */
161
- addresses?: Partial<UniswapV4Addresses>;
162
- }
163
- /**
164
- * Quote result data for an exact-out swap (carried inside a `SimulationResult`).
165
- */
166
- interface SwapExactOutQuote {
167
- /** Quoted input amount of `tokenIn` required for the exact output. */
168
- amountIn: bigint;
169
- /** Maximum acceptable input after applying slippage. */
170
- amountInMaximum: bigint;
171
- /** Whether the swap goes currency0 → currency1. */
172
- zeroForOne: boolean;
173
- /** Output token address (`address(0)` for native ETH). */
174
- tokenOut: Address;
175
- /** Resolved v4 PoolKey (reused by the swap calldata builder). */
176
- poolKey: PoolKey;
177
- /** Quoter's gas estimate. */
178
- gasEstimate: bigint;
179
- }
180
- /**
181
- * Parameters for {@link checkRouterApproval}.
182
- */
183
- interface CheckRouterApprovalParams {
184
- /** Public client. */
185
- client: PublicClient;
186
- /** Chain ID. */
187
- chainId: bigint;
188
- /** ERC20 token being spent (must not be native ETH). */
189
- tokenIn: Address;
190
- /** Token owner. */
191
- owner: Address;
192
- /** Amount that must be spendable. */
193
- amount: bigint;
194
- /** Override per-chain Uniswap v4 addresses (e.g. fork tests). */
195
- addresses?: Partial<UniswapV4Addresses>;
196
- }
197
- /**
198
- * Result of {@link checkRouterApproval}.
199
- */
200
- interface RouterApprovalStatus {
201
- /** ERC20 → Permit2 allowance is insufficient. */
202
- needsErc20Approval: boolean;
203
- /** Permit2 → Universal Router allowance is insufficient or expired. */
204
- needsPermit2Approval: boolean;
205
- /** Current ERC20 → Permit2 allowance. */
206
- erc20Allowance: bigint;
207
- /** Current Permit2 → router allowance amount. */
208
- permit2Amount: bigint;
209
- /** Current Permit2 → router allowance expiration (unix seconds). */
210
- permit2Expiration: bigint;
211
- }
212
- /**
213
- * Parameters for {@link approveErc20ForPermit2}.
214
- */
215
- interface ApproveErc20ForPermit2Params {
216
- client: PublicClient;
217
- walletClient: WalletClient;
218
- account: Address;
219
- chainId: bigint;
220
- /** ERC20 token to approve to Permit2. */
221
- tokenIn: Address;
222
- /** Amount to approve. Defaults to uint256 max. */
223
- amount?: bigint;
224
- txOverrides?: TxOverrides;
225
- addresses?: Partial<UniswapV4Addresses>;
226
- }
227
- /**
228
- * Parameters for {@link approveRouterViaPermit2}.
229
- */
230
- interface ApproveRouterViaPermit2Params {
231
- client: PublicClient;
232
- walletClient: WalletClient;
233
- account: Address;
234
- chainId: bigint;
235
- /** ERC20 token the router is allowed to spend via Permit2. */
236
- tokenIn: Address;
237
- /** Amount to approve (must fit uint160). Defaults to uint160 max. */
238
- amount?: bigint;
239
- /** Allowance expiration (unix seconds, uint48). If omitted, block timestamp + 30 days. */
240
- expiration?: bigint;
241
- txOverrides?: TxOverrides;
242
- addresses?: Partial<UniswapV4Addresses>;
243
- } //#endregion
244
- export { ApproveErc20ForPermit2Params, ApproveRouterViaPermit2Params, CheckRouterApprovalParams, PERMIT2_ADDRESS as PERMIT2_ADDRESS$1, QuoteSwapExactInViaRouterParams, QuoteSwapExactOutViaRouterParams, RouterApprovalStatus, SwapExactInQuote, SwapExactInViaRouterParams, SwapExactOutQuote, SwapExactOutViaRouterParams, UNISWAP_V4_ADDRESSES as UNISWAP_V4_ADDRESSES$1, UniswapV4Addresses, getUniswapV4Addresses as getUniswapV4Addresses$1 };
245
- //# sourceMappingURL=types-BQejAFnu.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types-BQejAFnu.d.ts","names":["Address","UniswapV4Addresses","PERMIT2_ADDRESS","UNISWAP_V4_ADDRESSES","Record","getUniswapV4Addresses","Partial","Address","PublicClient","WalletClient","PoolKey","TxOverrides","UniswapV4Addresses","SwapExactInViaRouterParams","Partial","QuoteSwapExactInViaRouterParams","SwapExactInQuote","SwapExactOutViaRouterParams","QuoteSwapExactOutViaRouterParams","SwapExactOutQuote","CheckRouterApprovalParams","RouterApprovalStatus","ApproveErc20ForPermit2Params","ApproveRouterViaPermit2Params"],"sources":["../src/uniswap/v4/addresses.d.ts","../src/uniswap/v4/router/types.d.ts"],"sourcesContent":null,"mappings":";;;;;;;;;;AAsBoB;UARHY,kBAAAA;;mBAEIL;EAWAL;YATPK;;eAEGA;;WAEJA;;;AAab;;AAA0DK,cARrCV,eAQqCU,EARpBL,OAQoBK;;AAAT;;;;;;cAA5BT,sBAAsBC,eAAeQ;;;;AAU1D;;;;;AAA2H;iBAAnGP,qBAAAA,8BAAmDS,QAAQF,sBAAsBA;;;AA/BzG;;;AAIcL,UCRGM,0BAAAA,CDQHN;EAAO;EAEG,MAEXA,ECVDC,YDUCD;EAAO;gBCRFE;;WAELF;EDWQL;eCTJK;;;;WAIJA;;;EDaQJ;EAAwD,WAAA,EAAA,MAAA;EAAA;EAAD,QAAjCC,CAAAA,EAAAA,MAAAA;EAAM;cCLjCG;;gBAEEI;;cAEFG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