@meteora-ag/dynamic-bonding-curve-sdk 1.4.5 → 1.4.6-rc.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/README.md +15 -4
- package/dist/index.cjs +204 -179
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +398 -349
- package/dist/index.d.ts +398 -349
- package/dist/index.js +204 -179
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,6 +40,21 @@ The generic flow of how Dynamic Bonding Curve works is as follows:
|
|
|
40
40
|
4. Meteora's migrator service migrates the pool to either DAMM V1 or DAMM V2 based on the config key once the migration quote threshold is met.
|
|
41
41
|
5. The graduated pool is tradeable on either DAMM V1 or DAMM V2.
|
|
42
42
|
|
|
43
|
+
## Flow of migration
|
|
44
|
+
|
|
45
|
+
### DAMM V1
|
|
46
|
+
|
|
47
|
+
1. `createDammV1MigrationMetadata`
|
|
48
|
+
2. `createLocker` (if the token has locked vesting)
|
|
49
|
+
3. `migrateToDammV1`
|
|
50
|
+
4. `lockDammV1LpToken` (if `creatorLockedLpPercentage` or `partnerLockedLpPercentage` is >0)
|
|
51
|
+
5. `claimDammV1LpToken` (if `creatorLpPercentage` or `partnerLpPercentage` is >0)
|
|
52
|
+
|
|
53
|
+
### DAMM V2
|
|
54
|
+
|
|
55
|
+
1. `createLocker` (if the token has locked vesting)
|
|
56
|
+
2. `migrateToDammV2`
|
|
57
|
+
|
|
43
58
|
### Test
|
|
44
59
|
|
|
45
60
|
```bash
|
|
@@ -58,8 +73,6 @@ We have created a [Manual Migrator UI](https://migrator.meteora.ag) that allows
|
|
|
58
73
|
|
|
59
74
|
### Graduated DAMM Pool Config Keys
|
|
60
75
|
|
|
61
|
-
#### DAMM V1:
|
|
62
|
-
|
|
63
76
|
Accessible via `DAMM_V1_MIGRATION_FEE_ADDRESS[i]` in the SDK.
|
|
64
77
|
|
|
65
78
|
- MigrationFeeOption.FixedBps25 == 0: 8f848CEy8eY6PhJ3VcemtBDzPPSD4Vq7aJczLZ3o8MmX
|
|
@@ -69,8 +82,6 @@ Accessible via `DAMM_V1_MIGRATION_FEE_ADDRESS[i]` in the SDK.
|
|
|
69
82
|
- MigrationFeeOption.FixedBps400 == 4: 9EZYAJrcqNWNQzP2trzZesP7XKMHA1jEomHzbRsdX8R2
|
|
70
83
|
- MigrationFeeOption.FixedBps600 == 5: 8cdKo87jZU2R12KY1BUjjRPwyjgdNjLGqSGQyrDshhud
|
|
71
84
|
|
|
72
|
-
#### DAMM V2:
|
|
73
|
-
|
|
74
85
|
Accessible via `DAMM_V2_MIGRATION_FEE_ADDRESS[i]` in the SDK.
|
|
75
86
|
|
|
76
87
|
- MigrationFeeOption.FixedBps25 == 0: 7F6dnUcRuyM2TwR8myT1dYypFXpPSxqwKNSFNkxyNESd
|
package/dist/index.cjs
CHANGED
|
@@ -92,17 +92,16 @@ var MAX_SQRT_PRICE = new (0, _bnjs2.default)("79226673521066979257578248091");
|
|
|
92
92
|
var RESOLUTION = 64;
|
|
93
93
|
var ONE_Q64 = new (0, _bnjs2.default)(1).shln(RESOLUTION);
|
|
94
94
|
var FEE_DENOMINATOR = 1e9;
|
|
95
|
-
var MIN_FEE_BPS =
|
|
95
|
+
var MIN_FEE_BPS = 25;
|
|
96
96
|
var MAX_FEE_BPS = 9900;
|
|
97
|
-
var MIN_FEE_NUMERATOR =
|
|
97
|
+
var MIN_FEE_NUMERATOR = 25e5;
|
|
98
98
|
var MAX_FEE_NUMERATOR = 99e7;
|
|
99
99
|
var BASIS_POINT_MAX = 1e4;
|
|
100
100
|
var MAX_CURVE_POINT = 16;
|
|
101
101
|
var PARTNER_SURPLUS_SHARE = 80;
|
|
102
102
|
var SWAP_BUFFER_PERCENTAGE = 25;
|
|
103
|
-
var MAX_MIGRATION_FEE_PERCENTAGE =
|
|
103
|
+
var MAX_MIGRATION_FEE_PERCENTAGE = 99;
|
|
104
104
|
var MAX_CREATOR_MIGRATION_FEE_PERCENTAGE = 100;
|
|
105
|
-
var MAX_SWALLOW_PERCENTAGE = 20;
|
|
106
105
|
var MAX_RATE_LIMITER_DURATION_IN_SECONDS = 43200;
|
|
107
106
|
var MAX_RATE_LIMITER_DURATION_IN_SLOTS = 108e3;
|
|
108
107
|
var SLOT_DURATION = 400;
|
|
@@ -936,7 +935,7 @@ var getMigrationThresholdPrice = (migrationThreshold, sqrtStartPrice, curve) =>
|
|
|
936
935
|
};
|
|
937
936
|
var getSwapAmountWithBuffer = (swapBaseAmount, sqrtStartPrice, curve) => {
|
|
938
937
|
const swapAmountBuffer = swapBaseAmount.add(
|
|
939
|
-
swapBaseAmount.mul(new (0, _bnjs2.default)(
|
|
938
|
+
swapBaseAmount.mul(new (0, _bnjs2.default)(SWAP_BUFFER_PERCENTAGE)).div(new (0, _bnjs2.default)(100))
|
|
940
939
|
);
|
|
941
940
|
const maxBaseAmountOnCurve = getBaseTokenForSwap(
|
|
942
941
|
sqrtStartPrice,
|
|
@@ -2009,15 +2008,6 @@ function toNumerator(bps, feeDenominator) {
|
|
|
2009
2008
|
);
|
|
2010
2009
|
}
|
|
2011
2010
|
}
|
|
2012
|
-
function getMaxSwallowQuoteAmount(config) {
|
|
2013
|
-
const maxSwallowAmount = mulDiv(
|
|
2014
|
-
config.migrationQuoteThreshold,
|
|
2015
|
-
new (0, _bnjs2.default)(MAX_SWALLOW_PERCENTAGE),
|
|
2016
|
-
new (0, _bnjs2.default)(100),
|
|
2017
|
-
1 /* Down */
|
|
2018
|
-
);
|
|
2019
|
-
return maxSwallowAmount;
|
|
2020
|
-
}
|
|
2021
2011
|
function getFeeMode(collectFeeMode, tradeDirection, hasReferral) {
|
|
2022
2012
|
let feesOnInput;
|
|
2023
2013
|
let feesOnBaseToken;
|
|
@@ -2285,9 +2275,12 @@ function getSwapResultFromExactInput(virtualPool, config, amountIn, feeMode, tra
|
|
|
2285
2275
|
config,
|
|
2286
2276
|
virtualPool.sqrtPrice,
|
|
2287
2277
|
actualAmountIn,
|
|
2288
|
-
|
|
2278
|
+
config.migrationSqrtPrice
|
|
2289
2279
|
);
|
|
2290
2280
|
const { outputAmount, nextSqrtPrice, amountLeft } = swapAmountFromInput;
|
|
2281
|
+
if (!amountLeft.isZero()) {
|
|
2282
|
+
throw new Error("Swap amount is over a threshold");
|
|
2283
|
+
}
|
|
2291
2284
|
const actualAmountOut = feeMode.feesOnInput ? outputAmount : (() => {
|
|
2292
2285
|
const feeResult = getFeeOnAmount(
|
|
2293
2286
|
tradeFeeNumerator,
|
|
@@ -2594,6 +2587,9 @@ function getSwapResultFromExactOutput(virtualPool, config, amountOut, feeMode, t
|
|
|
2594
2587
|
}
|
|
2595
2588
|
})();
|
|
2596
2589
|
const { outputAmount: amountIn, nextSqrtPrice } = swapAmountFromOutput;
|
|
2590
|
+
if (nextSqrtPrice.gt(config.migrationSqrtPrice)) {
|
|
2591
|
+
throw new Error("Swap amount is over a threshold");
|
|
2592
|
+
}
|
|
2597
2593
|
const [excludedFeeInputAmount, includedFeeInputAmount] = feeMode.feesOnInput ? (() => {
|
|
2598
2594
|
const tradeFeeNumerator = getTotalFeeNumeratorFromExcludedFeeAmount(
|
|
2599
2595
|
config.poolFees,
|
|
@@ -2775,10 +2771,6 @@ function swapQuoteExactIn(virtualPool, config, swapBaseForQuote, amountIn, slipp
|
|
|
2775
2771
|
tradeDirection,
|
|
2776
2772
|
currentPoint
|
|
2777
2773
|
);
|
|
2778
|
-
const maxSwallowQuoteAmount = getMaxSwallowQuoteAmount(config);
|
|
2779
|
-
if (result.amountLeft.gt(maxSwallowQuoteAmount)) {
|
|
2780
|
-
throw new Error("Amount left is over a threshold");
|
|
2781
|
-
}
|
|
2782
2774
|
let minimumAmountOut;
|
|
2783
2775
|
if (slippageBps > 0) {
|
|
2784
2776
|
const slippageFactor = new (0, _bnjs2.default)(1e4 - slippageBps);
|
|
@@ -3106,15 +3098,8 @@ function validateConfigParameters(configParam) {
|
|
|
3106
3098
|
)) {
|
|
3107
3099
|
throw new Error("Invalid migration fee option");
|
|
3108
3100
|
}
|
|
3109
|
-
if (configParam.migrationFee
|
|
3110
|
-
throw new Error(
|
|
3111
|
-
`Migration fee percentage must be between 0 and ${MAX_MIGRATION_FEE_PERCENTAGE}`
|
|
3112
|
-
);
|
|
3113
|
-
}
|
|
3114
|
-
if (configParam.migrationFee.creatorFeePercentage < 0 || configParam.migrationFee.creatorFeePercentage > MAX_CREATOR_MIGRATION_FEE_PERCENTAGE) {
|
|
3115
|
-
throw new Error(
|
|
3116
|
-
`Creator fee percentage must be between 0 and ${MAX_CREATOR_MIGRATION_FEE_PERCENTAGE}`
|
|
3117
|
-
);
|
|
3101
|
+
if (!validateMigrationFee(configParam.migrationFee)) {
|
|
3102
|
+
throw new Error("Invalid migration fee");
|
|
3118
3103
|
}
|
|
3119
3104
|
if (!validateTokenDecimals(configParam.tokenDecimal)) {
|
|
3120
3105
|
throw new Error("Token decimal must be between 6 and 9");
|
|
@@ -3233,6 +3218,24 @@ function validateSwapAmount(amountIn) {
|
|
|
3233
3218
|
}
|
|
3234
3219
|
return true;
|
|
3235
3220
|
}
|
|
3221
|
+
function validateMigrationFee(migrationFee) {
|
|
3222
|
+
if (!Number.isInteger(migrationFee.feePercentage) || !Number.isInteger(migrationFee.creatorFeePercentage)) {
|
|
3223
|
+
throw new Error(
|
|
3224
|
+
"Migration fee percentage and creator fee percentage must be whole numbers (no decimals allowed)"
|
|
3225
|
+
);
|
|
3226
|
+
}
|
|
3227
|
+
if (migrationFee.feePercentage < 0 || migrationFee.feePercentage > MAX_MIGRATION_FEE_PERCENTAGE) {
|
|
3228
|
+
throw new Error(
|
|
3229
|
+
`Migration fee percentage must be between 0 and ${MAX_MIGRATION_FEE_PERCENTAGE}`
|
|
3230
|
+
);
|
|
3231
|
+
}
|
|
3232
|
+
if (migrationFee.creatorFeePercentage < 0 || migrationFee.creatorFeePercentage > MAX_CREATOR_MIGRATION_FEE_PERCENTAGE) {
|
|
3233
|
+
throw new Error(
|
|
3234
|
+
`Migration creator fee percentage must be between 0 and ${MAX_CREATOR_MIGRATION_FEE_PERCENTAGE}`
|
|
3235
|
+
);
|
|
3236
|
+
}
|
|
3237
|
+
return true;
|
|
3238
|
+
}
|
|
3236
3239
|
|
|
3237
3240
|
// src/helpers/buildCurve.ts
|
|
3238
3241
|
|
|
@@ -3779,7 +3782,7 @@ var idl_default = {
|
|
|
3779
3782
|
address: "dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN",
|
|
3780
3783
|
metadata: {
|
|
3781
3784
|
name: "dynamic_bonding_curve",
|
|
3782
|
-
version: "0.1.
|
|
3785
|
+
version: "0.1.7",
|
|
3783
3786
|
spec: "0.1.0",
|
|
3784
3787
|
description: "Created with Anchor"
|
|
3785
3788
|
},
|
|
@@ -3917,6 +3920,83 @@ var idl_default = {
|
|
|
3917
3920
|
}
|
|
3918
3921
|
]
|
|
3919
3922
|
},
|
|
3923
|
+
{
|
|
3924
|
+
name: "claim_pool_creation_fee",
|
|
3925
|
+
discriminator: [
|
|
3926
|
+
246,
|
|
3927
|
+
51,
|
|
3928
|
+
18,
|
|
3929
|
+
222,
|
|
3930
|
+
80,
|
|
3931
|
+
42,
|
|
3932
|
+
236,
|
|
3933
|
+
205
|
|
3934
|
+
],
|
|
3935
|
+
accounts: [
|
|
3936
|
+
{
|
|
3937
|
+
name: "pool",
|
|
3938
|
+
writable: true
|
|
3939
|
+
},
|
|
3940
|
+
{
|
|
3941
|
+
name: "claim_fee_operator",
|
|
3942
|
+
docs: [
|
|
3943
|
+
"Claim fee operator"
|
|
3944
|
+
]
|
|
3945
|
+
},
|
|
3946
|
+
{
|
|
3947
|
+
name: "operator",
|
|
3948
|
+
docs: [
|
|
3949
|
+
"Operator"
|
|
3950
|
+
],
|
|
3951
|
+
signer: true,
|
|
3952
|
+
relations: [
|
|
3953
|
+
"claim_fee_operator"
|
|
3954
|
+
]
|
|
3955
|
+
},
|
|
3956
|
+
{
|
|
3957
|
+
name: "treasury",
|
|
3958
|
+
writable: true,
|
|
3959
|
+
address: "4EWqcx3aNZmMetCnxwLYwyNjan6XLGp3Ca2W316vrSjv"
|
|
3960
|
+
},
|
|
3961
|
+
{
|
|
3962
|
+
name: "system_program",
|
|
3963
|
+
address: "11111111111111111111111111111111"
|
|
3964
|
+
},
|
|
3965
|
+
{
|
|
3966
|
+
name: "event_authority",
|
|
3967
|
+
pda: {
|
|
3968
|
+
seeds: [
|
|
3969
|
+
{
|
|
3970
|
+
kind: "const",
|
|
3971
|
+
value: [
|
|
3972
|
+
95,
|
|
3973
|
+
95,
|
|
3974
|
+
101,
|
|
3975
|
+
118,
|
|
3976
|
+
101,
|
|
3977
|
+
110,
|
|
3978
|
+
116,
|
|
3979
|
+
95,
|
|
3980
|
+
97,
|
|
3981
|
+
117,
|
|
3982
|
+
116,
|
|
3983
|
+
104,
|
|
3984
|
+
111,
|
|
3985
|
+
114,
|
|
3986
|
+
105,
|
|
3987
|
+
116,
|
|
3988
|
+
121
|
|
3989
|
+
]
|
|
3990
|
+
}
|
|
3991
|
+
]
|
|
3992
|
+
}
|
|
3993
|
+
},
|
|
3994
|
+
{
|
|
3995
|
+
name: "program"
|
|
3996
|
+
}
|
|
3997
|
+
],
|
|
3998
|
+
args: []
|
|
3999
|
+
},
|
|
3920
4000
|
{
|
|
3921
4001
|
name: "claim_protocol_fee",
|
|
3922
4002
|
discriminator: [
|
|
@@ -4729,7 +4809,7 @@ var idl_default = {
|
|
|
4729
4809
|
{
|
|
4730
4810
|
name: "create_partner_metadata",
|
|
4731
4811
|
docs: [
|
|
4732
|
-
"PARTNER FUNCTIONS
|
|
4812
|
+
"PARTNER FUNCTIONS ///"
|
|
4733
4813
|
],
|
|
4734
4814
|
discriminator: [
|
|
4735
4815
|
192,
|
|
@@ -6036,16 +6116,10 @@ var idl_default = {
|
|
|
6036
6116
|
docs: [
|
|
6037
6117
|
"virtual pool"
|
|
6038
6118
|
],
|
|
6039
|
-
writable: true
|
|
6040
|
-
relations: [
|
|
6041
|
-
"migration_metadata"
|
|
6042
|
-
]
|
|
6119
|
+
writable: true
|
|
6043
6120
|
},
|
|
6044
6121
|
{
|
|
6045
|
-
name: "migration_metadata"
|
|
6046
|
-
docs: [
|
|
6047
|
-
"migration metadata"
|
|
6048
|
-
]
|
|
6122
|
+
name: "migration_metadata"
|
|
6049
6123
|
},
|
|
6050
6124
|
{
|
|
6051
6125
|
name: "config",
|
|
@@ -6173,43 +6247,16 @@ var idl_default = {
|
|
|
6173
6247
|
name: "virtual_pool"
|
|
6174
6248
|
},
|
|
6175
6249
|
{
|
|
6176
|
-
name: "config"
|
|
6177
|
-
relations: [
|
|
6178
|
-
"virtual_pool"
|
|
6179
|
-
]
|
|
6250
|
+
name: "config"
|
|
6180
6251
|
},
|
|
6181
6252
|
{
|
|
6182
|
-
name: "migration_metadata"
|
|
6183
|
-
writable: true,
|
|
6184
|
-
pda: {
|
|
6185
|
-
seeds: [
|
|
6186
|
-
{
|
|
6187
|
-
kind: "const",
|
|
6188
|
-
value: [
|
|
6189
|
-
100,
|
|
6190
|
-
97,
|
|
6191
|
-
109,
|
|
6192
|
-
109,
|
|
6193
|
-
95,
|
|
6194
|
-
118,
|
|
6195
|
-
50
|
|
6196
|
-
]
|
|
6197
|
-
},
|
|
6198
|
-
{
|
|
6199
|
-
kind: "account",
|
|
6200
|
-
path: "virtual_pool"
|
|
6201
|
-
}
|
|
6202
|
-
]
|
|
6203
|
-
}
|
|
6253
|
+
name: "migration_metadata"
|
|
6204
6254
|
},
|
|
6205
6255
|
{
|
|
6206
|
-
name: "payer"
|
|
6207
|
-
writable: true,
|
|
6208
|
-
signer: true
|
|
6256
|
+
name: "payer"
|
|
6209
6257
|
},
|
|
6210
6258
|
{
|
|
6211
|
-
name: "system_program"
|
|
6212
|
-
address: "11111111111111111111111111111111"
|
|
6259
|
+
name: "system_program"
|
|
6213
6260
|
},
|
|
6214
6261
|
{
|
|
6215
6262
|
name: "event_authority",
|
|
@@ -6991,6 +7038,36 @@ var idl_default = {
|
|
|
6991
7038
|
],
|
|
6992
7039
|
args: []
|
|
6993
7040
|
},
|
|
7041
|
+
{
|
|
7042
|
+
name: "withdraw_lamports_from_pool_authority",
|
|
7043
|
+
discriminator: [
|
|
7044
|
+
20,
|
|
7045
|
+
185,
|
|
7046
|
+
242,
|
|
7047
|
+
240,
|
|
7048
|
+
129,
|
|
7049
|
+
24,
|
|
7050
|
+
212,
|
|
7051
|
+
194
|
|
7052
|
+
],
|
|
7053
|
+
accounts: [
|
|
7054
|
+
{
|
|
7055
|
+
name: "pool_authority",
|
|
7056
|
+
writable: true,
|
|
7057
|
+
address: "FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"
|
|
7058
|
+
},
|
|
7059
|
+
{
|
|
7060
|
+
name: "receiver",
|
|
7061
|
+
writable: true,
|
|
7062
|
+
address: "4EWqcx3aNZmMetCnxwLYwyNjan6XLGp3Ca2W316vrSjv"
|
|
7063
|
+
},
|
|
7064
|
+
{
|
|
7065
|
+
name: "system_program",
|
|
7066
|
+
address: "11111111111111111111111111111111"
|
|
7067
|
+
}
|
|
7068
|
+
],
|
|
7069
|
+
args: []
|
|
7070
|
+
},
|
|
6994
7071
|
{
|
|
6995
7072
|
name: "withdraw_leftover",
|
|
6996
7073
|
discriminator: [
|
|
@@ -7304,19 +7381,6 @@ var idl_default = {
|
|
|
7304
7381
|
156
|
|
7305
7382
|
]
|
|
7306
7383
|
},
|
|
7307
|
-
{
|
|
7308
|
-
name: "MeteoraDammV2Metadata",
|
|
7309
|
-
discriminator: [
|
|
7310
|
-
104,
|
|
7311
|
-
221,
|
|
7312
|
-
219,
|
|
7313
|
-
203,
|
|
7314
|
-
10,
|
|
7315
|
-
142,
|
|
7316
|
-
250,
|
|
7317
|
-
163
|
|
7318
|
-
]
|
|
7319
|
-
},
|
|
7320
7384
|
{
|
|
7321
7385
|
name: "PartnerMetadata",
|
|
7322
7386
|
discriminator: [
|
|
@@ -7384,6 +7448,19 @@ var idl_default = {
|
|
|
7384
7448
|
138
|
|
7385
7449
|
]
|
|
7386
7450
|
},
|
|
7451
|
+
{
|
|
7452
|
+
name: "EvtClaimPoolCreationFee",
|
|
7453
|
+
discriminator: [
|
|
7454
|
+
149,
|
|
7455
|
+
111,
|
|
7456
|
+
149,
|
|
7457
|
+
44,
|
|
7458
|
+
136,
|
|
7459
|
+
64,
|
|
7460
|
+
175,
|
|
7461
|
+
62
|
|
7462
|
+
]
|
|
7463
|
+
},
|
|
7387
7464
|
{
|
|
7388
7465
|
name: "EvtClaimProtocolFee",
|
|
7389
7466
|
discriminator: [
|
|
@@ -7462,19 +7539,6 @@ var idl_default = {
|
|
|
7462
7539
|
144
|
|
7463
7540
|
]
|
|
7464
7541
|
},
|
|
7465
|
-
{
|
|
7466
|
-
name: "EvtCreateDammV2MigrationMetadata",
|
|
7467
|
-
discriminator: [
|
|
7468
|
-
103,
|
|
7469
|
-
111,
|
|
7470
|
-
132,
|
|
7471
|
-
168,
|
|
7472
|
-
140,
|
|
7473
|
-
253,
|
|
7474
|
-
150,
|
|
7475
|
-
114
|
|
7476
|
-
]
|
|
7477
|
-
},
|
|
7478
7542
|
{
|
|
7479
7543
|
name: "EvtCreateMeteoraMigrationMetadata",
|
|
7480
7544
|
discriminator: [
|
|
@@ -7903,6 +7967,16 @@ var idl_default = {
|
|
|
7903
7967
|
code: 6048,
|
|
7904
7968
|
name: "NextSqrtPriceIsSmallerThanStartSqrtPrice",
|
|
7905
7969
|
msg: "Next sqrt price is smaller than start sqrt price"
|
|
7970
|
+
},
|
|
7971
|
+
{
|
|
7972
|
+
code: 6049,
|
|
7973
|
+
name: "InvalidMinBaseFee",
|
|
7974
|
+
msg: "Invalid min base fee"
|
|
7975
|
+
},
|
|
7976
|
+
{
|
|
7977
|
+
code: 6050,
|
|
7978
|
+
name: "AccountInvariantViolation",
|
|
7979
|
+
msg: "Account invariant violation"
|
|
7906
7980
|
}
|
|
7907
7981
|
],
|
|
7908
7982
|
types: [
|
|
@@ -8358,6 +8432,26 @@ var idl_default = {
|
|
|
8358
8432
|
]
|
|
8359
8433
|
}
|
|
8360
8434
|
},
|
|
8435
|
+
{
|
|
8436
|
+
name: "EvtClaimPoolCreationFee",
|
|
8437
|
+
type: {
|
|
8438
|
+
kind: "struct",
|
|
8439
|
+
fields: [
|
|
8440
|
+
{
|
|
8441
|
+
name: "pool",
|
|
8442
|
+
type: "pubkey"
|
|
8443
|
+
},
|
|
8444
|
+
{
|
|
8445
|
+
name: "treasury",
|
|
8446
|
+
type: "pubkey"
|
|
8447
|
+
},
|
|
8448
|
+
{
|
|
8449
|
+
name: "creation_fee",
|
|
8450
|
+
type: "u64"
|
|
8451
|
+
}
|
|
8452
|
+
]
|
|
8453
|
+
}
|
|
8454
|
+
},
|
|
8361
8455
|
{
|
|
8362
8456
|
name: "EvtClaimProtocolFee",
|
|
8363
8457
|
type: {
|
|
@@ -8585,18 +8679,6 @@ var idl_default = {
|
|
|
8585
8679
|
]
|
|
8586
8680
|
}
|
|
8587
8681
|
},
|
|
8588
|
-
{
|
|
8589
|
-
name: "EvtCreateDammV2MigrationMetadata",
|
|
8590
|
-
type: {
|
|
8591
|
-
kind: "struct",
|
|
8592
|
-
fields: [
|
|
8593
|
-
{
|
|
8594
|
-
name: "virtual_pool",
|
|
8595
|
-
type: "pubkey"
|
|
8596
|
-
}
|
|
8597
|
-
]
|
|
8598
|
-
}
|
|
8599
|
-
},
|
|
8600
8682
|
{
|
|
8601
8683
|
name: "EvtCreateMeteoraMigrationMetadata",
|
|
8602
8684
|
type: {
|
|
@@ -9214,56 +9296,6 @@ var idl_default = {
|
|
|
9214
9296
|
]
|
|
9215
9297
|
}
|
|
9216
9298
|
},
|
|
9217
|
-
{
|
|
9218
|
-
name: "MeteoraDammV2Metadata",
|
|
9219
|
-
serialization: "bytemuck",
|
|
9220
|
-
repr: {
|
|
9221
|
-
kind: "c"
|
|
9222
|
-
},
|
|
9223
|
-
type: {
|
|
9224
|
-
kind: "struct",
|
|
9225
|
-
fields: [
|
|
9226
|
-
{
|
|
9227
|
-
name: "virtual_pool",
|
|
9228
|
-
docs: [
|
|
9229
|
-
"pool"
|
|
9230
|
-
],
|
|
9231
|
-
type: "pubkey"
|
|
9232
|
-
},
|
|
9233
|
-
{
|
|
9234
|
-
name: "padding_0",
|
|
9235
|
-
docs: [
|
|
9236
|
-
"!!! BE CAREFUL to use tomestone field, previous is pool creator"
|
|
9237
|
-
],
|
|
9238
|
-
type: {
|
|
9239
|
-
array: [
|
|
9240
|
-
"u8",
|
|
9241
|
-
32
|
|
9242
|
-
]
|
|
9243
|
-
}
|
|
9244
|
-
},
|
|
9245
|
-
{
|
|
9246
|
-
name: "partner",
|
|
9247
|
-
docs: [
|
|
9248
|
-
"partner"
|
|
9249
|
-
],
|
|
9250
|
-
type: "pubkey"
|
|
9251
|
-
},
|
|
9252
|
-
{
|
|
9253
|
-
name: "_padding",
|
|
9254
|
-
docs: [
|
|
9255
|
-
"Reserve"
|
|
9256
|
-
],
|
|
9257
|
-
type: {
|
|
9258
|
-
array: [
|
|
9259
|
-
"u8",
|
|
9260
|
-
126
|
|
9261
|
-
]
|
|
9262
|
-
}
|
|
9263
|
-
}
|
|
9264
|
-
]
|
|
9265
|
-
}
|
|
9266
|
-
},
|
|
9267
9299
|
{
|
|
9268
9300
|
name: "MigratedPoolFee",
|
|
9269
9301
|
type: {
|
|
@@ -10129,6 +10161,19 @@ var idl_default = {
|
|
|
10129
10161
|
],
|
|
10130
10162
|
type: "u64"
|
|
10131
10163
|
},
|
|
10164
|
+
{
|
|
10165
|
+
name: "creation_fee_bits",
|
|
10166
|
+
type: "u8"
|
|
10167
|
+
},
|
|
10168
|
+
{
|
|
10169
|
+
name: "_padding_0",
|
|
10170
|
+
type: {
|
|
10171
|
+
array: [
|
|
10172
|
+
"u8",
|
|
10173
|
+
7
|
|
10174
|
+
]
|
|
10175
|
+
}
|
|
10176
|
+
},
|
|
10132
10177
|
{
|
|
10133
10178
|
name: "_padding_1",
|
|
10134
10179
|
docs: [
|
|
@@ -10137,7 +10182,7 @@ var idl_default = {
|
|
|
10137
10182
|
type: {
|
|
10138
10183
|
array: [
|
|
10139
10184
|
"u64",
|
|
10140
|
-
|
|
10185
|
+
6
|
|
10141
10186
|
]
|
|
10142
10187
|
}
|
|
10143
10188
|
}
|
|
@@ -24360,25 +24405,6 @@ var MigrationService = class extends DynamicBondingCurveProgram {
|
|
|
24360
24405
|
///////////////////////
|
|
24361
24406
|
// DAMM V2 FUNCTIONS //
|
|
24362
24407
|
///////////////////////
|
|
24363
|
-
/**
|
|
24364
|
-
* Create metadata for the migration of Meteora DAMM V2
|
|
24365
|
-
* @param payer - The payer of the transaction
|
|
24366
|
-
* @param virtualPool - The virtual pool address
|
|
24367
|
-
* @param config - The config address
|
|
24368
|
-
* @returns A migration transaction
|
|
24369
|
-
*/
|
|
24370
|
-
async createDammV2MigrationMetadata(params) {
|
|
24371
|
-
const { virtualPool, config, payer } = params;
|
|
24372
|
-
const migrationMetadata = deriveDammV2MigrationMetadataAddress(virtualPool);
|
|
24373
|
-
const accounts = {
|
|
24374
|
-
virtualPool,
|
|
24375
|
-
config,
|
|
24376
|
-
migrationMetadata,
|
|
24377
|
-
payer,
|
|
24378
|
-
systemProgram: _web3js.SystemProgram.programId
|
|
24379
|
-
};
|
|
24380
|
-
return this.program.methods.migrationDammV2CreateMetadata().accountsPartial(accounts).transaction();
|
|
24381
|
-
}
|
|
24382
24408
|
/**
|
|
24383
24409
|
* Migrate to DAMM V2
|
|
24384
24410
|
* @param payer - The payer of the transaction
|
|
@@ -26485,6 +26511,5 @@ var DynamicBondingCurveClient = class _DynamicBondingCurveClient {
|
|
|
26485
26511
|
|
|
26486
26512
|
|
|
26487
26513
|
|
|
26488
|
-
|
|
26489
|
-
exports.ActivationType = ActivationType; exports.BASE_ADDRESS = BASE_ADDRESS; exports.BASIS_POINT_MAX = BASIS_POINT_MAX; exports.BIN_STEP_BPS_DEFAULT = BIN_STEP_BPS_DEFAULT; exports.BIN_STEP_BPS_U128_DEFAULT = BIN_STEP_BPS_U128_DEFAULT; exports.BaseFeeMode = BaseFeeMode; exports.CollectFeeMode = CollectFeeMode; exports.CreatorService = CreatorService; exports.DAMM_V1_MIGRATION_FEE_ADDRESS = DAMM_V1_MIGRATION_FEE_ADDRESS; exports.DAMM_V1_PROGRAM_ID = DAMM_V1_PROGRAM_ID; exports.DAMM_V2_MIGRATION_FEE_ADDRESS = DAMM_V2_MIGRATION_FEE_ADDRESS; exports.DAMM_V2_PROGRAM_ID = DAMM_V2_PROGRAM_ID; exports.DYNAMIC_BONDING_CURVE_PROGRAM_ID = DYNAMIC_BONDING_CURVE_PROGRAM_ID; exports.DYNAMIC_FEE_DECAY_PERIOD_DEFAULT = DYNAMIC_FEE_DECAY_PERIOD_DEFAULT; exports.DYNAMIC_FEE_FILTER_PERIOD_DEFAULT = DYNAMIC_FEE_FILTER_PERIOD_DEFAULT; exports.DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT = DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT; exports.DYNAMIC_FEE_ROUNDING_OFFSET = DYNAMIC_FEE_ROUNDING_OFFSET; exports.DYNAMIC_FEE_SCALING_FACTOR = DYNAMIC_FEE_SCALING_FACTOR; exports.DammV2DynamicFeeMode = DammV2DynamicFeeMode; exports.DynamicBondingCurveClient = DynamicBondingCurveClient; exports.DynamicBondingCurveIdl = idl_default; exports.DynamicBondingCurveProgram = DynamicBondingCurveProgram; exports.FEE_DENOMINATOR = FEE_DENOMINATOR; exports.FeeRateLimiter = FeeRateLimiter; exports.FeeScheduler = FeeScheduler; exports.LOCKER_PROGRAM_ID = LOCKER_PROGRAM_ID; exports.MAX_CREATOR_MIGRATION_FEE_PERCENTAGE = MAX_CREATOR_MIGRATION_FEE_PERCENTAGE; exports.MAX_CURVE_POINT = MAX_CURVE_POINT; exports.MAX_DYNAMIC_FEE_PERCENTAGE = MAX_DYNAMIC_FEE_PERCENTAGE; exports.MAX_FEE_BPS = MAX_FEE_BPS; exports.MAX_FEE_NUMERATOR = MAX_FEE_NUMERATOR; exports.MAX_MIGRATED_POOL_FEE_BPS = MAX_MIGRATED_POOL_FEE_BPS; exports.MAX_MIGRATION_FEE_PERCENTAGE = MAX_MIGRATION_FEE_PERCENTAGE; exports.MAX_PRICE_CHANGE_BPS_DEFAULT = MAX_PRICE_CHANGE_BPS_DEFAULT; exports.MAX_RATE_LIMITER_DURATION_IN_SECONDS = MAX_RATE_LIMITER_DURATION_IN_SECONDS; exports.MAX_RATE_LIMITER_DURATION_IN_SLOTS = MAX_RATE_LIMITER_DURATION_IN_SLOTS; exports.MAX_SQRT_PRICE = MAX_SQRT_PRICE; exports.MAX_SWALLOW_PERCENTAGE = MAX_SWALLOW_PERCENTAGE; exports.METAPLEX_PROGRAM_ID = METAPLEX_PROGRAM_ID; exports.MIN_FEE_BPS = MIN_FEE_BPS; exports.MIN_FEE_NUMERATOR = MIN_FEE_NUMERATOR; exports.MIN_MIGRATED_POOL_FEE_BPS = MIN_MIGRATED_POOL_FEE_BPS; exports.MIN_SQRT_PRICE = MIN_SQRT_PRICE; exports.MigrationFeeOption = MigrationFeeOption; exports.MigrationOption = MigrationOption; exports.MigrationService = MigrationService; exports.OFFSET = OFFSET; exports.ONE_Q64 = ONE_Q64; exports.PARTNER_SURPLUS_SHARE = PARTNER_SURPLUS_SHARE; exports.PartnerService = PartnerService; exports.PoolService = PoolService; exports.RESOLUTION = RESOLUTION; exports.Rounding = Rounding; exports.SLOT_DURATION = SLOT_DURATION; exports.SWAP_BUFFER_PERCENTAGE = SWAP_BUFFER_PERCENTAGE; exports.SafeMath = SafeMath; exports.StateService = StateService; exports.SwapMode = SwapMode; exports.TIMESTAMP_DURATION = TIMESTAMP_DURATION; exports.TokenDecimal = TokenDecimal; exports.TokenType = TokenType; exports.TokenUpdateAuthorityOption = TokenUpdateAuthorityOption; exports.TradeDirection = TradeDirection; exports.U128_MAX = U128_MAX; exports.U16_MAX = U16_MAX; exports.U64_MAX = U64_MAX; exports.VAULT_PROGRAM_ID = VAULT_PROGRAM_ID; exports.bpsToFeeNumerator = bpsToFeeNumerator; exports.buildCurve = buildCurve; exports.buildCurveWithLiquidityWeights = buildCurveWithLiquidityWeights; exports.buildCurveWithMarketCap = buildCurveWithMarketCap; exports.buildCurveWithTwoSegments = buildCurveWithTwoSegments; exports.calculateBaseToQuoteFromAmountIn = calculateBaseToQuoteFromAmountIn; exports.calculateBaseToQuoteFromAmountOut = calculateBaseToQuoteFromAmountOut; exports.calculateFeeSchedulerEndingBaseFeeBps = calculateFeeSchedulerEndingBaseFeeBps; exports.calculateQuoteToBaseFromAmountIn = calculateQuoteToBaseFromAmountIn; exports.calculateQuoteToBaseFromAmountOut = calculateQuoteToBaseFromAmountOut; exports.checkRateLimiterApplied = checkRateLimiterApplied; exports.cleanUpTokenAccountTx = cleanUpTokenAccountTx; exports.convertDecimalToBN = convertDecimalToBN; exports.convertToLamports = convertToLamports; exports.createDammV1Program = createDammV1Program; exports.createDammV2Program = createDammV2Program; exports.createDbcProgram = createDbcProgram; exports.createInitializePermissionlessDynamicVaultIx = createInitializePermissionlessDynamicVaultIx; exports.createLockEscrowIx = createLockEscrowIx; exports.createProgramAccountFilter = createProgramAccountFilter; exports.createVaultProgram = createVaultProgram; exports.deriveBaseKeyForLocker = deriveBaseKeyForLocker; exports.deriveDammV1EventAuthority = deriveDammV1EventAuthority; exports.deriveDammV1LockEscrowAddress = deriveDammV1LockEscrowAddress; exports.deriveDammV1LpMintAddress = deriveDammV1LpMintAddress; exports.deriveDammV1MigrationMetadataAddress = deriveDammV1MigrationMetadataAddress; exports.deriveDammV1PoolAddress = deriveDammV1PoolAddress; exports.deriveDammV1PoolAuthority = deriveDammV1PoolAuthority; exports.deriveDammV1ProtocolFeeAddress = deriveDammV1ProtocolFeeAddress; exports.deriveDammV1VaultLPAddress = deriveDammV1VaultLPAddress; exports.deriveDammV2EventAuthority = deriveDammV2EventAuthority; exports.deriveDammV2LockEscrowAddress = deriveDammV2LockEscrowAddress; exports.deriveDammV2MigrationMetadataAddress = deriveDammV2MigrationMetadataAddress; exports.deriveDammV2PoolAddress = deriveDammV2PoolAddress; exports.deriveDammV2PoolAuthority = deriveDammV2PoolAuthority; exports.deriveDammV2TokenVaultAddress = deriveDammV2TokenVaultAddress; exports.deriveDbcEventAuthority = deriveDbcEventAuthority; exports.deriveDbcPoolAddress = deriveDbcPoolAddress; exports.deriveDbcPoolAuthority = deriveDbcPoolAuthority; exports.deriveDbcPoolMetadata = deriveDbcPoolMetadata; exports.deriveDbcTokenVaultAddress = deriveDbcTokenVaultAddress; exports.deriveEscrow = deriveEscrow; exports.deriveLockerEventAuthority = deriveLockerEventAuthority; exports.deriveMintMetadata = deriveMintMetadata; exports.derivePartnerMetadata = derivePartnerMetadata; exports.derivePositionAddress = derivePositionAddress; exports.derivePositionNftAccount = derivePositionNftAccount; exports.deriveTokenVaultKey = deriveTokenVaultKey; exports.deriveVaultAddress = deriveVaultAddress; exports.deriveVaultLpMintAddress = deriveVaultLpMintAddress; exports.deriveVaultPdas = deriveVaultPdas; exports.feeNumeratorToBps = feeNumeratorToBps; exports.findAssociatedTokenAddress = findAssociatedTokenAddress; exports.fromDecimalToBN = fromDecimalToBN; exports.getAccountCreationTimestamp = getAccountCreationTimestamp; exports.getAccountCreationTimestamps = getAccountCreationTimestamps; exports.getAccountData = getAccountData; exports.getBaseFeeHandler = getBaseFeeHandler; exports.getBaseFeeNumerator = getBaseFeeNumerator; exports.getBaseFeeNumeratorByPeriod = getBaseFeeNumeratorByPeriod; exports.getBaseFeeParams = getBaseFeeParams; exports.getBaseTokenForSwap = getBaseTokenForSwap; exports.getCheckedAmounts = getCheckedAmounts; exports.getCurrentPoint = getCurrentPoint; exports.getDeltaAmountBaseUnsigned = getDeltaAmountBaseUnsigned; exports.getDeltaAmountBaseUnsigned256 = getDeltaAmountBaseUnsigned256; exports.getDeltaAmountBaseUnsignedUnchecked = getDeltaAmountBaseUnsignedUnchecked; exports.getDeltaAmountQuoteUnsigned = getDeltaAmountQuoteUnsigned; exports.getDeltaAmountQuoteUnsigned256 = getDeltaAmountQuoteUnsigned256; exports.getDeltaAmountQuoteUnsignedUnchecked = getDeltaAmountQuoteUnsignedUnchecked; exports.getDynamicFeeParams = getDynamicFeeParams; exports.getExcludedFeeAmount = getExcludedFeeAmount; exports.getFeeMode = getFeeMode; exports.getFeeNumeratorFromExcludedAmount = getFeeNumeratorFromExcludedAmount; exports.getFeeNumeratorFromIncludedAmount = getFeeNumeratorFromIncludedAmount; exports.getFeeNumeratorOnExponentialFeeScheduler = getFeeNumeratorOnExponentialFeeScheduler; exports.getFeeNumeratorOnLinearFeeScheduler = getFeeNumeratorOnLinearFeeScheduler; exports.getFeeOnAmount = getFeeOnAmount; exports.getFeeSchedulerParams = getFeeSchedulerParams; exports.getFirstCurve = getFirstCurve; exports.getFirstKey = getFirstKey; exports.getIncludedFeeAmount = getIncludedFeeAmount; exports.getInitialLiquidityFromDeltaBase = getInitialLiquidityFromDeltaBase; exports.getInitialLiquidityFromDeltaQuote = getInitialLiquidityFromDeltaQuote; exports.getLiquidity = getLiquidity; exports.getLockedVestingParams = getLockedVestingParams; exports.getMaxBaseFeeNumerator = getMaxBaseFeeNumerator; exports.getMaxIndex = getMaxIndex; exports.getMaxOutAmountWithMinBaseFee = getMaxOutAmountWithMinBaseFee; exports.getMaxSwallowQuoteAmount = getMaxSwallowQuoteAmount; exports.getMigratedPoolFeeParams = getMigratedPoolFeeParams; exports.getMigrationBaseToken = getMigrationBaseToken; exports.getMigrationQuoteAmount = getMigrationQuoteAmount; exports.getMigrationQuoteAmountFromMigrationQuoteThreshold = getMigrationQuoteAmountFromMigrationQuoteThreshold; exports.getMigrationQuoteThresholdFromMigrationQuoteAmount = getMigrationQuoteThresholdFromMigrationQuoteAmount; exports.getMigrationThresholdPrice = getMigrationThresholdPrice; exports.getMinBaseFeeNumerator = getMinBaseFeeNumerator; exports.getNextSqrtPriceFromBaseAmountInRoundingUp = getNextSqrtPriceFromBaseAmountInRoundingUp; exports.getNextSqrtPriceFromBaseAmountOutRoundingUp = getNextSqrtPriceFromBaseAmountOutRoundingUp; exports.getNextSqrtPriceFromInput = getNextSqrtPriceFromInput; exports.getNextSqrtPriceFromOutput = getNextSqrtPriceFromOutput; exports.getNextSqrtPriceFromQuoteAmountInRoundingDown = getNextSqrtPriceFromQuoteAmountInRoundingDown; exports.getNextSqrtPriceFromQuoteAmountOutRoundingDown = getNextSqrtPriceFromQuoteAmountOutRoundingDown; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getPercentageSupplyOnMigration = getPercentageSupplyOnMigration; exports.getPriceFromSqrtPrice = getPriceFromSqrtPrice; exports.getQuoteReserveFromNextSqrtPrice = getQuoteReserveFromNextSqrtPrice; exports.getRateLimiterExcludedFeeAmount = getRateLimiterExcludedFeeAmount; exports.getRateLimiterParams = getRateLimiterParams; exports.getSecondKey = getSecondKey; exports.getSqrtPriceFromMarketCap = getSqrtPriceFromMarketCap; exports.getSqrtPriceFromPrice = getSqrtPriceFromPrice; exports.getSwapAmountWithBuffer = getSwapAmountWithBuffer; exports.getSwapResult = getSwapResult; exports.getSwapResultFromExactInput = getSwapResultFromExactInput; exports.getSwapResultFromExactOutput = getSwapResultFromExactOutput; exports.getSwapResultFromPartialInput = getSwapResultFromPartialInput; exports.getTokenDecimals = getTokenDecimals; exports.getTokenProgram = getTokenProgram; exports.getTokenType = getTokenType; exports.getTokenomics = getTokenomics; exports.getTotalFeeNumerator = getTotalFeeNumerator; exports.getTotalFeeNumeratorFromExcludedFeeAmount = getTotalFeeNumeratorFromExcludedFeeAmount; exports.getTotalFeeNumeratorFromIncludedFeeAmount = getTotalFeeNumeratorFromIncludedFeeAmount; exports.getTotalSupplyFromCurve = getTotalSupplyFromCurve; exports.getTotalTokenSupply = getTotalTokenSupply; exports.getTotalVestingAmount = getTotalVestingAmount; exports.getTwoCurve = getTwoCurve; exports.getVariableFeeNumerator = getVariableFeeNumerator; exports.isDefaultLockedVesting = isDefaultLockedVesting; exports.isDynamicFeeEnabled = isDynamicFeeEnabled; exports.isNativeSol = isNativeSol; exports.isNonZeroRateLimiter = isNonZeroRateLimiter; exports.isRateLimiterApplied = isRateLimiterApplied; exports.isZeroRateLimiter = isZeroRateLimiter; exports.mulDiv = mulDiv; exports.mulShr = mulShr; exports.pow = pow; exports.prepareSwapAmountParam = prepareSwapAmountParam; exports.prepareTokenAccountTx = prepareTokenAccountTx; exports.splitFees = splitFees; exports.sqrt = sqrt; exports.swapQuote = swapQuote; exports.swapQuoteExactIn = swapQuoteExactIn; exports.swapQuoteExactOut = swapQuoteExactOut; exports.swapQuotePartialFill = swapQuotePartialFill; exports.toNumerator = toNumerator; exports.unwrapSOLInstruction = unwrapSOLInstruction; exports.validateActivationType = validateActivationType; exports.validateBalance = validateBalance; exports.validateBaseTokenType = validateBaseTokenType; exports.validateCollectFeeMode = validateCollectFeeMode; exports.validateConfigParameters = validateConfigParameters; exports.validateCurve = validateCurve; exports.validateFeeRateLimiter = validateFeeRateLimiter; exports.validateFeeScheduler = validateFeeScheduler; exports.validateLPPercentages = validateLPPercentages; exports.validateMigratedPoolFee = validateMigratedPoolFee; exports.validateMigrationAndTokenType = validateMigrationAndTokenType; exports.validateMigrationFeeOption = validateMigrationFeeOption; exports.validatePoolFees = validatePoolFees; exports.validateSwapAmount = validateSwapAmount; exports.validateTokenDecimals = validateTokenDecimals; exports.validateTokenSupply = validateTokenSupply; exports.validateTokenUpdateAuthorityOptions = validateTokenUpdateAuthorityOptions; exports.wrapSOLInstruction = wrapSOLInstruction;
|
|
26514
|
+
exports.ActivationType = ActivationType; exports.BASE_ADDRESS = BASE_ADDRESS; exports.BASIS_POINT_MAX = BASIS_POINT_MAX; exports.BIN_STEP_BPS_DEFAULT = BIN_STEP_BPS_DEFAULT; exports.BIN_STEP_BPS_U128_DEFAULT = BIN_STEP_BPS_U128_DEFAULT; exports.BaseFeeMode = BaseFeeMode; exports.CollectFeeMode = CollectFeeMode; exports.CreatorService = CreatorService; exports.DAMM_V1_MIGRATION_FEE_ADDRESS = DAMM_V1_MIGRATION_FEE_ADDRESS; exports.DAMM_V1_PROGRAM_ID = DAMM_V1_PROGRAM_ID; exports.DAMM_V2_MIGRATION_FEE_ADDRESS = DAMM_V2_MIGRATION_FEE_ADDRESS; exports.DAMM_V2_PROGRAM_ID = DAMM_V2_PROGRAM_ID; exports.DYNAMIC_BONDING_CURVE_PROGRAM_ID = DYNAMIC_BONDING_CURVE_PROGRAM_ID; exports.DYNAMIC_FEE_DECAY_PERIOD_DEFAULT = DYNAMIC_FEE_DECAY_PERIOD_DEFAULT; exports.DYNAMIC_FEE_FILTER_PERIOD_DEFAULT = DYNAMIC_FEE_FILTER_PERIOD_DEFAULT; exports.DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT = DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT; exports.DYNAMIC_FEE_ROUNDING_OFFSET = DYNAMIC_FEE_ROUNDING_OFFSET; exports.DYNAMIC_FEE_SCALING_FACTOR = DYNAMIC_FEE_SCALING_FACTOR; exports.DammV2DynamicFeeMode = DammV2DynamicFeeMode; exports.DynamicBondingCurveClient = DynamicBondingCurveClient; exports.DynamicBondingCurveIdl = idl_default; exports.DynamicBondingCurveProgram = DynamicBondingCurveProgram; exports.FEE_DENOMINATOR = FEE_DENOMINATOR; exports.FeeRateLimiter = FeeRateLimiter; exports.FeeScheduler = FeeScheduler; exports.LOCKER_PROGRAM_ID = LOCKER_PROGRAM_ID; exports.MAX_CREATOR_MIGRATION_FEE_PERCENTAGE = MAX_CREATOR_MIGRATION_FEE_PERCENTAGE; exports.MAX_CURVE_POINT = MAX_CURVE_POINT; exports.MAX_DYNAMIC_FEE_PERCENTAGE = MAX_DYNAMIC_FEE_PERCENTAGE; exports.MAX_FEE_BPS = MAX_FEE_BPS; exports.MAX_FEE_NUMERATOR = MAX_FEE_NUMERATOR; exports.MAX_MIGRATED_POOL_FEE_BPS = MAX_MIGRATED_POOL_FEE_BPS; exports.MAX_MIGRATION_FEE_PERCENTAGE = MAX_MIGRATION_FEE_PERCENTAGE; exports.MAX_PRICE_CHANGE_BPS_DEFAULT = MAX_PRICE_CHANGE_BPS_DEFAULT; exports.MAX_RATE_LIMITER_DURATION_IN_SECONDS = MAX_RATE_LIMITER_DURATION_IN_SECONDS; exports.MAX_RATE_LIMITER_DURATION_IN_SLOTS = MAX_RATE_LIMITER_DURATION_IN_SLOTS; exports.MAX_SQRT_PRICE = MAX_SQRT_PRICE; exports.METAPLEX_PROGRAM_ID = METAPLEX_PROGRAM_ID; exports.MIN_FEE_BPS = MIN_FEE_BPS; exports.MIN_FEE_NUMERATOR = MIN_FEE_NUMERATOR; exports.MIN_MIGRATED_POOL_FEE_BPS = MIN_MIGRATED_POOL_FEE_BPS; exports.MIN_SQRT_PRICE = MIN_SQRT_PRICE; exports.MigrationFeeOption = MigrationFeeOption; exports.MigrationOption = MigrationOption; exports.MigrationService = MigrationService; exports.OFFSET = OFFSET; exports.ONE_Q64 = ONE_Q64; exports.PARTNER_SURPLUS_SHARE = PARTNER_SURPLUS_SHARE; exports.PartnerService = PartnerService; exports.PoolService = PoolService; exports.RESOLUTION = RESOLUTION; exports.Rounding = Rounding; exports.SLOT_DURATION = SLOT_DURATION; exports.SWAP_BUFFER_PERCENTAGE = SWAP_BUFFER_PERCENTAGE; exports.SafeMath = SafeMath; exports.StateService = StateService; exports.SwapMode = SwapMode; exports.TIMESTAMP_DURATION = TIMESTAMP_DURATION; exports.TokenDecimal = TokenDecimal; exports.TokenType = TokenType; exports.TokenUpdateAuthorityOption = TokenUpdateAuthorityOption; exports.TradeDirection = TradeDirection; exports.U128_MAX = U128_MAX; exports.U16_MAX = U16_MAX; exports.U64_MAX = U64_MAX; exports.VAULT_PROGRAM_ID = VAULT_PROGRAM_ID; exports.bpsToFeeNumerator = bpsToFeeNumerator; exports.buildCurve = buildCurve; exports.buildCurveWithLiquidityWeights = buildCurveWithLiquidityWeights; exports.buildCurveWithMarketCap = buildCurveWithMarketCap; exports.buildCurveWithTwoSegments = buildCurveWithTwoSegments; exports.calculateBaseToQuoteFromAmountIn = calculateBaseToQuoteFromAmountIn; exports.calculateBaseToQuoteFromAmountOut = calculateBaseToQuoteFromAmountOut; exports.calculateFeeSchedulerEndingBaseFeeBps = calculateFeeSchedulerEndingBaseFeeBps; exports.calculateQuoteToBaseFromAmountIn = calculateQuoteToBaseFromAmountIn; exports.calculateQuoteToBaseFromAmountOut = calculateQuoteToBaseFromAmountOut; exports.checkRateLimiterApplied = checkRateLimiterApplied; exports.cleanUpTokenAccountTx = cleanUpTokenAccountTx; exports.convertDecimalToBN = convertDecimalToBN; exports.convertToLamports = convertToLamports; exports.createDammV1Program = createDammV1Program; exports.createDammV2Program = createDammV2Program; exports.createDbcProgram = createDbcProgram; exports.createInitializePermissionlessDynamicVaultIx = createInitializePermissionlessDynamicVaultIx; exports.createLockEscrowIx = createLockEscrowIx; exports.createProgramAccountFilter = createProgramAccountFilter; exports.createVaultProgram = createVaultProgram; exports.deriveBaseKeyForLocker = deriveBaseKeyForLocker; exports.deriveDammV1EventAuthority = deriveDammV1EventAuthority; exports.deriveDammV1LockEscrowAddress = deriveDammV1LockEscrowAddress; exports.deriveDammV1LpMintAddress = deriveDammV1LpMintAddress; exports.deriveDammV1MigrationMetadataAddress = deriveDammV1MigrationMetadataAddress; exports.deriveDammV1PoolAddress = deriveDammV1PoolAddress; exports.deriveDammV1PoolAuthority = deriveDammV1PoolAuthority; exports.deriveDammV1ProtocolFeeAddress = deriveDammV1ProtocolFeeAddress; exports.deriveDammV1VaultLPAddress = deriveDammV1VaultLPAddress; exports.deriveDammV2EventAuthority = deriveDammV2EventAuthority; exports.deriveDammV2LockEscrowAddress = deriveDammV2LockEscrowAddress; exports.deriveDammV2MigrationMetadataAddress = deriveDammV2MigrationMetadataAddress; exports.deriveDammV2PoolAddress = deriveDammV2PoolAddress; exports.deriveDammV2PoolAuthority = deriveDammV2PoolAuthority; exports.deriveDammV2TokenVaultAddress = deriveDammV2TokenVaultAddress; exports.deriveDbcEventAuthority = deriveDbcEventAuthority; exports.deriveDbcPoolAddress = deriveDbcPoolAddress; exports.deriveDbcPoolAuthority = deriveDbcPoolAuthority; exports.deriveDbcPoolMetadata = deriveDbcPoolMetadata; exports.deriveDbcTokenVaultAddress = deriveDbcTokenVaultAddress; exports.deriveEscrow = deriveEscrow; exports.deriveLockerEventAuthority = deriveLockerEventAuthority; exports.deriveMintMetadata = deriveMintMetadata; exports.derivePartnerMetadata = derivePartnerMetadata; exports.derivePositionAddress = derivePositionAddress; exports.derivePositionNftAccount = derivePositionNftAccount; exports.deriveTokenVaultKey = deriveTokenVaultKey; exports.deriveVaultAddress = deriveVaultAddress; exports.deriveVaultLpMintAddress = deriveVaultLpMintAddress; exports.deriveVaultPdas = deriveVaultPdas; exports.feeNumeratorToBps = feeNumeratorToBps; exports.findAssociatedTokenAddress = findAssociatedTokenAddress; exports.fromDecimalToBN = fromDecimalToBN; exports.getAccountCreationTimestamp = getAccountCreationTimestamp; exports.getAccountCreationTimestamps = getAccountCreationTimestamps; exports.getAccountData = getAccountData; exports.getBaseFeeHandler = getBaseFeeHandler; exports.getBaseFeeNumerator = getBaseFeeNumerator; exports.getBaseFeeNumeratorByPeriod = getBaseFeeNumeratorByPeriod; exports.getBaseFeeParams = getBaseFeeParams; exports.getBaseTokenForSwap = getBaseTokenForSwap; exports.getCheckedAmounts = getCheckedAmounts; exports.getCurrentPoint = getCurrentPoint; exports.getDeltaAmountBaseUnsigned = getDeltaAmountBaseUnsigned; exports.getDeltaAmountBaseUnsigned256 = getDeltaAmountBaseUnsigned256; exports.getDeltaAmountBaseUnsignedUnchecked = getDeltaAmountBaseUnsignedUnchecked; exports.getDeltaAmountQuoteUnsigned = getDeltaAmountQuoteUnsigned; exports.getDeltaAmountQuoteUnsigned256 = getDeltaAmountQuoteUnsigned256; exports.getDeltaAmountQuoteUnsignedUnchecked = getDeltaAmountQuoteUnsignedUnchecked; exports.getDynamicFeeParams = getDynamicFeeParams; exports.getExcludedFeeAmount = getExcludedFeeAmount; exports.getFeeMode = getFeeMode; exports.getFeeNumeratorFromExcludedAmount = getFeeNumeratorFromExcludedAmount; exports.getFeeNumeratorFromIncludedAmount = getFeeNumeratorFromIncludedAmount; exports.getFeeNumeratorOnExponentialFeeScheduler = getFeeNumeratorOnExponentialFeeScheduler; exports.getFeeNumeratorOnLinearFeeScheduler = getFeeNumeratorOnLinearFeeScheduler; exports.getFeeOnAmount = getFeeOnAmount; exports.getFeeSchedulerParams = getFeeSchedulerParams; exports.getFirstCurve = getFirstCurve; exports.getFirstKey = getFirstKey; exports.getIncludedFeeAmount = getIncludedFeeAmount; exports.getInitialLiquidityFromDeltaBase = getInitialLiquidityFromDeltaBase; exports.getInitialLiquidityFromDeltaQuote = getInitialLiquidityFromDeltaQuote; exports.getLiquidity = getLiquidity; exports.getLockedVestingParams = getLockedVestingParams; exports.getMaxBaseFeeNumerator = getMaxBaseFeeNumerator; exports.getMaxIndex = getMaxIndex; exports.getMaxOutAmountWithMinBaseFee = getMaxOutAmountWithMinBaseFee; exports.getMigratedPoolFeeParams = getMigratedPoolFeeParams; exports.getMigrationBaseToken = getMigrationBaseToken; exports.getMigrationQuoteAmount = getMigrationQuoteAmount; exports.getMigrationQuoteAmountFromMigrationQuoteThreshold = getMigrationQuoteAmountFromMigrationQuoteThreshold; exports.getMigrationQuoteThresholdFromMigrationQuoteAmount = getMigrationQuoteThresholdFromMigrationQuoteAmount; exports.getMigrationThresholdPrice = getMigrationThresholdPrice; exports.getMinBaseFeeNumerator = getMinBaseFeeNumerator; exports.getNextSqrtPriceFromBaseAmountInRoundingUp = getNextSqrtPriceFromBaseAmountInRoundingUp; exports.getNextSqrtPriceFromBaseAmountOutRoundingUp = getNextSqrtPriceFromBaseAmountOutRoundingUp; exports.getNextSqrtPriceFromInput = getNextSqrtPriceFromInput; exports.getNextSqrtPriceFromOutput = getNextSqrtPriceFromOutput; exports.getNextSqrtPriceFromQuoteAmountInRoundingDown = getNextSqrtPriceFromQuoteAmountInRoundingDown; exports.getNextSqrtPriceFromQuoteAmountOutRoundingDown = getNextSqrtPriceFromQuoteAmountOutRoundingDown; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getPercentageSupplyOnMigration = getPercentageSupplyOnMigration; exports.getPriceFromSqrtPrice = getPriceFromSqrtPrice; exports.getQuoteReserveFromNextSqrtPrice = getQuoteReserveFromNextSqrtPrice; exports.getRateLimiterExcludedFeeAmount = getRateLimiterExcludedFeeAmount; exports.getRateLimiterParams = getRateLimiterParams; exports.getSecondKey = getSecondKey; exports.getSqrtPriceFromMarketCap = getSqrtPriceFromMarketCap; exports.getSqrtPriceFromPrice = getSqrtPriceFromPrice; exports.getSwapAmountWithBuffer = getSwapAmountWithBuffer; exports.getSwapResult = getSwapResult; exports.getSwapResultFromExactInput = getSwapResultFromExactInput; exports.getSwapResultFromExactOutput = getSwapResultFromExactOutput; exports.getSwapResultFromPartialInput = getSwapResultFromPartialInput; exports.getTokenDecimals = getTokenDecimals; exports.getTokenProgram = getTokenProgram; exports.getTokenType = getTokenType; exports.getTokenomics = getTokenomics; exports.getTotalFeeNumerator = getTotalFeeNumerator; exports.getTotalFeeNumeratorFromExcludedFeeAmount = getTotalFeeNumeratorFromExcludedFeeAmount; exports.getTotalFeeNumeratorFromIncludedFeeAmount = getTotalFeeNumeratorFromIncludedFeeAmount; exports.getTotalSupplyFromCurve = getTotalSupplyFromCurve; exports.getTotalTokenSupply = getTotalTokenSupply; exports.getTotalVestingAmount = getTotalVestingAmount; exports.getTwoCurve = getTwoCurve; exports.getVariableFeeNumerator = getVariableFeeNumerator; exports.isDefaultLockedVesting = isDefaultLockedVesting; exports.isDynamicFeeEnabled = isDynamicFeeEnabled; exports.isNativeSol = isNativeSol; exports.isNonZeroRateLimiter = isNonZeroRateLimiter; exports.isRateLimiterApplied = isRateLimiterApplied; exports.isZeroRateLimiter = isZeroRateLimiter; exports.mulDiv = mulDiv; exports.mulShr = mulShr; exports.pow = pow; exports.prepareSwapAmountParam = prepareSwapAmountParam; exports.prepareTokenAccountTx = prepareTokenAccountTx; exports.splitFees = splitFees; exports.sqrt = sqrt; exports.swapQuote = swapQuote; exports.swapQuoteExactIn = swapQuoteExactIn; exports.swapQuoteExactOut = swapQuoteExactOut; exports.swapQuotePartialFill = swapQuotePartialFill; exports.toNumerator = toNumerator; exports.unwrapSOLInstruction = unwrapSOLInstruction; exports.validateActivationType = validateActivationType; exports.validateBalance = validateBalance; exports.validateBaseTokenType = validateBaseTokenType; exports.validateCollectFeeMode = validateCollectFeeMode; exports.validateConfigParameters = validateConfigParameters; exports.validateCurve = validateCurve; exports.validateFeeRateLimiter = validateFeeRateLimiter; exports.validateFeeScheduler = validateFeeScheduler; exports.validateLPPercentages = validateLPPercentages; exports.validateMigratedPoolFee = validateMigratedPoolFee; exports.validateMigrationAndTokenType = validateMigrationAndTokenType; exports.validateMigrationFee = validateMigrationFee; exports.validateMigrationFeeOption = validateMigrationFeeOption; exports.validatePoolFees = validatePoolFees; exports.validateSwapAmount = validateSwapAmount; exports.validateTokenDecimals = validateTokenDecimals; exports.validateTokenSupply = validateTokenSupply; exports.validateTokenUpdateAuthorityOptions = validateTokenUpdateAuthorityOptions; exports.wrapSOLInstruction = wrapSOLInstruction;
|
|
26490
26515
|
//# sourceMappingURL=index.cjs.map
|