Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
@panoptic-xyz/sdk
Advanced tools
Typescript SDK for Panoptic.
This SDK aims to provide a developer friendly, performant, and robust way to access the Panoptic protocol. An extension is used to provide a seamless extension to Viem. The main entities of the SDK are:
import { createPublicClient, http } from 'viem'
import { sepolia } from 'viem/chains'
import {
publicActionsPanoptic,
sepoliaPanoptic,
createPanopticPosition
} from '@panoptic-xyz/sdk'
export const publicClient = createPublicClient({
chain: mainnet,
transport: http(),
}).extend(publicActionsReverseMirage)
// Pass in or read a uniswap pool
const uniswapPool = ...
// Read the data from the corresponding panoptic pool
const panopticPool = await publicClient.getPanopticPool({
uniswapPool,
factory: sepoliaPanoptic.factory,
})
// Create a new position, specifying legs
const newPosition = createPanopticPosition(panopticPool, [
{
asset: "token0",
optionRatio: 1,
position: "long",
tokenType: "token0",
riskPartnerIndex: 0,
tickLower: 0,
tickUpper: 300
},
undefined,
undefined,
undefined,
])
// Mint the new position from the panoptic pool
const { result } = await publicClient.simulatePanopticMintOptions({
position: newPosition,
amount: 10n ** 18n
});
Entities
PanopticFactory
: The factory contract in the Panoptic protocolPanopticSemiFungiblePositionManager
: The semi-fungible position manager in the Panoptic protocolPanopticPool
: A pool created by PanopticFactory
PanopticPoolData
: The state of a PanopticPool
PanopticCollateral
: A collateral tracker in a PanopticPool
PanopticCollateralData
: The state of a PanopticCollateral
PanopticPosition
: A user position in a PanopticPool
PanopticPositionData
: The state of a PanopticPosition
PanopticCollateralPosition
: A user position in a PanopticCollateral
PanopticCollateralPositionData
: The state of a PanopticCollateralPosition
Utilities
createPanopticPool
createPanopticCollateral
createPanopticPosition
createPanopticSemiFungiblePosition
calculatePanopticTokenID
calculatePanopticPositionKey
Public Actions
getPanopticPool
getPanopticPoolData
getPanopticCollateralData
getPanopticCollateralPositionData
getPanoptionLegData
getPanopticPositionData
getPanopticSemiFungiblePositionData
getPanopticCheckCollateral
simulatePanopticDeployNewPool
simulatePanopticMintOptions
simulatePanopticBurnOptions
simulatePanopticRollOptions
simulatePanopticForceExercise
simulatePanopticLiquidateAccount
simulatePanopticCollateralMint
simulatePanopticCollateralDeposit
simulatePanopticCollateralRedeem
simulatePanopticCollateralWithdraw
simulatePanopticSFPMInitializeAMMPool
simulatePanopticSFPMMintTokenizedPosition
simulatePanopticSFPMBurnTokenizedPosition
simulatePanopticSFPMRollTokenizedPositions
Chains
sepoliaPanoptic
ABIs
panopticFactoryABI
panopticCollateralTrackerABI
panopticPoolABI
panopticSemiFuniblePositionManagerABI
FAQs
Typescript SDK for Panoptic.
We found that @panoptic-xyz/sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.