@flaunch/sdk 0.7.1 → 0.8.1

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 (66) hide show
  1. package/README.md +7 -7
  2. package/dist/abi/AnyBidWall.d.ts +740 -0
  3. package/dist/abi/AnyBidWall.d.ts.map +1 -0
  4. package/dist/abi/AnyPositionManager.d.ts +1922 -0
  5. package/dist/abi/AnyPositionManager.d.ts.map +1 -0
  6. package/dist/abi/FeeEscrow.d.ts +282 -0
  7. package/dist/abi/FeeEscrow.d.ts.map +1 -0
  8. package/dist/abi/ReferralEscrow.d.ts +321 -0
  9. package/dist/abi/ReferralEscrow.d.ts.map +1 -0
  10. package/dist/abi/index.cjs +10599 -1327
  11. package/dist/abi/index.cjs.map +1 -1
  12. package/dist/abi/index.d.ts +18 -0
  13. package/dist/abi/index.d.ts.map +1 -1
  14. package/dist/abi/index.js +10582 -1328
  15. package/dist/abi/index.js.map +1 -1
  16. package/dist/addresses/index.cjs +34 -0
  17. package/dist/addresses/index.cjs.map +1 -1
  18. package/dist/addresses/index.js +29 -1
  19. package/dist/addresses/index.js.map +1 -1
  20. package/dist/addresses.d.ts +6 -0
  21. package/dist/addresses.d.ts.map +1 -1
  22. package/dist/clients/AnyBidWall.d.ts +46 -0
  23. package/dist/clients/AnyBidWall.d.ts.map +1 -0
  24. package/dist/clients/AnyPositionManagerClient.d.ts +95 -0
  25. package/dist/clients/AnyPositionManagerClient.d.ts.map +1 -0
  26. package/dist/clients/FairLaunchClient.d.ts +3 -0
  27. package/dist/clients/FairLaunchClient.d.ts.map +1 -1
  28. package/dist/clients/FeeEscrowClient.d.ts +39 -0
  29. package/dist/clients/FeeEscrowClient.d.ts.map +1 -0
  30. package/dist/clients/FlaunchPositionManagerClient.d.ts +20 -0
  31. package/dist/clients/FlaunchPositionManagerClient.d.ts.map +1 -1
  32. package/dist/clients/FlaunchPositionManagerV1_1Client.d.ts +8 -0
  33. package/dist/clients/FlaunchPositionManagerV1_1Client.d.ts.map +1 -1
  34. package/dist/clients/FlaunchZapClient.d.ts +35 -0
  35. package/dist/clients/FlaunchZapClient.d.ts.map +1 -1
  36. package/dist/clients/InitialPriceClient.d.ts +4 -0
  37. package/dist/clients/InitialPriceClient.d.ts.map +1 -1
  38. package/dist/clients/MemecoinClient.d.ts +5 -0
  39. package/dist/clients/MemecoinClient.d.ts.map +1 -1
  40. package/dist/clients/QuoterClient.d.ts +6 -6
  41. package/dist/clients/QuoterClient.d.ts.map +1 -1
  42. package/dist/clients/ReferralEscrowClient.d.ts +40 -0
  43. package/dist/clients/ReferralEscrowClient.d.ts.map +1 -0
  44. package/dist/hooks/index.cjs +2 -2
  45. package/dist/hooks/index.cjs.map +1 -1
  46. package/dist/hooks/index.js +2 -2
  47. package/dist/hooks/index.js.map +1 -1
  48. package/dist/index.cjs.js +5214 -1905
  49. package/dist/index.cjs.js.map +1 -1
  50. package/dist/index.d.ts +4 -1
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.esm.js +5079 -1796
  53. package/dist/index.esm.js.map +1 -1
  54. package/dist/index.umd.js +1 -1
  55. package/dist/index.umd.js.map +1 -1
  56. package/dist/sdk/FlaunchSDK.d.ts +195 -91
  57. package/dist/sdk/FlaunchSDK.d.ts.map +1 -1
  58. package/dist/sdk/drift.d.ts +21 -0
  59. package/dist/sdk/drift.d.ts.map +1 -0
  60. package/dist/types.d.ts +9 -0
  61. package/dist/types.d.ts.map +1 -1
  62. package/dist/utils/parseSwap.d.ts +43 -0
  63. package/dist/utils/parseSwap.d.ts.map +1 -0
  64. package/dist/utils/universalRouter.d.ts +2 -2
  65. package/dist/utils/universalRouter.d.ts.map +1 -1
  66. package/package.json +1 -1
@@ -1,24 +1,56 @@
1
1
  import { Drift, HexString, ReadWriteAdapter, type Address } from "@delvtech/drift";
2
- import { ReadFlaunchPositionManager, WatchPoolCreatedParams, WatchPoolSwapParams as WatchPoolSwapParamsPositionManager } from "../clients/FlaunchPositionManagerClient";
2
+ import { Hex } from "viem";
3
+ import { ReadFlaunchPositionManager, ReadWriteFlaunchPositionManager, WatchPoolCreatedParams, WatchPoolSwapParams as WatchPoolSwapParamsPositionManager } from "../clients/FlaunchPositionManagerClient";
3
4
  import { ReadPoolManager, PositionInfoParams } from "../clients/PoolManagerClient";
4
5
  import { ReadStateView } from "../clients/StateViewClient";
5
6
  import { ReadFairLaunch } from "../clients/FairLaunchClient";
6
7
  import { ReadBidWall } from "../clients/BidWallClient";
7
- import { ReadWriteFastFlaunchZap, FastFlaunchParams, FastFlaunchIPFSParams } from "../clients/FastFlaunchClient";
8
- import { ReadFlaunchZap, ReadWriteFlaunchZap, FlaunchParams, FlaunchIPFSParams, FlaunchWithRevenueManagerParams, FlaunchWithRevenueManagerIPFSParams } from "../clients/FlaunchZapClient";
8
+ import { AnyBidWall } from "../clients/AnyBidWall";
9
+ import { ReadFlaunchZap, ReadWriteFlaunchZap, FlaunchParams, FlaunchIPFSParams, FlaunchWithRevenueManagerParams, FlaunchWithRevenueManagerIPFSParams, FlaunchWithSplitManagerParams, FlaunchWithSplitManagerIPFSParams } from "../clients/FlaunchZapClient";
9
10
  import { ReadFlaunch } from "../clients/FlaunchClient";
10
11
  import { ReadQuoter } from "clients/QuoterClient";
11
12
  import { ReadPermit2, ReadWritePermit2 } from "clients/Permit2Client";
12
13
  import { ReadFlaunchPositionManagerV1_1, ReadWriteFlaunchPositionManagerV1_1 } from "clients/FlaunchPositionManagerV1_1Client";
14
+ import { AnyFlaunchParams, ReadAnyPositionManager, ReadWriteAnyPositionManager } from "clients/AnyPositionManagerClient";
15
+ import { ReadFeeEscrow, ReadWriteFeeEscrow } from "clients/FeeEscrowClient";
16
+ import { ReadReferralEscrow, ReadWriteReferralEscrow } from "clients/ReferralEscrowClient";
13
17
  import { ReadBidWallV1_1 } from "clients/BidWallV1_1Client";
14
18
  import { ReadFairLaunchV1_1 } from "clients/FairLaunchV1_1Client";
15
19
  import { ReadFlaunchV1_1 } from "clients/FlaunchV1_1Client";
16
20
  import { ReadWriteTreasuryManagerFactory } from "clients/TreasuryManagerFactoryClient";
17
- import { CoinMetadata } from "types";
21
+ import { CoinMetadata, FlaunchVersion } from "types";
18
22
  import { PermitSingle } from "utils/universalRouter";
19
23
  type WatchPoolSwapParams = Omit<WatchPoolSwapParamsPositionManager<boolean>, "flETHIsCurrencyZero"> & {
20
24
  filterByCoin?: Address;
21
25
  };
26
+ type GenericBaseSwapLog = {
27
+ timestamp: number;
28
+ transactionHash: Hex;
29
+ blockNumber: bigint;
30
+ args: any;
31
+ };
32
+ type GenericBuySwapLog = GenericBaseSwapLog & {
33
+ type: "BUY";
34
+ delta: {
35
+ coinsBought: bigint;
36
+ flETHSold: bigint;
37
+ fees: {
38
+ isInFLETH: boolean;
39
+ amount: bigint;
40
+ };
41
+ };
42
+ };
43
+ type GenericSellSwapLog = GenericBaseSwapLog & {
44
+ type: "SELL";
45
+ delta: {
46
+ coinsSold: bigint;
47
+ flETHBought: bigint;
48
+ fees: {
49
+ isInFLETH: boolean;
50
+ amount: bigint;
51
+ };
52
+ };
53
+ };
22
54
  type BuyCoinBase = {
23
55
  coinAddress: Address;
24
56
  slippagePercent: number;
@@ -53,12 +85,16 @@ export declare class ReadFlaunchSDK {
53
85
  readonly TICK_SPACING = 60;
54
86
  readonly readPositionManager: ReadFlaunchPositionManager;
55
87
  readonly readPositionManagerV1_1: ReadFlaunchPositionManagerV1_1;
88
+ readonly readAnyPositionManager: ReadAnyPositionManager;
89
+ readonly readFeeEscrow: ReadFeeEscrow;
90
+ readonly readReferralEscrow: ReadReferralEscrow;
56
91
  readonly readFlaunchZap: ReadFlaunchZap;
57
92
  readonly readPoolManager: ReadPoolManager;
58
93
  readonly readStateView: ReadStateView;
59
94
  readonly readFairLaunch: ReadFairLaunch;
60
95
  readonly readFairLaunchV1_1: ReadFairLaunchV1_1;
61
96
  readonly readBidWall: ReadBidWall;
97
+ readonly readAnyBidWall: AnyBidWall;
62
98
  readonly readBidWallV1_1: ReadBidWallV1_1;
63
99
  readonly readFlaunch: ReadFlaunch;
64
100
  readonly readFlaunchV1_1: ReadFlaunchV1_1;
@@ -67,17 +103,35 @@ export declare class ReadFlaunchSDK {
67
103
  resolveIPFS: (value: string) => string;
68
104
  constructor(chainId: number, drift?: Drift);
69
105
  /**
70
- * Checks if a given coin address is a valid Flaunch coin (either V1 or V1.1)
106
+ * Checks if a given coin address is a valid Flaunch coin (supports all versions)
71
107
  * @param coinAddress - The address of the coin to check
72
108
  * @returns Promise<boolean> - True if the coin is valid, false otherwise
73
109
  */
74
110
  isValidCoin(coinAddress: Address): Promise<boolean>;
75
111
  /**
76
- * Checks if a given coin address is a V1 Flaunch coin
112
+ * Determines the version of a Flaunch coin
77
113
  * @param coinAddress - The address of the coin to check
78
- * @returns Promise<boolean> - True if the coin is V1, false if V1.1
114
+ * @returns Promise<FlaunchVersion> - The version of the coin
115
+ */
116
+ getCoinVersion(coinAddress: Address): Promise<FlaunchVersion>;
117
+ /**
118
+ * Gets the position manager address for a given version
119
+ * @param version - The version to get the position manager address for
120
+ */
121
+ getPositionManager(version: FlaunchVersion): ReadFlaunchPositionManager | ReadFlaunchPositionManagerV1_1 | ReadAnyPositionManager;
122
+ /**
123
+ * Gets the fair launch address for a given version
124
+ * @param version - The version to get the fair launch address for
79
125
  */
80
- isV1Coin(coinAddress: Address): Promise<boolean>;
126
+ getFairLaunch(version: FlaunchVersion): ReadFairLaunch | ReadFairLaunchV1_1;
127
+ /**
128
+ * Gets the bid wall address for a given version
129
+ * @param version - The version to get the bid wall address for
130
+ */
131
+ getBidWall(version: FlaunchVersion): ReadBidWall | AnyBidWall | ReadBidWallV1_1;
132
+ getPositionManagerAddress(version: FlaunchVersion): `0x${string}`;
133
+ getFairLaunchAddress(version: FlaunchVersion): `0x${string}`;
134
+ getBidWallAddress(version: FlaunchVersion): `0x${string}`;
81
135
  /**
82
136
  * Retrieves metadata for a given Flaunch coin
83
137
  * @param coinAddress - The address of the coin
@@ -118,61 +172,37 @@ export declare class ReadFlaunchSDK {
118
172
  telegramUrl: any;
119
173
  }[]>;
120
174
  /**
121
- * Watches for pool creation events on V1 contracts
122
- * @param params - Parameters for watching pool creation
123
- * @returns Subscription to pool creation events
124
- */
125
- watchPoolCreatedV1(params: WatchPoolCreatedParams): Promise<{
126
- cleanup: () => void;
127
- pollPoolCreatedNow: () => Promise<void>;
128
- }>;
129
- /**
130
- * Watches for pool creation events on V1.1 contracts
175
+ * Watches for pool creation events
131
176
  * @param params - Parameters for watching pool creation
177
+ * @param version - Version of Flaunch to use (defaults to V1_1)
132
178
  * @returns Subscription to pool creation events
133
179
  */
134
- watchPoolCreated(params: WatchPoolCreatedParams): Promise<{
180
+ watchPoolCreated(params: WatchPoolCreatedParams, version?: FlaunchVersion): Promise<{
135
181
  cleanup: () => void;
136
182
  pollPoolCreatedNow: () => Promise<void>;
137
183
  }>;
138
184
  /**
139
- * Polls for current pool creation events on V1 contracts
185
+ * Polls for current pool creation events
186
+ * @param version - Version of Flaunch to use (defaults to V1_1)
140
187
  * @returns Current pool creation events or undefined if polling is not available
141
188
  */
142
- pollPoolCreatedNowV1(): Promise<void> | undefined;
189
+ pollPoolCreatedNow(version?: FlaunchVersion): Promise<void> | undefined;
143
190
  /**
144
- * Polls for current pool creation events on V1.1 contracts
145
- * @returns Current pool creation events or undefined if polling is not available
146
- */
147
- pollPoolCreatedNow(): Promise<void> | undefined;
148
- /**
149
- * Watches for pool swap events on V1 contracts
191
+ * Watches for pool swap events
150
192
  * @param params - Parameters for watching pool swaps including optional coin filter
193
+ * @param version - Version of Flaunch to use (defaults to V1_1)
151
194
  * @returns Subscription to pool swap events
152
195
  */
153
- watchPoolSwapV1(params: WatchPoolSwapParams): Promise<{
196
+ watchPoolSwap(params: WatchPoolSwapParams, version?: FlaunchVersion): Promise<{
154
197
  cleanup: () => void;
155
198
  pollPoolSwapNow: () => Promise<void>;
156
199
  }>;
157
200
  /**
158
- * Watches for pool swap events on V1.1 contracts
159
- * @param params - Parameters for watching pool swaps including optional coin filter
160
- * @returns Subscription to pool swap events
161
- */
162
- watchPoolSwap(params: WatchPoolSwapParams): Promise<{
163
- cleanup: () => void;
164
- pollPoolSwapNow: () => Promise<void>;
165
- }>;
166
- /**
167
- * Polls for current pool swap events on V1 contracts
168
- * @returns Current pool swap events or undefined if polling is not available
169
- */
170
- pollPoolSwapNowV1(): Promise<void> | undefined;
171
- /**
172
- * Polls for current pool swap events on V1.1 contracts
201
+ * Polls for current pool swap events
202
+ * @param version - Version of Flaunch to use (defaults to V1_1)
173
203
  * @returns Current pool swap events or undefined if polling is not available
174
204
  */
175
- pollPoolSwapNow(): Promise<void> | undefined;
205
+ pollPoolSwapNow(version?: FlaunchVersion): Promise<void> | undefined;
176
206
  /**
177
207
  * Gets information about a liquidity position
178
208
  * @param params - Parameters for querying position info
@@ -190,30 +220,50 @@ export declare class ReadFlaunchSDK {
190
220
  /**
191
221
  * Gets the current tick for a given coin's pool
192
222
  * @param coinAddress - The address of the coin
193
- * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
223
+ * @param version - Optional specific version to use. If not provided, will be determined automatically
194
224
  * @returns Promise<number> - The current tick of the pool
195
225
  */
196
- currentTick(coinAddress: Address, isV1Coin?: boolean): Promise<number>;
226
+ currentTick(coinAddress: Address, version?: FlaunchVersion): Promise<number>;
197
227
  /**
198
228
  * Calculates the coin price in ETH based on the current tick
199
229
  * @param coinAddress - The address of the coin
200
- * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
230
+ * @param version - Optional specific version to use. If not provided, will be determined automatically
201
231
  * @returns Promise<string> - The price of the coin in ETH with 18 decimals precision
202
232
  */
203
- coinPriceInETH(coinAddress: Address, isV1Coin?: boolean): Promise<string>;
233
+ coinPriceInETH(coinAddress: Address, version?: FlaunchVersion): Promise<string>;
234
+ /**
235
+ * Calculates the coin price in USD based on the current ETH/USDC price
236
+ * @param coinAddress - The address of the coin
237
+ * @param version - Optional specific version to use. If not provided, will be determined automatically
238
+ * @returns Promise<string> - The price of the coin in USD with 2 decimal precision
239
+ */
240
+ coinPriceInUSD({ coinAddress, version, drift, }: {
241
+ coinAddress: Address;
242
+ version?: FlaunchVersion;
243
+ drift?: Drift;
244
+ }): Promise<string>;
245
+ coinMarketCapInUSD({ coinAddress, version, drift, }: {
246
+ coinAddress: Address;
247
+ version?: FlaunchVersion;
248
+ drift?: Drift;
249
+ }): Promise<string>;
204
250
  /**
205
251
  * Gets the current ETH/USDC price
206
252
  * @param drift - Optional drift instance to get price from Base Mainnet
207
253
  * @returns Promise<number> - The current ETH/USDC price
208
254
  */
209
255
  getETHUSDCPrice(drift?: Drift): Promise<number>;
256
+ initialSqrtPriceX96(params: {
257
+ coinAddress: Address;
258
+ initialMarketCapUSD: number;
259
+ }): Promise<bigint>;
210
260
  /**
211
261
  * Gets information about a fair launch for a given coin
212
262
  * @param coinAddress - The address of the coin
213
- * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
263
+ * @param version - Optional specific version to use. If not provided, will be determined automatically
214
264
  * @returns Fair launch information from the appropriate contract version
215
265
  */
216
- fairLaunchInfo(coinAddress: Address, isV1Coin?: boolean): Promise<{
266
+ fairLaunchInfo(coinAddress: Address, version?: FlaunchVersion): Promise<{
217
267
  startsAt: bigint;
218
268
  endsAt: bigint;
219
269
  initialTick: number;
@@ -224,31 +274,31 @@ export declare class ReadFlaunchSDK {
224
274
  /**
225
275
  * Checks if a fair launch is currently active for a given coin
226
276
  * @param coinAddress - The address of the coin
227
- * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
277
+ * @param version - Optional specific version to use. If not provided, will be determined automatically
228
278
  * @returns Promise<boolean> - True if fair launch is active, false otherwise
229
279
  */
230
- isFairLaunchActive(coinAddress: Address, isV1Coin?: boolean): Promise<boolean>;
280
+ isFairLaunchActive(coinAddress: Address, version?: FlaunchVersion): Promise<boolean>;
231
281
  /**
232
282
  * Gets the duration of a fair launch for a given coin
233
283
  * @param coinAddress - The address of the coin
234
- * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
284
+ * @param version - Optional specific version to use. If not provided, will be determined automatically
235
285
  * @returns Promise<number> - The duration in seconds (30 minutes for V1, variable for V1.1)
236
286
  */
237
- fairLaunchDuration(coinAddress: Address, isV1Coin?: boolean): Promise<number | bigint>;
287
+ fairLaunchDuration(coinAddress: Address, version?: FlaunchVersion): Promise<number | bigint>;
238
288
  /**
239
289
  * Gets the initial tick for a fair launch
240
290
  * @param coinAddress - The address of the coin
241
- * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
291
+ * @param version - Optional specific version to use. If not provided, will be determined automatically
242
292
  * @returns Promise<number> - The initial tick value
243
293
  */
244
- initialTick(coinAddress: Address, isV1Coin?: boolean): Promise<number>;
294
+ initialTick(coinAddress: Address, version?: FlaunchVersion): Promise<number>;
245
295
  /**
246
296
  * Gets information about the ETH-only position in a fair launch
247
297
  * @param coinAddress - The address of the coin
248
- * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
298
+ * @param version - Optional specific version to use. If not provided, will be determined automatically
249
299
  * @returns Promise<{flETHAmount: bigint, coinAmount: bigint, tickLower: number, tickUpper: number}> - Position details
250
300
  */
251
- fairLaunchETHOnlyPosition(coinAddress: Address, isV1Coin?: boolean): Promise<{
301
+ fairLaunchETHOnlyPosition(coinAddress: Address, version?: FlaunchVersion): Promise<{
252
302
  flETHAmount: bigint;
253
303
  coinAmount: bigint;
254
304
  tickLower: number;
@@ -257,10 +307,10 @@ export declare class ReadFlaunchSDK {
257
307
  /**
258
308
  * Gets information about the coin-only position in a fair launch
259
309
  * @param coinAddress - The address of the coin
260
- * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
310
+ * @param version - Optional specific version to use. If not provided, will be determined automatically
261
311
  * @returns Promise<{flETHAmount: bigint, coinAmount: bigint, tickLower: number, tickUpper: number}> - Position details
262
312
  */
263
- fairLaunchCoinOnlyPosition(coinAddress: Address, isV1Coin?: boolean): Promise<{
313
+ fairLaunchCoinOnlyPosition(coinAddress: Address, version?: FlaunchVersion): Promise<{
264
314
  flETHAmount: bigint;
265
315
  coinAmount: bigint;
266
316
  tickLower: number;
@@ -269,16 +319,30 @@ export declare class ReadFlaunchSDK {
269
319
  /**
270
320
  * Gets information about the bid wall position for a coin
271
321
  * @param coinAddress - The address of the coin
272
- * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
322
+ * @param version - Optional specific version to use. If not provided, will be determined automatically
273
323
  * @returns Promise<{flETHAmount: bigint, coinAmount: bigint, pendingEth: bigint, tickLower: number, tickUpper: number}> - Bid wall position details
274
324
  */
275
- bidWallPosition(coinAddress: Address, isV1Coin?: boolean): Promise<{
325
+ bidWallPosition(coinAddress: Address, version?: FlaunchVersion): Promise<{
276
326
  flETHAmount: bigint;
277
327
  coinAmount: bigint;
278
328
  pendingEth: bigint;
279
329
  tickLower: number;
280
330
  tickUpper: number;
281
331
  }>;
332
+ /**
333
+ * Gets the ETH balance for the creator to claim
334
+ * @param creator - The address of the creator to check
335
+ * @param isV1 - Optional boolean to check the balance for V1. V1.1 & AnyPositionManager use the same FeeEscrow contract
336
+ * @returns The balance of the creator
337
+ */
338
+ creatorRevenue(creator: Address, isV1?: boolean): Promise<bigint>;
339
+ /**
340
+ * Gets the balance of a recipient for a given coin
341
+ * @param recipient - The address of the recipient to check
342
+ * @param coinAddress - The address of the coin
343
+ * @returns Promise<bigint> - The balance of the recipient
344
+ */
345
+ referralBalance(recipient: Address, coinAddress: Address): Promise<bigint>;
282
346
  /**
283
347
  * Gets the claimable balance of ETH for the recipient from a revenue manager
284
348
  * @param params - Parameters for checking the balance
@@ -335,10 +399,10 @@ export declare class ReadFlaunchSDK {
335
399
  /**
336
400
  * Gets the pool ID for a given coin
337
401
  * @param coinAddress - The address of the coin
338
- * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
402
+ * @param version - Optional specific version to use
339
403
  * @returns Promise<string> - The pool ID
340
404
  */
341
- poolId(coinAddress: Address, isV1Coin?: boolean): Promise<`0x${string}`>;
405
+ poolId(coinAddress: Address, version?: FlaunchVersion): Promise<`0x${string}`>;
342
406
  /**
343
407
  * Gets the flaunching fee for a given initial price and slippage percent
344
408
  * @param params.sender - The address of the sender
@@ -367,26 +431,26 @@ export declare class ReadFlaunchSDK {
367
431
  * Gets a quote for selling an exact amount of tokens for ETH
368
432
  * @param coinAddress - The address of the token to sell
369
433
  * @param amountIn - The exact amount of tokens to sell
370
- * @param isV1Coin - Optional flag to specify if token is V1. If not provided, V1.1 is assumed
434
+ * @param version - Optional specific version to use
371
435
  * @returns Promise<bigint> - The expected amount of ETH to receive
372
436
  */
373
- getSellQuoteExactInput(coinAddress: Address, amountIn: bigint, isV1Coin?: boolean): Promise<bigint>;
437
+ getSellQuoteExactInput(coinAddress: Address, amountIn: bigint, version?: FlaunchVersion): Promise<bigint>;
374
438
  /**
375
439
  * Gets a quote for buying tokens with an exact amount of ETH
376
440
  * @param coinAddress - The address of the token to buy
377
441
  * @param ethIn - The exact amount of ETH to spend
378
- * @param isV1Coin - Optional flag to specify if token is V1. If not provided, V1.1 is assumed
442
+ * @param version - Optional specific version to use
379
443
  * @returns Promise<bigint> - The expected amount of tokens to receive
380
444
  */
381
- getBuyQuoteExactInput(coinAddress: Address, amountIn: bigint, isV1Coin?: boolean): Promise<bigint>;
445
+ getBuyQuoteExactInput(coinAddress: Address, amountIn: bigint, version?: FlaunchVersion): Promise<bigint>;
382
446
  /**
383
447
  * Gets a quote for buying an exact amount of tokens with ETH
384
448
  * @param coinAddress - The address of the token to buy
385
449
  * @param coinOut - The exact amount of tokens to receive
386
- * @param isV1Coin - Optional flag to specify if token is V1. If not provided, V1.1 is assumed
450
+ * @param version - Optional specific version to use
387
451
  * @returns Promise<bigint> - The required amount of ETH to spend
388
452
  */
389
- getBuyQuoteExactOutput(coinAddress: Address, amountOut: bigint, isV1Coin?: boolean): Promise<bigint>;
453
+ getBuyQuoteExactOutput(coinAddress: Address, amountOut: bigint, version?: FlaunchVersion): Promise<bigint>;
390
454
  /**
391
455
  * Determines if flETH is currency0 in the pool
392
456
  * @param coinAddress - The address of the coin
@@ -400,11 +464,29 @@ export declare class ReadFlaunchSDK {
400
464
  * @param resolverFn - Custom function to resolve IPFS URIs
401
465
  */
402
466
  setIPFSResolver(resolverFn: (ipfsHash: string) => string): void;
467
+ /**
468
+ * Parses a transaction hash to extract PoolSwap events and return parsed swap data
469
+ * @param params - Object containing parsing parameters
470
+ * @param params.txHash - The transaction hash to parse
471
+ * @param params.version - The Flaunch version to use for parsing
472
+ * @param params.flETHIsCurrencyZero - Whether flETH is currency 0 in the pool (optional)
473
+ * @returns Parsed swap log or undefined if no PoolSwap event found.
474
+ * If flETHIsCurrencyZero is provided, returns typed swap data with BUY/SELL information.
475
+ * If flETHIsCurrencyZero is undefined, returns basic swap log without parsed delta.
476
+ */
477
+ parseSwapTx<T extends boolean | undefined = undefined>(params: {
478
+ txHash: Hex;
479
+ version: FlaunchVersion;
480
+ flETHIsCurrencyZero?: T;
481
+ }): Promise<T extends boolean ? GenericBuySwapLog | GenericSellSwapLog | undefined : GenericBaseSwapLog | undefined>;
403
482
  }
404
483
  export declare class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
405
484
  drift: Drift<ReadWriteAdapter>;
485
+ readonly readWritePositionManager: ReadWriteFlaunchPositionManager;
406
486
  readonly readWritePositionManagerV1_1: ReadWriteFlaunchPositionManagerV1_1;
407
- readonly readWriteFastFlaunchZap: ReadWriteFastFlaunchZap;
487
+ readonly readWriteAnyPositionManager: ReadWriteAnyPositionManager;
488
+ readonly readWriteFeeEscrow: ReadWriteFeeEscrow;
489
+ readonly readWriteReferralEscrow: ReadWriteReferralEscrow;
408
490
  readonly readWriteFlaunchZap: ReadWriteFlaunchZap;
409
491
  readonly readWriteTreasuryManagerFactory: ReadWriteTreasuryManagerFactory;
410
492
  readonly readWritePermit2: ReadWritePermit2;
@@ -421,31 +503,17 @@ export declare class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
421
503
  protocolFeePercent: number;
422
504
  }): Promise<Address>;
423
505
  /**
424
- * Creates a new Flaunch on V1.1
506
+ * Creates a new Flaunch on the specified version
425
507
  * @param params - Parameters for creating the Flaunch
426
508
  * @returns Transaction response
427
509
  */
428
510
  flaunch(params: FlaunchParams): Promise<`0x${string}`>;
429
511
  /**
430
- * Creates a new Flaunch on V1.1 with IPFS metadata
512
+ * Creates a new Flaunch with IPFS metadata and optional version specification
431
513
  * @param params - Parameters for creating the Flaunch with IPFS data
432
514
  * @returns Transaction response
433
515
  */
434
516
  flaunchIPFS(params: FlaunchIPFSParams): Promise<`0x${string}`>;
435
- /**
436
- * Creates a new fast Flaunch on V1.1
437
- * @param params - Parameters for creating the fast Flaunch
438
- * @throws Error if FastFlaunchZap is not deployed on the current chain
439
- * @returns Transaction response
440
- */
441
- fastFlaunch(params: FastFlaunchParams): Promise<`0x${string}`>;
442
- /**
443
- * Creates a new fast Flaunch on V1.1 with IPFS metadata
444
- * @param params - Parameters for creating the fast Flaunch with IPFS data
445
- * @throws Error if FastFlaunchZap is not deployed on the current chain
446
- * @returns Transaction response
447
- */
448
- fastFlaunchIPFS(params: FastFlaunchIPFSParams): Promise<`0x${string}`>;
449
517
  /**
450
518
  * Creates a new Flaunch with revenue manager configuration
451
519
  * @param params - Parameters for creating the Flaunch with revenue manager
@@ -460,6 +528,24 @@ export declare class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
460
528
  * @returns Transaction response
461
529
  */
462
530
  flaunchIPFSWithRevenueManager(params: FlaunchWithRevenueManagerIPFSParams): Promise<`0x${string}`>;
531
+ /**
532
+ * Creates a new Flaunch that splits the creator fees to the creator and a list of recipients
533
+ * @param params - Parameters for creating the Flaunch with split manager
534
+ * @returns Transaction response
535
+ */
536
+ flaunchWithSplitManager(params: FlaunchWithSplitManagerParams): Promise<`0x${string}`>;
537
+ /**
538
+ * Creates a new Flaunch that splits the creator fees to the creator and a list of recipients, storing the token metadata on IPFS
539
+ * @param params - Parameters for creating the Flaunch with split manager including all IPFS metadata
540
+ * @returns Transaction response
541
+ */
542
+ flaunchIPFSWithSplitManager(params: FlaunchWithSplitManagerIPFSParams): Promise<`0x${string}`>;
543
+ /**
544
+ * Creates a new Flaunch with AnyPositionManager for external coins
545
+ * @param params - Parameters for creating the Flaunch with AnyPositionManager
546
+ * @returns Transaction response
547
+ */
548
+ anyFlaunch(params: AnyFlaunchParams): Promise<`0x${string}`>;
463
549
  /**
464
550
  * Gets the balance of a specific coin for the connected wallet
465
551
  * @param coinAddress - The address of the coin to check
@@ -469,17 +555,17 @@ export declare class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
469
555
  /**
470
556
  * Buys a coin with ETH
471
557
  * @param params - Parameters for buying the coin including amount, slippage, and referrer
472
- * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
558
+ * @param version - Optional specific version to use. If not provided, will determine automatically
473
559
  * @returns Transaction response for the buy operation
474
560
  */
475
- buyCoin(params: BuyCoinParams, isV1Coin?: boolean): Promise<`0x${string}`>;
561
+ buyCoin(params: BuyCoinParams, version?: FlaunchVersion): Promise<`0x${string}`>;
476
562
  /**
477
563
  * Sells a coin for ETH
478
564
  * @param params - Parameters for selling the coin including amount, slippage, permit data, and referrer
479
- * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
565
+ * @param version - Optional specific version to use. If not provided, will determine automatically
480
566
  * @returns Transaction response for the sell operation
481
567
  */
482
- sellCoin(params: SellCoinParams, isV1Coin?: boolean): Promise<`0x${string}`>;
568
+ sellCoin(params: SellCoinParams, version?: FlaunchVersion): Promise<`0x${string}`>;
483
569
  /**
484
570
  * Gets the typed data for a Permit2 signature
485
571
  * @param coinAddress - The address of the coin to permit
@@ -508,6 +594,24 @@ export declare class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
508
594
  allowance: bigint;
509
595
  nonce: number;
510
596
  }>;
597
+ /**
598
+ * Withdraws the creator's share of the revenue
599
+ * @param params - Parameters for withdrawing the creator's share of the revenue
600
+ * @param params.recipient - The address to withdraw the revenue to. Defaults to the connected wallet
601
+ * @param params.isV1 - Optional boolean to withdraw from V1. V1.1 & AnyPositionManager use the same FeeEscrow contract
602
+ * @returns Transaction response
603
+ */
604
+ withdrawCreatorRevenue(params: {
605
+ recipient?: Address;
606
+ isV1?: boolean;
607
+ }): Promise<`0x${string}`>;
608
+ /**
609
+ * Claims the referral balance for a given recipient
610
+ * @param coins - The addresses of the coins to claim
611
+ * @param recipient - The address of the recipient to claim the balance for
612
+ * @returns Transaction response
613
+ */
614
+ claimReferralBalance(coins: Address[], recipient: Address): Promise<`0x${string}`>;
511
615
  /**
512
616
  * Claims the protocol's share of the revenue
513
617
  * @param params - Parameters for claiming the protocol's share of the revenue
@@ -1 +1 @@
1
- {"version":3,"file":"FlaunchSDK.d.ts","sourceRoot":"","sources":["../../src/sdk/FlaunchSDK.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,KAAK,OAAO,EACb,MAAM,iBAAiB,CAAC;AAiCzB,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,mBAAmB,IAAI,kCAAkC,EAC1D,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,eAAe,EACf,kBAAkB,EACnB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,+BAA+B,EAC/B,mCAAmC,EACpC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE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AE,aAAa,EAAE,OAAO,CAAC,EAAE,cAAc;IAyE7D;;;;;OAKG;IACG,QAAQ,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc;IAgD/D;;;;;OAKG;IACG,mBAAmB,CAAC,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM;;;;;;;;;;;;;IAgBjE;;;;OAIG;IACG,2BAA2B,CAAC,WAAW,EAAE,OAAO;;;;IAatD;;;;;;OAMG;IACG,sBAAsB,CAAC,MAAM,EAAE;QACnC,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,IAAI,CAAC,EAAE,OAAO,CAAC;KAChB;IAUD;;;;;OAKG;IACH,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO;IAIzD;;;;OAIG;IACH,2BAA2B,CAAC,MAAM,EAAE;QAAE,qBAAqB,EAAE,OAAO,CAAA;KAAE;IAQtE;;;;OAIG;IACH,0BAA0B,CAAC,MAAM,EAAE;QAAE,qBAAqB,EAAE,OAAO,CAAA;KAAE;IAQrE;;;;OAIG;IACH,mCAAmC,CAAC,MAAM,EAAE;QAC1C,qBAAqB,EAAE,OAAO,CAAC;QAC/B,aAAa,EAAE;YAAE,OAAO,EAAE,OAAO,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KACxD;CAOF"}
@@ -0,0 +1,21 @@
1
+ import { Drift, ReadWriteAdapter } from "@delvtech/drift";
2
+ import type { PublicClient, WalletClient } from "viem";
3
+ export type CreateDriftParams = {
4
+ publicClient: PublicClient;
5
+ walletClient?: WalletClient;
6
+ };
7
+ /**
8
+ * Creates a read-only Drift instance with only public client
9
+ * @param params - Parameters with only publicClient
10
+ * @returns Drift instance for read-only operations
11
+ * @throws Error if publicClient.chain is not configured
12
+ */
13
+ export declare function createDrift(params: Omit<CreateDriftParams, "walletClient">): Drift;
14
+ /**
15
+ * Creates a read-write Drift instance with both public and wallet clients
16
+ * @param params - Parameters with both publicClient and walletClient
17
+ * @returns Drift instance for read and write operations
18
+ * @throws Error if publicClient.chain is not configured
19
+ */
20
+ export declare function createDrift(params: Required<CreateDriftParams>): Drift<ReadWriteAdapter>;
21
+ //# sourceMappingURL=drift.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drift.d.ts","sourceRoot":"","sources":["../../src/sdk/drift.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EACL,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEvD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,cAAc,CAAC,GAC9C,KAAK,CAAC;AACT;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAClC,KAAK,CAAC,gBAAgB,CAAC,CAAC"}
package/dist/types.d.ts CHANGED
@@ -31,4 +31,13 @@ export interface IPFSParams {
31
31
  };
32
32
  pinataConfig: PinataConfig;
33
33
  }
34
+ /**
35
+ * Enumeration of Flaunch contract versions
36
+ */
37
+ export declare enum FlaunchVersion {
38
+ V1 = "V1",
39
+ V1_1 = "V1_1",
40
+ V1_1_1 = "V1_1_1",
41
+ ANY = "ANY"
42
+ }
34
43
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,WAAW,SAAS;IACxB,CAAC,OAAO,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IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE;QACR,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED;;GAEG;AACH,oBAAY,cAAc;IACxB,EAAE,OAAO;IACT,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,GAAG,QAAQ;CACZ"}
@@ -0,0 +1,43 @@
1
+ export interface SwapLogArgs {
2
+ flAmount0: bigint;
3
+ flAmount1: bigint;
4
+ flFee0: bigint;
5
+ flFee1: bigint;
6
+ ispAmount0: bigint;
7
+ ispAmount1: bigint;
8
+ ispFee0: bigint;
9
+ ispFee1: bigint;
10
+ uniAmount0: bigint;
11
+ uniAmount1: bigint;
12
+ uniFee0: bigint;
13
+ uniFee1: bigint;
14
+ }
15
+ export interface SwapFees {
16
+ isInFLETH: boolean;
17
+ amount: bigint;
18
+ }
19
+ export interface BuySwapData {
20
+ type: "BUY";
21
+ delta: {
22
+ coinsBought: bigint;
23
+ flETHSold: bigint;
24
+ fees: SwapFees;
25
+ };
26
+ }
27
+ export interface SellSwapData {
28
+ type: "SELL";
29
+ delta: {
30
+ coinsSold: bigint;
31
+ flETHBought: bigint;
32
+ fees: SwapFees;
33
+ };
34
+ }
35
+ export type ParsedSwapData = BuySwapData | SellSwapData;
36
+ /**
37
+ * Parses raw swap log arguments into structured swap data
38
+ * @param args - The swap log arguments
39
+ * @param flETHIsCurrencyZero - Whether flETH is currency 0 in the pool
40
+ * @returns Parsed swap data with type and delta information
41
+ */
42
+ export declare function parseSwapData(args: SwapLogArgs, flETHIsCurrencyZero: boolean): ParsedSwapData;
43
+ //# sourceMappingURL=parseSwap.d.ts.map