@panoptic-eng/sdk 1.0.13 → 1.0.15

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/README.md CHANGED
@@ -2,12 +2,34 @@
2
2
 
3
3
  TypeScript SDK for interacting with the Panoptic v2 perpetual options protocol on EVM chains.
4
4
 
5
- ## Quick Start
5
+ ## Installation
6
+
7
+ Core install — everything you need for reads, writes, simulations, greeks and
8
+ tick/price math:
6
9
 
7
10
  ```bash
8
11
  npm install @panoptic-eng/sdk viem
9
12
  ```
10
13
 
14
+ This works with a default `npm install` (no `--force` / `--legacy-peer-deps`),
15
+ as well as with Yarn v1 and pnpm.
16
+
17
+ ### Using the React hooks
18
+
19
+ The SDK also ships React hooks (`PanopticProvider`, `usePool`, `useOpenPosition`,
20
+ …) from `@panoptic-eng/sdk/v2`. These rely on React, Wagmi and TanStack Query,
21
+ which are declared as **optional** peer dependencies — install them only if you
22
+ use the hooks:
23
+
24
+ ```bash
25
+ npm install @panoptic-eng/sdk viem react react-dom wagmi @tanstack/react-query
26
+ ```
27
+
28
+ Supported peer ranges: `react`/`react-dom` `^18.2.0 || ^19.0.0`,
29
+ `wagmi` `^2.14.0`, `@tanstack/react-query` `^5.45.0`, `viem` `^2.41.0`.
30
+
31
+ ## Quick Start
32
+
11
33
  ```typescript
12
34
  import { createPublicClient, createWalletClient, http, parseUnits } from 'viem'
13
35
  import { sepolia } from 'viem/chains'
package/dist/cow/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "../position-C3Ca4itE.js";
2
2
  import { APP_DATA_DOC, APP_DATA_HASH, COW_API_URLS, COW_CANCELLATION_TYPES, COW_NATIVE_ETH, COW_ORDER_TYPES, COW_SETTLEMENT, COW_VAULT_RELAYER, CowApiError, CowNativeTokenError, CowOrderTooSmallError, CowUnsupportedChainError, DEFAULT_VALID_FOR_SECONDS, XSTOCK_WRAPPERS, approveErc20ForCow, cancelCowOrder, checkCowApproval, cowDomain, findCowToken, getCowOrderStatus, getXstockUnderlying, getXstockWrapper, isCowSupportedChain, isXstockUnderlying, isXstockWrapper, pickBestVenue, quoteCowSwap, signAndSubmitCowOrder } from "../cow-GmGNOlyp.js";
3
- import "../writes-uU8w6eAC.js";
3
+ import "../writes-BlCi23qF.js";
4
4
 
5
5
  export { APP_DATA_DOC, APP_DATA_HASH, COW_API_URLS, COW_CANCELLATION_TYPES, COW_NATIVE_ETH, COW_ORDER_TYPES, COW_SETTLEMENT, COW_VAULT_RELAYER, CowApiError, CowNativeTokenError, CowOrderTooSmallError, CowUnsupportedChainError, DEFAULT_VALID_FOR_SECONDS, XSTOCK_WRAPPERS, approveErc20ForCow, cancelCowOrder, checkCowApproval, cowDomain, findCowToken, getCowOrderStatus, getXstockUnderlying, getXstockWrapper, isCowSupportedChain, isXstockUnderlying, isXstockWrapper, pickBestVenue, quoteCowSwap, signAndSubmitCowOrder };
package/dist/index.d.ts CHANGED
@@ -5,7 +5,6 @@ import { Config, UseSimulateContractReturnType, UseWaitForTransactionReceiptRetu
5
5
  import { z } from "zod";
6
6
  import { GraphQLClient, RequestOptions } from "graphql-request";
7
7
  import { BASE_CHAIN_ID, BASE_DEPLOYMENT, BASE_ETH_USDC_5BPS_MARKET, BASE_HYPOVAULT_ADDRESSES, BASE_HYPOVAULT_CORE_ADDRESSES, BASE_HYPOVAULT_MANAGER_ADDRESSES, BASE_HYPOVAULT_MANAGER_TURNKEY_SIGNERS, BASE_PANOPTIC_POOL_ADDRESSES, BASE_PANOPTIC_V2_ADDRESSES, CHAIN_DEPLOYMENTS, ChainDeployment, HypoVaultManagerTurnkeySigners, MAINNET_CHAIN_ID, MAINNET_DEPLOYMENT, MAINNET_PANOPTIC_V2_ADDRESSES, SEPOLIA_CHAIN_ID, SEPOLIA_DEPLOYMENT, SEPOLIA_ETH_USDC_5BPS_MARKET, SEPOLIA_HYPOVAULT_ADDRESSES, SEPOLIA_HYPOVAULT_CORE_ADDRESSES, SEPOLIA_HYPOVAULT_MANAGER_ADDRESSES, SEPOLIA_HYPOVAULT_MANAGER_TURNKEY_SIGNERS, SEPOLIA_PANOPTIC_POOL_ADDRESSES, SEPOLIA_PANOPTIC_V2_ADDRESSES, VAULT_DISPLAY_NAMES_PER_CHAIN, VAULT_DISPLAY_NAME_RESOLVERS_PER_CHAIN, VaultDisplayNameResolver, VaultDisplayNameResolverInput, getChainDeployment, getEthUsdcMarket, isSupportedChain, requireChainDeployment, resolveVaultDisplayName } from "./deployments";
8
- import * as graphql4 from "graphql";
9
8
  import * as graphql5 from "graphql";
10
9
  import * as graphql6 from "graphql";
11
10
  import * as graphql7 from "graphql";
@@ -17,6 +16,7 @@ import * as graphql12 from "graphql";
17
16
  import * as graphql13 from "graphql";
18
17
  import * as graphql14 from "graphql";
19
18
  import * as graphql15 from "graphql";
19
+ import * as graphql16 from "graphql";
20
20
 
21
21
  //#region src/abis/CollateralTracker.d.ts
22
22
  declare const CollateralTrackerAbi: readonly [{
@@ -32724,18 +32724,18 @@ type GetDepositEpochStatesForWithdrawalQuery = {
32724
32724
  //#endregion
32725
32725
  //#region src/graphql/hypoVault-sdk.generated.d.ts
32726
32726
  type GraphQLClientRequestHeaders = RequestOptions['requestHeaders'];
32727
- declare const DepositEpochStateFragmentDoc: graphql4.DocumentNode;
32728
- declare const HypoVaultFragmentDoc: graphql5.DocumentNode;
32729
- declare const WithdrawalEpochStateFragmentDoc: graphql6.DocumentNode;
32730
- declare const GetDepositOverviewDocument: graphql7.DocumentNode;
32731
- declare const GetLatestDepositAndWithdrawEpochDocument: graphql8.DocumentNode;
32732
- declare const GetLatestEpochDocument: graphql9.DocumentNode;
32733
- declare const GetVaultHistoryDocument: graphql10.DocumentNode;
32734
- declare const GetFilteredHypoVaultsDocument: graphql11.DocumentNode;
32735
- declare const GetQueuedWithdrawalsForExecutionDocument: graphql12.DocumentNode;
32736
- declare const GetWithdrawalEpochStatesForExecutionDocument: graphql13.DocumentNode;
32737
- declare const GetQueuedDepositsForWithdrawalDocument: graphql14.DocumentNode;
32738
- declare const GetDepositEpochStatesForWithdrawalDocument: graphql15.DocumentNode;
32727
+ declare const DepositEpochStateFragmentDoc: graphql5.DocumentNode;
32728
+ declare const HypoVaultFragmentDoc: graphql6.DocumentNode;
32729
+ declare const WithdrawalEpochStateFragmentDoc: graphql7.DocumentNode;
32730
+ declare const GetDepositOverviewDocument: graphql8.DocumentNode;
32731
+ declare const GetLatestDepositAndWithdrawEpochDocument: graphql9.DocumentNode;
32732
+ declare const GetLatestEpochDocument: graphql10.DocumentNode;
32733
+ declare const GetVaultHistoryDocument: graphql11.DocumentNode;
32734
+ declare const GetFilteredHypoVaultsDocument: graphql12.DocumentNode;
32735
+ declare const GetQueuedWithdrawalsForExecutionDocument: graphql13.DocumentNode;
32736
+ declare const GetWithdrawalEpochStatesForExecutionDocument: graphql14.DocumentNode;
32737
+ declare const GetQueuedDepositsForWithdrawalDocument: graphql15.DocumentNode;
32738
+ declare const GetDepositEpochStatesForWithdrawalDocument: graphql16.DocumentNode;
32739
32739
  type SdkFunctionWrapper = <T>(action: (requestHeaders?: Record<string, string>) => Promise<T>, operationName: string, operationType?: string, variables?: any) => Promise<T>;
32740
32740
  declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionWrapper): {
32741
32741
  GetDepositOverview(variables: GetDepositOverviewQueryVariables, requestHeaders?: GraphQLClientRequestHeaders): Promise<GetDepositOverviewQuery>;