auctionflow-sdk 1.0.0

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/index.mjs ADDED
@@ -0,0 +1,863 @@
1
+ // src/client.ts
2
+ import {
3
+ createPublicClient,
4
+ http,
5
+ zeroAddress
6
+ } from "viem";
7
+
8
+ // src/builders/auction-builder.ts
9
+ var AuctionBuilder = class {
10
+ config = {};
11
+ withToken(name, symbol, maxSupply) {
12
+ this.config.name = name;
13
+ this.config.symbol = symbol;
14
+ this.config.maxSupply = maxSupply;
15
+ return this;
16
+ }
17
+ withPaymentToken(address) {
18
+ this.config.paymentToken = address;
19
+ return this;
20
+ }
21
+ withBondingCurve(basePrice, slope) {
22
+ this.config.basePrice = basePrice;
23
+ this.config.slope = slope;
24
+ return this;
25
+ }
26
+ withMaxRaise(maxRaise) {
27
+ this.config.maxRaise = maxRaise;
28
+ return this;
29
+ }
30
+ withSchedule(startTime, endTime) {
31
+ this.config.startTime = startTime;
32
+ this.config.endTime = endTime;
33
+ return this;
34
+ }
35
+ build() {
36
+ const required = [
37
+ "name",
38
+ "symbol",
39
+ "maxSupply",
40
+ "paymentToken",
41
+ "basePrice",
42
+ "slope",
43
+ "maxRaise",
44
+ "startTime",
45
+ "endTime"
46
+ ];
47
+ for (const key of required) {
48
+ if (this.config[key] === void 0) {
49
+ throw new Error(`Missing required field: ${key}`);
50
+ }
51
+ }
52
+ const config = this.config;
53
+ if (config.maxSupply <= 0n) throw new Error("maxSupply must be greater than 0");
54
+ if (config.basePrice <= 0n) throw new Error("basePrice must be greater than 0");
55
+ if (config.slope < 0n) throw new Error("slope must not be negative");
56
+ if (config.maxRaise <= 0n) throw new Error("maxRaise must be greater than 0");
57
+ if (config.startTime >= config.endTime) {
58
+ throw new Error("startTime must be before endTime");
59
+ }
60
+ return config;
61
+ }
62
+ };
63
+
64
+ // src/constants/addresses.ts
65
+ var AUCTION_ADDRESSES = {
66
+ 84532: "0xadc3e02e962eed3856d7bee0315f84d187be1fea",
67
+ 8453: "0x0000000000000000000000000000000000000000"
68
+ // not yet deployed
69
+ };
70
+ var USDC_ADDRESSES = {
71
+ 84532: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
72
+ 8453: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
73
+ };
74
+
75
+ // src/abis/token-auction.ts
76
+ var tokenAuctionAbi = [
77
+ {
78
+ "type": "constructor",
79
+ "inputs": [
80
+ {
81
+ "name": "feeRecipient_",
82
+ "type": "address",
83
+ "internalType": "address"
84
+ },
85
+ {
86
+ "name": "defaultFeeBps_",
87
+ "type": "uint256",
88
+ "internalType": "uint256"
89
+ }
90
+ ],
91
+ "stateMutability": "nonpayable"
92
+ },
93
+ {
94
+ "type": "function",
95
+ "name": "auctionCount",
96
+ "inputs": [],
97
+ "outputs": [
98
+ {
99
+ "name": "",
100
+ "type": "uint256",
101
+ "internalType": "uint256"
102
+ }
103
+ ],
104
+ "stateMutability": "view"
105
+ },
106
+ {
107
+ "type": "function",
108
+ "name": "auctions",
109
+ "inputs": [
110
+ {
111
+ "name": "",
112
+ "type": "uint256",
113
+ "internalType": "uint256"
114
+ }
115
+ ],
116
+ "outputs": [
117
+ {
118
+ "name": "config",
119
+ "type": "tuple",
120
+ "internalType": "struct TokenAuction.AuctionConfig",
121
+ "components": [
122
+ {
123
+ "name": "token",
124
+ "type": "address",
125
+ "internalType": "contract AuctionToken"
126
+ },
127
+ {
128
+ "name": "paymentToken",
129
+ "type": "address",
130
+ "internalType": "contract IERC20"
131
+ },
132
+ {
133
+ "name": "basePrice",
134
+ "type": "uint256",
135
+ "internalType": "uint256"
136
+ },
137
+ {
138
+ "name": "slope",
139
+ "type": "uint256",
140
+ "internalType": "uint256"
141
+ },
142
+ {
143
+ "name": "maxRaise",
144
+ "type": "uint256",
145
+ "internalType": "uint256"
146
+ },
147
+ {
148
+ "name": "startTime",
149
+ "type": "uint256",
150
+ "internalType": "uint256"
151
+ },
152
+ {
153
+ "name": "endTime",
154
+ "type": "uint256",
155
+ "internalType": "uint256"
156
+ },
157
+ {
158
+ "name": "creator",
159
+ "type": "address",
160
+ "internalType": "address"
161
+ },
162
+ {
163
+ "name": "protocolFeeBps",
164
+ "type": "uint256",
165
+ "internalType": "uint256"
166
+ }
167
+ ]
168
+ },
169
+ {
170
+ "name": "state",
171
+ "type": "uint8",
172
+ "internalType": "enum TokenAuction.AuctionState"
173
+ },
174
+ {
175
+ "name": "totalRaised",
176
+ "type": "uint256",
177
+ "internalType": "uint256"
178
+ },
179
+ {
180
+ "name": "totalSold",
181
+ "type": "uint256",
182
+ "internalType": "uint256"
183
+ }
184
+ ],
185
+ "stateMutability": "view"
186
+ },
187
+ {
188
+ "type": "function",
189
+ "name": "buyTokens",
190
+ "inputs": [
191
+ {
192
+ "name": "auctionId",
193
+ "type": "uint256",
194
+ "internalType": "uint256"
195
+ },
196
+ {
197
+ "name": "amount",
198
+ "type": "uint256",
199
+ "internalType": "uint256"
200
+ }
201
+ ],
202
+ "outputs": [],
203
+ "stateMutability": "nonpayable"
204
+ },
205
+ {
206
+ "type": "function",
207
+ "name": "completeAuction",
208
+ "inputs": [
209
+ {
210
+ "name": "auctionId",
211
+ "type": "uint256",
212
+ "internalType": "uint256"
213
+ }
214
+ ],
215
+ "outputs": [],
216
+ "stateMutability": "nonpayable"
217
+ },
218
+ {
219
+ "type": "function",
220
+ "name": "createAuction",
221
+ "inputs": [
222
+ {
223
+ "name": "name",
224
+ "type": "string",
225
+ "internalType": "string"
226
+ },
227
+ {
228
+ "name": "symbol",
229
+ "type": "string",
230
+ "internalType": "string"
231
+ },
232
+ {
233
+ "name": "maxSupply",
234
+ "type": "uint256",
235
+ "internalType": "uint256"
236
+ },
237
+ {
238
+ "name": "paymentToken",
239
+ "type": "address",
240
+ "internalType": "address"
241
+ },
242
+ {
243
+ "name": "basePrice",
244
+ "type": "uint256",
245
+ "internalType": "uint256"
246
+ },
247
+ {
248
+ "name": "slope",
249
+ "type": "uint256",
250
+ "internalType": "uint256"
251
+ },
252
+ {
253
+ "name": "maxRaise",
254
+ "type": "uint256",
255
+ "internalType": "uint256"
256
+ },
257
+ {
258
+ "name": "startTime",
259
+ "type": "uint256",
260
+ "internalType": "uint256"
261
+ },
262
+ {
263
+ "name": "endTime",
264
+ "type": "uint256",
265
+ "internalType": "uint256"
266
+ }
267
+ ],
268
+ "outputs": [
269
+ {
270
+ "name": "auctionId",
271
+ "type": "uint256",
272
+ "internalType": "uint256"
273
+ }
274
+ ],
275
+ "stateMutability": "nonpayable"
276
+ },
277
+ {
278
+ "type": "function",
279
+ "name": "defaultFeeBps",
280
+ "inputs": [],
281
+ "outputs": [
282
+ {
283
+ "name": "",
284
+ "type": "uint256",
285
+ "internalType": "uint256"
286
+ }
287
+ ],
288
+ "stateMutability": "view"
289
+ },
290
+ {
291
+ "type": "function",
292
+ "name": "getBuyCost",
293
+ "inputs": [
294
+ {
295
+ "name": "auctionId",
296
+ "type": "uint256",
297
+ "internalType": "uint256"
298
+ },
299
+ {
300
+ "name": "amount",
301
+ "type": "uint256",
302
+ "internalType": "uint256"
303
+ }
304
+ ],
305
+ "outputs": [
306
+ {
307
+ "name": "cost",
308
+ "type": "uint256",
309
+ "internalType": "uint256"
310
+ },
311
+ {
312
+ "name": "fee",
313
+ "type": "uint256",
314
+ "internalType": "uint256"
315
+ }
316
+ ],
317
+ "stateMutability": "view"
318
+ },
319
+ {
320
+ "type": "function",
321
+ "name": "getSpotPrice",
322
+ "inputs": [
323
+ {
324
+ "name": "auctionId",
325
+ "type": "uint256",
326
+ "internalType": "uint256"
327
+ }
328
+ ],
329
+ "outputs": [
330
+ {
331
+ "name": "",
332
+ "type": "uint256",
333
+ "internalType": "uint256"
334
+ }
335
+ ],
336
+ "stateMutability": "view"
337
+ },
338
+ {
339
+ "type": "function",
340
+ "name": "owner",
341
+ "inputs": [],
342
+ "outputs": [
343
+ {
344
+ "name": "",
345
+ "type": "address",
346
+ "internalType": "address"
347
+ }
348
+ ],
349
+ "stateMutability": "view"
350
+ },
351
+ {
352
+ "type": "function",
353
+ "name": "proceedsWithdrawn",
354
+ "inputs": [
355
+ {
356
+ "name": "",
357
+ "type": "uint256",
358
+ "internalType": "uint256"
359
+ }
360
+ ],
361
+ "outputs": [
362
+ {
363
+ "name": "",
364
+ "type": "bool",
365
+ "internalType": "bool"
366
+ }
367
+ ],
368
+ "stateMutability": "view"
369
+ },
370
+ {
371
+ "type": "function",
372
+ "name": "protocolFeeRecipient",
373
+ "inputs": [],
374
+ "outputs": [
375
+ {
376
+ "name": "",
377
+ "type": "address",
378
+ "internalType": "address"
379
+ }
380
+ ],
381
+ "stateMutability": "view"
382
+ },
383
+ {
384
+ "type": "function",
385
+ "name": "renounceOwnership",
386
+ "inputs": [],
387
+ "outputs": [],
388
+ "stateMutability": "nonpayable"
389
+ },
390
+ {
391
+ "type": "function",
392
+ "name": "transferOwnership",
393
+ "inputs": [
394
+ {
395
+ "name": "newOwner",
396
+ "type": "address",
397
+ "internalType": "address"
398
+ }
399
+ ],
400
+ "outputs": [],
401
+ "stateMutability": "nonpayable"
402
+ },
403
+ {
404
+ "type": "function",
405
+ "name": "userPurchases",
406
+ "inputs": [
407
+ {
408
+ "name": "",
409
+ "type": "uint256",
410
+ "internalType": "uint256"
411
+ },
412
+ {
413
+ "name": "",
414
+ "type": "address",
415
+ "internalType": "address"
416
+ }
417
+ ],
418
+ "outputs": [
419
+ {
420
+ "name": "",
421
+ "type": "uint256",
422
+ "internalType": "uint256"
423
+ }
424
+ ],
425
+ "stateMutability": "view"
426
+ },
427
+ {
428
+ "type": "function",
429
+ "name": "withdrawProceeds",
430
+ "inputs": [
431
+ {
432
+ "name": "auctionId",
433
+ "type": "uint256",
434
+ "internalType": "uint256"
435
+ }
436
+ ],
437
+ "outputs": [],
438
+ "stateMutability": "nonpayable"
439
+ },
440
+ {
441
+ "type": "event",
442
+ "name": "AuctionCompleted",
443
+ "inputs": [
444
+ {
445
+ "name": "auctionId",
446
+ "type": "uint256",
447
+ "indexed": true,
448
+ "internalType": "uint256"
449
+ },
450
+ {
451
+ "name": "totalRaised",
452
+ "type": "uint256",
453
+ "indexed": false,
454
+ "internalType": "uint256"
455
+ },
456
+ {
457
+ "name": "totalSold",
458
+ "type": "uint256",
459
+ "indexed": false,
460
+ "internalType": "uint256"
461
+ }
462
+ ],
463
+ "anonymous": false
464
+ },
465
+ {
466
+ "type": "event",
467
+ "name": "AuctionCreated",
468
+ "inputs": [
469
+ {
470
+ "name": "auctionId",
471
+ "type": "uint256",
472
+ "indexed": true,
473
+ "internalType": "uint256"
474
+ },
475
+ {
476
+ "name": "creator",
477
+ "type": "address",
478
+ "indexed": true,
479
+ "internalType": "address"
480
+ },
481
+ {
482
+ "name": "token",
483
+ "type": "address",
484
+ "indexed": false,
485
+ "internalType": "address"
486
+ },
487
+ {
488
+ "name": "paymentToken",
489
+ "type": "address",
490
+ "indexed": false,
491
+ "internalType": "address"
492
+ },
493
+ {
494
+ "name": "basePrice",
495
+ "type": "uint256",
496
+ "indexed": false,
497
+ "internalType": "uint256"
498
+ },
499
+ {
500
+ "name": "slope",
501
+ "type": "uint256",
502
+ "indexed": false,
503
+ "internalType": "uint256"
504
+ },
505
+ {
506
+ "name": "maxRaise",
507
+ "type": "uint256",
508
+ "indexed": false,
509
+ "internalType": "uint256"
510
+ },
511
+ {
512
+ "name": "startTime",
513
+ "type": "uint256",
514
+ "indexed": false,
515
+ "internalType": "uint256"
516
+ },
517
+ {
518
+ "name": "endTime",
519
+ "type": "uint256",
520
+ "indexed": false,
521
+ "internalType": "uint256"
522
+ }
523
+ ],
524
+ "anonymous": false
525
+ },
526
+ {
527
+ "type": "event",
528
+ "name": "AuctionMigrated",
529
+ "inputs": [
530
+ {
531
+ "name": "auctionId",
532
+ "type": "uint256",
533
+ "indexed": true,
534
+ "internalType": "uint256"
535
+ },
536
+ {
537
+ "name": "liquidityPool",
538
+ "type": "address",
539
+ "indexed": false,
540
+ "internalType": "address"
541
+ }
542
+ ],
543
+ "anonymous": false
544
+ },
545
+ {
546
+ "type": "event",
547
+ "name": "OwnershipTransferred",
548
+ "inputs": [
549
+ {
550
+ "name": "previousOwner",
551
+ "type": "address",
552
+ "indexed": true,
553
+ "internalType": "address"
554
+ },
555
+ {
556
+ "name": "newOwner",
557
+ "type": "address",
558
+ "indexed": true,
559
+ "internalType": "address"
560
+ }
561
+ ],
562
+ "anonymous": false
563
+ },
564
+ {
565
+ "type": "event",
566
+ "name": "ProceedsWithdrawn",
567
+ "inputs": [
568
+ {
569
+ "name": "auctionId",
570
+ "type": "uint256",
571
+ "indexed": true,
572
+ "internalType": "uint256"
573
+ },
574
+ {
575
+ "name": "creator",
576
+ "type": "address",
577
+ "indexed": true,
578
+ "internalType": "address"
579
+ },
580
+ {
581
+ "name": "amount",
582
+ "type": "uint256",
583
+ "indexed": false,
584
+ "internalType": "uint256"
585
+ }
586
+ ],
587
+ "anonymous": false
588
+ },
589
+ {
590
+ "type": "event",
591
+ "name": "TokensPurchased",
592
+ "inputs": [
593
+ {
594
+ "name": "auctionId",
595
+ "type": "uint256",
596
+ "indexed": true,
597
+ "internalType": "uint256"
598
+ },
599
+ {
600
+ "name": "buyer",
601
+ "type": "address",
602
+ "indexed": true,
603
+ "internalType": "address"
604
+ },
605
+ {
606
+ "name": "amount",
607
+ "type": "uint256",
608
+ "indexed": false,
609
+ "internalType": "uint256"
610
+ },
611
+ {
612
+ "name": "cost",
613
+ "type": "uint256",
614
+ "indexed": false,
615
+ "internalType": "uint256"
616
+ },
617
+ {
618
+ "name": "protocolFee",
619
+ "type": "uint256",
620
+ "indexed": false,
621
+ "internalType": "uint256"
622
+ },
623
+ {
624
+ "name": "newTotalRaised",
625
+ "type": "uint256",
626
+ "indexed": false,
627
+ "internalType": "uint256"
628
+ },
629
+ {
630
+ "name": "newTotalSold",
631
+ "type": "uint256",
632
+ "indexed": false,
633
+ "internalType": "uint256"
634
+ }
635
+ ],
636
+ "anonymous": false
637
+ },
638
+ {
639
+ "type": "error",
640
+ "name": "OwnableInvalidOwner",
641
+ "inputs": [
642
+ {
643
+ "name": "owner",
644
+ "type": "address",
645
+ "internalType": "address"
646
+ }
647
+ ]
648
+ },
649
+ {
650
+ "type": "error",
651
+ "name": "OwnableUnauthorizedAccount",
652
+ "inputs": [
653
+ {
654
+ "name": "account",
655
+ "type": "address",
656
+ "internalType": "address"
657
+ }
658
+ ]
659
+ },
660
+ {
661
+ "type": "error",
662
+ "name": "ReentrancyGuardReentrantCall",
663
+ "inputs": []
664
+ },
665
+ {
666
+ "type": "error",
667
+ "name": "SafeERC20FailedOperation",
668
+ "inputs": [
669
+ {
670
+ "name": "token",
671
+ "type": "address",
672
+ "internalType": "address"
673
+ }
674
+ ]
675
+ }
676
+ ];
677
+
678
+ // src/utils/bonding-curve.ts
679
+ function calculateBuyCost(currentSupply, amount, basePrice, slope) {
680
+ const linearCost = basePrice * amount;
681
+ const curveCost = slope * amount * (2n * currentSupply + amount) / 2n;
682
+ return linearCost + curveCost;
683
+ }
684
+ function spotPrice(currentSupply, basePrice, slope) {
685
+ return basePrice + slope * currentSupply;
686
+ }
687
+ function calculateBuyQuote(currentSupply, amount, basePrice, slope, feeBps) {
688
+ const cost = calculateBuyCost(currentSupply, amount, basePrice, slope);
689
+ const fee = cost * feeBps / 10000n;
690
+ return {
691
+ cost,
692
+ fee,
693
+ total: cost + fee,
694
+ spotPriceAfter: spotPrice(currentSupply + amount, basePrice, slope)
695
+ };
696
+ }
697
+
698
+ // src/utils/chains.ts
699
+ import { base, baseSepolia } from "viem/chains";
700
+ var CHAINS = {
701
+ 84532: baseSepolia,
702
+ 8453: base
703
+ };
704
+
705
+ // src/client.ts
706
+ var AuctionFlowSDK = class {
707
+ publicClient;
708
+ walletClient;
709
+ auctionAddress;
710
+ chainId;
711
+ chain;
712
+ constructor(params) {
713
+ this.chainId = params.chainId;
714
+ this.chain = CHAINS[params.chainId];
715
+ this.auctionAddress = AUCTION_ADDRESSES[params.chainId];
716
+ if (this.auctionAddress === zeroAddress) {
717
+ throw new Error(
718
+ `AuctionFlow is not yet deployed on chain ${params.chainId}. Supported chains: ${Object.entries(AUCTION_ADDRESSES).filter(([, addr]) => addr !== zeroAddress).map(([id]) => id).join(", ")}.`
719
+ );
720
+ }
721
+ this.publicClient = createPublicClient({
722
+ chain: this.chain,
723
+ transport: http(params.rpcUrl)
724
+ });
725
+ this.walletClient = params.walletClient;
726
+ }
727
+ // Builder
728
+ buildAuction() {
729
+ return new AuctionBuilder();
730
+ }
731
+ async createAuction(config) {
732
+ if (!this.walletClient) throw new Error("Wallet client required");
733
+ const hash = await this.walletClient.writeContract({
734
+ chain: this.chain,
735
+ account: this.walletClient.account,
736
+ address: this.auctionAddress,
737
+ abi: tokenAuctionAbi,
738
+ functionName: "createAuction",
739
+ args: [
740
+ config.name,
741
+ config.symbol,
742
+ config.maxSupply,
743
+ config.paymentToken,
744
+ config.basePrice,
745
+ config.slope,
746
+ config.maxRaise,
747
+ config.startTime,
748
+ config.endTime
749
+ ]
750
+ });
751
+ return hash;
752
+ }
753
+ async buyTokens(auctionId, amount) {
754
+ if (!this.walletClient) throw new Error("Wallet client required");
755
+ const hash = await this.walletClient.writeContract({
756
+ chain: this.chain,
757
+ account: this.walletClient.account,
758
+ address: this.auctionAddress,
759
+ abi: tokenAuctionAbi,
760
+ functionName: "buyTokens",
761
+ args: [auctionId, amount]
762
+ });
763
+ return hash;
764
+ }
765
+ /**
766
+ * Withdraw a completed auction's raised payment tokens to its creator.
767
+ * Only the auction's creator can call this, and only once.
768
+ */
769
+ async withdrawProceeds(auctionId) {
770
+ if (!this.walletClient) throw new Error("Wallet client required");
771
+ const hash = await this.walletClient.writeContract({
772
+ chain: this.chain,
773
+ account: this.walletClient.account,
774
+ address: this.auctionAddress,
775
+ abi: tokenAuctionAbi,
776
+ functionName: "withdrawProceeds",
777
+ args: [auctionId]
778
+ });
779
+ return hash;
780
+ }
781
+ // Read: Has an auction's creator already withdrawn its proceeds?
782
+ async hasWithdrawnProceeds(auctionId) {
783
+ return this.publicClient.readContract({
784
+ address: this.auctionAddress,
785
+ abi: tokenAuctionAbi,
786
+ functionName: "proceedsWithdrawn",
787
+ args: [auctionId]
788
+ });
789
+ }
790
+ // Read: Get auction data
791
+ async getAuction(auctionId) {
792
+ const result = await this.publicClient.readContract({
793
+ address: this.auctionAddress,
794
+ abi: tokenAuctionAbi,
795
+ functionName: "auctions",
796
+ args: [auctionId]
797
+ });
798
+ return this.parseAuctionResult(auctionId, result);
799
+ }
800
+ // Read: Get buy quote (off-chain calculation)
801
+ async getQuote(auctionId, amount) {
802
+ const auction = await this.getAuction(auctionId);
803
+ const quote = calculateBuyQuote(
804
+ auction.totalSold,
805
+ amount,
806
+ auction.basePrice,
807
+ auction.slope,
808
+ auction.protocolFeeBps
809
+ );
810
+ return {
811
+ cost: quote.cost,
812
+ fee: quote.fee,
813
+ totalCost: quote.total,
814
+ spotPriceAfter: quote.spotPriceAfter
815
+ };
816
+ }
817
+ // Read: Get spot price
818
+ async getSpotPrice(auctionId) {
819
+ return this.publicClient.readContract({
820
+ address: this.auctionAddress,
821
+ abi: tokenAuctionAbi,
822
+ functionName: "getSpotPrice",
823
+ args: [auctionId]
824
+ });
825
+ }
826
+ parseAuctionResult(id, raw) {
827
+ return {
828
+ id,
829
+ token: raw.config.token,
830
+ paymentToken: raw.config.paymentToken,
831
+ creator: raw.config.creator,
832
+ basePrice: raw.config.basePrice,
833
+ slope: raw.config.slope,
834
+ maxRaise: raw.config.maxRaise,
835
+ startTime: raw.config.startTime,
836
+ endTime: raw.config.endTime,
837
+ state: raw.state,
838
+ totalRaised: raw.totalRaised,
839
+ totalSold: raw.totalSold,
840
+ protocolFeeBps: raw.config.protocolFeeBps
841
+ };
842
+ }
843
+ };
844
+
845
+ // src/types/index.ts
846
+ var AuctionState = /* @__PURE__ */ ((AuctionState2) => {
847
+ AuctionState2[AuctionState2["PENDING"] = 0] = "PENDING";
848
+ AuctionState2[AuctionState2["ACTIVE"] = 1] = "ACTIVE";
849
+ AuctionState2[AuctionState2["COMPLETED"] = 2] = "COMPLETED";
850
+ AuctionState2[AuctionState2["MIGRATED"] = 3] = "MIGRATED";
851
+ return AuctionState2;
852
+ })(AuctionState || {});
853
+ export {
854
+ AUCTION_ADDRESSES,
855
+ AuctionBuilder,
856
+ AuctionFlowSDK,
857
+ AuctionState,
858
+ USDC_ADDRESSES,
859
+ calculateBuyCost,
860
+ calculateBuyQuote,
861
+ spotPrice
862
+ };
863
+ //# sourceMappingURL=index.mjs.map