@flaunch/sdk 0.3.1 → 0.4.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 (86) hide show
  1. package/README.md +78 -0
  2. package/dist/abi/BidWallV1_1.d.ts +740 -0
  3. package/dist/abi/BidWallV1_1.d.ts.map +1 -0
  4. package/dist/abi/FairLaunchV1_1.d.ts +522 -0
  5. package/dist/abi/FairLaunchV1_1.d.ts.map +1 -0
  6. package/dist/abi/FastFlaunchZap.d.ts +30 -20
  7. package/dist/abi/FastFlaunchZap.d.ts.map +1 -1
  8. package/dist/abi/FlaunchPositionManagerV1_1.d.ts +2053 -0
  9. package/dist/abi/FlaunchPositionManagerV1_1.d.ts.map +1 -0
  10. package/dist/abi/FlaunchV1_1.d.ts +850 -0
  11. package/dist/abi/FlaunchV1_1.d.ts.map +1 -0
  12. package/dist/abi/FlaunchZap.d.ts +330 -0
  13. package/dist/abi/FlaunchZap.d.ts.map +1 -0
  14. package/dist/abi/Multicall.d.ts +333 -0
  15. package/dist/abi/Multicall.d.ts.map +1 -0
  16. package/dist/abi/RevenueManager.d.ts +648 -0
  17. package/dist/abi/RevenueManager.d.ts.map +1 -0
  18. package/dist/abi/TreasuryManagerFactory.d.ts +434 -0
  19. package/dist/abi/TreasuryManagerFactory.d.ts.map +1 -0
  20. package/dist/abi/index.cjs +27 -58
  21. package/dist/abi/index.cjs.map +1 -1
  22. package/dist/abi/index.js +27 -58
  23. package/dist/abi/index.js.map +1 -1
  24. package/dist/addresses/index.cjs +127 -91
  25. package/dist/addresses/index.cjs.map +1 -1
  26. package/dist/addresses/index.js +121 -92
  27. package/dist/addresses/index.js.map +1 -1
  28. package/dist/addresses.d.ts +7 -0
  29. package/dist/addresses.d.ts.map +1 -1
  30. package/dist/clients/BidWallClient.d.ts +20 -0
  31. package/dist/clients/BidWallClient.d.ts.map +1 -1
  32. package/dist/clients/BidWallV1_1Client.d.ts +46 -0
  33. package/dist/clients/BidWallV1_1Client.d.ts.map +1 -0
  34. package/dist/clients/FairLaunchClient.d.ts +20 -0
  35. package/dist/clients/FairLaunchClient.d.ts.map +1 -1
  36. package/dist/clients/FairLaunchV1_1Client.d.ts +50 -0
  37. package/dist/clients/FairLaunchV1_1Client.d.ts.map +1 -0
  38. package/dist/clients/FastFlaunchClient.d.ts +40 -0
  39. package/dist/clients/FastFlaunchClient.d.ts.map +1 -1
  40. package/dist/clients/FlaunchClient.d.ts +26 -0
  41. package/dist/clients/FlaunchClient.d.ts.map +1 -1
  42. package/dist/clients/FlaunchPositionManagerV1_1Client.d.ts +90 -0
  43. package/dist/clients/FlaunchPositionManagerV1_1Client.d.ts.map +1 -0
  44. package/dist/clients/FlaunchV1_1Client.d.ts +31 -0
  45. package/dist/clients/FlaunchV1_1Client.d.ts.map +1 -0
  46. package/dist/clients/FlaunchZapClient.d.ts +70 -0
  47. package/dist/clients/FlaunchZapClient.d.ts.map +1 -0
  48. package/dist/clients/MemecoinClient.d.ts +27 -0
  49. package/dist/clients/MemecoinClient.d.ts.map +1 -1
  50. package/dist/clients/MulticallClient.d.ts +16 -0
  51. package/dist/clients/MulticallClient.d.ts.map +1 -0
  52. package/dist/clients/Permit2Client.d.ts +17 -0
  53. package/dist/clients/Permit2Client.d.ts.map +1 -1
  54. package/dist/clients/QuoterClient.d.ts +39 -3
  55. package/dist/clients/QuoterClient.d.ts.map +1 -1
  56. package/dist/clients/RevenueManagerClient.d.ts +68 -0
  57. package/dist/clients/RevenueManagerClient.d.ts.map +1 -0
  58. package/dist/clients/StateViewClient.d.ts +30 -0
  59. package/dist/clients/StateViewClient.d.ts.map +1 -1
  60. package/dist/clients/TreasuryManagerFactoryClient.d.ts +24 -0
  61. package/dist/clients/TreasuryManagerFactoryClient.d.ts.map +1 -0
  62. package/dist/helpers/chainIdToChain.d.ts +5 -0
  63. package/dist/helpers/chainIdToChain.d.ts.map +1 -0
  64. package/dist/helpers/index.cjs +5310 -0
  65. package/dist/helpers/index.cjs.map +1 -1
  66. package/dist/helpers/index.d.ts +1 -0
  67. package/dist/helpers/index.d.ts.map +1 -1
  68. package/dist/helpers/index.js +5313 -4
  69. package/dist/helpers/index.js.map +1 -1
  70. package/dist/hooks/FlaunchPositionManagerHooks.d.ts +42 -0
  71. package/dist/hooks/FlaunchPositionManagerHooks.d.ts.map +1 -1
  72. package/dist/hooks/index.cjs +95 -0
  73. package/dist/hooks/index.cjs.map +1 -1
  74. package/dist/hooks/index.js +94 -1
  75. package/dist/hooks/index.js.map +1 -1
  76. package/dist/index.cjs.js +17284 -11191
  77. package/dist/index.cjs.js.map +1 -1
  78. package/dist/index.esm.js +17282 -11197
  79. package/dist/index.esm.js.map +1 -1
  80. package/dist/index.umd.js +1 -1
  81. package/dist/index.umd.js.map +1 -1
  82. package/dist/sdk/FlaunchSDK.d.ts +342 -15
  83. package/dist/sdk/FlaunchSDK.d.ts.map +1 -1
  84. package/dist/utils/universalRouter.d.ts +2 -0
  85. package/dist/utils/universalRouter.d.ts.map +1 -1
  86. package/package.json +8 -3
@@ -1,15 +1,21 @@
1
1
  import { Drift, HexString, ReadWriteAdapter, type Address } from "@delvtech/drift";
2
- import { ReadFlaunchPositionManager, ReadWriteFlaunchPositionManager, WatchPoolCreatedParams, FlaunchParams, FlaunchIPFSParams, WatchPoolSwapParams as WatchPoolSwapParamsPositionManager } from "../clients/FlaunchPositionManagerClient";
2
+ import { ReadFlaunchPositionManager, WatchPoolCreatedParams, WatchPoolSwapParams as WatchPoolSwapParamsPositionManager } from "../clients/FlaunchPositionManagerClient";
3
3
  import { ReadPoolManager, PositionInfoParams } from "../clients/PoolManagerClient";
4
4
  import { ReadStateView } from "../clients/StateViewClient";
5
5
  import { ReadFairLaunch } from "../clients/FairLaunchClient";
6
6
  import { ReadBidWall } from "../clients/BidWallClient";
7
7
  import { ReadWriteFastFlaunchZap, FastFlaunchParams, FastFlaunchIPFSParams } from "../clients/FastFlaunchClient";
8
+ import { ReadWriteFlaunchZap, FlaunchWithRevenueManagerParams, FlaunchWithRevenueManagerIPFSParams } from "../clients/FlaunchZapClient";
8
9
  import { ReadFlaunch } from "../clients/FlaunchClient";
9
10
  import { ReadQuoter } from "clients/QuoterClient";
11
+ import { ReadPermit2 } from "clients/Permit2Client";
12
+ import { ReadFlaunchPositionManagerV1_1, ReadWriteFlaunchPositionManagerV1_1, FlaunchParams, FlaunchIPFSParams } from "clients/FlaunchPositionManagerV1_1Client";
13
+ import { ReadBidWallV1_1 } from "clients/BidWallV1_1Client";
14
+ import { ReadFairLaunchV1_1 } from "clients/FairLaunchV1_1Client";
15
+ import { ReadFlaunchV1_1 } from "clients/FlaunchV1_1Client";
16
+ import { ReadWriteTreasuryManagerFactory } from "clients/TreasuryManagerFactoryClient";
10
17
  import { CoinMetadata } from "types";
11
18
  import { PermitSingle } from "utils/universalRouter";
12
- import { ReadPermit2 } from "clients/Permit2Client";
13
19
  type WatchPoolSwapParams = Omit<WatchPoolSwapParamsPositionManager<boolean>, "flETHIsCurrencyZero"> & {
14
20
  filterByCoin?: Address;
15
21
  };
@@ -38,33 +44,125 @@ type SellCoinParams = {
38
44
  permitSingle?: PermitSingle;
39
45
  signature?: HexString;
40
46
  };
47
+ /**
48
+ * Base class for interacting with Flaunch protocol in read-only mode
49
+ */
41
50
  export declare class ReadFlaunchSDK {
42
51
  readonly drift: Drift;
43
52
  readonly chainId: number;
44
53
  readonly TICK_SPACING = 60;
45
54
  readonly readPositionManager: ReadFlaunchPositionManager;
55
+ readonly readPositionManagerV1_1: ReadFlaunchPositionManagerV1_1;
46
56
  readonly readPoolManager: ReadPoolManager;
47
57
  readonly readStateView: ReadStateView;
48
58
  readonly readFairLaunch: ReadFairLaunch;
59
+ readonly readFairLaunchV1_1: ReadFairLaunchV1_1;
49
60
  readonly readBidWall: ReadBidWall;
61
+ readonly readBidWallV1_1: ReadBidWallV1_1;
50
62
  readonly readFlaunch: ReadFlaunch;
63
+ readonly readFlaunchV1_1: ReadFlaunchV1_1;
51
64
  readonly readQuoter: ReadQuoter;
52
65
  readonly readPermit2: ReadPermit2;
53
66
  constructor(chainId: number, drift?: Drift);
67
+ /**
68
+ * Checks if a given coin address is a valid Flaunch coin (either V1 or V1.1)
69
+ * @param coinAddress - The address of the coin to check
70
+ * @returns Promise<boolean> - True if the coin is valid, false otherwise
71
+ */
54
72
  isValidCoin(coinAddress: Address): Promise<boolean>;
73
+ /**
74
+ * Checks if a given coin address is a V1 Flaunch coin
75
+ * @param coinAddress - The address of the coin to check
76
+ * @returns Promise<boolean> - True if the coin is V1, false if V1.1
77
+ */
78
+ isV1Coin(coinAddress: Address): Promise<boolean>;
79
+ /**
80
+ * Retrieves metadata for a given Flaunch coin
81
+ * @param coinAddress - The address of the coin
82
+ * @returns Promise<CoinMetadata & { symbol: string }> - The coin's metadata including name, symbol, description, and social links
83
+ */
55
84
  getCoinMetadata(coinAddress: Address): Promise<CoinMetadata & {
56
85
  symbol: string;
57
86
  }>;
87
+ getCoinMetadataFromTokenId(flaunch: Address, tokenId: bigint): Promise<CoinMetadata & {
88
+ symbol: string;
89
+ }>;
90
+ getCoinMetadataFromTokenIds(params: {
91
+ flaunch: Address;
92
+ tokenId: bigint;
93
+ }[]): Promise<{
94
+ coinAddress: Address;
95
+ name: string;
96
+ symbol: string;
97
+ description: any;
98
+ image: string;
99
+ external_link: any;
100
+ collaborators: any;
101
+ discordUrl: any;
102
+ twitterUrl: any;
103
+ telegramUrl: any;
104
+ }[]>;
105
+ /**
106
+ * Watches for pool creation events on V1 contracts
107
+ * @param params - Parameters for watching pool creation
108
+ * @returns Subscription to pool creation events
109
+ */
110
+ watchPoolCreatedV1(params: WatchPoolCreatedParams): Promise<{
111
+ cleanup: () => void;
112
+ pollPoolCreatedNow: () => Promise<void>;
113
+ }>;
114
+ /**
115
+ * Watches for pool creation events on V1.1 contracts
116
+ * @param params - Parameters for watching pool creation
117
+ * @returns Subscription to pool creation events
118
+ */
58
119
  watchPoolCreated(params: WatchPoolCreatedParams): Promise<{
59
120
  cleanup: () => void;
60
121
  pollPoolCreatedNow: () => Promise<void>;
61
122
  }>;
123
+ /**
124
+ * Polls for current pool creation events on V1 contracts
125
+ * @returns Current pool creation events or undefined if polling is not available
126
+ */
127
+ pollPoolCreatedNowV1(): Promise<void>;
128
+ /**
129
+ * Polls for current pool creation events on V1.1 contracts
130
+ * @returns Current pool creation events or undefined if polling is not available
131
+ */
62
132
  pollPoolCreatedNow(): Promise<void>;
133
+ /**
134
+ * Watches for pool swap events on V1 contracts
135
+ * @param params - Parameters for watching pool swaps including optional coin filter
136
+ * @returns Subscription to pool swap events
137
+ */
138
+ watchPoolSwapV1(params: WatchPoolSwapParams): Promise<{
139
+ cleanup: () => void;
140
+ pollPoolSwapNow: () => Promise<void>;
141
+ }>;
142
+ /**
143
+ * Watches for pool swap events on V1.1 contracts
144
+ * @param params - Parameters for watching pool swaps including optional coin filter
145
+ * @returns Subscription to pool swap events
146
+ */
63
147
  watchPoolSwap(params: WatchPoolSwapParams): Promise<{
64
148
  cleanup: () => void;
65
149
  pollPoolSwapNow: () => Promise<void>;
66
150
  }>;
151
+ /**
152
+ * Polls for current pool swap events on V1 contracts
153
+ * @returns Current pool swap events or undefined if polling is not available
154
+ */
155
+ pollPoolSwapNowV1(): Promise<void>;
156
+ /**
157
+ * Polls for current pool swap events on V1.1 contracts
158
+ * @returns Current pool swap events or undefined if polling is not available
159
+ */
67
160
  pollPoolSwapNow(): Promise<void>;
161
+ /**
162
+ * Gets information about a liquidity position
163
+ * @param params - Parameters for querying position info
164
+ * @returns Position information from the state view contract
165
+ */
68
166
  positionInfo(params: PositionInfoParams): Promise<{
69
167
  liquidity: bigint;
70
168
  feeGrowthInside0LastX128: bigint;
@@ -74,10 +172,33 @@ export declare class ReadFlaunchSDK {
74
172
  feeGrowthInside0LastX128: bigint;
75
173
  feeGrowthInside1LastX128: bigint;
76
174
  }>;
77
- currentTick(coinAddress: Address): Promise<number>;
78
- coinPriceInETH(coinAddress: Address): Promise<string>;
175
+ /**
176
+ * Gets the current tick for a given coin's pool
177
+ * @param coinAddress - The address of the coin
178
+ * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
179
+ * @returns Promise<number> - The current tick of the pool
180
+ */
181
+ currentTick(coinAddress: Address, isV1Coin?: boolean): Promise<number>;
182
+ /**
183
+ * Calculates the coin price in ETH based on the current tick
184
+ * @param coinAddress - The address of the coin
185
+ * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
186
+ * @returns Promise<string> - The price of the coin in ETH with 18 decimals precision
187
+ */
188
+ coinPriceInETH(coinAddress: Address, isV1Coin?: boolean): Promise<string>;
189
+ /**
190
+ * Gets the current ETH/USDC price
191
+ * @param drift - Optional drift instance to get price from Base Mainnet
192
+ * @returns Promise<number> - The current ETH/USDC price
193
+ */
79
194
  getETHUSDCPrice(drift?: Drift): Promise<number>;
80
- fairLaunchInfo(coinAddress: Address): Promise<{
195
+ /**
196
+ * Gets information about a fair launch for a given coin
197
+ * @param coinAddress - The address of the coin
198
+ * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
199
+ * @returns Fair launch information from the appropriate contract version
200
+ */
201
+ fairLaunchInfo(coinAddress: Address, isV1Coin?: boolean): Promise<{
81
202
  startsAt: bigint;
82
203
  endsAt: bigint;
83
204
  initialTick: number;
@@ -85,42 +206,215 @@ export declare class ReadFlaunchSDK {
85
206
  supply: bigint;
86
207
  closed: boolean;
87
208
  }>;
88
- isFairLaunchActive(coinAddress: Address): Promise<boolean>;
89
- fairLaunchDuration(): number;
90
- initialTick(coinAddress: Address): Promise<number>;
91
- fairLaunchETHOnlyPosition(coinAddress: Address): Promise<{
209
+ /**
210
+ * Checks if a fair launch is currently active for a given coin
211
+ * @param coinAddress - The address of the coin
212
+ * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
213
+ * @returns Promise<boolean> - True if fair launch is active, false otherwise
214
+ */
215
+ isFairLaunchActive(coinAddress: Address, isV1Coin?: boolean): Promise<boolean>;
216
+ /**
217
+ * Gets the duration of a fair launch for a given coin
218
+ * @param coinAddress - The address of the coin
219
+ * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
220
+ * @returns Promise<number> - The duration in seconds (30 minutes for V1, variable for V1.1)
221
+ */
222
+ fairLaunchDuration(coinAddress: Address, isV1Coin?: boolean): Promise<number | bigint>;
223
+ /**
224
+ * Gets the initial tick for a fair launch
225
+ * @param coinAddress - The address of the coin
226
+ * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
227
+ * @returns Promise<number> - The initial tick value
228
+ */
229
+ initialTick(coinAddress: Address, isV1Coin?: boolean): Promise<number>;
230
+ /**
231
+ * Gets information about the ETH-only position in a fair launch
232
+ * @param coinAddress - The address of the coin
233
+ * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
234
+ * @returns Promise<{flETHAmount: bigint, coinAmount: bigint, tickLower: number, tickUpper: number}> - Position details
235
+ */
236
+ fairLaunchETHOnlyPosition(coinAddress: Address, isV1Coin?: boolean): Promise<{
92
237
  flETHAmount: bigint;
93
238
  coinAmount: bigint;
94
239
  tickLower: number;
95
240
  tickUpper: number;
96
241
  }>;
97
- fairLaunchCoinOnlyPosition(coinAddress: Address): Promise<{
242
+ /**
243
+ * Gets information about the coin-only position in a fair launch
244
+ * @param coinAddress - The address of the coin
245
+ * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
246
+ * @returns Promise<{flETHAmount: bigint, coinAmount: bigint, tickLower: number, tickUpper: number}> - Position details
247
+ */
248
+ fairLaunchCoinOnlyPosition(coinAddress: Address, isV1Coin?: boolean): Promise<{
98
249
  flETHAmount: bigint;
99
250
  coinAmount: bigint;
100
251
  tickLower: number;
101
252
  tickUpper: number;
102
253
  }>;
103
- bidWallPosition(coinAddress: Address): Promise<{
254
+ /**
255
+ * Gets information about the bid wall position for a coin
256
+ * @param coinAddress - The address of the coin
257
+ * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
258
+ * @returns Promise<{flETHAmount: bigint, coinAmount: bigint, pendingEth: bigint, tickLower: number, tickUpper: number}> - Bid wall position details
259
+ */
260
+ bidWallPosition(coinAddress: Address, isV1Coin?: boolean): Promise<{
104
261
  flETHAmount: bigint;
105
262
  coinAmount: bigint;
106
263
  pendingEth: bigint;
107
264
  tickLower: number;
108
265
  tickUpper: number;
109
266
  }>;
110
- poolId(coinAddress: Address): `0x${string}`;
267
+ /**
268
+ * Gets the claimable balance of ETH for the recipient from a revenue manager
269
+ * @param params - Parameters for checking the balance
270
+ * @param params.revenueManagerAddress - The address of the revenue manager
271
+ * @param params.recipient - The address of the recipient to check
272
+ * @returns Promise<bigint> - The claimable balance of ETH
273
+ */
274
+ revenueManagerBalance(params: {
275
+ revenueManagerAddress: Address;
276
+ recipient: Address;
277
+ }): Promise<bigint>;
278
+ /**
279
+ * Gets the claimable balance of ETH for the protocol from a revenue manager
280
+ * @param revenueManagerAddress - The address of the revenue manager
281
+ * @returns Promise<bigint> - The claimable balance of ETH
282
+ */
283
+ revenueManagerProtocolBalance(revenueManagerAddress: Address): Promise<bigint>;
284
+ /**
285
+ * Gets the total number of tokens managed by a revenue manager
286
+ * @param revenueManagerAddress - The address of the revenue manager
287
+ * @returns Promise<bigint> - The total count of tokens
288
+ */
289
+ revenueManagerTokensCount(revenueManagerAddress: Address): Promise<bigint>;
290
+ /**
291
+ * Gets all tokens created by a specific creator address
292
+ * @param params - Parameters for querying tokens by creator
293
+ * @param params.revenueManagerAddress - The address of the revenue manager
294
+ * @param params.creator - The address of the creator to query tokens for
295
+ * @param params.sortByDesc - Whether to sort the tokens by descending order
296
+ * @returns Promise<Array<{flaunch: Address, tokenId: bigint}>> - Array of token objects containing flaunch address and token ID
297
+ */
298
+ revenueManagerAllTokensByCreator(params: {
299
+ revenueManagerAddress: Address;
300
+ creator: Address;
301
+ sortByDesc?: boolean;
302
+ }): Promise<readonly {
303
+ flaunch: `0x${string}`;
304
+ tokenId: bigint;
305
+ }[]>;
306
+ /**
307
+ * Gets all tokens currently managed by a revenue manager
308
+ * @param params - Parameters for querying tokens in manager
309
+ * @param params.revenueManagerAddress - The address of the revenue manager
310
+ * @param params.sortByDesc - Optional boolean to sort tokens in descending order (default: false)
311
+ * @returns Promise<Array<{flaunch: Address, tokenId: bigint}>> - Array of token objects containing flaunch address and token ID
312
+ */
313
+ revenueManagerAllTokensInManager(params: {
314
+ revenueManagerAddress: Address;
315
+ sortByDesc?: boolean;
316
+ }): Promise<{
317
+ flaunch: `0x${string}`;
318
+ tokenId: bigint;
319
+ }[]>;
320
+ /**
321
+ * Gets the pool ID for a given coin
322
+ * @param coinAddress - The address of the coin
323
+ * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
324
+ * @returns Promise<string> - The pool ID
325
+ */
326
+ poolId(coinAddress: Address, isV1Coin?: boolean): Promise<`0x${string}`>;
327
+ /**
328
+ * Determines if flETH is currency0 in the pool
329
+ * @param coinAddress - The address of the coin
330
+ * @returns boolean - True if flETH is currency0, false otherwise
331
+ */
111
332
  flETHIsCurrencyZero(coinAddress: Address): boolean;
112
333
  }
113
334
  export declare class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
114
- readonly readWritePositionManager: ReadWriteFlaunchPositionManager;
335
+ drift: Drift<ReadWriteAdapter>;
336
+ readonly readWritePositionManagerV1_1: ReadWriteFlaunchPositionManagerV1_1;
115
337
  readonly readWriteFastFlaunchZap: ReadWriteFastFlaunchZap;
338
+ readonly readWriteFlaunchZap: ReadWriteFlaunchZap;
339
+ readonly readWriteTreasuryManagerFactory: ReadWriteTreasuryManagerFactory;
116
340
  constructor(chainId: number, drift?: Drift<ReadWriteAdapter>);
341
+ /**
342
+ * Deploys a new revenue manager
343
+ * @param params - Parameters for deploying the revenue manager
344
+ * @param params.protocolRecipient - The address of the protocol recipient
345
+ * @param params.protocolFeePercent - The percentage of the protocol fee
346
+ * @returns Address of the deployed revenue manager
347
+ */
348
+ deployRevenueManager(params: {
349
+ protocolRecipient: Address;
350
+ protocolFeePercent: number;
351
+ }): Promise<Address>;
352
+ /**
353
+ * Creates a new Flaunch on V1.1
354
+ * @param params - Parameters for creating the Flaunch
355
+ * @returns Transaction response
356
+ */
117
357
  flaunch(params: FlaunchParams): Promise<`0x${string}`>;
358
+ /**
359
+ * Creates a new Flaunch on V1.1 with IPFS metadata
360
+ * @param params - Parameters for creating the Flaunch with IPFS data
361
+ * @returns Transaction response
362
+ */
118
363
  flaunchIPFS(params: FlaunchIPFSParams): Promise<`0x${string}`>;
364
+ /**
365
+ * Creates a new fast Flaunch on V1.1
366
+ * @param params - Parameters for creating the fast Flaunch
367
+ * @throws Error if FastFlaunchZap is not deployed on the current chain
368
+ * @returns Transaction response
369
+ */
119
370
  fastFlaunch(params: FastFlaunchParams): Promise<`0x${string}`>;
371
+ /**
372
+ * Creates a new fast Flaunch on V1.1 with IPFS metadata
373
+ * @param params - Parameters for creating the fast Flaunch with IPFS data
374
+ * @throws Error if FastFlaunchZap is not deployed on the current chain
375
+ * @returns Transaction response
376
+ */
120
377
  fastFlaunchIPFS(params: FastFlaunchIPFSParams): Promise<`0x${string}`>;
378
+ /**
379
+ * Creates a new Flaunch with revenue manager configuration
380
+ * @param params - Parameters for creating the Flaunch with revenue manager
381
+ * @throws Error if FlaunchZap is not deployed on the current chain
382
+ * @returns Transaction response
383
+ */
384
+ flaunchWithRevenueManager(params: FlaunchWithRevenueManagerParams): Promise<`0x${string}`>;
385
+ /**
386
+ * Creates a new Flaunch with revenue manager configuration and IPFS metadata
387
+ * @param params - Parameters for creating the Flaunch with revenue manager and IPFS data
388
+ * @throws Error if FlaunchZap is not deployed on the current chain
389
+ * @returns Transaction response
390
+ */
391
+ flaunchIPFSWithRevenueManager(params: FlaunchWithRevenueManagerIPFSParams): Promise<`0x${string}`>;
392
+ /**
393
+ * Gets the balance of a specific coin for the connected wallet
394
+ * @param coinAddress - The address of the coin to check
395
+ * @returns Promise<bigint> - The balance of the coin
396
+ */
121
397
  coinBalance(coinAddress: Address): Promise<bigint>;
122
- buyCoin(params: BuyCoinParams): Promise<`0x${string}`>;
123
- sellCoin(params: SellCoinParams): Promise<`0x${string}`>;
398
+ /**
399
+ * Buys a coin with ETH
400
+ * @param params - Parameters for buying the coin including amount, slippage, and referrer
401
+ * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
402
+ * @returns Transaction response for the buy operation
403
+ */
404
+ buyCoin(params: BuyCoinParams, isV1Coin?: boolean): Promise<`0x${string}`>;
405
+ /**
406
+ * Sells a coin for ETH
407
+ * @param params - Parameters for selling the coin including amount, slippage, permit data, and referrer
408
+ * @param isV1Coin - Optional flag to specify if coin is V1. If not provided, will be determined automatically
409
+ * @returns Transaction response for the sell operation
410
+ */
411
+ sellCoin(params: SellCoinParams, isV1Coin?: boolean): Promise<`0x${string}`>;
412
+ /**
413
+ * Gets the typed data for a Permit2 signature
414
+ * @param coinAddress - The address of the coin to permit
415
+ * @param deadline - Optional deadline for the permit (defaults to 10 years)
416
+ * @returns The typed data object for signing
417
+ */
124
418
  getPermit2TypedData(coinAddress: Address, deadline?: bigint): Promise<{
125
419
  typedData: {
126
420
  primaryType: string;
@@ -134,10 +428,43 @@ export declare class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
134
428
  };
135
429
  permitSingle: PermitSingle;
136
430
  }>;
431
+ /**
432
+ * Gets the current Permit2 allowance and nonce for a coin
433
+ * @param coinAddress - The address of the coin to check
434
+ * @returns Promise<{allowance: bigint, nonce: bigint}> - Current allowance and nonce
435
+ */
137
436
  getPermit2AllowanceAndNonce(coinAddress: Address): Promise<{
138
437
  allowance: bigint;
139
438
  nonce: number;
140
439
  }>;
440
+ /**
441
+ * Claims the protocol's share of the revenue
442
+ * @param params - Parameters for claiming the protocol's share of the revenue
443
+ * @returns Transaction response
444
+ */
445
+ revenueManagerProtocolClaim(params: {
446
+ revenueManagerAddress: Address;
447
+ }): Promise<`0x${string}`>;
448
+ /**
449
+ * Claims the total creator's share of the revenue from a revenue manager
450
+ * @param params - Parameters for claiming the creator's share of the revenue
451
+ * @returns Transaction response
452
+ */
453
+ revenueManagerCreatorClaim(params: {
454
+ revenueManagerAddress: Address;
455
+ }): Promise<`0x${string}`>;
456
+ /**
457
+ * Claims the creator's share of the revenue from specific flaunch tokens
458
+ * @param params - Parameters for claiming the creator's share of the revenue
459
+ * @returns Transaction response
460
+ */
461
+ revenueManagerCreatorClaimForTokens(params: {
462
+ revenueManagerAddress: Address;
463
+ flaunchTokens: {
464
+ flaunch: Address;
465
+ tokenId: bigint;
466
+ }[];
467
+ }): Promise<`0x${string}`>;
141
468
  }
142
469
  export {};
143
470
  //# sourceMappingURL=FlaunchSDK.d.ts.map
@@ -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;AACzB,OAAO,EACL,0BAA0B,EAC1B,+BAA+B,EAC/B,sBAAsB,EACtB,aAAa,EACb,iBAAiB,EACjB,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,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAsBlD,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAGrC,OAAO,EAIL,YAAY,EAE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,OAAO,EAAE,OAAO,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KACxD;CAOF"}
@@ -21,6 +21,7 @@ export declare const ethToMemecoin: (params: {
21
21
  amountOutMin?: bigint;
22
22
  amountOut?: bigint;
23
23
  amountInMax?: bigint;
24
+ isV1Coin?: boolean;
24
25
  }) => {
25
26
  calldata: `0x${string}`;
26
27
  commands: `0x${string}`;
@@ -34,6 +35,7 @@ export declare const memecoinToEthWithPermit2: (params: {
34
35
  permitSingle: PermitSingle | undefined;
35
36
  signature: Hex | undefined;
36
37
  referrer: Address | null;
38
+ isV1Coin?: boolean;
37
39
  }) => {
38
40
  calldata: `0x${string}`;
39
41
  commands: `0x${string}`;
@@ -1 +1 @@
1
- {"version":3,"file":"universalRouter.d.ts","sourceRoot":"","sources":["../../src/utils/universalRouter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAGP,GAAG,EAMJ,MAAM,MAAM,CAAC;AAUd,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,aAAa,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AA2DF,eAAO,MAAM,qBAAqB,GAChC,QAAQ,MAAM,GAAG,SAAS,EAC1B,UAAU,MAAM,EAChB,UAAU,UAAU,GAAG,WAAW,WAanC,CAAC;AAIF,eAAO,MAAM,aAAa,GAAI,QAAQ;IACpC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,UAAU,GAAG,WAAW,CAAC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O,MAAM,mBAAmB,GAAI,4CAKjC;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,KAAG;IACF,SAAS,EAAE;QACT,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE;YACN,IAAI,EAAE,MAAM,CAAC;YACb,OAAO,EAAE,MAAM,CAAC;YAChB,iBAAiB,EAAE,OAAO,CAAC;SAC5B,CAAC;QACF,KAAK,EAAE,OAAO,YAAY,CAAC;QAC3B,OAAO,EAAE,YAAY,CAAC;KACvB,CAAC;IACF,YAAY,EAAE,YAAY,CAAC;CA8B5B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flaunch/sdk",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "description": "Flaunch SDK to easily interact with the Flaunch protocol",
5
5
  "license": "MIT",
6
6
  "author": "Apoorv Lathey <apoorv@flayer.io>",
@@ -57,6 +57,7 @@
57
57
  "files": [
58
58
  "dist"
59
59
  ],
60
+ "packageManager": "pnpm@8.15.4",
60
61
  "devDependencies": {
61
62
  "@rollup/plugin-commonjs": "^22.0.0",
62
63
  "@rollup/plugin-json": "^4.1.0",
@@ -67,7 +68,9 @@
67
68
  "rimraf": "^6.0.1",
68
69
  "rollup": "^2.75.6",
69
70
  "tslib": "^2.4.0",
70
- "typescript": "^5.3.3"
71
+ "typescript": "^5.3.3",
72
+ "typedoc": "^0.25.12",
73
+ "typedoc-plugin-markdown": "^3.17.1"
71
74
  },
72
75
  "dependencies": {
73
76
  "@uniswap/v3-sdk": "^3.24.1",
@@ -83,6 +86,8 @@
83
86
  "dev": "rollup -c -w",
84
87
  "clean": "rimraf dist",
85
88
  "prebuild": "npm run clean",
86
- "typecheck": "tsc --noEmit"
89
+ "typecheck": "tsc --noEmit",
90
+ "docs:generate": "typedoc --plugin typedoc-plugin-markdown --out docs src/index.ts --excludeExternals --exclude '**/abi/**' --includeVersion",
91
+ "docs:llms": "node scripts/generate-llms-doc.js"
87
92
  }
88
93
  }