@panoptic-eng/sdk 1.0.65 → 1.0.67
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/{chainDeployments-Do4NaZA_.js → chainDeployments-CwnYHCg7.js} +16 -10
- package/dist/cow/index.js +40 -0
- package/dist/cow/index.js.map +1 -1
- package/dist/{cow-BU9YOHkh.js → cow-CGgPXhY6.js} +1 -1
- package/dist/deployments.js +16 -10
- package/dist/deployments.js.map +1 -1
- package/dist/index.d.ts +34 -34
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -10
- package/dist/index.js.map +1 -1
- package/dist/{irm-DGyKOQXz.js → irm-BDxwCFDm.js} +2 -2
- package/dist/panoptic/v2/index.d.ts +38 -2
- package/dist/panoptic/v2/index.d.ts.map +1 -1
- package/dist/panoptic/v2/index.js +161 -16
- package/dist/panoptic/v2/index.js.map +1 -1
- package/dist/panoptic/v2/react-public.d.ts +38 -2
- package/dist/panoptic/v2/react-public.d.ts.map +1 -1
- package/dist/panoptic/v2/react-public.js +161 -16
- package/dist/panoptic/v2/react-public.js.map +1 -1
- package/dist/{rates-Y0Pbv1_x.js → rates-BHS-Qiu7.js} +75 -5
- package/dist/{router-DxE-iwYF.js → router-BW6TqwOO.js} +2 -2
- package/dist/{router-CheXbrfz.js → router-IDtCENST.js} +2 -2
- package/dist/{transactionFees-BF033Mob.js → transactionFees-B4jz-v7d.js} +1 -1
- package/dist/uniswap/index.js +71 -1
- package/dist/uniswap/index.js.map +1 -1
- package/dist/{v2-QFSAShVj.js → v2-Dgh6JxG_.js} +75 -6
- package/dist/vault-transaction-fees.js +16 -10
- package/dist/vault-transaction-fees.js.map +1 -1
- package/dist/{writes-BA21eyGF.js → writes-CG612Vuk.js} +2 -2
- package/dist/zodiac/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -13680,6 +13680,76 @@ function diagnoseOracleSafeMode(state, parameters, onchainLevel) {
|
|
|
13680
13680
|
};
|
|
13681
13681
|
}
|
|
13682
13682
|
|
|
13683
|
+
//#endregion
|
|
13684
|
+
//#region src/panoptic/v2/reads/riskEngineDeployment.ts
|
|
13685
|
+
const IMPLEMENTATION_SLOT = "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc";
|
|
13686
|
+
const PROXIES = new Set(["0x000000000000ffe5efdb5ae76b9200263c58b4c0", "0x000000000000ffada7c641e2ad6b13b51b50cc94"]);
|
|
13687
|
+
const BLUE_CHIP = {
|
|
13688
|
+
DECIMALS: 10000000n,
|
|
13689
|
+
VEGOID: 8,
|
|
13690
|
+
CROSS_BUFFER_0: 9000000n,
|
|
13691
|
+
CROSS_BUFFER_1: 9000000n,
|
|
13692
|
+
EMA_PERIODS: 4533471891108855828971580n,
|
|
13693
|
+
MAX_TICKS_DELTA: 724n,
|
|
13694
|
+
MAX_CLAMP_DELTA: 149,
|
|
13695
|
+
MAX_TWAP_DELTA_DISPATCH: 513,
|
|
13696
|
+
MAX_SPREAD: 9e4,
|
|
13697
|
+
BP_DECREASE_BUFFER: 1075e4,
|
|
13698
|
+
SELLER_COLLATERAL_RATIO: 2000000n,
|
|
13699
|
+
BUYER_COLLATERAL_RATIO: 100000n,
|
|
13700
|
+
MAINT_MARGIN_RATE: 1000000n,
|
|
13701
|
+
LOAN_MARGIN_DIVISOR: 4n,
|
|
13702
|
+
FORCE_EXERCISE_COST: 5000000n,
|
|
13703
|
+
TARGET_POOL_UTIL: 6666667n,
|
|
13704
|
+
SATURATED_POOL_UTIL: 9000000n,
|
|
13705
|
+
MAX_OPEN_LEGS: 26n,
|
|
13706
|
+
MAX_BONUS: 2000000n,
|
|
13707
|
+
NOTIONAL_FEE: 3,
|
|
13708
|
+
PREMIUM_FEE: 250,
|
|
13709
|
+
PROTOCOL_SPLIT: 5e3,
|
|
13710
|
+
BUILDER_SPLIT: 4e3,
|
|
13711
|
+
MIN_RATE_AT_TARGET: 634195839n
|
|
13712
|
+
};
|
|
13713
|
+
const IMPLEMENTATIONS = {
|
|
13714
|
+
"0x000000000000f0b287c19f606bc3a471f260c502": BLUE_CHIP,
|
|
13715
|
+
"0x000000000000f4901018445c697e1e358dab8dad": {
|
|
13716
|
+
...BLUE_CHIP,
|
|
13717
|
+
CROSS_BUFFER_0: 7500000n,
|
|
13718
|
+
CROSS_BUFFER_1: 7500000n,
|
|
13719
|
+
EMA_PERIODS: 9066943782217711657943160n,
|
|
13720
|
+
MAX_TICKS_DELTA: 953n,
|
|
13721
|
+
MAINT_MARGIN_RATE: 2500000n
|
|
13722
|
+
}
|
|
13723
|
+
};
|
|
13724
|
+
/** Resolve immutable getters from the implementation manifest and read dynamic state at the same block. */
|
|
13725
|
+
async function riskEngineMulticall(client, parameters) {
|
|
13726
|
+
const calls = parameters.contracts;
|
|
13727
|
+
const proxies = [...new Set(calls.map((call$1) => call$1.address.toLowerCase()))].filter((address) => PROXIES.has(address));
|
|
13728
|
+
if (proxies.length === 0) return client.multicall(parameters);
|
|
13729
|
+
const manifests = new Map(await Promise.all(proxies.map(async (address) => {
|
|
13730
|
+
const slot = await client.getStorageAt({
|
|
13731
|
+
address,
|
|
13732
|
+
slot: IMPLEMENTATION_SLOT,
|
|
13733
|
+
blockNumber: parameters.blockNumber
|
|
13734
|
+
});
|
|
13735
|
+
const implementation = slot?.length === 66 ? `0x${slot.slice(-40)}`.toLowerCase() : "";
|
|
13736
|
+
const manifest = IMPLEMENTATIONS[implementation];
|
|
13737
|
+
if (!manifest) throw new Error(`Unknown RiskEngine implementation ${implementation || "(missing)"} for ${address}; update the SDK deployment parameters`);
|
|
13738
|
+
return [address, manifest];
|
|
13739
|
+
})));
|
|
13740
|
+
const values = calls.map((call$1) => call$1.args?.length ? void 0 : manifests.get(call$1.address.toLowerCase())?.[call$1.functionName]);
|
|
13741
|
+
const liveCalls = calls.filter((_, index) => values[index] === void 0);
|
|
13742
|
+
const liveResults = liveCalls.length === 0 ? [] : await client.multicall({
|
|
13743
|
+
...parameters,
|
|
13744
|
+
contracts: liveCalls
|
|
13745
|
+
});
|
|
13746
|
+
let liveIndex = 0;
|
|
13747
|
+
return values.map((value) => value === void 0 ? liveResults[liveIndex++] : parameters.allowFailure === false ? value : {
|
|
13748
|
+
status: "success",
|
|
13749
|
+
result: value
|
|
13750
|
+
});
|
|
13751
|
+
}
|
|
13752
|
+
|
|
13683
13753
|
//#endregion
|
|
13684
13754
|
//#region src/panoptic/v2/reads/pool.ts
|
|
13685
13755
|
const erc20Abi$2 = [
|
|
@@ -13893,7 +13963,7 @@ async function getPool(params) {
|
|
|
13893
13963
|
abi: uniswapV3PoolAbi,
|
|
13894
13964
|
functionName: "liquidity"
|
|
13895
13965
|
} : null;
|
|
13896
|
-
const [dynamicResults, _meta] = await Promise.all([client
|
|
13966
|
+
const [dynamicResults, _meta] = await Promise.all([riskEngineMulticall(client, {
|
|
13897
13967
|
contracts: [
|
|
13898
13968
|
{
|
|
13899
13969
|
address: poolAddress,
|
|
@@ -14186,10 +14256,10 @@ async function getOracleState(params) {
|
|
|
14186
14256
|
_meta
|
|
14187
14257
|
};
|
|
14188
14258
|
}
|
|
14189
|
-
/**
|
|
14259
|
+
/** Resolve the oracle constants for a specific deployed RiskEngine at the target block. */
|
|
14190
14260
|
async function getOracleRiskParameters(params) {
|
|
14191
14261
|
const targetBlockNumber = params.blockNumber ?? await params.client.getBlockNumber();
|
|
14192
|
-
const [[emaPeriods, maxTicksDelta, maxClampDelta], _meta] = await Promise.all([params.client
|
|
14262
|
+
const [[emaPeriods, maxTicksDelta, maxClampDelta], _meta] = await Promise.all([riskEngineMulticall(params.client, {
|
|
14193
14263
|
contracts: [
|
|
14194
14264
|
{
|
|
14195
14265
|
address: params.riskEngineAddress,
|
|
@@ -14236,7 +14306,7 @@ async function getRiskParameters(params) {
|
|
|
14236
14306
|
abi: panopticPoolV2Abi,
|
|
14237
14307
|
functionName: "riskEngine"
|
|
14238
14308
|
});
|
|
14239
|
-
const [riskEngineResults, _meta] = await Promise.all([client
|
|
14309
|
+
const [riskEngineResults, _meta] = await Promise.all([riskEngineMulticall(client, {
|
|
14240
14310
|
contracts: [
|
|
14241
14311
|
{
|
|
14242
14312
|
address: riskEngineAddress,
|
|
@@ -24127,6 +24197,75 @@ async function getCurrentPositionSizes(params) {
|
|
|
24127
24197
|
return positionBalances.map((packed) => packed & BIT_MASK_128$1);
|
|
24128
24198
|
}
|
|
24129
24199
|
|
|
24200
|
+
//#endregion
|
|
24201
|
+
//#region src/panoptic/v2/reads/closePositionTransferEstimate.ts
|
|
24202
|
+
/** Spot-price burn swap projection; excludes AMM fees, price impact, and commissions. */
|
|
24203
|
+
function estimateCloseZapSwap({ itm0, itm1, asset, sqrtPriceX96 }) {
|
|
24204
|
+
if (sqrtPriceX96 <= 0n) throw new RangeError("Price must be positive");
|
|
24205
|
+
if (asset !== 0n && asset !== 1n) throw new RangeError("Asset must be token0 or token1");
|
|
24206
|
+
const priceSquared = sqrtPriceX96 * sqrtPriceX96;
|
|
24207
|
+
const q192 = 1n << 192n;
|
|
24208
|
+
const swapToken0 = itm0 !== 0n && (itm1 === 0n || asset === 0n);
|
|
24209
|
+
return swapToken0 ? {
|
|
24210
|
+
amount0: -itm0,
|
|
24211
|
+
amount1: itm0 * priceSquared / q192
|
|
24212
|
+
} : {
|
|
24213
|
+
amount0: itm1 * q192 / priceSquared,
|
|
24214
|
+
amount1: -itm1
|
|
24215
|
+
};
|
|
24216
|
+
}
|
|
24217
|
+
/** Estimate collateral transfers without dispatching a close or checking account solvency. */
|
|
24218
|
+
async function getClosePositionTransferEstimate(params) {
|
|
24219
|
+
const { client, poolAddress, account, queryAddress, tokenId } = params;
|
|
24220
|
+
const blockNumber = params.blockNumber ?? await client.getBlockNumber();
|
|
24221
|
+
const [positionSize] = await getCurrentPositionSizes({
|
|
24222
|
+
client,
|
|
24223
|
+
poolAddress,
|
|
24224
|
+
account,
|
|
24225
|
+
positionIdList: [tokenId],
|
|
24226
|
+
blockNumber
|
|
24227
|
+
});
|
|
24228
|
+
if (positionSize === void 0 || positionSize === 0n) throw new Error("This position is no longer open in the owner’s account.");
|
|
24229
|
+
const firstLeg = decodeTokenId(tokenId).legs[0];
|
|
24230
|
+
if (!firstLeg) throw new RangeError("Position must contain at least one leg");
|
|
24231
|
+
const value = await getNetLiquidationValue({
|
|
24232
|
+
client,
|
|
24233
|
+
poolAddress,
|
|
24234
|
+
account,
|
|
24235
|
+
queryAddress,
|
|
24236
|
+
tokenIds: [tokenId],
|
|
24237
|
+
includePendingPremium: false,
|
|
24238
|
+
blockNumber
|
|
24239
|
+
});
|
|
24240
|
+
const itm = await getItmAmounts({
|
|
24241
|
+
client,
|
|
24242
|
+
poolAddress,
|
|
24243
|
+
queryAddress,
|
|
24244
|
+
tokenId,
|
|
24245
|
+
positionSize,
|
|
24246
|
+
blockNumber,
|
|
24247
|
+
_meta: value._meta
|
|
24248
|
+
});
|
|
24249
|
+
const swap = estimateCloseZapSwap({
|
|
24250
|
+
itm0: itm.itm0,
|
|
24251
|
+
itm1: itm.itm1,
|
|
24252
|
+
asset: firstLeg.asset,
|
|
24253
|
+
sqrtPriceX96: tickToSqrtPriceX96(value.atTick)
|
|
24254
|
+
});
|
|
24255
|
+
return {
|
|
24256
|
+
exercise: {
|
|
24257
|
+
amount0: value.value0,
|
|
24258
|
+
amount1: value.value1
|
|
24259
|
+
},
|
|
24260
|
+
swap,
|
|
24261
|
+
zap: {
|
|
24262
|
+
amount0: value.value0 + swap.amount0,
|
|
24263
|
+
amount1: value.value1 + swap.amount1
|
|
24264
|
+
},
|
|
24265
|
+
_meta: value._meta
|
|
24266
|
+
};
|
|
24267
|
+
}
|
|
24268
|
+
|
|
24130
24269
|
//#endregion
|
|
24131
24270
|
//#region src/panoptic/v2/reads/enrichment.ts
|
|
24132
24271
|
/**
|
|
@@ -24436,7 +24575,7 @@ async function getHedgeLimits({ client, poolAddress, account, positionIds, asset
|
|
|
24436
24575
|
});
|
|
24437
24576
|
const { collateralToken0Address: ct0, collateralToken1Address: ct1, riskEngineAddress: engine } = metadata;
|
|
24438
24577
|
if (metadata.fee >= 1000000n) throw new Error("A fixed swap fee is required for this estimate");
|
|
24439
|
-
const [full, currentTick, pool0, pool1, total0, total1, interest0, interest1, buffer, notionalFee, cross0, cross1, maxLegs, accountLegs, supply0, supply1] = await client
|
|
24578
|
+
const [full, currentTick, pool0, pool1, total0, total1, interest0, interest1, buffer, notionalFee, cross0, cross1, maxLegs, accountLegs, supply0, supply1] = await riskEngineMulticall(client, {
|
|
24440
24579
|
contracts: [
|
|
24441
24580
|
{
|
|
24442
24581
|
address: poolAddress,
|
|
@@ -31456,7 +31595,7 @@ var _1 = {
|
|
|
31456
31595
|
"semiFungiblePositionManagerV4": "0x00000000000005C3287f136Ef5AF56c68Ea6849f",
|
|
31457
31596
|
"semiFungiblePositionManagerV3": "0x00000000000005E4693aDc8Ec0f12D686f728198",
|
|
31458
31597
|
"builderFactory": "0x0000000000000a3D22E158417AA639D7F71b0FF7",
|
|
31459
|
-
"riskEngine": "
|
|
31598
|
+
"riskEngine": "0x000000000000ffE5eFdB5AE76b9200263C58b4c0",
|
|
31460
31599
|
"panopticPoolImplementation": "0x000000000000135429F0DaCaB61639Bf6a63EbbC",
|
|
31461
31600
|
"collateralTrackerImplementation": "0x0000000000001d9c38CA405A2e04420865A08A33",
|
|
31462
31601
|
"panopticFactoryV4": "0x0000000000000c51d0f8cf4bd9adE7191372a625",
|
|
@@ -31467,7 +31606,7 @@ var _1 = {
|
|
|
31467
31606
|
"interactionHelper": "0x00000000000041fe14Ce3c2392337CE501aE8328"
|
|
31468
31607
|
}
|
|
31469
31608
|
},
|
|
31470
|
-
"riskEngines": ["
|
|
31609
|
+
"riskEngines": ["0x000000000000ffE5eFdB5AE76b9200263C58b4c0", "0x000000000000FfADa7c641E2aD6B13b51b50Cc94"],
|
|
31471
31610
|
"markets": { "ethUsdc30bps": {
|
|
31472
31611
|
"currency0": "0x0000000000000000000000000000000000000000",
|
|
31473
31612
|
"currency1": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
@@ -31487,7 +31626,12 @@ var _1 = {
|
|
|
31487
31626
|
"fee": 500,
|
|
31488
31627
|
"weth": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
|
|
31489
31628
|
},
|
|
31490
|
-
"deprecatedRiskEngines": [
|
|
31629
|
+
"deprecatedRiskEngines": [
|
|
31630
|
+
"0x0000000000000e673aECBDB5f5fE5DFAf4a8e9Ac",
|
|
31631
|
+
"0x0000000000000E65545005B26207D7edFd031260",
|
|
31632
|
+
"0x000000000000075e29cdaa9cb640a69e148ca7da",
|
|
31633
|
+
"0x0000000000000fe1e261f66ce2f44def4f5ae0cb"
|
|
31634
|
+
]
|
|
31491
31635
|
};
|
|
31492
31636
|
var _4663 = {
|
|
31493
31637
|
"chainId": 4663,
|
|
@@ -31545,7 +31689,7 @@ var _4663 = {
|
|
|
31545
31689
|
"semiFungiblePositionManagerV4": "0x00000000000005C3287f136Ef5AF56c68Ea6849f",
|
|
31546
31690
|
"semiFungiblePositionManagerV3": "0x00000000000005E4693aDc8Ec0f12D686f728198",
|
|
31547
31691
|
"builderFactory": "0x0000000000000a3D22E158417AA639D7F71b0FF7",
|
|
31548
|
-
"riskEngine": "
|
|
31692
|
+
"riskEngine": "0x000000000000FfADa7c641E2aD6B13b51b50Cc94",
|
|
31549
31693
|
"panopticPoolImplementation": "0x000000000000135429F0DaCaB61639Bf6a63EbbC",
|
|
31550
31694
|
"collateralTrackerImplementation": "0x0000000000001d9c38CA405A2e04420865A08A33",
|
|
31551
31695
|
"panopticFactoryV4": "0x0000000000000c51d0f8cf4bd9adE7191372a625",
|
|
@@ -31556,11 +31700,7 @@ var _4663 = {
|
|
|
31556
31700
|
"interactionHelper": "0x00000000000041fe14Ce3c2392337CE501aE8328"
|
|
31557
31701
|
}
|
|
31558
31702
|
},
|
|
31559
|
-
"riskEngines": [
|
|
31560
|
-
"0x000000000000075e29cdaa9cb640a69e148ca7da",
|
|
31561
|
-
"0x0000000000000fe1e261f66ce2f44def4f5ae0cb",
|
|
31562
|
-
"0x0000000000000f3fb82469581A74776178E76Ca4"
|
|
31563
|
-
],
|
|
31703
|
+
"riskEngines": ["0x000000000000ffE5eFdB5AE76b9200263C58b4c0", "0x000000000000FfADa7c641E2aD6B13b51b50Cc94"],
|
|
31564
31704
|
"markets": {
|
|
31565
31705
|
"spyUsdg": {
|
|
31566
31706
|
"currency0": "0x117cc2133c37B721F49dE2A7a74833232B3B4C0C",
|
|
@@ -31588,7 +31728,12 @@ var _4663 = {
|
|
|
31588
31728
|
"hypovault": "https://api.goldsky.com/api/public/project_cl9gc21q105380hxuh8ks53k3/subgraphs/hypovault-subgraph-robinhood/prod/gn",
|
|
31589
31729
|
"panoptic": "https://api.goldsky.com/api/public/project_cl9gc21q105380hxuh8ks53k3/subgraphs/panoptic-subgraph-robinhood/v2_prod/gn"
|
|
31590
31730
|
},
|
|
31591
|
-
"deprecatedRiskEngines": [
|
|
31731
|
+
"deprecatedRiskEngines": [
|
|
31732
|
+
"0x0000000000000E65545005B26207D7edFd031260",
|
|
31733
|
+
"0x000000000000075e29cdaa9cb640a69e148ca7da",
|
|
31734
|
+
"0x0000000000000fe1e261f66ce2f44def4f5ae0cb",
|
|
31735
|
+
"0x0000000000000f3fb82469581A74776178E76Ca4"
|
|
31736
|
+
]
|
|
31592
31737
|
};
|
|
31593
31738
|
var _8453 = {
|
|
31594
31739
|
"chainId": 8453,
|
|
@@ -32424,5 +32569,5 @@ async function getPositionVolatilityHistory({ client, poolAddress, account, toke
|
|
|
32424
32569
|
}
|
|
32425
32570
|
|
|
32426
32571
|
//#endregion
|
|
32427
|
-
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, MARKET_INDICATOR_PERIODS, MAX_TICK, MAX_TRACKED_CHUNKS, MINT_BUFFER, MINT_BUFFER_DENOMINATOR, MIN_TICK, MaxRetriesExceededError, MissingPositionIdsError, NO_LOWER_LIQUIDATION_TICK, NO_UPPER_LIQUIDATION_TICK, 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, STRIKE_LADDER_TARGET_STRIKES, SafeModeError, StaleDataError, StaleOracleError, SwapTokenMismatchError, SyncTimeoutError, TOKEN_ID_BITS, TokenIdHasZeroLegsError, TooManyLegsOpenError, TransferFailedError, UNREALIZED_INTEREST_BITS, UTILIZATION_DENOMINATOR, UnauthorizedUniswapCallbackError, UnderOverFlowError, UnhealthyPoolError, UnsafePremiumSettlementError, VARIANCE_RATIO_LAG, 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, assertLpPositionFunded, assertTradeable, borrow, borrowAndWait, buildBatchDispatchArgs, buildCreditSwapCall, buildCreditWrappedDispatch, buildOpenPositionCalldata, buildProtectedSettleDispatch, buildProtectedSettlePlan, buildSettleSequenceCalls, buildSfpmSwapCalldata, buildSfpmSwapPlan, buildTemporaryLoanRecoveryDispatch, buildTokenShortfallRecoveryDispatch, buildUniqueCredit, buildUniqueLoan, buildUniqueWidthZeroLeg, calculateAccountGreeksPure, calculateMarketIndicator, calculatePortfolioDelta, calculatePortfolioGamma, calculatePortfolioGreeks, calculatePortfolioValue, calculatePositionDelta, calculatePositionDeltaDebtOnly, calculatePositionDeltaWithSwap, calculatePositionGamma, calculatePositionGreeks, calculatePositionValue, calculatePositionValues, calculatePositionVolatilityMetrics, calculateResyncBlock, calculateSpreadWad, calculateVarianceProfile, cancelTransaction, checkApproval, checkCollateralAcrossTicks, classifyStrategyGroups, classifyStrike, cleanupStalePendingPositions, clearCheckpoint, clearPendingPositions, clearTrackedChunks, clearTrackedPositions, clearTradeHistory, closePosition, closePositionAndWait, collateralCurveTicks, 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, emptyLiquidateParams, encodeLeg, encodePoolId, encodePoolKeyBytes, encodeV3PoolKeyBytes, encodeV4PoolId, ensureSfpmV3PoolInitialized, estimateBlockNumbers, estimateCollateralBreakdown, estimateCollateralRequired, executeBatchDispatch, executeBatchDispatchAndWait, executeSettleSequence, executeSettleSequenceAndWait, failPendingPosition, feeGrowthInsideX128, feesFromFeeGrowthDelta, fetchPoolId, fetchSfpmV3PoolId, fetchUniswapFeeData, 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, generateOverlappingTokenIds, getAccountBuyingPower, getAccountCollateral, getAccountGreeks, getAccountHistory, getAccountPremia, getAccountSummaryBasic, getAccountSummaryRisk, getAssetIndex, getBlockMeta, getChainDeployment, getChunkLiquidities, getChunkSpreads, getClosedPositions, getClosedPositionsKey, getCollateralAddresses, getCollateralCurve, getCollateralCurveInputs, getCollateralData, getCollateralRequiredBase, getCollateralSharePrices, getCollateralTotalAssetsBatch, getCurrentRates, getDeltaHedgeParams, getEnforcedTickLimits, getExecutableLpMaxSize, getFactoryConstructMetadata, getFactoryOwnerOf, getFactoryTokenURI, getForfeitablePremium, getGuardianUnlockState, getHedgeLimits, 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, getPoolCurrentTick, getPoolDeploymentBlock, getPoolDisplayId, getPoolLiquidities, getPoolMetaKey, getPoolMetadata, getPoolPrefix, getPortfolioValue, getPosition, getPositionChunkData, getPositionDeltaMetrics, getPositionEnrichmentData, getPositionGreeks, getPositionMetaKey, getPositionValueCurve, getPositionVolatilityHistory, getPositions, getPositionsKey, getPositionsWithPremia, getPriceHistory, getPricesAtTick, getRealizedPnL, getRequiredCreditForITM, getRiskParameters, getSafeMode, getSchemaVersionKey, getSimpleLoanTokenIndex, 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, ladderStrikeSequence, liquidate, liquidateAndWait, loadCheckpoint, logReturns, marketPnlInQuote, marketRiskFromValues, marketScenario, minePoolAddress, mint, mintAndWait, mintableAfterBuffer, multicallRead, netLiquidationValueInQuote, openPosition, openPositionAndWait, optimizeTokenIdRiskPartners, oracleEpochAt, orderListForSettle, packMarketState, panopticLiquidatorAbi, panopticPoolV2Abi, panopticQueryAbi, parseBps, parseCollateralLog, parsePanopticError, parsePoolLog, parseTokenAmount, parseTokenListId, parseWad, planDeriveStrategy, pokeOracle, pokeOracleAndWait, positionValueKey, positionValueTicks, prepareIndicatorCandles, prepareLiquidityGamma, preparePositionGamma, preparePositionValue, preparePositionValueCurve, previewBorrow, previewDeposit, previewMint, previewRedeem, previewRepay, previewUnwrap, previewWithdraw, previewWrap, priceToTick, publicBroadcaster, quoteLiquidation, quoteOneTokenFlow, quoteSfpmSwap, quoteTemporaryLoanRecovery, quoteTokenShortfallRecovery, quoteV3ExactIn, ratePerSecWadToAprPct, realizedBeta, reconstructFromEvents, recoverSnapshot, recoverSnapshotFromTx, redeem, redeemAndWait, removeTrackedChunks, repay, repayAndWait, requireChainDeployment, resolveBlockNumbers, resolveLadderStrike, resolvePanopticPoolFromPoolId, resolveTokenIndex, resolveUniswapV4PoolKey, riskEngineAbi, rollPosition, rollPositionAndWait, roundToTickSpacing, saveCheckpoint, saveClosedPosition, scaleCollateralRequired, scanChunks, screenAccountExact, selectDispatchForAccount, settleAccumulatedPremia, settleAccumulatedPremiaAndWait, settlePremiumFrom, settlePremiumFromAndWait, simulateBatchDispatch, simulateClosePosition, simulateDeployNewPool, simulateDeposit, simulateDispatch, simulateForceExercise, simulateLiquidate, simulateOpenPosition, simulateSFPMBurn, simulateSFPMMint, simulateSettle, simulateSettlePremiumBatch, simulateSettlePremiumFrom, simulateSettleSequence, simulateSwapExactIn, simulateSwapExactOut, simulateWithTokenFlow, simulateWithdraw, slippageBpsToTickDistance, smartRepay, smartRepayAndWait, speedUpTransaction, splitTokenIdByTimescale, 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, valuePositionAccrual, verifyBlockContinuity, watchEvents, wethWrapAbi, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapEth, wrapEthAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi };
|
|
32572
|
+
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, MARKET_INDICATOR_PERIODS, MAX_TICK, MAX_TRACKED_CHUNKS, MINT_BUFFER, MINT_BUFFER_DENOMINATOR, MIN_TICK, MaxRetriesExceededError, MissingPositionIdsError, NO_LOWER_LIQUIDATION_TICK, NO_UPPER_LIQUIDATION_TICK, 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, STRIKE_LADDER_TARGET_STRIKES, SafeModeError, StaleDataError, StaleOracleError, SwapTokenMismatchError, SyncTimeoutError, TOKEN_ID_BITS, TokenIdHasZeroLegsError, TooManyLegsOpenError, TransferFailedError, UNREALIZED_INTEREST_BITS, UTILIZATION_DENOMINATOR, UnauthorizedUniswapCallbackError, UnderOverFlowError, UnhealthyPoolError, UnsafePremiumSettlementError, VARIANCE_RATIO_LAG, 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, assertLpPositionFunded, assertTradeable, borrow, borrowAndWait, buildBatchDispatchArgs, buildCreditSwapCall, buildCreditWrappedDispatch, buildOpenPositionCalldata, buildProtectedSettleDispatch, buildProtectedSettlePlan, buildSettleSequenceCalls, buildSfpmSwapCalldata, buildSfpmSwapPlan, buildTemporaryLoanRecoveryDispatch, buildTokenShortfallRecoveryDispatch, buildUniqueCredit, buildUniqueLoan, buildUniqueWidthZeroLeg, calculateAccountGreeksPure, calculateMarketIndicator, calculatePortfolioDelta, calculatePortfolioGamma, calculatePortfolioGreeks, calculatePortfolioValue, calculatePositionDelta, calculatePositionDeltaDebtOnly, calculatePositionDeltaWithSwap, calculatePositionGamma, calculatePositionGreeks, calculatePositionValue, calculatePositionValues, calculatePositionVolatilityMetrics, calculateResyncBlock, calculateSpreadWad, calculateVarianceProfile, cancelTransaction, checkApproval, checkCollateralAcrossTicks, classifyStrategyGroups, classifyStrike, cleanupStalePendingPositions, clearCheckpoint, clearPendingPositions, clearTrackedChunks, clearTrackedPositions, clearTradeHistory, closePosition, closePositionAndWait, collateralCurveTicks, 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, emptyLiquidateParams, encodeLeg, encodePoolId, encodePoolKeyBytes, encodeV3PoolKeyBytes, encodeV4PoolId, ensureSfpmV3PoolInitialized, estimateBlockNumbers, estimateCloseZapSwap, estimateCollateralBreakdown, estimateCollateralRequired, executeBatchDispatch, executeBatchDispatchAndWait, executeSettleSequence, executeSettleSequenceAndWait, failPendingPosition, feeGrowthInsideX128, feesFromFeeGrowthDelta, fetchPoolId, fetchSfpmV3PoolId, fetchUniswapFeeData, 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, generateOverlappingTokenIds, getAccountBuyingPower, getAccountCollateral, getAccountGreeks, getAccountHistory, getAccountPremia, getAccountSummaryBasic, getAccountSummaryRisk, getAssetIndex, getBlockMeta, getChainDeployment, getChunkLiquidities, getChunkSpreads, getClosePositionTransferEstimate, getClosedPositions, getClosedPositionsKey, getCollateralAddresses, getCollateralCurve, getCollateralCurveInputs, getCollateralData, getCollateralRequiredBase, getCollateralSharePrices, getCollateralTotalAssetsBatch, getCurrentRates, getDeltaHedgeParams, getEnforcedTickLimits, getExecutableLpMaxSize, getFactoryConstructMetadata, getFactoryOwnerOf, getFactoryTokenURI, getForfeitablePremium, getGuardianUnlockState, getHedgeLimits, 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, getPoolCurrentTick, getPoolDeploymentBlock, getPoolDisplayId, getPoolLiquidities, getPoolMetaKey, getPoolMetadata, getPoolPrefix, getPortfolioValue, getPosition, getPositionChunkData, getPositionDeltaMetrics, getPositionEnrichmentData, getPositionGreeks, getPositionMetaKey, getPositionValueCurve, getPositionVolatilityHistory, getPositions, getPositionsKey, getPositionsWithPremia, getPriceHistory, getPricesAtTick, getRealizedPnL, getRequiredCreditForITM, getRiskParameters, getSafeMode, getSchemaVersionKey, getSimpleLoanTokenIndex, 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, ladderStrikeSequence, liquidate, liquidateAndWait, loadCheckpoint, logReturns, marketPnlInQuote, marketRiskFromValues, marketScenario, minePoolAddress, mint, mintAndWait, mintableAfterBuffer, multicallRead, netLiquidationValueInQuote, openPosition, openPositionAndWait, optimizeTokenIdRiskPartners, oracleEpochAt, orderListForSettle, packMarketState, panopticLiquidatorAbi, panopticPoolV2Abi, panopticQueryAbi, parseBps, parseCollateralLog, parsePanopticError, parsePoolLog, parseTokenAmount, parseTokenListId, parseWad, planDeriveStrategy, pokeOracle, pokeOracleAndWait, positionValueKey, positionValueTicks, prepareIndicatorCandles, prepareLiquidityGamma, preparePositionGamma, preparePositionValue, preparePositionValueCurve, previewBorrow, previewDeposit, previewMint, previewRedeem, previewRepay, previewUnwrap, previewWithdraw, previewWrap, priceToTick, publicBroadcaster, quoteLiquidation, quoteOneTokenFlow, quoteSfpmSwap, quoteTemporaryLoanRecovery, quoteTokenShortfallRecovery, quoteV3ExactIn, ratePerSecWadToAprPct, realizedBeta, reconstructFromEvents, recoverSnapshot, recoverSnapshotFromTx, redeem, redeemAndWait, removeTrackedChunks, repay, repayAndWait, requireChainDeployment, resolveBlockNumbers, resolveLadderStrike, resolvePanopticPoolFromPoolId, resolveTokenIndex, resolveUniswapV4PoolKey, riskEngineAbi, rollPosition, rollPositionAndWait, roundToTickSpacing, saveCheckpoint, saveClosedPosition, scaleCollateralRequired, scanChunks, screenAccountExact, selectDispatchForAccount, settleAccumulatedPremia, settleAccumulatedPremiaAndWait, settlePremiumFrom, settlePremiumFromAndWait, simulateBatchDispatch, simulateClosePosition, simulateDeployNewPool, simulateDeposit, simulateDispatch, simulateForceExercise, simulateLiquidate, simulateOpenPosition, simulateSFPMBurn, simulateSFPMMint, simulateSettle, simulateSettlePremiumBatch, simulateSettlePremiumFrom, simulateSettleSequence, simulateSwapExactIn, simulateSwapExactOut, simulateWithTokenFlow, simulateWithdraw, slippageBpsToTickDistance, smartRepay, smartRepayAndWait, speedUpTransaction, splitTokenIdByTimescale, 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, valuePositionAccrual, verifyBlockContinuity, watchEvents, wethWrapAbi, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapEth, wrapEthAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi };
|
|
32428
32573
|
//# sourceMappingURL=index.js.map
|