@panoptic-eng/sdk 1.0.8 → 1.0.9
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/index.d.ts +102 -47
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +120 -42
- package/dist/index.js.map +1 -1
- package/dist/panoptic/v2/index.d.ts +84 -1
- package/dist/panoptic/v2/index.d.ts.map +1 -1
- package/dist/panoptic/v2/index.js +59 -2
- package/dist/panoptic/v2/index.js.map +1 -1
- package/dist/test/index.d.ts +2 -2
- package/dist/test/index.d.ts.map +1 -1
- package/dist/uniswap/index.js +1 -1
- package/dist/{writes-zbqyGAkV.js → writes-sE5gMbcW.js} +71 -2
- package/dist/writes-sE5gMbcW.js.map +1 -0
- package/package.json +1 -1
- package/dist/writes-zbqyGAkV.js.map +0 -1
package/dist/test/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Address } from "viem";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { Config } from "wagmi";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/test/test-utils.d.ts
|
|
7
7
|
declare const spawnAnvil: (args?: AnvilArgs) => Promise<void>;
|
|
@@ -236,7 +236,7 @@ declare const ReactTestWrapper: ({
|
|
|
236
236
|
}: {
|
|
237
237
|
children?: ReactNode;
|
|
238
238
|
wagmiConfig: Config;
|
|
239
|
-
}) =>
|
|
239
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
240
240
|
|
|
241
241
|
//#endregion
|
|
242
242
|
//#region src/test/test-accounts.d.ts
|
package/dist/test/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["spawnAnvil","AnvilArgs","Promise","killAnvilProcess","killAllAnvilProcesses","Record","ReactNode","Config","ReactTestWrapper","children","wagmiConfig","
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["spawnAnvil","AnvilArgs","Promise","killAnvilProcess","killAllAnvilProcesses","Record","ReactNode","Config","ReactTestWrapper","children","wagmiConfig","react_jsx_runtime0","JSX","Element","Address","alice","bob","charlie"],"sources":["../../src/test/test-utils.d.ts","../../src/test/react-test-utils.d.ts","../../src/test/test-accounts.d.ts"],"sourcesContent":null,"mappings":";;;;;;cAAqBA,oBAAoBC,cAAcC;cAClCC,oCAAoCD;cACpCE,6BAA6BF;KAC7CD,SAAAA;;;AAHL;;;EAAkD,QAAKC,CAAAA,EAAAA,MAAAA,GAAAA,SAAAA;EAAO;AAC9D;AACA;AAAgE;;;;ACAhE;;EAG6C,eAHHO,CAAAA,EAAAA,OAAAA,GAAAA,SAAAA;EAAQ;;;;AAGL;;;;ACJ7C;EACqBO,kBAAKF,CAAAA,EAAAA,MAAO,GAAA,MAAA,GAAA,SAAA;EACZG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eFkGJZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCnGIG;;;;aACNF;eACEC;MACiBI,kBAAAA,CAAAC,GAAAA,CAAIC;;;;cCJjBE,OAAOD;cACPE,KAAKF;cACLG,SAASH"}
|
package/dist/uniswap/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../position-BVhvYRm8.js";
|
|
2
|
-
import "../writes-
|
|
2
|
+
import "../writes-sE5gMbcW.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-Uk3EXb-b.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 };
|
|
@@ -3266,6 +3266,75 @@ async function previewUnwrap(params) {
|
|
|
3266
3266
|
args: [amount]
|
|
3267
3267
|
});
|
|
3268
3268
|
}
|
|
3269
|
+
/**
|
|
3270
|
+
* Minimal canonical WETH9 surface used for ETH<->WETH wrapping. Unlike the
|
|
3271
|
+
* ERC4626 xStock wrapper, WETH is a 1:1 wrapper: `deposit` is payable and wraps
|
|
3272
|
+
* `msg.value`, `withdraw` unwraps an exact amount back to native ETH.
|
|
3273
|
+
*/
|
|
3274
|
+
const wethWrapAbi = [{
|
|
3275
|
+
type: "function",
|
|
3276
|
+
name: "deposit",
|
|
3277
|
+
stateMutability: "payable",
|
|
3278
|
+
inputs: [],
|
|
3279
|
+
outputs: []
|
|
3280
|
+
}, {
|
|
3281
|
+
type: "function",
|
|
3282
|
+
name: "withdraw",
|
|
3283
|
+
stateMutability: "nonpayable",
|
|
3284
|
+
inputs: [{
|
|
3285
|
+
name: "wad",
|
|
3286
|
+
type: "uint256"
|
|
3287
|
+
}],
|
|
3288
|
+
outputs: []
|
|
3289
|
+
}];
|
|
3290
|
+
/**
|
|
3291
|
+
* Wrap native ETH into WETH (`deposit` payable). No approval needed.
|
|
3292
|
+
*
|
|
3293
|
+
* @returns TxResult with hash and wait function
|
|
3294
|
+
*/
|
|
3295
|
+
async function wrapEth(params) {
|
|
3296
|
+
const { client, walletClient, account, weth, amount, txOverrides } = params;
|
|
3297
|
+
return submitWrite({
|
|
3298
|
+
client,
|
|
3299
|
+
walletClient,
|
|
3300
|
+
account,
|
|
3301
|
+
address: weth,
|
|
3302
|
+
abi: wethWrapAbi,
|
|
3303
|
+
functionName: "deposit",
|
|
3304
|
+
args: [],
|
|
3305
|
+
value: amount,
|
|
3306
|
+
txOverrides
|
|
3307
|
+
});
|
|
3308
|
+
}
|
|
3309
|
+
/** Wrap ETH and wait for confirmation. */
|
|
3310
|
+
async function wrapEthAndWait(params) {
|
|
3311
|
+
const result = await wrapEth(params);
|
|
3312
|
+
return result.wait();
|
|
3313
|
+
}
|
|
3314
|
+
/**
|
|
3315
|
+
* Unwrap WETH back into native ETH (`withdraw`). Burns the caller's own WETH —
|
|
3316
|
+
* no approval needed.
|
|
3317
|
+
*
|
|
3318
|
+
* @returns TxResult with hash and wait function
|
|
3319
|
+
*/
|
|
3320
|
+
async function unwrapWeth(params) {
|
|
3321
|
+
const { client, walletClient, account, weth, amount, txOverrides } = params;
|
|
3322
|
+
return submitWrite({
|
|
3323
|
+
client,
|
|
3324
|
+
walletClient,
|
|
3325
|
+
account,
|
|
3326
|
+
address: weth,
|
|
3327
|
+
abi: wethWrapAbi,
|
|
3328
|
+
functionName: "withdraw",
|
|
3329
|
+
args: [amount],
|
|
3330
|
+
txOverrides
|
|
3331
|
+
});
|
|
3332
|
+
}
|
|
3333
|
+
/** Unwrap WETH and wait for confirmation. */
|
|
3334
|
+
async function unwrapWethAndWait(params) {
|
|
3335
|
+
const result = await unwrapWeth(params);
|
|
3336
|
+
return result.wait();
|
|
3337
|
+
}
|
|
3269
3338
|
|
|
3270
3339
|
//#endregion
|
|
3271
3340
|
//#region src/panoptic/v2/tokenId/decode.ts
|
|
@@ -4298,5 +4367,5 @@ async function smartRepayAndWait(params) {
|
|
|
4298
4367
|
}
|
|
4299
4368
|
|
|
4300
4369
|
//#endregion
|
|
4301
|
-
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, 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, settleAccumulatedPremia, settleAccumulatedPremiaAndWait, simulateOpenPosition, simulateWithTokenFlow, smartRepay, smartRepayAndWait, speedUpTransaction, supply, supplyAndWait, swapExactIn, swapExactInAndWait, swapExactOut, swapExactOutAndWait, syncPositions, unsupply, unsupplyAndWait, unwrapXstock, unwrapXstockAndWait, validateBatch, validatePoolId, verifyBlockContinuity, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi };
|
|
4302
|
-
//# sourceMappingURL=writes-
|
|
4370
|
+
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, 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, 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 };
|
|
4371
|
+
//# sourceMappingURL=writes-sE5gMbcW.js.map
|