@balancer-labs/balancer-maths
Advanced tools
+44
-12
@@ -1,2 +0,2 @@ | ||
| type PoolType$8 = 'GYRO'; | ||
| type PoolType$9 = 'GYRO'; | ||
| type Gyro2CLPImmutable = { | ||
@@ -7,3 +7,3 @@ sqrtAlpha: bigint; | ||
| type Gyro2CLPState = BasePoolState & { | ||
| poolType: PoolType$8; | ||
| poolType: PoolType$9; | ||
| } & Gyro2CLPImmutable; | ||
@@ -66,3 +66,3 @@ | ||
| type PoolType$7 = 'GYROE'; | ||
| type PoolType$8 = 'GYROE'; | ||
| type GyroECLPImmutable = { | ||
@@ -85,3 +85,3 @@ paramsAlpha: bigint; | ||
| type GyroECLPState = BasePoolState & { | ||
| poolType: PoolType$7; | ||
| poolType: PoolType$8; | ||
| } & GyroECLPImmutable; | ||
@@ -170,3 +170,3 @@ | ||
| type PoolType$6 = 'WEIGHTED'; | ||
| type PoolType$7 = 'WEIGHTED'; | ||
| type WeightedImmutable = { | ||
@@ -176,3 +176,3 @@ weights: bigint[]; | ||
| type WeightedState = BasePoolState & { | ||
| poolType: PoolType$6; | ||
| poolType: PoolType$7; | ||
| } & WeightedImmutable; | ||
@@ -231,3 +231,3 @@ | ||
| type PoolType$5 = 'RECLAMM'; | ||
| type PoolType$6 = 'RECLAMM'; | ||
| type ReClammMutable = { | ||
@@ -245,3 +245,3 @@ lastVirtualBalances: bigint[]; | ||
| type ReClammState = BasePoolState & { | ||
| poolType: PoolType$5; | ||
| poolType: PoolType$6; | ||
| } & ReClammMutable; | ||
@@ -272,3 +272,3 @@ | ||
| type PoolType$4 = 'QUANT_AMM_WEIGHTED'; | ||
| type PoolType$5 = 'QUANT_AMM_WEIGHTED'; | ||
| type QuantAmmMutable = { | ||
@@ -285,3 +285,3 @@ firstFourWeightsAndMultipliers: bigint[]; | ||
| type QuantAmmState = BasePoolState & { | ||
| poolType: PoolType$4; | ||
| poolType: PoolType$5; | ||
| } & QuantAmmMutable & QuantAmmImmutable; | ||
@@ -329,2 +329,34 @@ | ||
| type PoolType$4 = 'FIXED_PRICE_LBP'; | ||
| type FixedPriceLBPImmutable = { | ||
| projectTokenIndex: number; | ||
| reserveTokenIndex: number; | ||
| projectTokenRate: bigint; | ||
| startTime: bigint; | ||
| endTime: bigint; | ||
| }; | ||
| type FixedPriceLBPMutable = { | ||
| isSwapEnabled: boolean; | ||
| currentTimestamp: bigint; | ||
| }; | ||
| type FixedPriceLBPState = BasePoolState & { | ||
| poolType: PoolType$4; | ||
| } & FixedPriceLBPImmutable & FixedPriceLBPMutable; | ||
| declare class FixedPriceLBP implements PoolBase { | ||
| projectTokenIndex: number; | ||
| reserveTokenIndex: number; | ||
| projectTokenRate: bigint; | ||
| isSwapEnabled: boolean; | ||
| constructor(poolState: FixedPriceLBPState); | ||
| getMaximumInvariantRatio(): bigint; | ||
| getMinimumInvariantRatio(): bigint; | ||
| getMaxSwapAmount(maxSwapParams: MaxSwapParams): bigint; | ||
| getMaxSingleTokenAddAmount(): bigint; | ||
| getMaxSingleTokenRemoveAmount(_maxRemoveParams: MaxSingleTokenRemoveParams): bigint; | ||
| onSwap(swapParams: SwapParams): bigint; | ||
| computeInvariant(balancesLiveScaled18: bigint[], rounding: Rounding): bigint; | ||
| computeBalance(_balancesLiveScaled18: bigint[], _tokenInIndex: number, _invariantRatio: bigint): bigint; | ||
| } | ||
| /** | ||
@@ -346,3 +378,3 @@ * State of a pool. Note - rates, fees, totalSupply use scaled 18. | ||
| }; | ||
| type PoolState = BasePoolState | WeightedState | StableState | GyroECLPState | ReClammState | QuantAmmState; | ||
| type PoolState = BasePoolState | WeightedState | StableState | GyroECLPState | ReClammState | QuantAmmState | FixedPriceLBPState; | ||
| declare enum SwapKind { | ||
@@ -719,2 +751,2 @@ GivenIn = 0, | ||
| export { AddKind, type AddLiquidityInput, type AfterSwapParams, type BasePoolState, type BufferImmutable, type BufferMutable, type BufferState, type DerivedEclpParams, type EclpParams, Gyro2CLP, type Gyro2CLPImmutable, type Gyro2CLPState, GyroECLP, type GyroECLPImmutable, GyroECLPMath, type GyroECLPState, type HookBase, type HookClassConstructor, type HookClasses, type HookState, type HookStateBase, LiquidityBootstrapping, type LiquidityBootstrappingImmutable, type LiquidityBootstrappingMutable, type LiquidityBootstrappingState, type MaxSingleTokenRemoveParams, type MaxSwapParams, type PoolBase, type PoolState, QuantAmm, type QuantAmmImmutable, type QuantAmmMutable, type QuantAmmState, ReClamm, type ReClammMutable, type ReClammState, ReClammV2, type ReClammV2Mutable, type ReClammV2State, RemoveKind, type RemoveLiquidityInput, Rounding, Stable, type StableMutable, type StableState, type SwapInput, SwapKind, type SwapParams, Vault, type Vector2, Weighted, type WeightedImmutable, type WeightedState, _MAX_INVARIANT_RATIO, _MAX_IN_RATIO, _MAX_OUT_RATIO, _MIN_INVARIANT_RATIO, _MIN_WEIGHT, _computeBalanceOutGivenInvariant, _computeInGivenExactOut, _computeInvariantDown, _computeInvariantUp, _computeOutGivenExactIn, calcInGivenOut, calcOutGivenIn, calculateBlockNormalisedWeight, calculateInvariant, calculateVirtualParameter0, calculateVirtualParameter1, erc4626BufferWrapOrUnwrap, getFirstFourWeightsAndMultipliers, getSecondFourWeightsAndMultipliers }; | ||
| export { AddKind, type AddLiquidityInput, type AfterSwapParams, type BasePoolState, type BufferImmutable, type BufferMutable, type BufferState, type DerivedEclpParams, type EclpParams, FixedPriceLBP, type FixedPriceLBPImmutable, type FixedPriceLBPMutable, type FixedPriceLBPState, Gyro2CLP, type Gyro2CLPImmutable, type Gyro2CLPState, GyroECLP, type GyroECLPImmutable, GyroECLPMath, type GyroECLPState, type HookBase, type HookClassConstructor, type HookClasses, type HookState, type HookStateBase, LiquidityBootstrapping, type LiquidityBootstrappingImmutable, type LiquidityBootstrappingMutable, type LiquidityBootstrappingState, type MaxSingleTokenRemoveParams, type MaxSwapParams, type PoolBase, type PoolState, QuantAmm, type QuantAmmImmutable, type QuantAmmMutable, type QuantAmmState, ReClamm, type ReClammMutable, type ReClammState, ReClammV2, type ReClammV2Mutable, type ReClammV2State, RemoveKind, type RemoveLiquidityInput, Rounding, Stable, type StableMutable, type StableState, type SwapInput, SwapKind, type SwapParams, Vault, type Vector2, Weighted, type WeightedImmutable, type WeightedState, _MAX_INVARIANT_RATIO, _MAX_IN_RATIO, _MAX_OUT_RATIO, _MIN_INVARIANT_RATIO, _MIN_WEIGHT, _computeBalanceOutGivenInvariant, _computeInGivenExactOut, _computeInvariantDown, _computeInvariantUp, _computeOutGivenExactIn, calcInGivenOut, calcOutGivenIn, calculateBlockNormalisedWeight, calculateInvariant, calculateVirtualParameter0, calculateVirtualParameter1, erc4626BufferWrapOrUnwrap, getFirstFourWeightsAndMultipliers, getSecondFourWeightsAndMultipliers }; |
+44
-12
@@ -1,2 +0,2 @@ | ||
| type PoolType$8 = 'GYRO'; | ||
| type PoolType$9 = 'GYRO'; | ||
| type Gyro2CLPImmutable = { | ||
@@ -7,3 +7,3 @@ sqrtAlpha: bigint; | ||
| type Gyro2CLPState = BasePoolState & { | ||
| poolType: PoolType$8; | ||
| poolType: PoolType$9; | ||
| } & Gyro2CLPImmutable; | ||
@@ -66,3 +66,3 @@ | ||
| type PoolType$7 = 'GYROE'; | ||
| type PoolType$8 = 'GYROE'; | ||
| type GyroECLPImmutable = { | ||
@@ -85,3 +85,3 @@ paramsAlpha: bigint; | ||
| type GyroECLPState = BasePoolState & { | ||
| poolType: PoolType$7; | ||
| poolType: PoolType$8; | ||
| } & GyroECLPImmutable; | ||
@@ -170,3 +170,3 @@ | ||
| type PoolType$6 = 'WEIGHTED'; | ||
| type PoolType$7 = 'WEIGHTED'; | ||
| type WeightedImmutable = { | ||
@@ -176,3 +176,3 @@ weights: bigint[]; | ||
| type WeightedState = BasePoolState & { | ||
| poolType: PoolType$6; | ||
| poolType: PoolType$7; | ||
| } & WeightedImmutable; | ||
@@ -231,3 +231,3 @@ | ||
| type PoolType$5 = 'RECLAMM'; | ||
| type PoolType$6 = 'RECLAMM'; | ||
| type ReClammMutable = { | ||
@@ -245,3 +245,3 @@ lastVirtualBalances: bigint[]; | ||
| type ReClammState = BasePoolState & { | ||
| poolType: PoolType$5; | ||
| poolType: PoolType$6; | ||
| } & ReClammMutable; | ||
@@ -272,3 +272,3 @@ | ||
| type PoolType$4 = 'QUANT_AMM_WEIGHTED'; | ||
| type PoolType$5 = 'QUANT_AMM_WEIGHTED'; | ||
| type QuantAmmMutable = { | ||
@@ -285,3 +285,3 @@ firstFourWeightsAndMultipliers: bigint[]; | ||
| type QuantAmmState = BasePoolState & { | ||
| poolType: PoolType$4; | ||
| poolType: PoolType$5; | ||
| } & QuantAmmMutable & QuantAmmImmutable; | ||
@@ -329,2 +329,34 @@ | ||
| type PoolType$4 = 'FIXED_PRICE_LBP'; | ||
| type FixedPriceLBPImmutable = { | ||
| projectTokenIndex: number; | ||
| reserveTokenIndex: number; | ||
| projectTokenRate: bigint; | ||
| startTime: bigint; | ||
| endTime: bigint; | ||
| }; | ||
| type FixedPriceLBPMutable = { | ||
| isSwapEnabled: boolean; | ||
| currentTimestamp: bigint; | ||
| }; | ||
| type FixedPriceLBPState = BasePoolState & { | ||
| poolType: PoolType$4; | ||
| } & FixedPriceLBPImmutable & FixedPriceLBPMutable; | ||
| declare class FixedPriceLBP implements PoolBase { | ||
| projectTokenIndex: number; | ||
| reserveTokenIndex: number; | ||
| projectTokenRate: bigint; | ||
| isSwapEnabled: boolean; | ||
| constructor(poolState: FixedPriceLBPState); | ||
| getMaximumInvariantRatio(): bigint; | ||
| getMinimumInvariantRatio(): bigint; | ||
| getMaxSwapAmount(maxSwapParams: MaxSwapParams): bigint; | ||
| getMaxSingleTokenAddAmount(): bigint; | ||
| getMaxSingleTokenRemoveAmount(_maxRemoveParams: MaxSingleTokenRemoveParams): bigint; | ||
| onSwap(swapParams: SwapParams): bigint; | ||
| computeInvariant(balancesLiveScaled18: bigint[], rounding: Rounding): bigint; | ||
| computeBalance(_balancesLiveScaled18: bigint[], _tokenInIndex: number, _invariantRatio: bigint): bigint; | ||
| } | ||
| /** | ||
@@ -346,3 +378,3 @@ * State of a pool. Note - rates, fees, totalSupply use scaled 18. | ||
| }; | ||
| type PoolState = BasePoolState | WeightedState | StableState | GyroECLPState | ReClammState | QuantAmmState; | ||
| type PoolState = BasePoolState | WeightedState | StableState | GyroECLPState | ReClammState | QuantAmmState | FixedPriceLBPState; | ||
| declare enum SwapKind { | ||
@@ -719,2 +751,2 @@ GivenIn = 0, | ||
| export { AddKind, type AddLiquidityInput, type AfterSwapParams, type BasePoolState, type BufferImmutable, type BufferMutable, type BufferState, type DerivedEclpParams, type EclpParams, Gyro2CLP, type Gyro2CLPImmutable, type Gyro2CLPState, GyroECLP, type GyroECLPImmutable, GyroECLPMath, type GyroECLPState, type HookBase, type HookClassConstructor, type HookClasses, type HookState, type HookStateBase, LiquidityBootstrapping, type LiquidityBootstrappingImmutable, type LiquidityBootstrappingMutable, type LiquidityBootstrappingState, type MaxSingleTokenRemoveParams, type MaxSwapParams, type PoolBase, type PoolState, QuantAmm, type QuantAmmImmutable, type QuantAmmMutable, type QuantAmmState, ReClamm, type ReClammMutable, type ReClammState, ReClammV2, type ReClammV2Mutable, type ReClammV2State, RemoveKind, type RemoveLiquidityInput, Rounding, Stable, type StableMutable, type StableState, type SwapInput, SwapKind, type SwapParams, Vault, type Vector2, Weighted, type WeightedImmutable, type WeightedState, _MAX_INVARIANT_RATIO, _MAX_IN_RATIO, _MAX_OUT_RATIO, _MIN_INVARIANT_RATIO, _MIN_WEIGHT, _computeBalanceOutGivenInvariant, _computeInGivenExactOut, _computeInvariantDown, _computeInvariantUp, _computeOutGivenExactIn, calcInGivenOut, calcOutGivenIn, calculateBlockNormalisedWeight, calculateInvariant, calculateVirtualParameter0, calculateVirtualParameter1, erc4626BufferWrapOrUnwrap, getFirstFourWeightsAndMultipliers, getSecondFourWeightsAndMultipliers }; | ||
| export { AddKind, type AddLiquidityInput, type AfterSwapParams, type BasePoolState, type BufferImmutable, type BufferMutable, type BufferState, type DerivedEclpParams, type EclpParams, FixedPriceLBP, type FixedPriceLBPImmutable, type FixedPriceLBPMutable, type FixedPriceLBPState, Gyro2CLP, type Gyro2CLPImmutable, type Gyro2CLPState, GyroECLP, type GyroECLPImmutable, GyroECLPMath, type GyroECLPState, type HookBase, type HookClassConstructor, type HookClasses, type HookState, type HookStateBase, LiquidityBootstrapping, type LiquidityBootstrappingImmutable, type LiquidityBootstrappingMutable, type LiquidityBootstrappingState, type MaxSingleTokenRemoveParams, type MaxSwapParams, type PoolBase, type PoolState, QuantAmm, type QuantAmmImmutable, type QuantAmmMutable, type QuantAmmState, ReClamm, type ReClammMutable, type ReClammState, ReClammV2, type ReClammV2Mutable, type ReClammV2State, RemoveKind, type RemoveLiquidityInput, Rounding, Stable, type StableMutable, type StableState, type SwapInput, SwapKind, type SwapParams, Vault, type Vector2, Weighted, type WeightedImmutable, type WeightedState, _MAX_INVARIANT_RATIO, _MAX_IN_RATIO, _MAX_OUT_RATIO, _MIN_INVARIANT_RATIO, _MIN_WEIGHT, _computeBalanceOutGivenInvariant, _computeInGivenExactOut, _computeInvariantDown, _computeInvariantUp, _computeOutGivenExactIn, calcInGivenOut, calcOutGivenIn, calculateBlockNormalisedWeight, calculateInvariant, calculateVirtualParameter0, calculateVirtualParameter1, erc4626BufferWrapOrUnwrap, getFirstFourWeightsAndMultipliers, getSecondFourWeightsAndMultipliers }; |
+1
-1
@@ -12,3 +12,3 @@ { | ||
| }, | ||
| "version": "0.0.38", | ||
| "version": "0.0.39", | ||
| "main": "dist/index.js", | ||
@@ -15,0 +15,0 @@ "module": "dist/index.mjs", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1100439
1.73%9509
2.14%22
10%