@whetstone-research/doppler-sdk 0.0.9 → 0.0.10
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/DopplerSDK.js +7 -7
- package/dist/DopplerSDK.mjs +6 -6
- package/dist/builders/DynamicAuctionBuilder.js +3 -3
- package/dist/builders/DynamicAuctionBuilder.mjs +2 -2
- package/dist/builders/MulticurveBuilder.d.mts +3 -1
- package/dist/builders/MulticurveBuilder.d.ts +3 -1
- package/dist/builders/MulticurveBuilder.js +3 -3
- package/dist/builders/MulticurveBuilder.mjs +2 -2
- package/dist/builders/StaticAuctionBuilder.js +3 -3
- package/dist/builders/StaticAuctionBuilder.mjs +2 -2
- package/dist/builders/index.js +7 -7
- package/dist/builders/index.mjs +4 -4
- package/dist/{chunk-YLUYLHLX.mjs → chunk-37V2HKFT.mjs} +2 -2
- package/dist/{chunk-YLUYLHLX.mjs.map → chunk-37V2HKFT.mjs.map} +1 -1
- package/dist/{chunk-TICZ6SU4.js → chunk-45K7HWN3.js} +9 -3
- package/dist/chunk-45K7HWN3.js.map +1 -0
- package/dist/{chunk-KJBMWB6J.js → chunk-4EGMIALP.js} +50 -38
- package/dist/chunk-4EGMIALP.js.map +1 -0
- package/dist/{chunk-L5XYYQV2.mjs → chunk-6ZGNKAIS.mjs} +3 -3
- package/dist/{chunk-L5XYYQV2.mjs.map → chunk-6ZGNKAIS.mjs.map} +1 -1
- package/dist/{chunk-UC7IVRW6.mjs → chunk-HTJQIXTH.mjs} +49 -37
- package/dist/chunk-HTJQIXTH.mjs.map +1 -0
- package/dist/{chunk-BEY5GNKW.js → chunk-IF25GIO5.js} +4 -4
- package/dist/{chunk-BEY5GNKW.js.map → chunk-IF25GIO5.js.map} +1 -1
- package/dist/{chunk-SB7GMLX4.js → chunk-KGZT2XIV.js} +4 -4
- package/dist/{chunk-SB7GMLX4.js.map → chunk-KGZT2XIV.js.map} +1 -1
- package/dist/{chunk-HME6IINB.js → chunk-MC4ZQEWY.js} +2 -2
- package/dist/{chunk-HME6IINB.js.map → chunk-MC4ZQEWY.js.map} +1 -1
- package/dist/{chunk-VK6K2LX7.mjs → chunk-MYDPPMPE.mjs} +9 -3
- package/dist/chunk-MYDPPMPE.mjs.map +1 -0
- package/dist/{chunk-GO7INK3W.mjs → chunk-O3FGTSWS.mjs} +3 -3
- package/dist/{chunk-GO7INK3W.mjs.map → chunk-O3FGTSWS.mjs.map} +1 -1
- package/dist/{chunk-SO2E6QRZ.mjs → chunk-RSZ3HMUZ.mjs} +6 -6
- package/dist/{chunk-SO2E6QRZ.mjs.map → chunk-RSZ3HMUZ.mjs.map} +1 -1
- package/dist/{chunk-PUHGA5IN.js → chunk-WFHVLYAF.js} +10 -10
- package/dist/{chunk-PUHGA5IN.js.map → chunk-WFHVLYAF.js.map} +1 -1
- package/dist/entities/DopplerFactory.js +2 -2
- package/dist/entities/DopplerFactory.mjs +1 -1
- package/dist/entities/auction/MulticurvePool.js +1 -1
- package/dist/entities/auction/MulticurvePool.mjs +1 -1
- package/dist/entities/auction/index.js +1 -1
- package/dist/entities/auction/index.mjs +1 -1
- package/dist/index.js +12 -12
- package/dist/index.mjs +6 -6
- package/dist/types.d.mts +3 -9
- package/dist/types.d.ts +3 -9
- package/dist/types.js +4 -4
- package/dist/types.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-KJBMWB6J.js.map +0 -1
- package/dist/chunk-TICZ6SU4.js.map +0 -1
- package/dist/chunk-UC7IVRW6.mjs.map +0 -1
- package/dist/chunk-VK6K2LX7.mjs.map +0 -1
package/dist/DopplerSDK.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWFHVLYAF_js = require('./chunk-WFHVLYAF.js');
|
|
4
4
|
require('./chunk-3PNCB4W5.js');
|
|
5
5
|
require('./chunk-EU5LMGLS.js');
|
|
6
6
|
require('./chunk-HWE7NWQB.js');
|
|
@@ -13,11 +13,11 @@ require('./chunk-VEIVYUYF.js');
|
|
|
13
13
|
require('./chunk-YYLD3AJ7.js');
|
|
14
14
|
require('./chunk-UHNGZLXR.js');
|
|
15
15
|
require('./chunk-JIKAD4YL.js');
|
|
16
|
-
require('./chunk-
|
|
17
|
-
require('./chunk-
|
|
18
|
-
require('./chunk-
|
|
16
|
+
require('./chunk-KGZT2XIV.js');
|
|
17
|
+
require('./chunk-4EGMIALP.js');
|
|
18
|
+
require('./chunk-IF25GIO5.js');
|
|
19
19
|
require('./chunk-F3ZJCKLO.js');
|
|
20
|
-
require('./chunk-
|
|
20
|
+
require('./chunk-45K7HWN3.js');
|
|
21
21
|
require('./chunk-WTS75RUC.js');
|
|
22
22
|
require('./chunk-UPVKABAV.js');
|
|
23
23
|
require('./chunk-VKLAZYHT.js');
|
|
@@ -29,7 +29,7 @@ require('./chunk-JTEZHYLY.js');
|
|
|
29
29
|
require('./chunk-RYYAINID.js');
|
|
30
30
|
require('./chunk-XSJTASPK.js');
|
|
31
31
|
require('./chunk-4DUE547M.js');
|
|
32
|
-
require('./chunk-
|
|
32
|
+
require('./chunk-MC4ZQEWY.js');
|
|
33
33
|
require('./chunk-GJAT5S24.js');
|
|
34
34
|
require('./chunk-H3IRAWA5.js');
|
|
35
35
|
require('./chunk-RK6EHB3X.js');
|
|
@@ -39,7 +39,7 @@ require('./chunk-MXSAPSI4.js');
|
|
|
39
39
|
|
|
40
40
|
Object.defineProperty(exports, "DopplerSDK", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkWFHVLYAF_js.DopplerSDK; }
|
|
43
43
|
});
|
|
44
44
|
//# sourceMappingURL=DopplerSDK.js.map
|
|
45
45
|
//# sourceMappingURL=DopplerSDK.js.map
|
package/dist/DopplerSDK.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DopplerSDK } from './chunk-
|
|
1
|
+
export { DopplerSDK } from './chunk-RSZ3HMUZ.mjs';
|
|
2
2
|
import './chunk-SD7BHT2F.mjs';
|
|
3
3
|
import './chunk-ZGRFX62H.mjs';
|
|
4
4
|
import './chunk-JQARYKOD.mjs';
|
|
@@ -11,11 +11,11 @@ import './chunk-XNMXN5SZ.mjs';
|
|
|
11
11
|
import './chunk-KAZQJ24E.mjs';
|
|
12
12
|
import './chunk-4AMNXBJG.mjs';
|
|
13
13
|
import './chunk-P25HBGP5.mjs';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
16
|
-
import './chunk-
|
|
14
|
+
import './chunk-O3FGTSWS.mjs';
|
|
15
|
+
import './chunk-HTJQIXTH.mjs';
|
|
16
|
+
import './chunk-6ZGNKAIS.mjs';
|
|
17
17
|
import './chunk-VGG33AOK.mjs';
|
|
18
|
-
import './chunk-
|
|
18
|
+
import './chunk-MYDPPMPE.mjs';
|
|
19
19
|
import './chunk-5TL5V6UX.mjs';
|
|
20
20
|
import './chunk-H3B54PFV.mjs';
|
|
21
21
|
import './chunk-IR653SKT.mjs';
|
|
@@ -27,7 +27,7 @@ import './chunk-IV2NRRYF.mjs';
|
|
|
27
27
|
import './chunk-OTYM24TG.mjs';
|
|
28
28
|
import './chunk-KOAC3BBP.mjs';
|
|
29
29
|
import './chunk-LXUF7RNX.mjs';
|
|
30
|
-
import './chunk-
|
|
30
|
+
import './chunk-37V2HKFT.mjs';
|
|
31
31
|
import './chunk-EC2TH76G.mjs';
|
|
32
32
|
import './chunk-UVD3PV3B.mjs';
|
|
33
33
|
import './chunk-7DCLWOKP.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKGZT2XIV_js = require('../chunk-KGZT2XIV.js');
|
|
4
4
|
require('../chunk-F3ZJCKLO.js');
|
|
5
5
|
require('../chunk-WTS75RUC.js');
|
|
6
6
|
require('../chunk-UPVKABAV.js');
|
|
@@ -13,7 +13,7 @@ require('../chunk-JTEZHYLY.js');
|
|
|
13
13
|
require('../chunk-RYYAINID.js');
|
|
14
14
|
require('../chunk-XSJTASPK.js');
|
|
15
15
|
require('../chunk-4DUE547M.js');
|
|
16
|
-
require('../chunk-
|
|
16
|
+
require('../chunk-MC4ZQEWY.js');
|
|
17
17
|
require('../chunk-GJAT5S24.js');
|
|
18
18
|
require('../chunk-H3IRAWA5.js');
|
|
19
19
|
require('../chunk-RK6EHB3X.js');
|
|
@@ -23,7 +23,7 @@ require('../chunk-MXSAPSI4.js');
|
|
|
23
23
|
|
|
24
24
|
Object.defineProperty(exports, "DynamicAuctionBuilder", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkKGZT2XIV_js.DynamicAuctionBuilder; }
|
|
27
27
|
});
|
|
28
28
|
//# sourceMappingURL=DynamicAuctionBuilder.js.map
|
|
29
29
|
//# sourceMappingURL=DynamicAuctionBuilder.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DynamicAuctionBuilder } from '../chunk-
|
|
1
|
+
export { DynamicAuctionBuilder } from '../chunk-O3FGTSWS.mjs';
|
|
2
2
|
import '../chunk-VGG33AOK.mjs';
|
|
3
3
|
import '../chunk-5TL5V6UX.mjs';
|
|
4
4
|
import '../chunk-H3B54PFV.mjs';
|
|
@@ -11,7 +11,7 @@ import '../chunk-IV2NRRYF.mjs';
|
|
|
11
11
|
import '../chunk-OTYM24TG.mjs';
|
|
12
12
|
import '../chunk-KOAC3BBP.mjs';
|
|
13
13
|
import '../chunk-LXUF7RNX.mjs';
|
|
14
|
-
import '../chunk-
|
|
14
|
+
import '../chunk-37V2HKFT.mjs';
|
|
15
15
|
import '../chunk-EC2TH76G.mjs';
|
|
16
16
|
import '../chunk-UVD3PV3B.mjs';
|
|
17
17
|
import '../chunk-7DCLWOKP.mjs';
|
|
@@ -17,6 +17,9 @@ declare class MulticurveBuilder<C extends SupportedChainId> implements BaseAucti
|
|
|
17
17
|
private userAddress?;
|
|
18
18
|
private moduleAddresses?;
|
|
19
19
|
private gasLimit?;
|
|
20
|
+
private numerairePrice?;
|
|
21
|
+
private tokenDecimals?;
|
|
22
|
+
private numeraireDecimals?;
|
|
20
23
|
chainId: C;
|
|
21
24
|
constructor(chainId: C);
|
|
22
25
|
static forChain<C extends SupportedChainId>(chainId: C): MulticurveBuilder<C>;
|
|
@@ -51,7 +54,6 @@ declare class MulticurveBuilder<C extends SupportedChainId> implements BaseAucti
|
|
|
51
54
|
beneficiary: Address;
|
|
52
55
|
shares: bigint;
|
|
53
56
|
}[];
|
|
54
|
-
farTick?: number;
|
|
55
57
|
}): this;
|
|
56
58
|
withMarketCapPresets(params?: {
|
|
57
59
|
fee?: number;
|
|
@@ -17,6 +17,9 @@ declare class MulticurveBuilder<C extends SupportedChainId> implements BaseAucti
|
|
|
17
17
|
private userAddress?;
|
|
18
18
|
private moduleAddresses?;
|
|
19
19
|
private gasLimit?;
|
|
20
|
+
private numerairePrice?;
|
|
21
|
+
private tokenDecimals?;
|
|
22
|
+
private numeraireDecimals?;
|
|
20
23
|
chainId: C;
|
|
21
24
|
constructor(chainId: C);
|
|
22
25
|
static forChain<C extends SupportedChainId>(chainId: C): MulticurveBuilder<C>;
|
|
@@ -51,7 +54,6 @@ declare class MulticurveBuilder<C extends SupportedChainId> implements BaseAucti
|
|
|
51
54
|
beneficiary: Address;
|
|
52
55
|
shares: bigint;
|
|
53
56
|
}[];
|
|
54
|
-
farTick?: number;
|
|
55
57
|
}): this;
|
|
56
58
|
withMarketCapPresets(params?: {
|
|
57
59
|
fee?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk4EGMIALP_js = require('../chunk-4EGMIALP.js');
|
|
4
4
|
require('../chunk-F3ZJCKLO.js');
|
|
5
5
|
require('../chunk-WTS75RUC.js');
|
|
6
6
|
require('../chunk-UPVKABAV.js');
|
|
@@ -13,7 +13,7 @@ require('../chunk-JTEZHYLY.js');
|
|
|
13
13
|
require('../chunk-RYYAINID.js');
|
|
14
14
|
require('../chunk-XSJTASPK.js');
|
|
15
15
|
require('../chunk-4DUE547M.js');
|
|
16
|
-
require('../chunk-
|
|
16
|
+
require('../chunk-MC4ZQEWY.js');
|
|
17
17
|
require('../chunk-GJAT5S24.js');
|
|
18
18
|
require('../chunk-H3IRAWA5.js');
|
|
19
19
|
require('../chunk-RK6EHB3X.js');
|
|
@@ -23,7 +23,7 @@ require('../chunk-MXSAPSI4.js');
|
|
|
23
23
|
|
|
24
24
|
Object.defineProperty(exports, "MulticurveBuilder", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk4EGMIALP_js.MulticurveBuilder; }
|
|
27
27
|
});
|
|
28
28
|
//# sourceMappingURL=MulticurveBuilder.js.map
|
|
29
29
|
//# sourceMappingURL=MulticurveBuilder.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { MulticurveBuilder } from '../chunk-
|
|
1
|
+
export { MulticurveBuilder } from '../chunk-HTJQIXTH.mjs';
|
|
2
2
|
import '../chunk-VGG33AOK.mjs';
|
|
3
3
|
import '../chunk-5TL5V6UX.mjs';
|
|
4
4
|
import '../chunk-H3B54PFV.mjs';
|
|
@@ -11,7 +11,7 @@ import '../chunk-IV2NRRYF.mjs';
|
|
|
11
11
|
import '../chunk-OTYM24TG.mjs';
|
|
12
12
|
import '../chunk-KOAC3BBP.mjs';
|
|
13
13
|
import '../chunk-LXUF7RNX.mjs';
|
|
14
|
-
import '../chunk-
|
|
14
|
+
import '../chunk-37V2HKFT.mjs';
|
|
15
15
|
import '../chunk-EC2TH76G.mjs';
|
|
16
16
|
import '../chunk-UVD3PV3B.mjs';
|
|
17
17
|
import '../chunk-7DCLWOKP.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkIF25GIO5_js = require('../chunk-IF25GIO5.js');
|
|
4
4
|
require('../chunk-F3ZJCKLO.js');
|
|
5
5
|
require('../chunk-WTS75RUC.js');
|
|
6
6
|
require('../chunk-UPVKABAV.js');
|
|
@@ -13,7 +13,7 @@ require('../chunk-JTEZHYLY.js');
|
|
|
13
13
|
require('../chunk-RYYAINID.js');
|
|
14
14
|
require('../chunk-XSJTASPK.js');
|
|
15
15
|
require('../chunk-4DUE547M.js');
|
|
16
|
-
require('../chunk-
|
|
16
|
+
require('../chunk-MC4ZQEWY.js');
|
|
17
17
|
require('../chunk-GJAT5S24.js');
|
|
18
18
|
require('../chunk-H3IRAWA5.js');
|
|
19
19
|
require('../chunk-RK6EHB3X.js');
|
|
@@ -23,7 +23,7 @@ require('../chunk-MXSAPSI4.js');
|
|
|
23
23
|
|
|
24
24
|
Object.defineProperty(exports, "StaticAuctionBuilder", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkIF25GIO5_js.StaticAuctionBuilder; }
|
|
27
27
|
});
|
|
28
28
|
//# sourceMappingURL=StaticAuctionBuilder.js.map
|
|
29
29
|
//# sourceMappingURL=StaticAuctionBuilder.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { StaticAuctionBuilder } from '../chunk-
|
|
1
|
+
export { StaticAuctionBuilder } from '../chunk-6ZGNKAIS.mjs';
|
|
2
2
|
import '../chunk-VGG33AOK.mjs';
|
|
3
3
|
import '../chunk-5TL5V6UX.mjs';
|
|
4
4
|
import '../chunk-H3B54PFV.mjs';
|
|
@@ -11,7 +11,7 @@ import '../chunk-IV2NRRYF.mjs';
|
|
|
11
11
|
import '../chunk-OTYM24TG.mjs';
|
|
12
12
|
import '../chunk-KOAC3BBP.mjs';
|
|
13
13
|
import '../chunk-LXUF7RNX.mjs';
|
|
14
|
-
import '../chunk-
|
|
14
|
+
import '../chunk-37V2HKFT.mjs';
|
|
15
15
|
import '../chunk-EC2TH76G.mjs';
|
|
16
16
|
import '../chunk-UVD3PV3B.mjs';
|
|
17
17
|
import '../chunk-7DCLWOKP.mjs';
|
package/dist/builders/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../chunk-JIKAD4YL.js');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
4
|
+
var chunkKGZT2XIV_js = require('../chunk-KGZT2XIV.js');
|
|
5
|
+
var chunk4EGMIALP_js = require('../chunk-4EGMIALP.js');
|
|
6
|
+
var chunkIF25GIO5_js = require('../chunk-IF25GIO5.js');
|
|
7
7
|
var chunkF3ZJCKLO_js = require('../chunk-F3ZJCKLO.js');
|
|
8
8
|
require('../chunk-WTS75RUC.js');
|
|
9
9
|
require('../chunk-UPVKABAV.js');
|
|
@@ -16,7 +16,7 @@ require('../chunk-JTEZHYLY.js');
|
|
|
16
16
|
require('../chunk-RYYAINID.js');
|
|
17
17
|
require('../chunk-XSJTASPK.js');
|
|
18
18
|
require('../chunk-4DUE547M.js');
|
|
19
|
-
require('../chunk-
|
|
19
|
+
require('../chunk-MC4ZQEWY.js');
|
|
20
20
|
require('../chunk-GJAT5S24.js');
|
|
21
21
|
require('../chunk-H3IRAWA5.js');
|
|
22
22
|
require('../chunk-RK6EHB3X.js');
|
|
@@ -26,15 +26,15 @@ require('../chunk-MXSAPSI4.js');
|
|
|
26
26
|
|
|
27
27
|
Object.defineProperty(exports, "DynamicAuctionBuilder", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkKGZT2XIV_js.DynamicAuctionBuilder; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "MulticurveBuilder", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunk4EGMIALP_js.MulticurveBuilder; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "StaticAuctionBuilder", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkIF25GIO5_js.StaticAuctionBuilder; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "MARKET_CAP_PRESETS", {
|
|
40
40
|
enumerable: true,
|
package/dist/builders/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../chunk-P25HBGP5.mjs';
|
|
2
|
-
export { DynamicAuctionBuilder } from '../chunk-
|
|
3
|
-
export { MulticurveBuilder } from '../chunk-
|
|
4
|
-
export { StaticAuctionBuilder } from '../chunk-
|
|
2
|
+
export { DynamicAuctionBuilder } from '../chunk-O3FGTSWS.mjs';
|
|
3
|
+
export { MulticurveBuilder } from '../chunk-HTJQIXTH.mjs';
|
|
4
|
+
export { StaticAuctionBuilder } from '../chunk-6ZGNKAIS.mjs';
|
|
5
5
|
export { MARKET_CAP_PRESETS, MARKET_CAP_PRESET_ORDER, buildCurvesFromPresets, computeTicks } from '../chunk-VGG33AOK.mjs';
|
|
6
6
|
import '../chunk-5TL5V6UX.mjs';
|
|
7
7
|
import '../chunk-H3B54PFV.mjs';
|
|
@@ -14,7 +14,7 @@ import '../chunk-IV2NRRYF.mjs';
|
|
|
14
14
|
import '../chunk-OTYM24TG.mjs';
|
|
15
15
|
import '../chunk-KOAC3BBP.mjs';
|
|
16
16
|
import '../chunk-LXUF7RNX.mjs';
|
|
17
|
-
import '../chunk-
|
|
17
|
+
import '../chunk-37V2HKFT.mjs';
|
|
18
18
|
import '../chunk-EC2TH76G.mjs';
|
|
19
19
|
import '../chunk-UVD3PV3B.mjs';
|
|
20
20
|
import '../chunk-7DCLWOKP.mjs';
|
|
@@ -21,5 +21,5 @@ var LockablePoolStatus = /* @__PURE__ */ ((LockablePoolStatus2) => {
|
|
|
21
21
|
})(LockablePoolStatus || {});
|
|
22
22
|
|
|
23
23
|
export { LockablePoolStatus, NO_OP_ENABLED_CHAIN_IDS, isNoOpEnabledChain };
|
|
24
|
-
//# sourceMappingURL=chunk-
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-37V2HKFT.mjs.map
|
|
25
|
+
//# sourceMappingURL=chunk-37V2HKFT.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types.ts"],"names":["LockablePoolStatus"],"mappings":";;;AA0EO,IAAM,uBAAA,GAA0B;AAAA,EACrC,SAAA,CAAU,IAAA;AAAA,EACV,SAAA,CAAU,YAAA;AAAA,EACV,SAAA,CAAU,QAAA;AAAA,EACV,SAAA,CAAU,gBAAA;AAAA,EACV,SAAA,CAAU,aAAA;AAAA,EACV,SAAA,CAAU;AACZ;AAOO,SAAS,mBACd,OAAA,EAC+B;AAC/B,EAAA,OAAQ,uBAAA,CAA8C,SAAS,OAAO,CAAA;AACxE;AAyBO,IAAK,kBAAA,qBAAAA,mBAAAA,KAAL;AACL,EAAAA,mBAAAA,CAAAA,mBAAAA,CAAA,mBAAgB,CAAA,CAAA,GAAhB,eAAA;AACA,EAAAA,mBAAAA,CAAAA,mBAAAA,CAAA,iBAAc,CAAA,CAAA,GAAd,aAAA;AACA,EAAAA,mBAAAA,CAAAA,mBAAAA,CAAA,YAAS,CAAA,CAAA,GAAT,QAAA;AACA,EAAAA,mBAAAA,CAAAA,mBAAAA,CAAA,YAAS,CAAA,CAAA,GAAT,QAAA;AAJU,EAAA,OAAAA,mBAAAA;AAAA,CAAA,EAAA,kBAAA,IAAA,EAAA","file":"chunk-YLUYLHLX.mjs","sourcesContent":["import { base, baseSepolia, ink, unichain } from 'viem/chains';\nimport { CHAIN_IDS, type SupportedChainId } from './addresses';\n// Re-export SupportedChainId so consumers can import from this module\nexport { type SupportedChainId } from './addresses';\nimport type { Address, WalletClient } from 'viem';\n\nexport type SupportedChain =\n | typeof base\n | typeof baseSepolia\n | typeof ink\n | typeof unichain\n | typeof baseSepolia;\n// Use a wide type to avoid cross-package viem type identity issues when linking packages locally.\nexport type SupportedPublicClient = unknown;\n\n// Core configuration types\n// Token configuration (discriminated union)\nexport interface StandardTokenConfig {\n type?: 'standard'; // default behavior (backwards compatible)\n name: string;\n symbol: string;\n tokenURI: string;\n yearlyMintRate?: bigint; // Optional yearly mint rate (in WAD, default: 2% = 0.02e18)\n}\n\nexport interface Doppler404TokenConfig {\n type: 'doppler404';\n name: string;\n symbol: string;\n baseURI: string;\n // Optional unit for DN404 factory (uint256). Defaults to 1000 when omitted.\n unit?: bigint;\n}\n\nexport type TokenConfig = StandardTokenConfig | Doppler404TokenConfig;\n\nexport interface SaleConfig {\n initialSupply: bigint;\n numTokensToSell: bigint;\n numeraire: Address; // e.g., WETH address\n}\n\n// Static Auction Pool configuration\nexport interface StaticPoolConfig {\n startTick: number;\n endTick: number;\n fee: number; // e.g., 3000 for 0.3%\n // Optional parameters for lockable initializer\n numPositions?: number; // Number of liquidity positions (default: based on tick range)\n maxShareToBeSold?: bigint; // Maximum share of tokens to sell (in WAD, default: 1e18 = 100%)\n beneficiaries?: BeneficiaryData[]; // Optional beneficiaries for fee streaming\n}\n\n// Dynamic Auction configuration\nexport interface DynamicAuctionConfig {\n duration: number; // in seconds\n epochLength: number; // in seconds\n startTick: number;\n endTick: number;\n gamma?: number; // Optional, can be auto-calculated\n minProceeds: bigint;\n maxProceeds: bigint;\n numPdSlugs?: number; // Price discovery slugs (optional)\n}\n\n// Vesting configuration\nexport interface VestingConfig {\n duration: number; // in seconds\n cliffDuration: number; // in seconds\n recipients?: Address[]; // Optional array of recipient addresses (defaults to [userAddress] if not specified)\n amounts?: bigint[]; // Optional array of vesting amounts per recipient (must match recipients length if provided)\n}\n\n// Chains where no-op governance is enabled\nexport const NO_OP_ENABLED_CHAIN_IDS = [\n CHAIN_IDS.BASE,\n CHAIN_IDS.BASE_SEPOLIA,\n CHAIN_IDS.UNICHAIN,\n CHAIN_IDS.UNICHAIN_SEPOLIA,\n CHAIN_IDS.MONAD_TESTNET,\n CHAIN_IDS.MONAD_MAINNET,\n] as const;\n\nexport type NoOpEnabledChainId = (typeof NO_OP_ENABLED_CHAIN_IDS)[number];\n\n/**\n * Check if a chain supports no-op governance\n */\nexport function isNoOpEnabledChain(\n chainId: number,\n): chainId is NoOpEnabledChainId {\n return (NO_OP_ENABLED_CHAIN_IDS as readonly number[]).includes(chainId);\n}\n\n// Governance configuration (discriminated union)\nexport type GovernanceDefault = { type: 'default' };\nexport interface GovernanceCustom {\n type: 'custom';\n initialVotingDelay: number;\n initialVotingPeriod: number;\n initialProposalThreshold: bigint;\n}\nexport type GovernanceNoOp = { type: 'noOp' };\n\nexport type GovernanceOption<C extends SupportedChainId> =\n | GovernanceDefault\n | GovernanceCustom\n | (C extends NoOpEnabledChainId ? GovernanceNoOp : never);\n\n// Unified beneficiary data used for fee streaming, lockable initializers, and migration configs\n// Uses shares in WAD format (1e18 = 100%) for consistency across all beneficiary configurations\nexport interface BeneficiaryData {\n beneficiary: Address;\n shares: bigint; // shares in WAD (1e18 = 100%)\n}\n\n// Pool status for lockable initializer\nexport enum LockablePoolStatus {\n Uninitialized = 0,\n Initialized = 1,\n Locked = 2,\n Exited = 3,\n}\n\n// Lockable pool state\nexport interface LockablePoolState {\n asset: Address;\n numeraire: Address;\n tickLower: number;\n tickUpper: number;\n maxShareToBeSold: bigint;\n totalTokensOnBondingCurve: bigint;\n status: LockablePoolStatus;\n}\n\n// Multicurve pool state (V4 initializer)\nexport interface MulticurvePoolState {\n asset: Address;\n numeraire: Address;\n fee: number;\n tickSpacing: number;\n status: LockablePoolStatus; // Reuses the same enum\n poolKey: V4PoolKey;\n farTick: number;\n}\n\n// Migration configuration (discriminated union)\nexport type MigrationConfig =\n | { type: 'uniswapV2' } // Basic migration to a new Uniswap v2 pool\n | {\n type: 'uniswapV4';\n fee: number;\n tickSpacing: number;\n // Configuration for fee streaming via StreamableFeesLocker (optional)\n // When omitted, fees are not locked and beneficiaries are not configured\n // This is useful when using noOp governance where lock duration is not meaningful\n streamableFees?: {\n lockDuration: number; // in seconds\n beneficiaries: BeneficiaryData[]; // Uses shares in WAD (1e18 = 100%)\n };\n }\n | { type: 'noOp' }; // No migration - used with lockable beneficiaries\n\n// Create Static Auction parameters\nexport interface CreateStaticAuctionParams<\n C extends SupportedChainId = SupportedChainId,\n> {\n // Token configuration\n token: TokenConfig;\n\n // Sale configuration\n sale: SaleConfig;\n\n // Static Auction (Uniswap v3) Pool configuration\n pool: StaticPoolConfig;\n\n // Vesting configuration (optional)\n vesting?: VestingConfig;\n\n // Governance configuration (required). Use `{ type: 'noOp' }` where enabled,\n // `{ type: 'default' }` for standard defaults, or `{ type: 'custom', ... }` to customize.\n governance: GovernanceOption<C>;\n\n // Explicit Migration Configuration\n migration: MigrationConfig;\n\n // Integrator details\n integrator?: Address;\n userAddress: Address;\n\n // Optional address overrides for on-chain modules used during encoding/creation\n modules?: ModuleAddressOverrides;\n\n // Optional transaction gas limit override for the create() transaction\n // If omitted, SDK will default to 13,500,000 gas for create()\n gas?: bigint;\n}\n\n// Create Dynamic Auction parameters\nexport interface CreateDynamicAuctionParams<\n C extends SupportedChainId = SupportedChainId,\n> {\n // Token configuration\n token: TokenConfig;\n\n // Sale configuration\n sale: SaleConfig;\n\n // Dynamic Auction (Uniswap v4 Hook) configuration\n auction: DynamicAuctionConfig;\n\n // Pool configuration\n pool: {\n fee: number; // e.g., 3000 for 0.3%\n tickSpacing: number;\n };\n\n // Vesting configuration (optional)\n vesting?: VestingConfig;\n\n // Governance configuration (required). Use `{ type: 'noOp' }` where enabled,\n // `{ type: 'default' }` for standard defaults, or `{ type: 'custom', ... }` to customize.\n governance: GovernanceOption<C>;\n\n // Explicit Migration Configuration\n migration: MigrationConfig;\n\n // Integrator details\n integrator?: Address;\n userAddress: Address;\n\n // Time configuration (internal use)\n startTimeOffset?: number;\n blockTimestamp?: number; // Optional: use this block timestamp instead of fetching latest\n\n // Optional transaction gas limit override for the create() transaction\n // If omitted, SDK will default to 13,500,000 gas for create()\n gas?: bigint;\n\n // Optional address overrides for on-chain modules used during encoding/creation\n modules?: ModuleAddressOverrides;\n}\n\n// Price range configuration for automatic tick calculation\nexport interface PriceRange {\n startPrice: number;\n endPrice: number;\n}\n\n// Tick range configuration\nexport interface TickRange {\n startTick: number;\n endTick: number;\n}\n\n// ============================================================================\n// Market Cap Configuration Types\n// ============================================================================\n\n/**\n * Market cap range in USD for price configurations.\n * Used to define start and end market caps for bonding curves.\n */\nexport interface MarketCapRange {\n /** Starting market cap in USD (e.g., 100_000 for $100k) */\n start: number;\n /** Ending market cap in USD (e.g., 10_000_000 for $10M) */\n end: number;\n}\n\n/**\n * Base configuration for market cap-based tick calculations.\n * Used by builder methods to convert market caps to ticks.\n */\nexport interface MarketCapConfig {\n /** Target market cap range in USD */\n marketCap: MarketCapRange;\n /** Price of numeraire in USD (e.g., 3000 for ETH at $3000) */\n numerairePrice: number;\n /**\n * Token supply override. If not provided, inferred from saleConfig.initialSupply.\n * Must include decimals (e.g., parseEther('1000000000') for 1B tokens).\n */\n tokenSupply?: bigint;\n /** Token decimals (default: 18) */\n tokenDecimals?: number;\n /** Numeraire decimals (default: 18) */\n numeraireDecimals?: number;\n}\n\n/**\n * Market cap configuration for V3 Static Auctions.\n * Extends base config with V3-specific parameters.\n */\nexport interface StaticAuctionMarketCapConfig extends MarketCapConfig {\n /** Fee tier in basis points (e.g., 10000 for 1%). Default: 10000 */\n fee?: number;\n /** Number of liquidity positions. Default: 15 */\n numPositions?: number;\n /** Maximum share of tokens to sell per position (WAD). Default: 35% */\n maxShareToBeSold?: bigint;\n}\n\n/**\n * Market cap range for V4 Dynamic Auctions (Dutch auctions).\n * Uses start/min because price descends from start to minimum.\n */\nexport interface DynamicMarketCapRange {\n /** Starting market cap in USD - auction begins here (e.g., 500_000 for $500k) */\n start: number;\n /** Minimum market cap in USD - floor price the auction descends to (e.g., 50_000 for $50k) */\n min: number;\n}\n\n/**\n * Market cap configuration for V4 Dynamic Auctions.\n * Uses start/min (not start/end) because Dutch auctions descend from start to minimum.\n */\nexport interface DynamicAuctionMarketCapConfig {\n /** Target market cap range (start = launch price, min = floor price) */\n marketCap: DynamicMarketCapRange;\n /** Price of numeraire in USD (e.g., 3000 for ETH at $3000) */\n numerairePrice: number;\n /**\n * Token supply override. If not provided, inferred from saleConfig.initialSupply.\n * Must include decimals (e.g., parseEther('1000000000') for 1B tokens).\n */\n tokenSupply?: bigint;\n /** Token decimals (default: 18) */\n tokenDecimals?: number;\n /** Numeraire decimals (default: 18) */\n numeraireDecimals?: number;\n /**\n * Pool fee in basis points. Default: 10000 (1%)\n *\n * V4 pools support any fee from 0 to 100,000 (10%).\n * Standard tiers (100, 500, 3000, 10000) auto-derive tickSpacing.\n * Custom fees require explicit tickSpacing parameter.\n */\n fee?: number;\n /**\n * Tick spacing for the pool. Required for custom fees.\n *\n * Must be <= 30 for Doppler pools (MAX_TICK_SPACING constraint).\n * If not provided with a standard fee tier, defaults to 30.\n */\n tickSpacing?: number;\n /** Minimum proceeds required for successful auction */\n minProceeds: bigint;\n /** Maximum proceeds cap for the auction */\n maxProceeds: bigint;\n /** Auction duration in seconds. Default: 7 days */\n duration?: number;\n /** Epoch length in seconds. Default: 3600 (1 hour) */\n epochLength?: number;\n /** Gamma (tick decay per epoch). Auto-calculated if not provided */\n gamma?: number;\n /** Number of price discovery slugs. Default: 5 */\n numPdSlugs?: number;\n}\n\n/**\n * Result of market cap parameter validation.\n */\nexport interface MarketCapValidationResult {\n /** Whether all parameters are within normal bounds */\n valid: boolean;\n /** Warning messages for unusual but technically valid values */\n warnings: string[];\n}\n\n// ============================================================================\n// Market Cap Helper Function Parameter Types\n// ============================================================================\n\n/**\n * Parameters for converting market cap range to ticks for V3 Static Auctions.\n */\nexport interface StaticAuctionTickParams {\n marketCapRange: MarketCapRange;\n tokenSupply: bigint;\n numerairePriceUSD: number;\n tickSpacing: number;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n}\n\n/**\n * Parameters for converting market cap range to ticks for V4 Dynamic Auctions.\n */\nexport interface DynamicAuctionTickParams {\n marketCapRange: MarketCapRange;\n tokenSupply: bigint;\n numerairePriceUSD: number;\n numeraire: Address;\n tickSpacing: number;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n}\n\n/**\n * Parameters for converting market cap range to ticks for V4 Multicurve pools.\n */\nexport interface MulticurveTickRangeParams {\n marketCapLower: number;\n marketCapUpper: number | 'max';\n tokenSupply: bigint;\n numerairePriceUSD: number;\n tickSpacing: number;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n}\n\n/**\n * Parameters for converting a single market cap to a tick for Multicurve.\n */\nexport interface MulticurveTickParams {\n marketCapUSD: number;\n tokenSupply: bigint;\n numerairePriceUSD: number;\n tickSpacing: number;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n}\n\n/**\n * Parameters for converting a tick to market cap (reverse conversion).\n */\nexport interface TickToMarketCapParams {\n tick: number;\n tokenSupply: bigint;\n numerairePriceUSD: number;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n}\n\n// ============================================================================\n// New Multicurve Market Cap API (no tick math required)\n// ============================================================================\n\n/**\n * Curve configuration for Multicurve pools using market cap ranges.\n * Each curve defines a market cap range and liquidity distribution.\n */\nexport interface MulticurveMarketCapRangeCurve {\n /** Market cap range for this curve */\n marketCap: {\n /** Start market cap in USD (for the first curve, this is the launch price) */\n start: number;\n /** End market cap in USD, or 'max' for MAX_TICK rounded to tick spacing */\n end: number | 'max';\n };\n /** Number of liquidity positions in this curve */\n numPositions: number;\n /** Share of total supply allocated to this curve (WAD, e.g., parseEther('0.3') = 30%) */\n shares: bigint;\n}\n\n/**\n * Market cap-based configuration for Multicurve pools.\n * No tick math required - just specify market caps in USD.\n */\nexport interface MulticurveMarketCapCurvesConfig {\n /** Price of numeraire in USD (e.g., 3000 for ETH at $3000) */\n numerairePrice: number;\n /**\n * Array of curves defining market cap ranges and liquidity distribution.\n * The first curve's marketCap.start is the launch price.\n * Curves must be contiguous (no gaps allowed).\n */\n curves: MulticurveMarketCapRangeCurve[];\n /** Token supply override */\n tokenSupply?: bigint;\n /** Token decimals (default: 18) */\n tokenDecimals?: number;\n /** Numeraire decimals (default: 18) */\n numeraireDecimals?: number;\n /** Fee tier (default: FEE_TIERS.LOW) */\n fee?: number;\n /** Tick spacing (derived from fee if not provided) */\n tickSpacing?: number;\n /** Optional beneficiaries for fee streaming */\n beneficiaries?: BeneficiaryData[];\n /**\n * Market cap at which the pool can graduate (migrate or change status).\n * Converted to farTick internally.\n * Note: This is NOT a cap - prices can exceed this value after graduation.\n * Must be within the curve boundaries (>= lowest start, <= highest end).\n * If not specified, defaults to the highest curve's tickUpper.\n */\n graduationMarketCap?: number;\n}\n\n// Build configuration for static auctions (V3-style)\nexport interface StaticAuctionBuildConfig {\n // Token details\n name: string;\n symbol: string;\n totalSupply?: bigint; // default: 1 billion\n numTokensToSell?: bigint; // default: 900 million\n tokenURI: string;\n\n // Time parameters\n startTimeOffset?: number; // Optional - seconds to add to current block timestamp (default: 30)\n\n // Price parameters - must provide either priceRange or tickRange\n numeraire: Address; // Required for V3\n tickRange?: TickRange;\n priceRange?: PriceRange;\n fee?: number; // default: 10000 (1%)\n\n // Pool parameters (V3 specific)\n numPositions?: number; // default: 15\n maxShareToBeSold?: bigint; // default: 35% in WAD\n\n // Vesting parameters\n yearlyMintRate?: bigint; // default: 2%\n vestingDuration?: bigint; // default: 1 year\n recipients?: Address[]; // defaults to [userAddress]\n amounts?: bigint[]; // defaults based on pre-mint calculation\n\n // Migration configuration\n migration: MigrationConfig;\n\n // Other parameters\n integrator?: Address;\n useGovernance?: boolean; // default: true\n}\n\n// Build configuration for dynamic auctions (V4-style)\nexport interface DynamicAuctionBuildConfig {\n // Token details\n name: string;\n symbol: string;\n totalSupply: bigint;\n numTokensToSell: bigint;\n tokenURI: string;\n\n // Time parameters\n startTimeOffset?: number; // Optional - seconds to add to block timestamp (default: 30)\n blockTimestamp?: number; // Optional - specific block timestamp to use (default: fetch latest)\n duration?: number; // in seconds (default: 604800 = 7 days)\n epochLength?: number; // in seconds (default: 3600)\n\n // Price parameters - must provide either priceRange or tickRange\n numeraire?: Address; // defaults to zero address\n tickRange?: TickRange;\n priceRange?: PriceRange;\n tickSpacing: number;\n gamma?: number; // auto-calculated if not provided\n fee: number; // In basis points\n\n // Sale parameters\n minProceeds: bigint;\n maxProceeds: bigint;\n numPdSlugs?: number; // default: 5\n\n // Vesting parameters\n yearlyMintRate?: bigint; // default: 2%\n vestingDuration: bigint;\n recipients: Address[];\n amounts: bigint[];\n\n // Migration configuration\n migration: MigrationConfig;\n\n // Other parameters\n integrator?: Address;\n useGovernance?: boolean; // default: true\n}\n\n// SDK initialization configuration\nexport interface DopplerSDKConfig {\n publicClient: SupportedPublicClient;\n walletClient?: WalletClient;\n chainId: number;\n}\n\n// Pool information types\nexport interface PoolInfo {\n address: Address;\n tokenAddress: Address;\n numeraireAddress: Address;\n fee: number;\n liquidity: bigint;\n sqrtPriceX96: bigint;\n}\n\nexport interface HookInfo {\n hookAddress: Address;\n tokenAddress: Address;\n numeraireAddress: Address;\n poolId: string;\n currentEpoch: number;\n totalProceeds: bigint;\n totalTokensSold: bigint;\n earlyExit: boolean;\n insufficientProceeds: boolean;\n startingTime: bigint;\n endingTime: bigint;\n epochLength: bigint;\n minimumProceeds: bigint;\n maximumProceeds: bigint;\n}\n\n// Quote result type\nexport interface QuoteResult {\n amountOut: bigint;\n priceImpact: number;\n fee: bigint;\n route: string[];\n}\n\n// Lockable Uniswap V3 Initializer encode params\nexport interface LockableV3InitializerParams {\n fee: number;\n tickLower: number;\n tickUpper: number;\n numPositions: number;\n maxShareToBeSold: bigint;\n beneficiaries: BeneficiaryData[];\n}\n\n// Multicurve curve configuration (mirrors solidity struct)\nexport interface MulticurveCurve {\n tickLower: number; // int24\n tickUpper: number; // int24\n numPositions: number; // uint16\n shares: bigint; // uint256 (WAD)\n}\n\nexport type MulticurveMarketCapPreset = 'low' | 'medium' | 'high';\n\nexport interface V4PoolKey {\n currency0: Address;\n currency1: Address;\n fee: number;\n tickSpacing: number;\n hooks: Address;\n}\n\nexport interface MulticurveBundleExactOutResult {\n asset: Address;\n poolKey: V4PoolKey;\n amountIn: bigint;\n gasEstimate: bigint;\n}\n\nexport interface MulticurveBundleExactInResult {\n asset: Address;\n poolKey: V4PoolKey;\n amountOut: bigint;\n gasEstimate: bigint;\n}\n\n// RehypeDopplerHook configuration for fee distribution and buyback\nexport interface RehypeDopplerHookConfig {\n // The hook contract address (must be whitelisted in the initializer)\n hookAddress: Address;\n // Destination address for buyback tokens\n buybackDestination: Address;\n // Custom swap fee in basis points (e.g., 3000 = 0.3%)\n customFee: number;\n // Fee distribution percentages (must sum to 100% / WAD)\n // Percentage of fees used for asset buyback (in WAD, e.g., 0.2e18 = 20%)\n assetBuybackPercentWad: bigint;\n // Percentage of fees used for numeraire buyback (in WAD, e.g., 0.2e18 = 20%)\n numeraireBuybackPercentWad: bigint;\n // Percentage of fees distributed to beneficiaries (in WAD, e.g., 0.3e18 = 30%)\n beneficiaryPercentWad: bigint;\n // Percentage of fees distributed to LPs (in WAD, e.g., 0.3e18 = 30%)\n lpPercentWad: bigint;\n // Optional graduation calldata (called when pool graduates)\n graduationCalldata?: `0x${string}`;\n}\n\n// Create Multicurve initializer parameters\nexport interface CreateMulticurveParams<\n C extends SupportedChainId = SupportedChainId,\n> {\n // Token configuration\n token: TokenConfig;\n\n // Sale configuration\n sale: SaleConfig;\n\n // Pool configuration for multicurve initializer\n pool: {\n fee: number;\n tickSpacing: number;\n curves: MulticurveCurve[];\n // Optional beneficiaries to lock the pool (fee collection only, no migration)\n beneficiaries?: BeneficiaryData[];\n // Optional far tick for the pool (defaults to max usable tick based on tickSpacing)\n farTick?: number;\n };\n\n // Optional scheduled launch configuration\n schedule?: {\n startTime: number;\n };\n\n dopplerHook?: RehypeDopplerHookConfig;\n\n // Vesting configuration (optional)\n vesting?: VestingConfig;\n\n // Governance configuration\n governance: GovernanceOption<C>;\n\n // Migration configuration (can be any supported migrator: V2, V3, or V4)\n migration: MigrationConfig;\n\n // Integrator details\n integrator?: Address;\n userAddress: Address;\n\n // Optional address overrides for on-chain modules used during encoding/creation\n modules?: ModuleAddressOverrides;\n\n // Optional transaction gas limit override for the create() transaction\n gas?: bigint;\n}\n\n// Final Params object that gets passed as arg to create\nexport interface CreateParams {\n initialSupply: bigint;\n numTokensToSell: bigint;\n numeraire: Address;\n tokenFactory: Address;\n tokenFactoryData: `0x${string}`;\n governanceFactory: Address;\n governanceFactoryData: `0x${string}`;\n poolInitializer: Address;\n poolInitializerData: `0x${string}`;\n liquidityMigrator: Address;\n liquidityMigratorData: `0x${string}`;\n integrator: Address;\n salt: `0x${string}`;\n}\n\n// Optional per-call module address overrides. When provided, these take precedence\n// over chain defaults resolved via getAddresses(chainId).\nexport interface ModuleAddressOverrides {\n // Core deployment & routing\n airlock?: Address;\n tokenFactory?: Address;\n\n // Initializers\n v3Initializer?: Address;\n lockableV3Initializer?: Address;\n v4Initializer?: Address;\n v4MulticurveInitializer?: Address;\n v4ScheduledMulticurveInitializer?: Address;\n dopplerHookInitializer?: Address;\n\n // DopplerHooks\n rehypeDopplerHook?: Address;\n\n // Governance\n governanceFactory?: Address;\n\n // Dynamic auction infra\n poolManager?: Address;\n dopplerDeployer?: Address;\n\n // Migrators\n v2Migrator?: Address;\n v4Migrator?: Address;\n noOpMigrator?: Address;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"names":["LockablePoolStatus"],"mappings":";;;AA0EO,IAAM,uBAAA,GAA0B;AAAA,EACrC,SAAA,CAAU,IAAA;AAAA,EACV,SAAA,CAAU,YAAA;AAAA,EACV,SAAA,CAAU,QAAA;AAAA,EACV,SAAA,CAAU,gBAAA;AAAA,EACV,SAAA,CAAU,aAAA;AAAA,EACV,SAAA,CAAU;AACZ;AAOO,SAAS,mBACd,OAAA,EAC+B;AAC/B,EAAA,OAAQ,uBAAA,CAA8C,SAAS,OAAO,CAAA;AACxE;AAyBO,IAAK,kBAAA,qBAAAA,mBAAAA,KAAL;AACL,EAAAA,mBAAAA,CAAAA,mBAAAA,CAAA,mBAAgB,CAAA,CAAA,GAAhB,eAAA;AACA,EAAAA,mBAAAA,CAAAA,mBAAAA,CAAA,iBAAc,CAAA,CAAA,GAAd,aAAA;AACA,EAAAA,mBAAAA,CAAAA,mBAAAA,CAAA,YAAS,CAAA,CAAA,GAAT,QAAA;AACA,EAAAA,mBAAAA,CAAAA,mBAAAA,CAAA,YAAS,CAAA,CAAA,GAAT,QAAA;AAJU,EAAA,OAAAA,mBAAAA;AAAA,CAAA,EAAA,kBAAA,IAAA,EAAA","file":"chunk-37V2HKFT.mjs","sourcesContent":["import { base, baseSepolia, ink, unichain } from 'viem/chains';\nimport { CHAIN_IDS, type SupportedChainId } from './addresses';\n// Re-export SupportedChainId so consumers can import from this module\nexport { type SupportedChainId } from './addresses';\nimport type { Address, WalletClient } from 'viem';\n\nexport type SupportedChain =\n | typeof base\n | typeof baseSepolia\n | typeof ink\n | typeof unichain\n | typeof baseSepolia;\n// Use a wide type to avoid cross-package viem type identity issues when linking packages locally.\nexport type SupportedPublicClient = unknown;\n\n// Core configuration types\n// Token configuration (discriminated union)\nexport interface StandardTokenConfig {\n type?: 'standard'; // default behavior (backwards compatible)\n name: string;\n symbol: string;\n tokenURI: string;\n yearlyMintRate?: bigint; // Optional yearly mint rate (in WAD, default: 2% = 0.02e18)\n}\n\nexport interface Doppler404TokenConfig {\n type: 'doppler404';\n name: string;\n symbol: string;\n baseURI: string;\n // Optional unit for DN404 factory (uint256). Defaults to 1000 when omitted.\n unit?: bigint;\n}\n\nexport type TokenConfig = StandardTokenConfig | Doppler404TokenConfig;\n\nexport interface SaleConfig {\n initialSupply: bigint;\n numTokensToSell: bigint;\n numeraire: Address; // e.g., WETH address\n}\n\n// Static Auction Pool configuration\nexport interface StaticPoolConfig {\n startTick: number;\n endTick: number;\n fee: number; // e.g., 3000 for 0.3%\n // Optional parameters for lockable initializer\n numPositions?: number; // Number of liquidity positions (default: based on tick range)\n maxShareToBeSold?: bigint; // Maximum share of tokens to sell (in WAD, default: 1e18 = 100%)\n beneficiaries?: BeneficiaryData[]; // Optional beneficiaries for fee streaming\n}\n\n// Dynamic Auction configuration\nexport interface DynamicAuctionConfig {\n duration: number; // in seconds\n epochLength: number; // in seconds\n startTick: number;\n endTick: number;\n gamma?: number; // Optional, can be auto-calculated\n minProceeds: bigint;\n maxProceeds: bigint;\n numPdSlugs?: number; // Price discovery slugs (optional)\n}\n\n// Vesting configuration\nexport interface VestingConfig {\n duration: number; // in seconds\n cliffDuration: number; // in seconds\n recipients?: Address[]; // Optional array of recipient addresses (defaults to [userAddress] if not specified)\n amounts?: bigint[]; // Optional array of vesting amounts per recipient (must match recipients length if provided)\n}\n\n// Chains where no-op governance is enabled\nexport const NO_OP_ENABLED_CHAIN_IDS = [\n CHAIN_IDS.BASE,\n CHAIN_IDS.BASE_SEPOLIA,\n CHAIN_IDS.UNICHAIN,\n CHAIN_IDS.UNICHAIN_SEPOLIA,\n CHAIN_IDS.MONAD_TESTNET,\n CHAIN_IDS.MONAD_MAINNET,\n] as const;\n\nexport type NoOpEnabledChainId = (typeof NO_OP_ENABLED_CHAIN_IDS)[number];\n\n/**\n * Check if a chain supports no-op governance\n */\nexport function isNoOpEnabledChain(\n chainId: number,\n): chainId is NoOpEnabledChainId {\n return (NO_OP_ENABLED_CHAIN_IDS as readonly number[]).includes(chainId);\n}\n\n// Governance configuration (discriminated union)\nexport type GovernanceDefault = { type: 'default' };\nexport interface GovernanceCustom {\n type: 'custom';\n initialVotingDelay: number;\n initialVotingPeriod: number;\n initialProposalThreshold: bigint;\n}\nexport type GovernanceNoOp = { type: 'noOp' };\n\nexport type GovernanceOption<C extends SupportedChainId> =\n | GovernanceDefault\n | GovernanceCustom\n | (C extends NoOpEnabledChainId ? GovernanceNoOp : never);\n\n// Unified beneficiary data used for fee streaming, lockable initializers, and migration configs\n// Uses shares in WAD format (1e18 = 100%) for consistency across all beneficiary configurations\nexport interface BeneficiaryData {\n beneficiary: Address;\n shares: bigint; // shares in WAD (1e18 = 100%)\n}\n\n// Pool status for lockable initializer\nexport enum LockablePoolStatus {\n Uninitialized = 0,\n Initialized = 1,\n Locked = 2,\n Exited = 3,\n}\n\n// Lockable pool state\nexport interface LockablePoolState {\n asset: Address;\n numeraire: Address;\n tickLower: number;\n tickUpper: number;\n maxShareToBeSold: bigint;\n totalTokensOnBondingCurve: bigint;\n status: LockablePoolStatus;\n}\n\n// Multicurve pool state (V4 initializer)\nexport interface MulticurvePoolState {\n asset: Address;\n numeraire: Address;\n fee: number;\n tickSpacing: number;\n status: LockablePoolStatus; // Reuses the same enum\n poolKey: V4PoolKey;\n farTick: number;\n}\n\n// Migration configuration (discriminated union)\nexport type MigrationConfig =\n | { type: 'uniswapV2' } // Basic migration to a new Uniswap v2 pool\n | {\n type: 'uniswapV4';\n fee: number;\n tickSpacing: number;\n // Configuration for fee streaming via StreamableFeesLocker (optional)\n // When omitted, fees are not locked and beneficiaries are not configured\n // This is useful when using noOp governance where lock duration is not meaningful\n streamableFees?: {\n lockDuration: number; // in seconds\n beneficiaries: BeneficiaryData[]; // Uses shares in WAD (1e18 = 100%)\n };\n }\n | { type: 'noOp' }; // No migration - used with lockable beneficiaries\n\n// Create Static Auction parameters\nexport interface CreateStaticAuctionParams<\n C extends SupportedChainId = SupportedChainId,\n> {\n // Token configuration\n token: TokenConfig;\n\n // Sale configuration\n sale: SaleConfig;\n\n // Static Auction (Uniswap v3) Pool configuration\n pool: StaticPoolConfig;\n\n // Vesting configuration (optional)\n vesting?: VestingConfig;\n\n // Governance configuration (required). Use `{ type: 'noOp' }` where enabled,\n // `{ type: 'default' }` for standard defaults, or `{ type: 'custom', ... }` to customize.\n governance: GovernanceOption<C>;\n\n // Explicit Migration Configuration\n migration: MigrationConfig;\n\n // Integrator details\n integrator?: Address;\n userAddress: Address;\n\n // Optional address overrides for on-chain modules used during encoding/creation\n modules?: ModuleAddressOverrides;\n\n // Optional transaction gas limit override for the create() transaction\n // If omitted, SDK will default to 13,500,000 gas for create()\n gas?: bigint;\n}\n\n// Create Dynamic Auction parameters\nexport interface CreateDynamicAuctionParams<\n C extends SupportedChainId = SupportedChainId,\n> {\n // Token configuration\n token: TokenConfig;\n\n // Sale configuration\n sale: SaleConfig;\n\n // Dynamic Auction (Uniswap v4 Hook) configuration\n auction: DynamicAuctionConfig;\n\n // Pool configuration\n pool: {\n fee: number; // e.g., 3000 for 0.3%\n tickSpacing: number;\n };\n\n // Vesting configuration (optional)\n vesting?: VestingConfig;\n\n // Governance configuration (required). Use `{ type: 'noOp' }` where enabled,\n // `{ type: 'default' }` for standard defaults, or `{ type: 'custom', ... }` to customize.\n governance: GovernanceOption<C>;\n\n // Explicit Migration Configuration\n migration: MigrationConfig;\n\n // Integrator details\n integrator?: Address;\n userAddress: Address;\n\n // Time configuration (internal use)\n startTimeOffset?: number;\n blockTimestamp?: number; // Optional: use this block timestamp instead of fetching latest\n\n // Optional transaction gas limit override for the create() transaction\n // If omitted, SDK will default to 13,500,000 gas for create()\n gas?: bigint;\n\n // Optional address overrides for on-chain modules used during encoding/creation\n modules?: ModuleAddressOverrides;\n}\n\n// Price range configuration for automatic tick calculation\nexport interface PriceRange {\n startPrice: number;\n endPrice: number;\n}\n\n// Tick range configuration\nexport interface TickRange {\n startTick: number;\n endTick: number;\n}\n\n// ============================================================================\n// Market Cap Configuration Types\n// ============================================================================\n\n/**\n * Market cap range in USD for price configurations.\n * Used to define start and end market caps for bonding curves.\n */\nexport interface MarketCapRange {\n /** Starting market cap in USD (e.g., 100_000 for $100k) */\n start: number;\n /** Ending market cap in USD (e.g., 10_000_000 for $10M) */\n end: number;\n}\n\n/**\n * Base configuration for market cap-based tick calculations.\n * Used by builder methods to convert market caps to ticks.\n */\nexport interface MarketCapConfig {\n /** Target market cap range in USD */\n marketCap: MarketCapRange;\n /** Price of numeraire in USD (e.g., 3000 for ETH at $3000) */\n numerairePrice: number;\n /**\n * Token supply override. If not provided, inferred from saleConfig.initialSupply.\n * Must include decimals (e.g., parseEther('1000000000') for 1B tokens).\n */\n tokenSupply?: bigint;\n /** Token decimals (default: 18) */\n tokenDecimals?: number;\n /** Numeraire decimals (default: 18) */\n numeraireDecimals?: number;\n}\n\n/**\n * Market cap configuration for V3 Static Auctions.\n * Extends base config with V3-specific parameters.\n */\nexport interface StaticAuctionMarketCapConfig extends MarketCapConfig {\n /** Fee tier in basis points (e.g., 10000 for 1%). Default: 10000 */\n fee?: number;\n /** Number of liquidity positions. Default: 15 */\n numPositions?: number;\n /** Maximum share of tokens to sell per position (WAD). Default: 35% */\n maxShareToBeSold?: bigint;\n}\n\n/**\n * Market cap range for V4 Dynamic Auctions (Dutch auctions).\n * Uses start/min because price descends from start to minimum.\n */\nexport interface DynamicMarketCapRange {\n /** Starting market cap in USD - auction begins here (e.g., 500_000 for $500k) */\n start: number;\n /** Minimum market cap in USD - floor price the auction descends to (e.g., 50_000 for $50k) */\n min: number;\n}\n\n/**\n * Market cap configuration for V4 Dynamic Auctions.\n * Uses start/min (not start/end) because Dutch auctions descend from start to minimum.\n */\nexport interface DynamicAuctionMarketCapConfig {\n /** Target market cap range (start = launch price, min = floor price) */\n marketCap: DynamicMarketCapRange;\n /** Price of numeraire in USD (e.g., 3000 for ETH at $3000) */\n numerairePrice: number;\n /**\n * Token supply override. If not provided, inferred from saleConfig.initialSupply.\n * Must include decimals (e.g., parseEther('1000000000') for 1B tokens).\n */\n tokenSupply?: bigint;\n /** Token decimals (default: 18) */\n tokenDecimals?: number;\n /** Numeraire decimals (default: 18) */\n numeraireDecimals?: number;\n /**\n * Pool fee in basis points. Default: 10000 (1%)\n *\n * V4 pools support any fee from 0 to 100,000 (10%).\n * Standard tiers (100, 500, 3000, 10000) auto-derive tickSpacing.\n * Custom fees require explicit tickSpacing parameter.\n */\n fee?: number;\n /**\n * Tick spacing for the pool. Required for custom fees.\n *\n * Must be <= 30 for Doppler pools (MAX_TICK_SPACING constraint).\n * If not provided with a standard fee tier, defaults to 30.\n */\n tickSpacing?: number;\n /** Minimum proceeds required for successful auction */\n minProceeds: bigint;\n /** Maximum proceeds cap for the auction */\n maxProceeds: bigint;\n /** Auction duration in seconds. Default: 7 days */\n duration?: number;\n /** Epoch length in seconds. Default: 3600 (1 hour) */\n epochLength?: number;\n /** Gamma (tick decay per epoch). Auto-calculated if not provided */\n gamma?: number;\n /** Number of price discovery slugs. Default: 5 */\n numPdSlugs?: number;\n}\n\n/**\n * Result of market cap parameter validation.\n */\nexport interface MarketCapValidationResult {\n /** Whether all parameters are within normal bounds */\n valid: boolean;\n /** Warning messages for unusual but technically valid values */\n warnings: string[];\n}\n\n// ============================================================================\n// Market Cap Helper Function Parameter Types\n// ============================================================================\n\n/**\n * Parameters for converting market cap range to ticks for V3 Static Auctions.\n */\nexport interface StaticAuctionTickParams {\n marketCapRange: MarketCapRange;\n tokenSupply: bigint;\n numerairePriceUSD: number;\n tickSpacing: number;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n}\n\n/**\n * Parameters for converting market cap range to ticks for V4 Dynamic Auctions.\n */\nexport interface DynamicAuctionTickParams {\n marketCapRange: MarketCapRange;\n tokenSupply: bigint;\n numerairePriceUSD: number;\n numeraire: Address;\n tickSpacing: number;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n}\n\n/**\n * Parameters for converting market cap range to ticks for V4 Multicurve pools.\n */\nexport interface MulticurveTickRangeParams {\n marketCapLower: number;\n marketCapUpper: number | 'max';\n tokenSupply: bigint;\n numerairePriceUSD: number;\n tickSpacing: number;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n}\n\n/**\n * Parameters for converting a single market cap to a tick for Multicurve.\n */\nexport interface MulticurveTickParams {\n marketCapUSD: number;\n tokenSupply: bigint;\n numerairePriceUSD: number;\n tickSpacing: number;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n}\n\n/**\n * Parameters for converting a tick to market cap (reverse conversion).\n */\nexport interface TickToMarketCapParams {\n tick: number;\n tokenSupply: bigint;\n numerairePriceUSD: number;\n tokenDecimals?: number;\n numeraireDecimals?: number;\n}\n\n// ============================================================================\n// New Multicurve Market Cap API (no tick math required)\n// ============================================================================\n\n/**\n * Curve configuration for Multicurve pools using market cap ranges.\n * Each curve defines a market cap range and liquidity distribution.\n */\nexport interface MulticurveMarketCapRangeCurve {\n /** Market cap range for this curve */\n marketCap: {\n /** Start market cap in USD (for the first curve, this is the launch price) */\n start: number;\n /** End market cap in USD, or 'max' for MAX_TICK rounded to tick spacing */\n end: number | 'max';\n };\n /** Number of liquidity positions in this curve */\n numPositions: number;\n /** Share of total supply allocated to this curve (WAD, e.g., parseEther('0.3') = 30%) */\n shares: bigint;\n}\n\n/**\n * Market cap-based configuration for Multicurve pools.\n * No tick math required - just specify market caps in USD.\n */\nexport interface MulticurveMarketCapCurvesConfig {\n /** Price of numeraire in USD (e.g., 3000 for ETH at $3000) */\n numerairePrice: number;\n /**\n * Array of curves defining market cap ranges and liquidity distribution.\n * The first curve's marketCap.start is the launch price.\n * Curves must be contiguous (no gaps allowed).\n */\n curves: MulticurveMarketCapRangeCurve[];\n /** Token supply override */\n tokenSupply?: bigint;\n /** Token decimals (default: 18) */\n tokenDecimals?: number;\n /** Numeraire decimals (default: 18) */\n numeraireDecimals?: number;\n /** Fee tier (default: FEE_TIERS.LOW) */\n fee?: number;\n /** Tick spacing (derived from fee if not provided) */\n tickSpacing?: number;\n /** Optional beneficiaries for fee streaming */\n beneficiaries?: BeneficiaryData[];\n}\n\n// Build configuration for static auctions (V3-style)\nexport interface StaticAuctionBuildConfig {\n // Token details\n name: string;\n symbol: string;\n totalSupply?: bigint; // default: 1 billion\n numTokensToSell?: bigint; // default: 900 million\n tokenURI: string;\n\n // Time parameters\n startTimeOffset?: number; // Optional - seconds to add to current block timestamp (default: 30)\n\n // Price parameters - must provide either priceRange or tickRange\n numeraire: Address; // Required for V3\n tickRange?: TickRange;\n priceRange?: PriceRange;\n fee?: number; // default: 10000 (1%)\n\n // Pool parameters (V3 specific)\n numPositions?: number; // default: 15\n maxShareToBeSold?: bigint; // default: 35% in WAD\n\n // Vesting parameters\n yearlyMintRate?: bigint; // default: 2%\n vestingDuration?: bigint; // default: 1 year\n recipients?: Address[]; // defaults to [userAddress]\n amounts?: bigint[]; // defaults based on pre-mint calculation\n\n // Migration configuration\n migration: MigrationConfig;\n\n // Other parameters\n integrator?: Address;\n useGovernance?: boolean; // default: true\n}\n\n// Build configuration for dynamic auctions (V4-style)\nexport interface DynamicAuctionBuildConfig {\n // Token details\n name: string;\n symbol: string;\n totalSupply: bigint;\n numTokensToSell: bigint;\n tokenURI: string;\n\n // Time parameters\n startTimeOffset?: number; // Optional - seconds to add to block timestamp (default: 30)\n blockTimestamp?: number; // Optional - specific block timestamp to use (default: fetch latest)\n duration?: number; // in seconds (default: 604800 = 7 days)\n epochLength?: number; // in seconds (default: 3600)\n\n // Price parameters - must provide either priceRange or tickRange\n numeraire?: Address; // defaults to zero address\n tickRange?: TickRange;\n priceRange?: PriceRange;\n tickSpacing: number;\n gamma?: number; // auto-calculated if not provided\n fee: number; // In basis points\n\n // Sale parameters\n minProceeds: bigint;\n maxProceeds: bigint;\n numPdSlugs?: number; // default: 5\n\n // Vesting parameters\n yearlyMintRate?: bigint; // default: 2%\n vestingDuration: bigint;\n recipients: Address[];\n amounts: bigint[];\n\n // Migration configuration\n migration: MigrationConfig;\n\n // Other parameters\n integrator?: Address;\n useGovernance?: boolean; // default: true\n}\n\n// SDK initialization configuration\nexport interface DopplerSDKConfig {\n publicClient: SupportedPublicClient;\n walletClient?: WalletClient;\n chainId: number;\n}\n\n// Pool information types\nexport interface PoolInfo {\n address: Address;\n tokenAddress: Address;\n numeraireAddress: Address;\n fee: number;\n liquidity: bigint;\n sqrtPriceX96: bigint;\n}\n\nexport interface HookInfo {\n hookAddress: Address;\n tokenAddress: Address;\n numeraireAddress: Address;\n poolId: string;\n currentEpoch: number;\n totalProceeds: bigint;\n totalTokensSold: bigint;\n earlyExit: boolean;\n insufficientProceeds: boolean;\n startingTime: bigint;\n endingTime: bigint;\n epochLength: bigint;\n minimumProceeds: bigint;\n maximumProceeds: bigint;\n}\n\n// Quote result type\nexport interface QuoteResult {\n amountOut: bigint;\n priceImpact: number;\n fee: bigint;\n route: string[];\n}\n\n// Lockable Uniswap V3 Initializer encode params\nexport interface LockableV3InitializerParams {\n fee: number;\n tickLower: number;\n tickUpper: number;\n numPositions: number;\n maxShareToBeSold: bigint;\n beneficiaries: BeneficiaryData[];\n}\n\n// Multicurve curve configuration (mirrors solidity struct)\nexport interface MulticurveCurve {\n tickLower: number; // int24\n tickUpper: number; // int24\n numPositions: number; // uint16\n shares: bigint; // uint256 (WAD)\n}\n\nexport type MulticurveMarketCapPreset = 'low' | 'medium' | 'high';\n\nexport interface V4PoolKey {\n currency0: Address;\n currency1: Address;\n fee: number;\n tickSpacing: number;\n hooks: Address;\n}\n\nexport interface MulticurveBundleExactOutResult {\n asset: Address;\n poolKey: V4PoolKey;\n amountIn: bigint;\n gasEstimate: bigint;\n}\n\nexport interface MulticurveBundleExactInResult {\n asset: Address;\n poolKey: V4PoolKey;\n amountOut: bigint;\n gasEstimate: bigint;\n}\n\n// RehypeDopplerHook configuration for fee distribution and buyback\nexport interface RehypeDopplerHookConfig {\n // The hook contract address (must be whitelisted in the initializer)\n hookAddress: Address;\n // Destination address for buyback tokens\n buybackDestination: Address;\n // Custom swap fee in basis points (e.g., 3000 = 0.3%)\n customFee: number;\n // Fee distribution percentages (must sum to 100% / WAD)\n // Percentage of fees used for asset buyback (in WAD, e.g., 0.2e18 = 20%)\n assetBuybackPercentWad: bigint;\n // Percentage of fees used for numeraire buyback (in WAD, e.g., 0.2e18 = 20%)\n numeraireBuybackPercentWad: bigint;\n // Percentage of fees distributed to beneficiaries (in WAD, e.g., 0.3e18 = 30%)\n beneficiaryPercentWad: bigint;\n // Percentage of fees distributed to LPs (in WAD, e.g., 0.3e18 = 30%)\n lpPercentWad: bigint;\n // Optional graduation calldata (called when pool graduates)\n graduationCalldata?: `0x${string}`;\n\n // Graduation threshold configuration (rehype-only)\n // Market cap in USD at which pool can graduate. Requires numerairePrice (from withCurves() or explicit).\n graduationMarketCap?: number;\n // Price of numeraire in USD. Optional if using withCurves() (reuses that value). Required with poolConfig().\n numerairePrice?: number;\n // Direct tick value for graduation threshold. Use graduationMarketCap for USD-based config.\n farTick?: number;\n}\n\n// Create Multicurve initializer parameters\nexport interface CreateMulticurveParams<\n C extends SupportedChainId = SupportedChainId,\n> {\n // Token configuration\n token: TokenConfig;\n\n // Sale configuration\n sale: SaleConfig;\n\n // Pool configuration for multicurve initializer\n pool: {\n fee: number;\n tickSpacing: number;\n curves: MulticurveCurve[];\n // Optional beneficiaries to lock the pool (fee collection only, no migration)\n beneficiaries?: BeneficiaryData[];\n };\n\n // Optional scheduled launch configuration\n schedule?: {\n startTime: number;\n };\n\n dopplerHook?: RehypeDopplerHookConfig;\n\n // Vesting configuration (optional)\n vesting?: VestingConfig;\n\n // Governance configuration\n governance: GovernanceOption<C>;\n\n // Migration configuration (can be any supported migrator: V2, V3, or V4)\n migration: MigrationConfig;\n\n // Integrator details\n integrator?: Address;\n userAddress: Address;\n\n // Optional address overrides for on-chain modules used during encoding/creation\n modules?: ModuleAddressOverrides;\n\n // Optional transaction gas limit override for the create() transaction\n gas?: bigint;\n}\n\n// Final Params object that gets passed as arg to create\nexport interface CreateParams {\n initialSupply: bigint;\n numTokensToSell: bigint;\n numeraire: Address;\n tokenFactory: Address;\n tokenFactoryData: `0x${string}`;\n governanceFactory: Address;\n governanceFactoryData: `0x${string}`;\n poolInitializer: Address;\n poolInitializerData: `0x${string}`;\n liquidityMigrator: Address;\n liquidityMigratorData: `0x${string}`;\n integrator: Address;\n salt: `0x${string}`;\n}\n\n// Optional per-call module address overrides. When provided, these take precedence\n// over chain defaults resolved via getAddresses(chainId).\nexport interface ModuleAddressOverrides {\n // Core deployment & routing\n airlock?: Address;\n tokenFactory?: Address;\n\n // Initializers\n v3Initializer?: Address;\n lockableV3Initializer?: Address;\n v4Initializer?: Address;\n v4MulticurveInitializer?: Address;\n v4ScheduledMulticurveInitializer?: Address;\n dopplerHookInitializer?: Address;\n\n // DopplerHooks\n rehypeDopplerHook?: Address;\n\n // Governance\n governanceFactory?: Address;\n\n // Dynamic auction infra\n poolManager?: Address;\n dopplerDeployer?: Address;\n\n // Migrators\n v2Migrator?: Address;\n v4Migrator?: Address;\n noOpMigrator?: Address;\n}\n"]}
|
|
@@ -853,7 +853,13 @@ var DopplerFactory = class {
|
|
|
853
853
|
);
|
|
854
854
|
let poolInitializerData;
|
|
855
855
|
if (useDopplerHookInitializer) {
|
|
856
|
-
|
|
856
|
+
let farTick;
|
|
857
|
+
if (params.dopplerHook?.farTick !== void 0) {
|
|
858
|
+
farTick = params.dopplerHook.farTick;
|
|
859
|
+
} else {
|
|
860
|
+
const allTickUppers = params.pool.curves.map((c) => c.tickUpper);
|
|
861
|
+
farTick = Math.max(...allTickUppers);
|
|
862
|
+
}
|
|
857
863
|
let onInitializationDopplerHookCalldata = "0x";
|
|
858
864
|
let graduationDopplerHookCalldata = "0x";
|
|
859
865
|
let dopplerHookAddress = chunk4DUE547M_js.ZERO_ADDRESS;
|
|
@@ -2089,5 +2095,5 @@ var DopplerFactory = class {
|
|
|
2089
2095
|
var MULTICURVE_BUNDLER_SELECTORS = ["0xe2e9faa1", "0x07087b06"];
|
|
2090
2096
|
|
|
2091
2097
|
exports.DopplerFactory = DopplerFactory;
|
|
2092
|
-
//# sourceMappingURL=chunk-
|
|
2093
|
-
//# sourceMappingURL=chunk-
|
|
2098
|
+
//# sourceMappingURL=chunk-45K7HWN3.js.map
|
|
2099
|
+
//# sourceMappingURL=chunk-45K7HWN3.js.map
|