@panoptic-eng/sdk 1.0.41 → 1.0.43
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/cow/index.d.ts.map +1 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/panoptic/v2/index.d.ts +118 -1
- package/dist/panoptic/v2/index.d.ts.map +1 -1
- package/dist/panoptic/v2/index.js +210 -16
- package/dist/panoptic/v2/index.js.map +1 -1
- package/dist/panoptic/v2/react-public.d.ts +118 -1
- package/dist/panoptic/v2/react-public.d.ts.map +1 -1
- package/dist/panoptic/v2/react-public.js +210 -16
- package/dist/panoptic/v2/react-public.js.map +1 -1
- package/dist/{v2-ChGyiigb.js → v2-Djy0rVdh.js} +208 -14
- package/package.json +1 -1
|
@@ -10983,7 +10983,7 @@ function getUniswapV3Addresses(chainId, overrides) {
|
|
|
10983
10983
|
|
|
10984
10984
|
//#endregion
|
|
10985
10985
|
//#region src/uniswap/v3/router/quote.ts
|
|
10986
|
-
const BPS_DENOMINATOR$
|
|
10986
|
+
const BPS_DENOMINATOR$4 = 10000n;
|
|
10987
10987
|
const UINT128_MAX = (1n << 128n) - 1n;
|
|
10988
10988
|
/**
|
|
10989
10989
|
* Quote an exact-in v3 swap. Returns `null` when the quote reverts (e.g. the
|
|
@@ -10993,7 +10993,7 @@ const UINT128_MAX = (1n << 128n) - 1n;
|
|
|
10993
10993
|
async function quoteV3ExactIn(params) {
|
|
10994
10994
|
const { client, chainId, tokenIn, tokenOut, fee, amountIn, slippageBps, blockNumber } = params;
|
|
10995
10995
|
if (amountIn < 0n || amountIn > UINT128_MAX) throw new PanopticError(`amountIn ${amountIn} exceeds uint128 maximum`);
|
|
10996
|
-
if (slippageBps < 0n || slippageBps > BPS_DENOMINATOR$
|
|
10996
|
+
if (slippageBps < 0n || slippageBps > BPS_DENOMINATOR$4) throw new PanopticError(`invalid slippageBps ${slippageBps}, must be 0..10000`);
|
|
10997
10997
|
const { quoterV2 } = getUniswapV3Addresses(chainId, params.addresses);
|
|
10998
10998
|
try {
|
|
10999
10999
|
const { result } = await client.simulateContract({
|
|
@@ -11010,7 +11010,7 @@ async function quoteV3ExactIn(params) {
|
|
|
11010
11010
|
}]
|
|
11011
11011
|
});
|
|
11012
11012
|
const [amountOut, , , gasEstimate] = result;
|
|
11013
|
-
const amountOutMinimum = amountOut * (BPS_DENOMINATOR$
|
|
11013
|
+
const amountOutMinimum = amountOut * (BPS_DENOMINATOR$4 - slippageBps) / BPS_DENOMINATOR$4;
|
|
11014
11014
|
return {
|
|
11015
11015
|
amountOut,
|
|
11016
11016
|
amountOutMinimum,
|
|
@@ -16849,7 +16849,7 @@ async function simulateDispatch(params) {
|
|
|
16849
16849
|
|
|
16850
16850
|
//#endregion
|
|
16851
16851
|
//#region src/panoptic/v2/simulations/tokenShortfallRecovery.ts
|
|
16852
|
-
const BPS_DENOMINATOR$
|
|
16852
|
+
const BPS_DENOMINATOR$3 = 10000n;
|
|
16853
16853
|
const MAX_RECOVERY_QUOTE_ATTEMPTS = 8;
|
|
16854
16854
|
/**
|
|
16855
16855
|
* Wrap a dispatch with a temporary credit leg that sources the shortfall.
|
|
@@ -16899,7 +16899,7 @@ function getNotEnoughTokensError(error) {
|
|
|
16899
16899
|
}
|
|
16900
16900
|
function maximumAmountIn(estimatedAmountIn, slippageBps) {
|
|
16901
16901
|
if (slippageBps < 0n) throw new PanopticError("slippageBps must be non-negative");
|
|
16902
|
-
return (estimatedAmountIn * (BPS_DENOMINATOR$
|
|
16902
|
+
return (estimatedAmountIn * (BPS_DENOMINATOR$3 + slippageBps) + BPS_DENOMINATOR$3 - 1n) / BPS_DENOMINATOR$3;
|
|
16903
16903
|
}
|
|
16904
16904
|
function ceilDiv(numerator, denominator) {
|
|
16905
16905
|
return (numerator + denominator - 1n) / denominator;
|
|
@@ -16927,10 +16927,10 @@ async function quoteTokenShortfallRecovery(params) {
|
|
|
16927
16927
|
reason: "invalid-shortfall",
|
|
16928
16928
|
detail: `requested=${shortfallError.assetsRequested} <= balance=${shortfallError.assetBalance}`
|
|
16929
16929
|
};
|
|
16930
|
-
if (params.slippageBps < 0n || params.slippageBps > BPS_DENOMINATOR$
|
|
16930
|
+
if (params.slippageBps < 0n || params.slippageBps > BPS_DENOMINATOR$3) return {
|
|
16931
16931
|
available: false,
|
|
16932
16932
|
reason: "invalid-slippage",
|
|
16933
|
-
detail: `slippageBps=${params.slippageBps} is outside [0, ${BPS_DENOMINATOR$
|
|
16933
|
+
detail: `slippageBps=${params.slippageBps} is outside [0, ${BPS_DENOMINATOR$3}]`
|
|
16934
16934
|
};
|
|
16935
16935
|
const targetBlockNumber = params.blockNumber ?? await params.client.getBlockNumber();
|
|
16936
16936
|
const pool = await getPool({
|
|
@@ -21759,7 +21759,7 @@ const nfpmAbi = [{
|
|
|
21759
21759
|
}],
|
|
21760
21760
|
stateMutability: "payable"
|
|
21761
21761
|
}];
|
|
21762
|
-
const MAX_UINT128 = 2n ** 128n - 1n;
|
|
21762
|
+
const MAX_UINT128$1 = 2n ** 128n - 1n;
|
|
21763
21763
|
const MAX_UINT256 = 2n ** 256n - 1n;
|
|
21764
21764
|
const Q128 = 2n ** 128n;
|
|
21765
21765
|
/**
|
|
@@ -21801,8 +21801,8 @@ async function getUniswapV3LpPositionState(params) {
|
|
|
21801
21801
|
args: [{
|
|
21802
21802
|
tokenId,
|
|
21803
21803
|
recipient: owner,
|
|
21804
|
-
amount0Max: MAX_UINT128,
|
|
21805
|
-
amount1Max: MAX_UINT128
|
|
21804
|
+
amount0Max: MAX_UINT128$1,
|
|
21805
|
+
amount1Max: MAX_UINT128$1
|
|
21806
21806
|
}],
|
|
21807
21807
|
account: owner,
|
|
21808
21808
|
blockNumber: _meta.blockNumber
|
|
@@ -26183,7 +26183,7 @@ async function simulateSwapExactIn(params) {
|
|
|
26183
26183
|
|
|
26184
26184
|
//#endregion
|
|
26185
26185
|
//#region src/panoptic/v2/simulations/oneTokenFlow.ts
|
|
26186
|
-
const BPS_DENOMINATOR$
|
|
26186
|
+
const BPS_DENOMINATOR$2 = 10000n;
|
|
26187
26187
|
/**
|
|
26188
26188
|
* Default {@link OneTokenFlowQuoteParams.minSwapRatioBps}: 0.5%.
|
|
26189
26189
|
*
|
|
@@ -26203,7 +26203,7 @@ function abs(value) {
|
|
|
26203
26203
|
return value < 0n ? -value : value;
|
|
26204
26204
|
}
|
|
26205
26205
|
function padForSlippage(amount, slippageBps) {
|
|
26206
|
-
return (amount * (BPS_DENOMINATOR$
|
|
26206
|
+
return (amount * (BPS_DENOMINATOR$2 + slippageBps) + BPS_DENOMINATOR$2 - 1n) / BPS_DENOMINATOR$2;
|
|
26207
26207
|
}
|
|
26208
26208
|
/**
|
|
26209
26209
|
* Quote a dispatch wrapped so its net flow lands in `targetTokenIndex` only.
|
|
@@ -26223,10 +26223,10 @@ async function quoteOneTokenFlow(params) {
|
|
|
26223
26223
|
reason: "invalid-target-token",
|
|
26224
26224
|
detail: `targetTokenIndex=${targetTokenIndex} is neither 0 nor 1`
|
|
26225
26225
|
};
|
|
26226
|
-
if (params.slippageBps < 0n || params.slippageBps > BPS_DENOMINATOR$
|
|
26226
|
+
if (params.slippageBps < 0n || params.slippageBps > BPS_DENOMINATOR$2) return {
|
|
26227
26227
|
available: false,
|
|
26228
26228
|
reason: "invalid-slippage",
|
|
26229
|
-
detail: `slippageBps=${params.slippageBps} is outside [0, ${BPS_DENOMINATOR$
|
|
26229
|
+
detail: `slippageBps=${params.slippageBps} is outside [0, ${BPS_DENOMINATOR$2}]`
|
|
26230
26230
|
};
|
|
26231
26231
|
const tickLimitLow = params.tickLimitLow ?? MIN_TICK;
|
|
26232
26232
|
const tickLimitHigh = params.tickLimitHigh ?? MAX_TICK;
|
|
@@ -26334,7 +26334,7 @@ async function quoteOneTokenFlow(params) {
|
|
|
26334
26334
|
}
|
|
26335
26335
|
if (baseTargetDelta !== null && minSwapRatioBps > 0n) {
|
|
26336
26336
|
const swapInTargetTerms = convertToTokenIndex(swapAmount, otherTokenIndex, targetTokenIndex, pool.sqrtPriceX96);
|
|
26337
|
-
if (swapInTargetTerms * BPS_DENOMINATOR$
|
|
26337
|
+
if (swapInTargetTerms * BPS_DENOMINATOR$2 < minSwapRatioBps * abs(baseTargetDelta)) return {
|
|
26338
26338
|
available: false,
|
|
26339
26339
|
reason: "below-threshold",
|
|
26340
26340
|
detail: `non-target flow ${swapInTargetTerms} (in target token terms) is below ${minSwapRatioBps}bps of the target flow ${abs(baseTargetDelta)}`
|
|
@@ -26426,6 +26426,200 @@ async function quoteOneTokenFlow(params) {
|
|
|
26426
26426
|
};
|
|
26427
26427
|
}
|
|
26428
26428
|
|
|
26429
|
+
//#endregion
|
|
26430
|
+
//#region src/panoptic/v2/simulations/temporaryLoanRecovery.ts
|
|
26431
|
+
const BPS_DENOMINATOR$1 = 10000n;
|
|
26432
|
+
const MAX_RECOVERY_ATTEMPTS = 8n;
|
|
26433
|
+
const MAX_UINT128 = (1n << 128n) - 1n;
|
|
26434
|
+
const LOAN_GROWTH_DENOMINATOR = 20n;
|
|
26435
|
+
/**
|
|
26436
|
+
* Wrap a dispatch with `loan mint -> user operations -> swapped loan burn`.
|
|
26437
|
+
* The repeated tokenId is intentional: the first occurrence mints it and the
|
|
26438
|
+
* last occurrence burns it after the user's operations have settled.
|
|
26439
|
+
*/
|
|
26440
|
+
function buildTemporaryLoanRecoveryDispatch(params) {
|
|
26441
|
+
const low = params.tickLimitLow <= params.tickLimitHigh ? params.tickLimitLow : params.tickLimitHigh;
|
|
26442
|
+
const high = params.tickLimitLow <= params.tickLimitHigh ? params.tickLimitHigh : params.tickLimitLow;
|
|
26443
|
+
return {
|
|
26444
|
+
positionIdList: [
|
|
26445
|
+
params.loanTokenId,
|
|
26446
|
+
...params.dispatch.positionIdList,
|
|
26447
|
+
params.loanTokenId
|
|
26448
|
+
],
|
|
26449
|
+
finalPositionIdList: [...params.dispatch.finalPositionIdList],
|
|
26450
|
+
positionSizes: [
|
|
26451
|
+
params.loanPositionSize,
|
|
26452
|
+
...params.dispatch.positionSizes,
|
|
26453
|
+
0n
|
|
26454
|
+
],
|
|
26455
|
+
tickAndSpreadLimits: [
|
|
26456
|
+
[
|
|
26457
|
+
low,
|
|
26458
|
+
high,
|
|
26459
|
+
0n
|
|
26460
|
+
],
|
|
26461
|
+
...params.dispatch.tickAndSpreadLimits,
|
|
26462
|
+
[
|
|
26463
|
+
high,
|
|
26464
|
+
low,
|
|
26465
|
+
0n
|
|
26466
|
+
]
|
|
26467
|
+
],
|
|
26468
|
+
usePremiaAsCollateral: params.dispatch.usePremiaAsCollateral,
|
|
26469
|
+
builderCode: params.dispatch.builderCode
|
|
26470
|
+
};
|
|
26471
|
+
}
|
|
26472
|
+
/**
|
|
26473
|
+
* Quotes and simulates an atomic temporary loan around a full-close dispatch.
|
|
26474
|
+
*
|
|
26475
|
+
* @param params - Chain client, account, failed dispatch, shortfall error, and quote limits.
|
|
26476
|
+
* @returns An executable quote when recovery succeeds, otherwise a categorized unavailable result.
|
|
26477
|
+
* @throws {PanopticError} When the dispatch is not a full close or required RPC reads fail.
|
|
26478
|
+
*/
|
|
26479
|
+
async function quoteTemporaryLoanRecovery(params) {
|
|
26480
|
+
const initialShortfall = getNotEnoughTokensError(params.error);
|
|
26481
|
+
if (initialShortfall === null) return {
|
|
26482
|
+
available: false,
|
|
26483
|
+
reason: "not-token-shortfall"
|
|
26484
|
+
};
|
|
26485
|
+
let loanAmount = initialShortfall.assetsRequested - initialShortfall.assetBalance;
|
|
26486
|
+
if (loanAmount <= 0n) return {
|
|
26487
|
+
available: false,
|
|
26488
|
+
reason: "invalid-shortfall",
|
|
26489
|
+
detail: `requested=${initialShortfall.assetsRequested} <= balance=${initialShortfall.assetBalance}`
|
|
26490
|
+
};
|
|
26491
|
+
if (params.slippageBps <= 0n || params.slippageBps > BPS_DENOMINATOR$1) return {
|
|
26492
|
+
available: false,
|
|
26493
|
+
reason: "invalid-slippage",
|
|
26494
|
+
detail: `slippageBps=${params.slippageBps} is outside (0, ${BPS_DENOMINATOR$1}]`
|
|
26495
|
+
};
|
|
26496
|
+
if (params.dispatch.finalPositionIdList.length !== 0) throw new PanopticError("Temporary-loan recovery requires a full-close dispatch with an empty finalPositionIdList");
|
|
26497
|
+
let targetBlockNumber;
|
|
26498
|
+
try {
|
|
26499
|
+
targetBlockNumber = params.blockNumber ?? await params.client.getBlockNumber();
|
|
26500
|
+
} catch (error) {
|
|
26501
|
+
if (error instanceof PanopticError) throw error;
|
|
26502
|
+
throw new PanopticError("Failed to resolve the block for temporary-loan recovery", error instanceof Error ? error : new Error(String(error)));
|
|
26503
|
+
}
|
|
26504
|
+
let pool;
|
|
26505
|
+
try {
|
|
26506
|
+
pool = await getPool({
|
|
26507
|
+
client: params.client,
|
|
26508
|
+
poolAddress: params.poolAddress,
|
|
26509
|
+
chainId: params.chainId,
|
|
26510
|
+
blockNumber: targetBlockNumber
|
|
26511
|
+
});
|
|
26512
|
+
} catch (error) {
|
|
26513
|
+
if (error instanceof PanopticError) throw error;
|
|
26514
|
+
throw new PanopticError("Failed to load the pool for temporary-loan recovery", error instanceof Error ? error : new Error(String(error)));
|
|
26515
|
+
}
|
|
26516
|
+
const defaultLimits = tickLimits(pool.currentTick, params.slippageBps);
|
|
26517
|
+
const tickLimitLow = params.tickLimitLow ?? defaultLimits.low;
|
|
26518
|
+
const tickLimitHigh = params.tickLimitHigh ?? defaultLimits.high;
|
|
26519
|
+
if (tickLimitLow >= tickLimitHigh) return {
|
|
26520
|
+
available: false,
|
|
26521
|
+
reason: "invalid-tick-limits",
|
|
26522
|
+
detail: `tickLimitLow=${tickLimitLow} >= tickLimitHigh=${tickLimitHigh}`
|
|
26523
|
+
};
|
|
26524
|
+
const token0 = pool.collateralTracker0.token;
|
|
26525
|
+
const token1 = pool.collateralTracker1.token;
|
|
26526
|
+
const tokenIndexFor = (address) => {
|
|
26527
|
+
const normalized = address.toLowerCase();
|
|
26528
|
+
if (normalized === token0.toLowerCase() || normalized === pool.collateralTracker0.address.toLowerCase()) return 0n;
|
|
26529
|
+
if (normalized === token1.toLowerCase() || normalized === pool.collateralTracker1.address.toLowerCase()) return 1n;
|
|
26530
|
+
return null;
|
|
26531
|
+
};
|
|
26532
|
+
const loanTokenIndex = tokenIndexFor(initialShortfall.tokenAddress);
|
|
26533
|
+
if (loanTokenIndex === null) return {
|
|
26534
|
+
available: false,
|
|
26535
|
+
reason: "unsupported-token",
|
|
26536
|
+
detail: `${initialShortfall.tokenAddress} is neither collateral token of ${params.poolAddress}`
|
|
26537
|
+
};
|
|
26538
|
+
const repaymentTokenIndex = loanTokenIndex === 0n ? 1n : 0n;
|
|
26539
|
+
const loanToken = loanTokenIndex === 0n ? token0 : token1;
|
|
26540
|
+
const repaymentToken = repaymentTokenIndex === 0n ? token0 : token1;
|
|
26541
|
+
const collisionIds = Array.from(new Set([
|
|
26542
|
+
...params.existingPositionIds,
|
|
26543
|
+
...params.dispatch.positionIdList,
|
|
26544
|
+
...params.dispatch.finalPositionIdList
|
|
26545
|
+
]));
|
|
26546
|
+
for (let attempt = 0n; attempt < MAX_RECOVERY_ATTEMPTS; attempt += 1n) {
|
|
26547
|
+
if (loanAmount > MAX_UINT128) return {
|
|
26548
|
+
available: false,
|
|
26549
|
+
reason: "recovery-unavailable",
|
|
26550
|
+
detail: `required loan amount ${loanAmount} exceeds uint128`
|
|
26551
|
+
};
|
|
26552
|
+
const loan = buildUniqueLoan(pool.poolId, loanTokenIndex, loanTokenIndex, pool.currentTick, pool.tickSpacing, collisionIds, loanAmount);
|
|
26553
|
+
const recoveredDispatch = buildTemporaryLoanRecoveryDispatch({
|
|
26554
|
+
dispatch: params.dispatch,
|
|
26555
|
+
loanTokenId: loan.tokenId,
|
|
26556
|
+
loanPositionSize: loan.adjustedSize,
|
|
26557
|
+
tickLimitLow,
|
|
26558
|
+
tickLimitHigh
|
|
26559
|
+
});
|
|
26560
|
+
const simulation = await simulateDispatch({
|
|
26561
|
+
client: params.client,
|
|
26562
|
+
poolAddress: params.poolAddress,
|
|
26563
|
+
account: params.account,
|
|
26564
|
+
existingPositionIdList: params.existingPositionIds,
|
|
26565
|
+
...recoveredDispatch,
|
|
26566
|
+
blockNumber: targetBlockNumber
|
|
26567
|
+
});
|
|
26568
|
+
if (simulation.success && simulation.tokenFlow !== void 0) {
|
|
26569
|
+
const tokenFlow = simulation.tokenFlow;
|
|
26570
|
+
return {
|
|
26571
|
+
available: true,
|
|
26572
|
+
quote: {
|
|
26573
|
+
loanToken,
|
|
26574
|
+
repaymentToken,
|
|
26575
|
+
loanTokenIndex,
|
|
26576
|
+
loanAmount,
|
|
26577
|
+
loanPositionSize: loan.adjustedSize,
|
|
26578
|
+
loanTokenId: loan.tokenId,
|
|
26579
|
+
slippageBps: params.slippageBps,
|
|
26580
|
+
netLoanTokenChange: loanTokenIndex === 0n ? tokenFlow.delta0 : tokenFlow.delta1,
|
|
26581
|
+
netRepaymentTokenChange: repaymentTokenIndex === 0n ? tokenFlow.delta0 : tokenFlow.delta1,
|
|
26582
|
+
dispatch: recoveredDispatch,
|
|
26583
|
+
simulation: {
|
|
26584
|
+
...simulation,
|
|
26585
|
+
tokenFlow
|
|
26586
|
+
},
|
|
26587
|
+
tokenFlow,
|
|
26588
|
+
_meta: simulation._meta
|
|
26589
|
+
}
|
|
26590
|
+
};
|
|
26591
|
+
}
|
|
26592
|
+
if (simulation.success) return {
|
|
26593
|
+
available: false,
|
|
26594
|
+
reason: "recovery-unavailable",
|
|
26595
|
+
detail: "temporary-loan simulation returned no token flow"
|
|
26596
|
+
};
|
|
26597
|
+
const shortfall = getNotEnoughTokensError(simulation.error);
|
|
26598
|
+
if (shortfall === null) return {
|
|
26599
|
+
available: false,
|
|
26600
|
+
reason: "recovery-unavailable",
|
|
26601
|
+
detail: `temporary-loan dispatch reverted: ${simulation.error.message}`,
|
|
26602
|
+
error: simulation.error
|
|
26603
|
+
};
|
|
26604
|
+
const shortfallIndex = tokenIndexFor(shortfall.tokenAddress);
|
|
26605
|
+
if (shortfallIndex !== loanTokenIndex) return {
|
|
26606
|
+
available: false,
|
|
26607
|
+
reason: "repayment-token-shortfall",
|
|
26608
|
+
detail: `repayment token ${shortfall.tokenAddress} requested ${shortfall.assetsRequested}, balance ${shortfall.assetBalance}`,
|
|
26609
|
+
error: simulation.error
|
|
26610
|
+
};
|
|
26611
|
+
const residual = shortfall.assetsRequested - shortfall.assetBalance;
|
|
26612
|
+
const geometricGrowth = (loanAmount + LOAN_GROWTH_DENOMINATOR - 1n) / LOAN_GROWTH_DENOMINATOR;
|
|
26613
|
+
loanAmount += residual > geometricGrowth ? residual : geometricGrowth;
|
|
26614
|
+
}
|
|
26615
|
+
return {
|
|
26616
|
+
available: false,
|
|
26617
|
+
reason: "recovery-unavailable",
|
|
26618
|
+
detail: `temporary-loan recovery remained short after ${MAX_RECOVERY_ATTEMPTS} attempts`,
|
|
26619
|
+
error: new PanopticError("Could not size the temporary loan within the quote attempt limit")
|
|
26620
|
+
};
|
|
26621
|
+
}
|
|
26622
|
+
|
|
26429
26623
|
//#endregion
|
|
26430
26624
|
//#region src/panoptic/v2/abis/poolManager.ts
|
|
26431
26625
|
/**
|
|
@@ -28093,5 +28287,5 @@ const VAULT_DISPLAY_NAME_RESOLVERS_PER_CHAIN = {
|
|
|
28093
28287
|
};
|
|
28094
28288
|
|
|
28095
28289
|
//#endregion
|
|
28096
|
-
export { AccountInsolventError, AlreadyInitializedError, BORROW_INDEX_BITS, BPS_DENOMINATOR, BPS_SCALE, BatchValidationError, BelowMinimumRedemptionError, CastingError, ChunkHasZeroLiquidityError, ChunkLimitError, CrossPoolError, DEFAULT_MAX_SPREAD, DEFAULT_MINT_BUFFER, DEFAULT_MIN_SWAP_RATIO_BPS, DEFAULT_RECONNECT_CONFIG, DEFAULT_VEGOID, DepositTooLargeError, DuplicateTokenIdError, EffectiveLiquidityAboveThresholdError, ExceedsMaximumRedemptionError, InputListFailError, InsufficientCreditLiquidityError, InvalidBuilderCodeError, InvalidHistoryRangeError, InvalidTickBoundError, InvalidTickError, InvalidTokenIdParameterError, InvalidUniswapCallbackError, LEG_BITS, LEG_LIMITS, LEG_MASKS, LengthMismatchError, LiquidityTooHighError, LoanSlotExhaustedError, MARKET_EPOCH_BITS, MARKET_EPOCH_SHIFT, MAX_TICK, MAX_TRACKED_CHUNKS, MINT_BUFFER, MINT_BUFFER_DENOMINATOR, MIN_TICK, MaxRetriesExceededError, MissingPositionIdsError, NetLiquidityZeroError, NetworkMismatchError, NoLegsExercisableError, NotALongLegError, NotBuilderError, NotEnoughLiquidityInChunkError, NotEnoughTokensError, NotGuardianError, NotMarginCalledError, NotPanopticPoolError, ORACLE_EPOCH_SECONDS, OracleRateLimitedError, PanopticError, PanopticHelperNotDeployedError, PanopticValidationError, PoolNotInitializedError, PositionCountNotZeroError, PositionNotOwnedError, PositionSnapshotNotFoundError, PositionTooLargeError, PriceBoundFailError, PriceImpactTooLargeError, ProviderLagError, RATE_AT_TARGET_BITS, REORG_DEPTH, REQUIRED_BASE_ERROR_SENTINEL, ReentrancyError, RpcError, RpcResponseError, SCHEMA_VERSION, SECONDS_PER_YEAR, STANDARD_TICK_WIDTHS, STORAGE_PREFIX, SafeModeError, StaleDataError, StaleOracleError, SwapTokenMismatchError, SyncTimeoutError, TOKEN_ID_BITS, TokenIdHasZeroLegsError, TooManyLegsOpenError, TransferFailedError, UNREALIZED_INTEREST_BITS, UTILIZATION_DENOMINATOR, UnauthorizedUniswapCallbackError, UnderOverFlowError, UnhealthyPoolError, WAD, WrongPoolIdError, WrongUniswapPoolError, ZERO_COLLATERAL, ZERO_VALUATION, ZeroAddressError, ZeroCollateralRequirementError, addLegToTokenId, addPendingPosition, addTrackedChunks, annualizePerSecondRateWad, applyMintBuffer, applyMintBufferPerToken, apportion, approve, approveAndWait, approvePool, assertCanBurn, assertCanForceExercise, assertCanLiquidate, assertCanMint, assertFresh, assertHealthy, assertTradeable, borrow, borrowAndWait, buildBatchDispatchArgs, buildCreditSwapCall, buildCreditWrappedDispatch, buildOpenPositionCalldata, buildSfpmSwapCalldata, buildSfpmSwapPlan, buildTokenShortfallRecoveryDispatch, buildUniqueCredit, buildUniqueLoan, buildUniqueWidthZeroLeg, calculateAccountGreeksPure, calculatePortfolioDelta, calculatePortfolioGamma, calculatePortfolioGreeks, calculatePortfolioValue, calculatePositionDelta, calculatePositionDeltaDebtOnly, calculatePositionDeltaWithSwap, calculatePositionGamma, calculatePositionGreeks, calculatePositionValue, calculateResyncBlock, calculateSpreadWad, cancelTransaction, checkApproval, checkCollateralAcrossTicks, classifyStrategyGroups, cleanupStalePendingPositions, clearCheckpoint, clearPendingPositions, clearTrackedChunks, clearTrackedPositions, clearTradeHistory, closePosition, closePositionAndWait, collateralRuleKindFor, collateralTrackerV2Abi, computeV4PoolId, confirmPendingPosition, convertToAssets, convertToShares, countLegs, createEventPoller, createEventSubscription, createFileStorage, createFlowNeutralTokenId, createMemoryStorage, createNonceManager, createPoolFormatters, createTokenIdBuilder, decodeAllDispatchCalldata, decodeAllLegs, decodeDispatchCalldata, decodeLeftRightSigned, decodeLeftRightUnsigned, decodeLeg, decodeOraclePack, decodeOracleRiskParameters, decodeOracleTiming, decodePanopticTokenURI, decodePoolId, decodeTickSpacing, decodeTokenId, decodeVegoid, deployNewPool, deployNewPoolAndWait, deposit, depositAndWait, deriveSupplyRatePerSecWad, deriveUniqueTokenId, detectReorg, diagnoseOracleSafeMode, dispatch, dispatchAndWait, encodeLeg, encodePoolId, encodePoolKeyBytes, encodeV3PoolKeyBytes, encodeV4PoolId, ensureSfpmV3PoolInitialized, estimateBlockNumbers, estimateCollateralBreakdown, estimateCollateralRequired, executeBatchDispatch, executeBatchDispatchAndWait, failPendingPosition, feesFromFeeGrowthDelta, fetchPoolId, fetchSfpmV3PoolId, forceExercise, forceExerciseAndWait, formatBlockNumber, formatBps, formatCompact, formatDatetime, formatDuration, formatDurationSeconds, formatFeeTier, formatGas, formatGwei, formatPerSecondRateWadAsAprPct, formatPerSecondRateWadAsApyPct, formatPoolIdHex, formatPriceRange, formatRateWad, formatRatioPercent, formatTick, formatTickRange, formatTimestamp, formatTimestampLocale, formatTokenAmount, formatTokenAmountSigned, formatTokenDelta, formatTokenFlow, formatTokenIdHex, formatTokenIdShort, formatTxHash, formatUtilization, formatWad, formatWadPercent, formatWadSigned, formatWei, getAccountBuyingPower, getAccountCollateral, getAccountGreeks, getAccountHistory, getAccountPremia, getAccountSummaryBasic, getAccountSummaryRisk, getAssetIndex, getBlockMeta, getChainDeployment, getChunkLiquidities, getChunkSpreads, getClosedPositions, getClosedPositionsKey, getCollateralAddresses, getCollateralData, getCollateralSharePrices, getCollateralTotalAssetsBatch, getCurrentRates, getDeltaHedgeParams, getEnforcedTickLimits, getFactoryConstructMetadata, getFactoryOwnerOf, getFactoryTokenURI, getGuardianUnlockState, getInterestState, getIrmCurrent, getIrmCurve, getItmAmounts, getLegDelta, getLegDeltaInVaultFrame, getLegGamma, getLegNetValueWidth0, getLegValue, getLiquidationPrices, getMarginBuffer, getMaxPositionSize, getMaxRedeem, getMaxWithdrawable, getNativeTokenPrice, getNetLiquidationValue, getNetLiquidationValues, getNotEnoughTokensError, getOpenPositionIds, getOpenPositionPreview, getOracleRiskParameters, getOracleState, getPanopticPoolAddress, getPanopticPoolFromPoolId, getPendingPositions, getPendingPositionsKey, getPool, getPoolDeploymentBlock, getPoolDisplayId, getPoolLiquidities, getPoolMetaKey, getPoolMetadata, getPoolPrefix, getPortfolioValue, getPosition, getPositionChunkData, getPositionEnrichmentData, getPositionGreeks, getPositionMetaKey, getPositions, getPositionsKey, getPositionsWithPremia, getPriceHistory, getPricesAtTick, getRealizedPnL, getRequiredCreditForITM, getRiskParameters, getSafeMode, getSchemaVersionKey, getStreamiaHistory, getSyncCheckpointKey, getSyncStatus, getTickSpacing, getTokenListId, getTrackedChunks, getTrackedChunksKey, getTrackedPositionIds, getTradeHistory, getUniswapFeeHistory, getUniswapV3LpPositionState, getUniswapV3PoolFromId, getUniswapV3PoolInfo, getUniswapV3PoolLiquidities, getUniswapV4LpPositionState, getUniswapV4PoolBasicState, getUniswapV4PoolInfo, getUniswapV4PoolKeyFromId, getUniswapV4PoolLiquidities, getUtilization, hasLoanOrCredit, hasLongLeg, interpolateBlocks, isCall, isCredit, isCreditLeg, isDefinedRisk, isGasError, isInputListFailError, isLiquidatable, isLoan, isLoanLeg, isNonceError, isPanopticErrorType, isPositionTracked, isRetryableRpcError, isShortOnly, isSpread, isSupportedChain, isolateGroupTokenId, jsonSerializer, liquidate, liquidateAndWait, loadCheckpoint, minePoolAddress, mint, mintAndWait, mintableAfterBuffer, multicallRead, openPosition, openPositionAndWait, optimizeTokenIdRiskPartners, oracleEpochAt, packMarketState, panopticPoolV2Abi, parseBps, parseCollateralLog, parsePanopticError, parsePoolLog, parseTokenAmount, parseTokenListId, parseWad, planDeriveStrategy, pokeOracle, pokeOracleAndWait, previewBorrow, previewDeposit, previewMint, previewRedeem, previewUnwrap, previewWithdraw, previewWrap, priceToTick, publicBroadcaster, quoteOneTokenFlow, quoteSfpmSwap, quoteTokenShortfallRecovery, quoteV3ExactIn, ratePerSecWadToAprPct, reconstructFromEvents, recoverSnapshot, recoverSnapshotFromTx, redeem, redeemAndWait, removeTrackedChunks, repay, repayAndWait, requireChainDeployment, resolveBlockNumbers, resolvePanopticPoolFromPoolId, resolveTokenIndex, resolveUniswapV4PoolKey, riskEngineAbi, rollPosition, rollPositionAndWait, roundToTickSpacing, saveCheckpoint, saveClosedPosition, scanChunks, selectDispatchForAccount, settleAccumulatedPremia, settleAccumulatedPremiaAndWait, simulateBatchDispatch, simulateClosePosition, simulateDeployNewPool, simulateDeposit, simulateDispatch, simulateForceExercise, simulateLiquidate, simulateOpenPosition, simulateSFPMBurn, simulateSFPMMint, simulateSettle, simulateSwapExactIn, simulateSwapExactOut, simulateWithTokenFlow, simulateWithdraw, slippageBpsToTickDistance, smartRepay, smartRepayAndWait, speedUpTransaction, sqrtPriceX96ToPriceDecimalScaled, sqrtPriceX96ToTick, supply, supplyAndWait, swapExactIn, swapExactInAndWait, swapExactOut, swapExactOutAndWait, syncPositions, tickLimits, tickToPrice, tickToPriceDecimalScaled, tickToSqrtPriceX96, toVaultFrameAtTick, truncateAddress, unsupply, unsupplyAndWait, unwrapWeth, unwrapWethAndWait, unwrapXstock, unwrapXstockAndWait, utilizationBpsToWad, utilizationPctToWad, validateBatch, validateBuilderCode, validatePoolId, verifyBlockContinuity, watchEvents, wethWrapAbi, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapEth, wrapEthAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi };
|
|
28290
|
+
export { AccountInsolventError, AlreadyInitializedError, BORROW_INDEX_BITS, BPS_DENOMINATOR, BPS_SCALE, BatchValidationError, BelowMinimumRedemptionError, CastingError, ChunkHasZeroLiquidityError, ChunkLimitError, CrossPoolError, DEFAULT_MAX_SPREAD, DEFAULT_MINT_BUFFER, DEFAULT_MIN_SWAP_RATIO_BPS, DEFAULT_RECONNECT_CONFIG, DEFAULT_VEGOID, DepositTooLargeError, DuplicateTokenIdError, EffectiveLiquidityAboveThresholdError, ExceedsMaximumRedemptionError, InputListFailError, InsufficientCreditLiquidityError, InvalidBuilderCodeError, InvalidHistoryRangeError, InvalidTickBoundError, InvalidTickError, InvalidTokenIdParameterError, InvalidUniswapCallbackError, LEG_BITS, LEG_LIMITS, LEG_MASKS, LengthMismatchError, LiquidityTooHighError, LoanSlotExhaustedError, MARKET_EPOCH_BITS, MARKET_EPOCH_SHIFT, MAX_TICK, MAX_TRACKED_CHUNKS, MINT_BUFFER, MINT_BUFFER_DENOMINATOR, MIN_TICK, MaxRetriesExceededError, MissingPositionIdsError, NetLiquidityZeroError, NetworkMismatchError, NoLegsExercisableError, NotALongLegError, NotBuilderError, NotEnoughLiquidityInChunkError, NotEnoughTokensError, NotGuardianError, NotMarginCalledError, NotPanopticPoolError, ORACLE_EPOCH_SECONDS, OracleRateLimitedError, PanopticError, PanopticHelperNotDeployedError, PanopticValidationError, PoolNotInitializedError, PositionCountNotZeroError, PositionNotOwnedError, PositionSnapshotNotFoundError, PositionTooLargeError, PriceBoundFailError, PriceImpactTooLargeError, ProviderLagError, RATE_AT_TARGET_BITS, REORG_DEPTH, REQUIRED_BASE_ERROR_SENTINEL, ReentrancyError, RpcError, RpcResponseError, SCHEMA_VERSION, SECONDS_PER_YEAR, STANDARD_TICK_WIDTHS, STORAGE_PREFIX, SafeModeError, StaleDataError, StaleOracleError, SwapTokenMismatchError, SyncTimeoutError, TOKEN_ID_BITS, TokenIdHasZeroLegsError, TooManyLegsOpenError, TransferFailedError, UNREALIZED_INTEREST_BITS, UTILIZATION_DENOMINATOR, UnauthorizedUniswapCallbackError, UnderOverFlowError, UnhealthyPoolError, WAD, WrongPoolIdError, WrongUniswapPoolError, ZERO_COLLATERAL, ZERO_VALUATION, ZeroAddressError, ZeroCollateralRequirementError, addLegToTokenId, addPendingPosition, addTrackedChunks, annualizePerSecondRateWad, applyMintBuffer, applyMintBufferPerToken, apportion, approve, approveAndWait, approvePool, assertCanBurn, assertCanForceExercise, assertCanLiquidate, assertCanMint, assertFresh, assertHealthy, assertTradeable, borrow, borrowAndWait, buildBatchDispatchArgs, buildCreditSwapCall, buildCreditWrappedDispatch, buildOpenPositionCalldata, buildSfpmSwapCalldata, buildSfpmSwapPlan, buildTemporaryLoanRecoveryDispatch, buildTokenShortfallRecoveryDispatch, buildUniqueCredit, buildUniqueLoan, buildUniqueWidthZeroLeg, calculateAccountGreeksPure, calculatePortfolioDelta, calculatePortfolioGamma, calculatePortfolioGreeks, calculatePortfolioValue, calculatePositionDelta, calculatePositionDeltaDebtOnly, calculatePositionDeltaWithSwap, calculatePositionGamma, calculatePositionGreeks, calculatePositionValue, calculateResyncBlock, calculateSpreadWad, cancelTransaction, checkApproval, checkCollateralAcrossTicks, classifyStrategyGroups, cleanupStalePendingPositions, clearCheckpoint, clearPendingPositions, clearTrackedChunks, clearTrackedPositions, clearTradeHistory, closePosition, closePositionAndWait, collateralRuleKindFor, collateralTrackerV2Abi, computeV4PoolId, confirmPendingPosition, convertToAssets, convertToShares, countLegs, createEventPoller, createEventSubscription, createFileStorage, createFlowNeutralTokenId, createMemoryStorage, createNonceManager, createPoolFormatters, createTokenIdBuilder, decodeAllDispatchCalldata, decodeAllLegs, decodeDispatchCalldata, decodeLeftRightSigned, decodeLeftRightUnsigned, decodeLeg, decodeOraclePack, decodeOracleRiskParameters, decodeOracleTiming, decodePanopticTokenURI, decodePoolId, decodeTickSpacing, decodeTokenId, decodeVegoid, deployNewPool, deployNewPoolAndWait, deposit, depositAndWait, deriveSupplyRatePerSecWad, deriveUniqueTokenId, detectReorg, diagnoseOracleSafeMode, dispatch, dispatchAndWait, encodeLeg, encodePoolId, encodePoolKeyBytes, encodeV3PoolKeyBytes, encodeV4PoolId, ensureSfpmV3PoolInitialized, estimateBlockNumbers, estimateCollateralBreakdown, estimateCollateralRequired, executeBatchDispatch, executeBatchDispatchAndWait, failPendingPosition, feesFromFeeGrowthDelta, fetchPoolId, fetchSfpmV3PoolId, forceExercise, forceExerciseAndWait, formatBlockNumber, formatBps, formatCompact, formatDatetime, formatDuration, formatDurationSeconds, formatFeeTier, formatGas, formatGwei, formatPerSecondRateWadAsAprPct, formatPerSecondRateWadAsApyPct, formatPoolIdHex, formatPriceRange, formatRateWad, formatRatioPercent, formatTick, formatTickRange, formatTimestamp, formatTimestampLocale, formatTokenAmount, formatTokenAmountSigned, formatTokenDelta, formatTokenFlow, formatTokenIdHex, formatTokenIdShort, formatTxHash, formatUtilization, formatWad, formatWadPercent, formatWadSigned, formatWei, getAccountBuyingPower, getAccountCollateral, getAccountGreeks, getAccountHistory, getAccountPremia, getAccountSummaryBasic, getAccountSummaryRisk, getAssetIndex, getBlockMeta, getChainDeployment, getChunkLiquidities, getChunkSpreads, getClosedPositions, getClosedPositionsKey, getCollateralAddresses, getCollateralData, getCollateralSharePrices, getCollateralTotalAssetsBatch, getCurrentRates, getDeltaHedgeParams, getEnforcedTickLimits, getFactoryConstructMetadata, getFactoryOwnerOf, getFactoryTokenURI, getGuardianUnlockState, getInterestState, getIrmCurrent, getIrmCurve, getItmAmounts, getLegDelta, getLegDeltaInVaultFrame, getLegGamma, getLegNetValueWidth0, getLegValue, getLiquidationPrices, getMarginBuffer, getMaxPositionSize, getMaxRedeem, getMaxWithdrawable, getNativeTokenPrice, getNetLiquidationValue, getNetLiquidationValues, getNotEnoughTokensError, getOpenPositionIds, getOpenPositionPreview, getOracleRiskParameters, getOracleState, getPanopticPoolAddress, getPanopticPoolFromPoolId, getPendingPositions, getPendingPositionsKey, getPool, getPoolDeploymentBlock, getPoolDisplayId, getPoolLiquidities, getPoolMetaKey, getPoolMetadata, getPoolPrefix, getPortfolioValue, getPosition, getPositionChunkData, getPositionEnrichmentData, getPositionGreeks, getPositionMetaKey, getPositions, getPositionsKey, getPositionsWithPremia, getPriceHistory, getPricesAtTick, getRealizedPnL, getRequiredCreditForITM, getRiskParameters, getSafeMode, getSchemaVersionKey, getStreamiaHistory, getSyncCheckpointKey, getSyncStatus, getTickSpacing, getTokenListId, getTrackedChunks, getTrackedChunksKey, getTrackedPositionIds, getTradeHistory, getUniswapFeeHistory, getUniswapV3LpPositionState, getUniswapV3PoolFromId, getUniswapV3PoolInfo, getUniswapV3PoolLiquidities, getUniswapV4LpPositionState, getUniswapV4PoolBasicState, getUniswapV4PoolInfo, getUniswapV4PoolKeyFromId, getUniswapV4PoolLiquidities, getUtilization, hasLoanOrCredit, hasLongLeg, interpolateBlocks, isCall, isCredit, isCreditLeg, isDefinedRisk, isGasError, isInputListFailError, isLiquidatable, isLoan, isLoanLeg, isNonceError, isPanopticErrorType, isPositionTracked, isRetryableRpcError, isShortOnly, isSpread, isSupportedChain, isolateGroupTokenId, jsonSerializer, liquidate, liquidateAndWait, loadCheckpoint, minePoolAddress, mint, mintAndWait, mintableAfterBuffer, multicallRead, openPosition, openPositionAndWait, optimizeTokenIdRiskPartners, oracleEpochAt, packMarketState, panopticPoolV2Abi, parseBps, parseCollateralLog, parsePanopticError, parsePoolLog, parseTokenAmount, parseTokenListId, parseWad, planDeriveStrategy, pokeOracle, pokeOracleAndWait, previewBorrow, previewDeposit, previewMint, previewRedeem, previewUnwrap, previewWithdraw, previewWrap, priceToTick, publicBroadcaster, quoteOneTokenFlow, quoteSfpmSwap, quoteTemporaryLoanRecovery, quoteTokenShortfallRecovery, quoteV3ExactIn, ratePerSecWadToAprPct, reconstructFromEvents, recoverSnapshot, recoverSnapshotFromTx, redeem, redeemAndWait, removeTrackedChunks, repay, repayAndWait, requireChainDeployment, resolveBlockNumbers, resolvePanopticPoolFromPoolId, resolveTokenIndex, resolveUniswapV4PoolKey, riskEngineAbi, rollPosition, rollPositionAndWait, roundToTickSpacing, saveCheckpoint, saveClosedPosition, scanChunks, selectDispatchForAccount, settleAccumulatedPremia, settleAccumulatedPremiaAndWait, simulateBatchDispatch, simulateClosePosition, simulateDeployNewPool, simulateDeposit, simulateDispatch, simulateForceExercise, simulateLiquidate, simulateOpenPosition, simulateSFPMBurn, simulateSFPMMint, simulateSettle, simulateSwapExactIn, simulateSwapExactOut, simulateWithTokenFlow, simulateWithdraw, slippageBpsToTickDistance, smartRepay, smartRepayAndWait, speedUpTransaction, sqrtPriceX96ToPriceDecimalScaled, sqrtPriceX96ToTick, supply, supplyAndWait, swapExactIn, swapExactInAndWait, swapExactOut, swapExactOutAndWait, syncPositions, tickLimits, tickToPrice, tickToPriceDecimalScaled, tickToSqrtPriceX96, toVaultFrameAtTick, truncateAddress, unsupply, unsupplyAndWait, unwrapWeth, unwrapWethAndWait, unwrapXstock, unwrapXstockAndWait, utilizationBpsToWad, utilizationPctToWad, validateBatch, validateBuilderCode, validatePoolId, verifyBlockContinuity, watchEvents, wethWrapAbi, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapEth, wrapEthAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi };
|
|
28097
28291
|
//# sourceMappingURL=index.js.map
|