@panoptic-eng/sdk 1.0.18 → 1.0.19
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.js +1 -1
- package/dist/panoptic/v2/index.d.ts +4 -0
- package/dist/panoptic/v2/index.d.ts.map +1 -1
- package/dist/panoptic/v2/index.js +1 -1
- package/dist/uniswap/index.js +1 -1
- package/dist/{writes-DQ-H14sj.js → writes-CGmOSeKi.js} +5 -5
- package/dist/{writes-DQ-H14sj.js.map → writes-CGmOSeKi.js.map} +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BORROW_INDEX_BITS, BPS_SCALE, MARKET_EPOCH_BITS, MARKET_EPOCH_SHIFT, RATE_AT_TARGET_BITS, SECONDS_PER_YEAR, UNREALIZED_INTEREST_BITS, annualizePerSecondRateWad, deriveSupplyRatePerSecWad, formatPerSecondRateWadAsAprPct, formatPerSecondRateWadAsApyPct, formatRateWad, formatTokenAmount, formatTokenAmountSigned, formatTokenDelta, formatTokenFlow, formatWad, formatWadPercent, formatWadSigned, getAccountCollateral, getAccountSummaryBasic, getAccountSummaryRisk, getCollateralAddresses, getCollateralData, getCurrentRates, getInterestState, getIrmCurrent, getIrmCurve, getLiquidationPrices, getNetLiquidationValue, getNetLiquidationValues, isLiquidatable, packMarketState, panopticQueryAbi, parseTokenAmount, parseWad, ratePerSecWadToAprPct, readBlockAndAggregate, requireReturnData, utilizationBpsToWad, utilizationPctToWad } from "../../irm-y3T4tvfM.js";
|
|
2
2
|
import { AccountInsolventError, AlreadyInitializedError, BPS_DENOMINATOR, BatchValidationError, BelowMinimumRedemptionError, CastingError, ChunkHasZeroLiquidityError, ChunkLimitError, CrossPoolError, DEFAULT_MAX_SPREAD, DEFAULT_VEGOID, DepositTooLargeError, DuplicateTokenIdError, EffectiveLiquidityAboveThresholdError, ExceedsMaximumRedemptionError, InputListFailError, InsufficientCreditLiquidityError, InvalidBuilderCodeError, InvalidHistoryRangeError, InvalidTickBoundError, InvalidTickError, InvalidTokenIdParameterError, InvalidUniswapCallbackError, LEG_BITS, LEG_LIMITS, LEG_MASKS, LengthMismatchError, LiquidityTooHighError, LoanSlotExhaustedError, MAX_TICK, MAX_TRACKED_CHUNKS, MIN_TICK, MaxRetriesExceededError, MissingPositionIdsError, NetLiquidityZeroError, NetworkMismatchError, NoLegsExercisableError, NotALongLegError, NotBuilderError, NotEnoughLiquidityInChunkError, NotEnoughTokensError, NotGuardianError, NotMarginCalledError, NotPanopticPoolError, ORACLE_EPOCH_SECONDS, OracleRateLimitedError, PanopticError$1 as PanopticError, PanopticHelperNotDeployedError, PanopticValidationError, PoolNotInitializedError, PositionCountNotZeroError, PositionNotOwnedError, PositionSnapshotNotFoundError, PositionTooLargeError, PriceBoundFailError, PriceImpactTooLargeError, ProviderLagError, REORG_DEPTH, ReentrancyError, RpcError, RpcResponseError, SCHEMA_VERSION, STANDARD_TICK_WIDTHS, STORAGE_PREFIX, SafeModeError, StaleDataError, StaleOracleError, StorageDataNotFoundError, SwapTokenMismatchError, SyncTimeoutError, TOKEN_ID_BITS, TokenIdHasZeroLegsError, TooManyLegsOpenError, TransferFailedError, UTILIZATION_DENOMINATOR, UnauthorizedUniswapCallbackError, UnderOverFlowError, UnhealthyPoolError, WAD$1 as WAD, WrongPoolIdError, WrongUniswapPoolError, ZERO_COLLATERAL, ZERO_VALUATION, ZeroAddressError, ZeroCollateralRequirementError, calculatePortfolioDelta, calculatePortfolioGamma, calculatePortfolioGreeks, calculatePortfolioValue, calculatePositionDelta, calculatePositionDeltaWithSwap, calculatePositionGamma, calculatePositionGreeks, calculatePositionValue, collateralTrackerV2Abi, decodeLeftRightSigned, decodeLeftRightUnsigned, decodePosition, decodePositionBalance, decodeTickSpacing, fetchPoolId$1 as fetchPoolId, formatPriceRange$1 as formatPriceRange, formatTick$1 as formatTick, formatTickRange$1 as formatTickRange, getBlockMeta, getLegDelta, getLegGamma, getLegValue, getOracleState$1 as getOracleState, getPool$1 as getPool, getPoolMetadata$1 as getPoolMetadata, getPosition, getPositionGreeks, getPositions, getPricesAtTick$1 as getPricesAtTick, getRiskParameters$1 as getRiskParameters, getTickSpacing$1 as getTickSpacing, getUtilization$1 as getUtilization, isCall, isDefinedRisk, isPanopticErrorType, panopticFactoryV3Abi, panopticFactoryV4Abi, panopticGuardianAbi, panopticPoolV2Abi, panopticQueryAbi$1, parsePanopticError, priceToTick$1 as priceToTick, riskEngineAbi, roundToTickSpacing$1 as roundToTickSpacing, semiFungiblePositionManagerV3Abi, semiFungiblePositionManagerV4Abi, sqrtPriceX96ToPriceDecimalScaled$1 as sqrtPriceX96ToPriceDecimalScaled, sqrtPriceX96ToTick$1 as sqrtPriceX96ToTick, stateViewAbi, tickLimits$1 as tickLimits, tickToPrice$1 as tickToPrice, tickToPriceDecimalScaled$1 as tickToPriceDecimalScaled, tickToSqrtPriceX96$1 as tickToSqrtPriceX96, uniswapV3PoolAbi, validateBuilderCode$1 as validateBuilderCode } from "../../position-Bo7y8jcj.js";
|
|
3
3
|
import { approveErc20ForCow, cancelCowOrder, checkCowApproval, getCowOrderStatus, isCowSupportedChain, quoteCowSwap, signAndSubmitCowOrder } from "../../cow-BciGptKA.js";
|
|
4
|
-
import { addLegToTokenId, approve, approveAndWait, approvePool, assertCanBurn, assertCanForceExercise, assertCanLiquidate, assertCanMint, assertFresh, assertHealthy, assertTradeable, borrow, borrowAndWait, buildBatchDispatchArgs, buildOpenPositionCalldata, buildUniqueLoan, calculateResyncBlock, cancelTransaction, checkApproval, clearCheckpoint, clearTrackedPositions, closePosition, closePositionAndWait, countLegs, createFileStorage, createMemoryStorage, createNonceManager, createTokenIdBuilder, decodeAllDispatchCalldata, decodeAllLegs, decodeDispatchCalldata, decodeLeg, decodePoolId, decodeTickSpacing$1, decodeTokenId, decodeVegoid, deployNewPool, deployNewPoolAndWait, deposit, depositAndWait, detectReorg, dispatch, dispatchAndWait, encodeLeg, encodePoolId, encodeV4PoolId, executeBatchDispatch, executeBatchDispatchAndWait, forceExercise, forceExerciseAndWait, getAssetIndex, getClosedPositionsKey, getOpenPositionIds, getPendingPositionsKey, getPoolMetaKey, getPoolPrefix, getPositionMetaKey, getPositionsKey, getSchemaVersionKey, getSyncCheckpointKey, getTrackedChunksKey, getTrackedPositionIds, hasLoanOrCredit, hasLongLeg, isCredit, isCreditLeg, isGasError, isInputListFailError, isLoan, isLoanLeg, isNonceError, isPositionTracked, isRetryableRpcError, isShortOnly, isSpread, jsonSerializer, liquidate, liquidateAndWait, loadCheckpoint, mint, mintAndWait, openPosition, openPositionAndWait, pokeOracle, pokeOracleAndWait, previewBorrow, previewUnwrap, previewWrap, publicBroadcaster, recoverSnapshot, recoverSnapshotFromTx, redeem, redeemAndWait, repay, repayAndWait, resolveTokenIndex, rollPosition, rollPositionAndWait, saveCheckpoint, selectDispatchForAccount, settleAccumulatedPremia, settleAccumulatedPremiaAndWait, simulateOpenPosition, simulateWithTokenFlow, smartRepay, smartRepayAndWait, speedUpTransaction, supply, supplyAndWait, swapExactIn, swapExactInAndWait, swapExactOut, swapExactOutAndWait, syncPositions, unsupply, unsupplyAndWait, unwrapWeth, unwrapWethAndWait, unwrapXstock, unwrapXstockAndWait, validateBatch, validatePoolId, verifyBlockContinuity, wethWrapAbi, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapEth, wrapEthAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi } from "../../writes-
|
|
4
|
+
import { addLegToTokenId, approve, approveAndWait, approvePool, assertCanBurn, assertCanForceExercise, assertCanLiquidate, assertCanMint, assertFresh, assertHealthy, assertTradeable, borrow, borrowAndWait, buildBatchDispatchArgs, buildOpenPositionCalldata, buildUniqueLoan, calculateResyncBlock, cancelTransaction, checkApproval, clearCheckpoint, clearTrackedPositions, closePosition, closePositionAndWait, countLegs, createFileStorage, createMemoryStorage, createNonceManager, createTokenIdBuilder, decodeAllDispatchCalldata, decodeAllLegs, decodeDispatchCalldata, decodeLeg, decodePoolId, decodeTickSpacing$1, decodeTokenId, decodeVegoid, deployNewPool, deployNewPoolAndWait, deposit, depositAndWait, detectReorg, dispatch, dispatchAndWait, encodeLeg, encodePoolId, encodeV4PoolId, executeBatchDispatch, executeBatchDispatchAndWait, forceExercise, forceExerciseAndWait, getAssetIndex, getClosedPositionsKey, getOpenPositionIds, getPendingPositionsKey, getPoolMetaKey, getPoolPrefix, getPositionMetaKey, getPositionsKey, getSchemaVersionKey, getSyncCheckpointKey, getTrackedChunksKey, getTrackedPositionIds, hasLoanOrCredit, hasLongLeg, isCredit, isCreditLeg, isGasError, isInputListFailError, isLoan, isLoanLeg, isNonceError, isPositionTracked, isRetryableRpcError, isShortOnly, isSpread, jsonSerializer, liquidate, liquidateAndWait, loadCheckpoint, mint, mintAndWait, openPosition, openPositionAndWait, pokeOracle, pokeOracleAndWait, previewBorrow, previewUnwrap, previewWrap, publicBroadcaster, recoverSnapshot, recoverSnapshotFromTx, redeem, redeemAndWait, repay, repayAndWait, resolveTokenIndex, rollPosition, rollPositionAndWait, saveCheckpoint, selectDispatchForAccount, settleAccumulatedPremia, settleAccumulatedPremiaAndWait, simulateOpenPosition, simulateWithTokenFlow, smartRepay, smartRepayAndWait, speedUpTransaction, supply, supplyAndWait, swapExactIn, swapExactInAndWait, swapExactOut, swapExactOutAndWait, syncPositions, unsupply, unsupplyAndWait, unwrapWeth, unwrapWethAndWait, unwrapXstock, unwrapXstockAndWait, validateBatch, validatePoolId, verifyBlockContinuity, wethWrapAbi, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapEth, wrapEthAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi } from "../../writes-CGmOSeKi.js";
|
|
5
5
|
import { approveErc20ForPermit2, approveRouterViaPermit2, checkRouterApproval, quoteSwapExactInViaRouter, quoteSwapExactOutViaRouter, swapExactInViaRouter, swapExactOutViaRouter } from "../../router-qZEEc47U.js";
|
|
6
6
|
import { ContractFunctionExecutionError, decodeFunctionResult, encodeAbiParameters, encodeFunctionData, getAddress, keccak256, zeroAddress } from "viem";
|
|
7
7
|
import { multicall } from "viem/actions";
|
package/dist/uniswap/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../position-Bo7y8jcj.js";
|
|
2
|
-
import "../writes-
|
|
2
|
+
import "../writes-CGmOSeKi.js";
|
|
3
3
|
import { AmountExceedsUint128Error, InvalidSwapTokenError, MissingSweepRecipientError, PERMIT2_ADDRESS, QuoterUnavailableError, SETTLE_ALL, SWAP_EXACT_IN_SINGLE, SWAP_EXACT_OUT_SINGLE, SWEEP, TAKE_ALL, UNISWAP_V4_ADDRESSES, UnsupportedChainError, V4_SWAP, approveErc20ForPermit2, approveErc20ForPermit2AndWait, approveRouterViaPermit2, approveRouterViaPermit2AndWait, buildV4ExactOutSwapExecuteArgs, buildV4ExactOutSwapExecuteCalldata, buildV4SwapExecuteArgs, buildV4SwapExecuteCalldata, checkRouterApproval, getUniswapV4Addresses, quoteSwapExactInViaRouter, quoteSwapExactOutViaRouter, resolveSwapRoute, swapExactInViaRouter, swapExactInViaRouterAndWait, swapExactOutViaRouter, swapExactOutViaRouterAndWait } from "../router-qZEEc47U.js";
|
|
4
4
|
|
|
5
5
|
export { AmountExceedsUint128Error, InvalidSwapTokenError, MissingSweepRecipientError, PERMIT2_ADDRESS, QuoterUnavailableError, SETTLE_ALL, SWAP_EXACT_IN_SINGLE, SWAP_EXACT_OUT_SINGLE, SWEEP, TAKE_ALL, UNISWAP_V4_ADDRESSES, UnsupportedChainError, V4_SWAP, approveErc20ForPermit2, approveErc20ForPermit2AndWait, approveRouterViaPermit2, approveRouterViaPermit2AndWait, buildV4ExactOutSwapExecuteArgs, buildV4ExactOutSwapExecuteCalldata, buildV4SwapExecuteArgs, buildV4SwapExecuteCalldata, checkRouterApproval, getUniswapV4Addresses, quoteSwapExactInViaRouter, quoteSwapExactOutViaRouter, resolveSwapRoute, swapExactInViaRouter, swapExactInViaRouterAndWait, swapExactOutViaRouter, swapExactOutViaRouterAndWait };
|
|
@@ -3072,7 +3072,7 @@ function buildUniqueLoan(poolId, asset, tokenType, currentTick, tickSpacing, exi
|
|
|
3072
3072
|
* ```
|
|
3073
3073
|
*/
|
|
3074
3074
|
async function swapExactOut(params) {
|
|
3075
|
-
const { client, walletClient, account, poolAddress, chainId, tokenOut, amountOut, slippageBps, existingPositionIds: explicitIds, storage, txOverrides } = params;
|
|
3075
|
+
const { client, walletClient, account, poolAddress, chainId, tokenOut, amountOut, slippageBps, existingPositionIds: explicitIds, storage, builderCode = 0n, txOverrides } = params;
|
|
3076
3076
|
for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
|
|
3077
3077
|
const [pool, positionIds] = await Promise.all([getPool({
|
|
3078
3078
|
client,
|
|
@@ -3112,7 +3112,7 @@ async function swapExactOut(params) {
|
|
|
3112
3112
|
positionSizes,
|
|
3113
3113
|
[mintTickLimits, burnTickLimits],
|
|
3114
3114
|
false,
|
|
3115
|
-
|
|
3115
|
+
builderCode
|
|
3116
3116
|
],
|
|
3117
3117
|
txOverrides
|
|
3118
3118
|
});
|
|
@@ -3153,7 +3153,7 @@ async function swapExactOutAndWait(params) {
|
|
|
3153
3153
|
* ```
|
|
3154
3154
|
*/
|
|
3155
3155
|
async function swapExactIn(params) {
|
|
3156
|
-
const { client, walletClient, account, poolAddress, chainId, tokenIn, amountIn, slippageBps, existingPositionIds: explicitIds, storage, txOverrides } = params;
|
|
3156
|
+
const { client, walletClient, account, poolAddress, chainId, tokenIn, amountIn, slippageBps, existingPositionIds: explicitIds, storage, builderCode = 0n, txOverrides } = params;
|
|
3157
3157
|
for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
|
|
3158
3158
|
const [pool, positionIds] = await Promise.all([getPool({
|
|
3159
3159
|
client,
|
|
@@ -3193,7 +3193,7 @@ async function swapExactIn(params) {
|
|
|
3193
3193
|
positionSizes,
|
|
3194
3194
|
[mintTickLimits, burnTickLimits],
|
|
3195
3195
|
false,
|
|
3196
|
-
|
|
3196
|
+
builderCode
|
|
3197
3197
|
],
|
|
3198
3198
|
txOverrides
|
|
3199
3199
|
});
|
|
@@ -4483,4 +4483,4 @@ async function smartRepayAndWait(params) {
|
|
|
4483
4483
|
|
|
4484
4484
|
//#endregion
|
|
4485
4485
|
export { addLegToTokenId, approve, approveAndWait, approvePool, assertCanBurn, assertCanForceExercise, assertCanLiquidate, assertCanMint, assertFresh, assertHealthy, assertTradeable, borrow, borrowAndWait, buildBatchDispatchArgs, buildOpenPositionCalldata, buildUniqueLoan, calculateResyncBlock, cancelTransaction, checkApproval, clearCheckpoint, clearTrackedPositions, closePosition, closePositionAndWait, countLegs, createFileStorage, createMemoryStorage, createNonceManager, createTokenIdBuilder, decodeAllDispatchCalldata, decodeAllLegs, decodeDispatchCalldata, decodeLeg, decodePoolId, decodeTickSpacing as decodeTickSpacing$1, decodeTokenId, decodeVegoid, deployNewPool, deployNewPoolAndWait, deposit, depositAndWait, detectReorg, dispatch, dispatchAndWait, encodeLeg, encodePoolId, encodeV4PoolId, executeBatchDispatch, executeBatchDispatchAndWait, forceExercise, forceExerciseAndWait, getAssetIndex, getClosedPositionsKey, getOpenPositionIds, getPendingPositionsKey, getPoolMetaKey, getPoolPrefix, getPositionMetaKey, getPositionsKey, getSchemaVersionKey, getSyncCheckpointKey, getTrackedChunksKey, getTrackedPositionIds, hasLoanOrCredit, hasLongLeg, isCredit, isCreditLeg, isGasError, isInputListFailError, isLoan, isLoanLeg, isNonceError, isPositionTracked, isRetryableRpcError, isShortOnly, isSpread, jsonSerializer, liquidate, liquidateAndWait, loadCheckpoint, mint, mintAndWait, openPosition, openPositionAndWait, pokeOracle, pokeOracleAndWait, previewBorrow, previewUnwrap, previewWrap, publicBroadcaster, recoverSnapshot, recoverSnapshotFromTx, redeem, redeemAndWait, repay, repayAndWait, resolveTokenIndex, rollPosition, rollPositionAndWait, saveCheckpoint, selectDispatchForAccount, settleAccumulatedPremia, settleAccumulatedPremiaAndWait, simulateOpenPosition, simulateWithTokenFlow, smartRepay, smartRepayAndWait, speedUpTransaction, supply, supplyAndWait, swapExactIn, swapExactInAndWait, swapExactOut, swapExactOutAndWait, syncPositions, unsupply, unsupplyAndWait, unwrapWeth, unwrapWethAndWait, unwrapXstock, unwrapXstockAndWait, validateBatch, validatePoolId, verifyBlockContinuity, wethWrapAbi, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapEth, wrapEthAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi };
|
|
4486
|
-
//# sourceMappingURL=writes-
|
|
4486
|
+
//# sourceMappingURL=writes-CGmOSeKi.js.map
|