@panoptic-eng/sdk 1.0.62 → 1.0.64
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 +1 -1
- package/dist/cow/index.d.ts +1 -1
- package/dist/cow/index.d.ts.map +1 -1
- package/dist/cow/index.js +1 -1
- package/dist/cow/index.js.map +1 -1
- package/dist/{cow-DTi3GjQz.js → cow-BIzmQHon.js} +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{irm-BDlcUNgJ.js → irm-BGog_tSR.js} +3 -3
- package/dist/panoptic/v2/index.d.ts +137 -135
- package/dist/panoptic/v2/index.d.ts.map +1 -1
- package/dist/panoptic/v2/index.js +52 -51
- package/dist/panoptic/v2/index.js.map +1 -1
- package/dist/panoptic/v2/react-public.d.ts +144 -142
- package/dist/panoptic/v2/react-public.d.ts.map +1 -1
- package/dist/panoptic/v2/react-public.js +55 -54
- package/dist/panoptic/v2/react-public.js.map +1 -1
- package/dist/providers-1WdiaRbY.js +54 -0
- package/dist/{rates-BwZnK0tG.js → rates-O6Sn-xqL.js} +3 -3
- package/dist/{router-Y1OxL9Nt.js → router-BuAvFpbu.js} +137 -10
- package/dist/{router-jMP7fVno.js → router-DHn0rNd7.js} +2 -2
- package/dist/rpc/index.d.ts +112 -0
- package/dist/rpc/index.d.ts.map +1 -0
- package/dist/rpc/index.js +242 -0
- package/dist/rpc/index.js.map +1 -0
- package/dist/test/index.d.ts +1 -1
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/index.js +1 -14
- package/dist/test/index.js.map +1 -1
- package/dist/uniswap/index.d.ts +311 -216
- package/dist/uniswap/index.d.ts.map +1 -1
- package/dist/uniswap/index.js +254 -21
- package/dist/uniswap/index.js.map +1 -1
- package/dist/{v2-B27ILZl4.js → v2-D2Bg1SeN.js} +19 -144
- package/dist/{writes-B8NGXzUG.js → writes-jz-N6C_4.js} +37 -37
- package/dist/zodiac/index.d.ts +3 -3
- package/dist/zodiac/index.d.ts.map +1 -1
- package/dist/zodiac/index.js +3 -3
- package/dist/zodiac/index.js.map +1 -1
- package/package.json +5 -1
|
@@ -842,8 +842,8 @@ interface RiskEngine {
|
|
|
842
842
|
/** Commission rate (in bps), charged on notional at mint */
|
|
843
843
|
commissionRate: bigint;
|
|
844
844
|
/**
|
|
845
|
-
*
|
|
846
|
-
* commission is the lesser of this applied to the realized
|
|
845
|
+
* Streamia fee rate (in bps), charged on realized streamia at burn. The burn
|
|
846
|
+
* commission is the lesser of this applied to the realized streamia and
|
|
847
847
|
* 10x `commissionRate` applied to the notional — see CollateralTracker.settleBurn.
|
|
848
848
|
*/
|
|
849
849
|
premiumFeeRate: bigint;
|
|
@@ -978,9 +978,9 @@ interface Position {
|
|
|
978
978
|
blockNumberAtMint: bigint;
|
|
979
979
|
/** Whether a swap occurred at mint */
|
|
980
980
|
swapAtMint: boolean;
|
|
981
|
-
/** Accumulated
|
|
981
|
+
/** Accumulated streamia owed for token 0 */
|
|
982
982
|
premiaOwed0: bigint;
|
|
983
|
-
/** Accumulated
|
|
983
|
+
/** Accumulated streamia owed for token 1 */
|
|
984
984
|
premiaOwed1: bigint;
|
|
985
985
|
/** Whether this is an optimistic pending position */
|
|
986
986
|
pending?: boolean;
|
|
@@ -1043,9 +1043,9 @@ interface ClosedPosition {
|
|
|
1043
1043
|
realizedPnL0: bigint;
|
|
1044
1044
|
/** Realized PnL for token 1 */
|
|
1045
1045
|
realizedPnL1: bigint;
|
|
1046
|
-
/** Total
|
|
1046
|
+
/** Total streamia collected for token 0 */
|
|
1047
1047
|
premiaCollected0: bigint;
|
|
1048
|
-
/** Total
|
|
1048
|
+
/** Total streamia collected for token 1 */
|
|
1049
1049
|
premiaCollected1: bigint;
|
|
1050
1050
|
/** Closure reason */
|
|
1051
1051
|
closureReason: 'closed' | 'liquidated' | 'force_exercised';
|
|
@@ -1190,7 +1190,7 @@ interface NetLiquidationValue {
|
|
|
1190
1190
|
value1: bigint;
|
|
1191
1191
|
/** Tick used for calculation */
|
|
1192
1192
|
atTick: bigint;
|
|
1193
|
-
/** Whether pending
|
|
1193
|
+
/** Whether pending streamia was included */
|
|
1194
1194
|
includedPendingPremium: boolean;
|
|
1195
1195
|
/** Block metadata */
|
|
1196
1196
|
_meta: BlockMeta;
|
|
@@ -1432,7 +1432,7 @@ interface OptionBurntEvent extends BaseEvent {
|
|
|
1432
1432
|
tokenId: bigint;
|
|
1433
1433
|
/** Position size that was burnt */
|
|
1434
1434
|
positionSize: bigint;
|
|
1435
|
-
/**
|
|
1435
|
+
/** Streamia settled for each leg (token0 right, token1 left per leg) */
|
|
1436
1436
|
premiaByLeg: readonly [bigint, bigint, bigint, bigint];
|
|
1437
1437
|
}
|
|
1438
1438
|
/**
|
|
@@ -2400,7 +2400,7 @@ interface OpenPositionParams extends Partial<PositionStorageParams> {
|
|
|
2400
2400
|
* When false (default), tickLimits are passed in ascending order (low, high).
|
|
2401
2401
|
*/
|
|
2402
2402
|
swapAtMint?: boolean;
|
|
2403
|
-
/** Whether to use
|
|
2403
|
+
/** Whether to use streamia as collateral */
|
|
2404
2404
|
usePremiaAsCollateral?: boolean;
|
|
2405
2405
|
/** Builder code (defaults to 0) */
|
|
2406
2406
|
builderCode?: bigint;
|
|
@@ -2496,7 +2496,7 @@ interface ClosePositionParams extends Partial<PositionStorageParams> {
|
|
|
2496
2496
|
* When false (default), tickLimits are passed in ascending order (low, high).
|
|
2497
2497
|
*/
|
|
2498
2498
|
swapAtMint?: boolean;
|
|
2499
|
-
/** Whether to use
|
|
2499
|
+
/** Whether to use streamia as collateral */
|
|
2500
2500
|
usePremiaAsCollateral?: boolean;
|
|
2501
2501
|
/** Builder code (defaults to 0) */
|
|
2502
2502
|
builderCode?: bigint;
|
|
@@ -2552,7 +2552,7 @@ interface RollPositionParams extends Partial<PositionStorageParams> {
|
|
|
2552
2552
|
openSpreadLimit?: bigint;
|
|
2553
2553
|
/** Whether to swap tokens when opening */
|
|
2554
2554
|
openSwapAtMint?: boolean;
|
|
2555
|
-
/** Whether to use
|
|
2555
|
+
/** Whether to use streamia as collateral */
|
|
2556
2556
|
usePremiaAsCollateral?: boolean;
|
|
2557
2557
|
/** Builder code */
|
|
2558
2558
|
builderCode?: bigint;
|
|
@@ -2973,9 +2973,9 @@ interface ClosePositionSimulation {
|
|
|
2973
2973
|
amount0Received: bigint;
|
|
2974
2974
|
/** Token 1 amount received */
|
|
2975
2975
|
amount1Received: bigint;
|
|
2976
|
-
/**
|
|
2976
|
+
/** Streamia collected for token 0 (null: requires pre-close streamia snapshot) */
|
|
2977
2977
|
premiaCollected0: bigint | null;
|
|
2978
|
-
/**
|
|
2978
|
+
/** Streamia collected for token 1 (null: requires pre-close streamia snapshot) */
|
|
2979
2979
|
premiaCollected1: bigint | null;
|
|
2980
2980
|
/** Post-trade collateral for token 0 */
|
|
2981
2981
|
postCollateral0: bigint;
|
|
@@ -3000,16 +3000,16 @@ interface ForceExerciseSimulation {
|
|
|
3000
3000
|
reason?: string;
|
|
3001
3001
|
}
|
|
3002
3002
|
/**
|
|
3003
|
-
* Settle-
|
|
3003
|
+
* Settle-streamia-on-another-account simulation result data.
|
|
3004
3004
|
*/
|
|
3005
3005
|
interface SettlePremiumFromSimulation {
|
|
3006
|
-
/** Short
|
|
3006
|
+
/** Short streamia the settle makes available to the caller (token 0) */
|
|
3007
3007
|
premium0: bigint;
|
|
3008
|
-
/** Short
|
|
3008
|
+
/** Short streamia the settle makes available to the caller (token 1) */
|
|
3009
3009
|
premium1: bigint;
|
|
3010
|
-
/** Total
|
|
3010
|
+
/** Total streamia the buyer pays into the chunk (token 0) */
|
|
3011
3011
|
settled0: bigint;
|
|
3012
|
-
/** Total
|
|
3012
|
+
/** Total streamia the buyer pays into the chunk (token 1) */
|
|
3013
3013
|
settled1: bigint;
|
|
3014
3014
|
/** Whether the settlement would succeed */
|
|
3015
3015
|
canSettle: boolean;
|
|
@@ -3034,20 +3034,20 @@ interface LiquidateSimulation {
|
|
|
3034
3034
|
shortfall1: bigint;
|
|
3035
3035
|
}
|
|
3036
3036
|
/**
|
|
3037
|
-
* Settle
|
|
3037
|
+
* Settle streamia simulation result data.
|
|
3038
3038
|
*/
|
|
3039
3039
|
interface SettleSimulation {
|
|
3040
|
-
/** Signed
|
|
3040
|
+
/** Signed streamia flow for token 0 — positive = collected, negative = paid. */
|
|
3041
3041
|
premiaReceived0: bigint;
|
|
3042
|
-
/** Signed
|
|
3042
|
+
/** Signed streamia flow for token 1 — positive = collected, negative = paid. */
|
|
3043
3043
|
premiaReceived1: bigint;
|
|
3044
3044
|
/** Post-settle collateral for token 0 */
|
|
3045
3045
|
postCollateral0: bigint;
|
|
3046
3046
|
/** Post-settle collateral for token 1 */
|
|
3047
3047
|
postCollateral1: bigint;
|
|
3048
|
-
/**
|
|
3048
|
+
/** Streamia made collectable by buyer settlement and chunk pokes. */
|
|
3049
3049
|
premiumProtected: [bigint, bigint];
|
|
3050
|
-
/**
|
|
3050
|
+
/** Streamia still unavailable after protection and forfeited by settlement. */
|
|
3051
3051
|
remainingForfeit: [bigint, bigint];
|
|
3052
3052
|
/** Whether the settlement includes a temporary chunk-liquidity poke. */
|
|
3053
3053
|
usesPoke: boolean;
|
|
@@ -3090,9 +3090,9 @@ interface DispatchSimulation {
|
|
|
3090
3090
|
netAmount0: bigint;
|
|
3091
3091
|
/** Token 1 net change */
|
|
3092
3092
|
netAmount1: bigint;
|
|
3093
|
-
/**
|
|
3093
|
+
/** Streamia settled for token 0 (null when atomic pre/post position reads are unavailable). */
|
|
3094
3094
|
premiaReceived0: bigint | null;
|
|
3095
|
-
/**
|
|
3095
|
+
/** Streamia settled for token 1 (null when atomic pre/post position reads are unavailable). */
|
|
3096
3096
|
premiaReceived1: bigint | null;
|
|
3097
3097
|
/** Positions created */
|
|
3098
3098
|
positionsCreated: bigint[];
|
|
@@ -3610,7 +3610,7 @@ interface TokenIdBuilder {
|
|
|
3610
3610
|
* Add a loan leg (borrow liquidity). Uses width=0 with isLong=false.
|
|
3611
3611
|
*
|
|
3612
3612
|
* A loan borrows liquidity from the pool at a specific strike price.
|
|
3613
|
-
* The borrower receives the token and owes interest (
|
|
3613
|
+
* The borrower receives the token and owes interest (streamia).
|
|
3614
3614
|
*
|
|
3615
3615
|
* @param config - Loan configuration (tokenType, strike, optionRatio)
|
|
3616
3616
|
* @returns The builder for chaining
|
|
@@ -3620,7 +3620,7 @@ interface TokenIdBuilder {
|
|
|
3620
3620
|
* Add a credit leg (lend liquidity). Uses width=0 with isLong=true.
|
|
3621
3621
|
*
|
|
3622
3622
|
* A credit lends liquidity to the pool at a specific strike price.
|
|
3623
|
-
* The lender deposits the token and earns interest (
|
|
3623
|
+
* The lender deposits the token and earns interest (streamia).
|
|
3624
3624
|
*
|
|
3625
3625
|
* @param config - Credit configuration (tokenType, strike, optionRatio)
|
|
3626
3626
|
* @returns The builder for chaining
|
|
@@ -4814,18 +4814,18 @@ declare function getPositionGreeks(params: GetPositionGreeksParams): Promise<Pos
|
|
|
4814
4814
|
//#endregion
|
|
4815
4815
|
//#region src/panoptic/v2/reads/premia.d.ts
|
|
4816
4816
|
/**
|
|
4817
|
-
*
|
|
4817
|
+
* Streamia data for an account.
|
|
4818
4818
|
*/
|
|
4819
4819
|
interface AccountPremia {
|
|
4820
|
-
/** Total short
|
|
4820
|
+
/** Total short streamia owed to the account for token 0 */
|
|
4821
4821
|
shortPremium0: bigint;
|
|
4822
|
-
/** Total short
|
|
4822
|
+
/** Total short streamia owed to the account for token 1 */
|
|
4823
4823
|
shortPremium1: bigint;
|
|
4824
|
-
/** Total long
|
|
4824
|
+
/** Total long streamia owed by the account for token 0 */
|
|
4825
4825
|
longPremium0: bigint;
|
|
4826
|
-
/** Total long
|
|
4826
|
+
/** Total long streamia owed by the account for token 1 */
|
|
4827
4827
|
longPremium1: bigint;
|
|
4828
|
-
/** Whether pending (unsettled)
|
|
4828
|
+
/** Whether pending (unsettled) streamia was included */
|
|
4829
4829
|
includePendingPremium: boolean;
|
|
4830
4830
|
/** Block metadata */
|
|
4831
4831
|
_meta: BlockMeta;
|
|
@@ -4842,7 +4842,7 @@ interface GetAccountPremiaParams {
|
|
|
4842
4842
|
account: Address$1;
|
|
4843
4843
|
/** TokenIds held by the account */
|
|
4844
4844
|
tokenIds: bigint[];
|
|
4845
|
-
/** Whether to include pending (unsettled)
|
|
4845
|
+
/** Whether to include pending (unsettled) streamia (default: true) */
|
|
4846
4846
|
includePendingPremium?: boolean;
|
|
4847
4847
|
/** Optional block number for historical queries */
|
|
4848
4848
|
blockNumber?: bigint;
|
|
@@ -4850,18 +4850,18 @@ interface GetAccountPremiaParams {
|
|
|
4850
4850
|
_meta?: BlockMeta;
|
|
4851
4851
|
}
|
|
4852
4852
|
/**
|
|
4853
|
-
* Get
|
|
4853
|
+
* Get streamia totals for an account.
|
|
4854
4854
|
*
|
|
4855
|
-
* Returns the total short and long
|
|
4856
|
-
* Short
|
|
4857
|
-
* Long
|
|
4855
|
+
* Returns the total short and long streamia across all positions.
|
|
4856
|
+
* Short streamia is owed TO the account (earned from selling options).
|
|
4857
|
+
* Long streamia is owed BY the account (paid for buying options).
|
|
4858
4858
|
*
|
|
4859
4859
|
* @param params - The parameters
|
|
4860
|
-
* @returns
|
|
4860
|
+
* @returns Streamia totals with block metadata
|
|
4861
4861
|
*
|
|
4862
4862
|
* @example
|
|
4863
4863
|
* ```typescript
|
|
4864
|
-
* const
|
|
4864
|
+
* const streamia = await getAccountPremia({
|
|
4865
4865
|
* client,
|
|
4866
4866
|
* poolAddress,
|
|
4867
4867
|
* account,
|
|
@@ -4869,13 +4869,13 @@ interface GetAccountPremiaParams {
|
|
|
4869
4869
|
* includePendingPremium: true,
|
|
4870
4870
|
* })
|
|
4871
4871
|
*
|
|
4872
|
-
* console.log('Short
|
|
4873
|
-
* console.log('Long
|
|
4872
|
+
* console.log('Short streamia earned:', streamia.shortPremium0, streamia.shortPremium1)
|
|
4873
|
+
* console.log('Long streamia owed:', streamia.longPremium0, streamia.longPremium1)
|
|
4874
4874
|
* ```
|
|
4875
4875
|
*/
|
|
4876
4876
|
declare function getAccountPremia(params: GetAccountPremiaParams): Promise<AccountPremia>;
|
|
4877
4877
|
/**
|
|
4878
|
-
* Position with
|
|
4878
|
+
* Position with streamia data.
|
|
4879
4879
|
*/
|
|
4880
4880
|
interface PositionWithPremia extends Position {}
|
|
4881
4881
|
/**
|
|
@@ -4884,15 +4884,15 @@ interface PositionWithPremia extends Position {}
|
|
|
4884
4884
|
interface PositionsWithPremiaResult {
|
|
4885
4885
|
/** Positions with full data */
|
|
4886
4886
|
positions: PositionWithPremia[];
|
|
4887
|
-
/** Total short
|
|
4887
|
+
/** Total short streamia owed to the account for token 0 */
|
|
4888
4888
|
shortPremium0: bigint;
|
|
4889
|
-
/** Total short
|
|
4889
|
+
/** Total short streamia owed to the account for token 1 */
|
|
4890
4890
|
shortPremium1: bigint;
|
|
4891
|
-
/** Total long
|
|
4891
|
+
/** Total long streamia owed by the account for token 0 */
|
|
4892
4892
|
longPremium0: bigint;
|
|
4893
|
-
/** Total long
|
|
4893
|
+
/** Total long streamia owed by the account for token 1 */
|
|
4894
4894
|
longPremium1: bigint;
|
|
4895
|
-
/** Whether pending (unsettled)
|
|
4895
|
+
/** Whether pending (unsettled) streamia was included */
|
|
4896
4896
|
includePendingPremium: boolean;
|
|
4897
4897
|
/** Block metadata */
|
|
4898
4898
|
_meta: BlockMeta;
|
|
@@ -4909,7 +4909,7 @@ interface GetPositionsWithPremiaParams {
|
|
|
4909
4909
|
account: Address$1;
|
|
4910
4910
|
/** TokenIds held by the account */
|
|
4911
4911
|
tokenIds: bigint[];
|
|
4912
|
-
/** Whether to include pending (unsettled)
|
|
4912
|
+
/** Whether to include pending (unsettled) streamia (default: true) */
|
|
4913
4913
|
includePendingPremium?: boolean;
|
|
4914
4914
|
/** Optional block number for historical queries */
|
|
4915
4915
|
blockNumber?: bigint;
|
|
@@ -4917,13 +4917,13 @@ interface GetPositionsWithPremiaParams {
|
|
|
4917
4917
|
_meta?: BlockMeta;
|
|
4918
4918
|
}
|
|
4919
4919
|
/**
|
|
4920
|
-
* Get positions with per-position
|
|
4920
|
+
* Get positions with per-position streamia data.
|
|
4921
4921
|
*
|
|
4922
4922
|
* Uses multicall to batch individual getFullPositionsData calls
|
|
4923
|
-
* for each position, giving us per-position
|
|
4923
|
+
* for each position, giving us per-position streamia in a single RPC request.
|
|
4924
4924
|
*
|
|
4925
4925
|
* @param params - The parameters
|
|
4926
|
-
* @returns Positions with
|
|
4926
|
+
* @returns Positions with streamia and totals with block metadata
|
|
4927
4927
|
*
|
|
4928
4928
|
* @example
|
|
4929
4929
|
* ```typescript
|
|
@@ -4936,27 +4936,27 @@ interface GetPositionsWithPremiaParams {
|
|
|
4936
4936
|
*
|
|
4937
4937
|
* for (const position of result.positions) {
|
|
4938
4938
|
* console.log('Position:', position.tokenId)
|
|
4939
|
-
* console.log('
|
|
4939
|
+
* console.log('Streamia:', position.premiaOwed0, position.premiaOwed1)
|
|
4940
4940
|
* }
|
|
4941
|
-
* console.log('Total short
|
|
4941
|
+
* console.log('Total short streamia:', result.shortPremium0, result.shortPremium1)
|
|
4942
4942
|
* ```
|
|
4943
4943
|
*/
|
|
4944
4944
|
declare function getPositionsWithPremia(params: GetPositionsWithPremiaParams): Promise<PositionsWithPremiaResult>;
|
|
4945
4945
|
/**
|
|
4946
|
-
* Forfeitable (unsettled) short
|
|
4946
|
+
* Forfeitable (unsettled) short streamia on a position.
|
|
4947
4947
|
*/
|
|
4948
4948
|
interface ForfeitablePremium {
|
|
4949
|
-
/** Short
|
|
4949
|
+
/** Short streamia owed to the account, including unsettled pending streamia (token 0) */
|
|
4950
4950
|
owed0: bigint;
|
|
4951
|
-
/** Short
|
|
4951
|
+
/** Short streamia owed to the account, including unsettled pending streamia (token 1) */
|
|
4952
4952
|
owed1: bigint;
|
|
4953
|
-
/** Short
|
|
4953
|
+
/** Short streamia currently available to collect (token 0) */
|
|
4954
4954
|
available0: bigint;
|
|
4955
|
-
/** Short
|
|
4955
|
+
/** Short streamia currently available to collect (token 1) */
|
|
4956
4956
|
available1: bigint;
|
|
4957
|
-
/**
|
|
4957
|
+
/** Streamia that would be forfeited if the position were closed now (owed - available, token 0) */
|
|
4958
4958
|
forfeit0: bigint;
|
|
4959
|
-
/**
|
|
4959
|
+
/** Streamia that would be forfeited if the position were closed now (owed - available, token 1) */
|
|
4960
4960
|
forfeit1: bigint;
|
|
4961
4961
|
/** Block metadata */
|
|
4962
4962
|
_meta: BlockMeta;
|
|
@@ -4977,17 +4977,17 @@ interface GetForfeitablePremiumParams {
|
|
|
4977
4977
|
blockNumber?: bigint;
|
|
4978
4978
|
}
|
|
4979
4979
|
/**
|
|
4980
|
-
* Get the unsettled short
|
|
4980
|
+
* Get the unsettled short streamia an account would forfeit by closing now.
|
|
4981
4981
|
*
|
|
4982
4982
|
* Calls `getFullPositionsData` twice in one multicall — once with
|
|
4983
4983
|
* `includePendingPremium = true` (everything owed to the short legs) and once
|
|
4984
4984
|
* with `false` (only what is available to collect). The difference is the
|
|
4985
|
-
*
|
|
4985
|
+
* streamia still owed by buyers that has not been settled; closing before it
|
|
4986
4986
|
* settles forfeits it. Settling buyers first (see `settlePremiumFrom`) moves
|
|
4987
|
-
* that
|
|
4987
|
+
* that streamia into the available bucket.
|
|
4988
4988
|
*
|
|
4989
4989
|
* @param params - The parameters
|
|
4990
|
-
* @returns Owed, available, and forfeitable
|
|
4990
|
+
* @returns Owed, available, and forfeitable streamia with block metadata
|
|
4991
4991
|
*/
|
|
4992
4992
|
declare function getForfeitablePremium(params: GetForfeitablePremiumParams): Promise<ForfeitablePremium>;
|
|
4993
4993
|
|
|
@@ -5076,7 +5076,7 @@ interface GetAccountSummaryRiskParams extends GetAccountSummaryBasicParams {
|
|
|
5076
5076
|
queryAddress: Address$1;
|
|
5077
5077
|
/** Optional: Tick to calculate risk metrics at (defaults to current tick) */
|
|
5078
5078
|
atTick?: bigint;
|
|
5079
|
-
/** Optional: Whether to include pending
|
|
5079
|
+
/** Optional: Whether to include pending streamia in NLV */
|
|
5080
5080
|
includePendingPremium?: boolean;
|
|
5081
5081
|
}
|
|
5082
5082
|
/**
|
|
@@ -5113,7 +5113,7 @@ interface GetNetLiquidationValueParams {
|
|
|
5113
5113
|
tokenIds: bigint[];
|
|
5114
5114
|
/** Optional: Tick to calculate NLV at (defaults to current tick) */
|
|
5115
5115
|
atTick?: bigint;
|
|
5116
|
-
/** Optional: Whether to include pending
|
|
5116
|
+
/** Optional: Whether to include pending streamia */
|
|
5117
5117
|
includePendingPremium?: boolean;
|
|
5118
5118
|
/** PanopticQuery address (required) */
|
|
5119
5119
|
queryAddress: Address$1;
|
|
@@ -5128,7 +5128,7 @@ interface GetNetLiquidationValueParams {
|
|
|
5128
5128
|
* ## Same-Block Guarantee
|
|
5129
5129
|
* Tick and NLV are queried at the same target block.
|
|
5130
5130
|
*
|
|
5131
|
-
* Requires PanopticQuery for accurate value and
|
|
5131
|
+
* Requires PanopticQuery for accurate value and streamia accounting.
|
|
5132
5132
|
*
|
|
5133
5133
|
* @param params - The parameters
|
|
5134
5134
|
* @returns Net liquidation value with block metadata
|
|
@@ -5148,7 +5148,7 @@ interface GetNetLiquidationValuesParams {
|
|
|
5148
5148
|
tokenIds: bigint[];
|
|
5149
5149
|
/** Ticks to calculate NLV at */
|
|
5150
5150
|
atTicks: bigint[];
|
|
5151
|
-
/** Optional: Whether to include pending
|
|
5151
|
+
/** Optional: Whether to include pending streamia */
|
|
5152
5152
|
includePendingPremium?: boolean;
|
|
5153
5153
|
/** PanopticQuery address (required) */
|
|
5154
5154
|
queryAddress: Address$1;
|
|
@@ -5587,8 +5587,8 @@ interface GetMaxPositionSizeParams {
|
|
|
5587
5587
|
/** Whether to swap tokens at mint (affects collateral requirements, default: false) */
|
|
5588
5588
|
swapAtMint?: boolean;
|
|
5589
5589
|
/**
|
|
5590
|
-
* Whether the solvency simulation may count accrued
|
|
5591
|
-
* mint (which uses `false`) — passing `true` credits
|
|
5590
|
+
* Whether the solvency simulation may count accrued streamia as collateral. MUST match the
|
|
5591
|
+
* mint (which uses `false`) — passing `true` credits streamia the mint won't, so the search
|
|
5592
5592
|
* returns a size larger than the account can actually mint. Defaults to `false`.
|
|
5593
5593
|
*/
|
|
5594
5594
|
usePremiaAsCollateral?: boolean;
|
|
@@ -6345,7 +6345,7 @@ declare function getSafeMode(params: GetSafeModeParams): Promise<SafeModeState$1
|
|
|
6345
6345
|
//#endregion
|
|
6346
6346
|
//#region src/panoptic/v2/reads/queryUtils.d.ts
|
|
6347
6347
|
/**
|
|
6348
|
-
* Portfolio value result (without
|
|
6348
|
+
* Portfolio value result (without streamia).
|
|
6349
6349
|
*/
|
|
6350
6350
|
interface PortfolioValue {
|
|
6351
6351
|
/** Value in token 0 */
|
|
@@ -6379,10 +6379,10 @@ interface GetPortfolioValueParams {
|
|
|
6379
6379
|
_meta?: BlockMeta;
|
|
6380
6380
|
}
|
|
6381
6381
|
/**
|
|
6382
|
-
* Get portfolio value (NAV) without
|
|
6382
|
+
* Get portfolio value (NAV) without streamia.
|
|
6383
6383
|
*
|
|
6384
6384
|
* This calculates the net asset value of the portfolio based on Uniswap liquidity
|
|
6385
|
-
* at a given tick, excluding accumulated
|
|
6385
|
+
* at a given tick, excluding accumulated streamia. Useful for PnL tracking separate
|
|
6386
6386
|
* from liquidation value.
|
|
6387
6387
|
*
|
|
6388
6388
|
* ## Same-Block Guarantee
|
|
@@ -7396,7 +7396,7 @@ interface GetOpenPositionPreviewParams {
|
|
|
7396
7396
|
spreadLimit?: bigint;
|
|
7397
7397
|
/** Whether to swap at mint */
|
|
7398
7398
|
swapAtMint?: boolean;
|
|
7399
|
-
/** Whether to use
|
|
7399
|
+
/** Whether to use streamia as collateral */
|
|
7400
7400
|
usePremiaAsCollateral?: boolean;
|
|
7401
7401
|
/** Chain ID (for greeks calculation) */
|
|
7402
7402
|
chainId?: bigint;
|
|
@@ -7614,7 +7614,7 @@ interface AccountTrade {
|
|
|
7614
7614
|
poolUtilization0?: bigint;
|
|
7615
7615
|
/** Pool utilization for token 1 at mint (only for mints) */
|
|
7616
7616
|
poolUtilization1?: bigint;
|
|
7617
|
-
/**
|
|
7617
|
+
/** Streamia settled per leg on burn (only for burns) */
|
|
7618
7618
|
premiaByLeg?: readonly [bigint, bigint, bigint, bigint];
|
|
7619
7619
|
}
|
|
7620
7620
|
/**
|
|
@@ -7689,7 +7689,7 @@ interface StreamiaLeg {
|
|
|
7689
7689
|
|
|
7690
7690
|
//#endregion
|
|
7691
7691
|
//#region src/panoptic/v2/reads/streamiaHistory.d.ts
|
|
7692
|
-
/** A signed settled-
|
|
7692
|
+
/** A signed settled-streamia event used to reconstruct cumulative streamia. */
|
|
7693
7693
|
interface SettledEvent {
|
|
7694
7694
|
/** Block at which settlement occurred */
|
|
7695
7695
|
blockNumber: bigint;
|
|
@@ -7716,7 +7716,7 @@ interface GetStreamiaHistoryParams {
|
|
|
7716
7716
|
poolConfig: PoolVersionConfig;
|
|
7717
7717
|
/** Whether to include Uniswap fee data (default: true) */
|
|
7718
7718
|
includeUniswapFees?: boolean;
|
|
7719
|
-
/** Signed settled-
|
|
7719
|
+
/** Signed settled-streamia events to include in cumulative streamia (optional) */
|
|
7720
7720
|
settledEvents?: SettledEvent[];
|
|
7721
7721
|
/** Pre-fetched block metadata (skips an extra eth_getBlockByNumber if provided) */
|
|
7722
7722
|
_meta?: BlockMeta;
|
|
@@ -7725,12 +7725,12 @@ interface GetStreamiaHistoryParams {
|
|
|
7725
7725
|
interface StreamiaSnapshot {
|
|
7726
7726
|
/** Block number (undefined if queried as latest) */
|
|
7727
7727
|
blockNumber: bigint | undefined;
|
|
7728
|
-
/** Currently unsettled Panoptic
|
|
7728
|
+
/** Currently unsettled Panoptic streamia (short - long) */
|
|
7729
7729
|
panopticPremia: {
|
|
7730
7730
|
token0: bigint;
|
|
7731
7731
|
token1: bigint;
|
|
7732
7732
|
};
|
|
7733
|
-
/** Lifetime Panoptic
|
|
7733
|
+
/** Lifetime Panoptic streamia, including signed settled amounts */
|
|
7734
7734
|
cumulativePanopticPremia: {
|
|
7735
7735
|
token0: bigint;
|
|
7736
7736
|
token1: bigint;
|
|
@@ -7752,7 +7752,7 @@ interface StreamiaHistoryResult {
|
|
|
7752
7752
|
* Get historical streamia data for a position across multiple blocks.
|
|
7753
7753
|
*
|
|
7754
7754
|
* @param params - The parameters
|
|
7755
|
-
* @returns Snapshots of Panoptic
|
|
7755
|
+
* @returns Snapshots of Panoptic streamia and Uniswap fee deltas at each block
|
|
7756
7756
|
*/
|
|
7757
7757
|
declare function getStreamiaHistory(params: GetStreamiaHistoryParams): Promise<StreamiaHistoryResult>;
|
|
7758
7758
|
|
|
@@ -8146,9 +8146,9 @@ interface PositionInput {
|
|
|
8146
8146
|
tickAtBurn?: number;
|
|
8147
8147
|
/** Block number of the burn tx (closed positions only) */
|
|
8148
8148
|
burnBlockNumber?: bigint;
|
|
8149
|
-
/**
|
|
8149
|
+
/** Streamia in token0 from subgraph (closed positions only) */
|
|
8150
8150
|
burnPremium0?: bigint;
|
|
8151
|
-
/**
|
|
8151
|
+
/** Streamia in token1 from subgraph (closed positions only) */
|
|
8152
8152
|
burnPremium1?: bigint;
|
|
8153
8153
|
}
|
|
8154
8154
|
/**
|
|
@@ -8158,9 +8158,9 @@ interface PositionInput {
|
|
|
8158
8158
|
* The UI maps these to asset/quote based on isAssetToken0.
|
|
8159
8159
|
*/
|
|
8160
8160
|
interface PositionEnrichmentResult {
|
|
8161
|
-
/** Net
|
|
8161
|
+
/** Net streamia owed: shortPremium - longPremium for token0 (open); burnPremium0 for closed */
|
|
8162
8162
|
premiaOwed0: bigint;
|
|
8163
|
-
/** Net
|
|
8163
|
+
/** Net streamia owed: shortPremium - longPremium for token1 (open); burnPremium1 for closed */
|
|
8164
8164
|
premiaOwed1: bigint;
|
|
8165
8165
|
/** Portfolio value in token0 at current tick (open) or burn tick (closed) */
|
|
8166
8166
|
portfolioValue0: bigint;
|
|
@@ -8205,17 +8205,17 @@ interface GetPositionEnrichmentDataResult {
|
|
|
8205
8205
|
_meta: BlockMeta;
|
|
8206
8206
|
}
|
|
8207
8207
|
/**
|
|
8208
|
-
* Fetch enrichment data (
|
|
8208
|
+
* Fetch enrichment data (streamia, portfolio values, collateral requirements) for a set of positions.
|
|
8209
8209
|
*
|
|
8210
8210
|
* Batches all needed contract reads into efficient multicalls:
|
|
8211
8211
|
* - **Open positions**: 3 calls per position in a single multicall at current block:
|
|
8212
|
-
* 1. `getFullPositionsData` →
|
|
8212
|
+
* 1. `getFullPositionsData` → streamia + collateral requirements
|
|
8213
8213
|
* 2. `getPortfolioValue` at currentTick → current portfolio value
|
|
8214
8214
|
* 3. `getPortfolioValue` at mintTick → portfolio value at mint
|
|
8215
8215
|
* - **Closed positions**: 2 calls per position at `burnBlockNumber - 1`:
|
|
8216
8216
|
* 1. `getPortfolioValue` at burnTick → portfolio value at close
|
|
8217
8217
|
* 2. `getPortfolioValue` at mintTick → portfolio value at mint
|
|
8218
|
-
* (
|
|
8218
|
+
* (streamia come from subgraph `burnPremium0/1`)
|
|
8219
8219
|
*
|
|
8220
8220
|
* ## Same-Block Guarantee
|
|
8221
8221
|
* Open position data is fetched at a single block number.
|
|
@@ -9650,7 +9650,7 @@ declare function withdrawAndWait(params: WithdrawParams): Promise<TxReceipt>;
|
|
|
9650
9650
|
interface WithdrawWithPositionsParams extends WithdrawParams {
|
|
9651
9651
|
/** Position ID list for collateral validation */
|
|
9652
9652
|
positionIdList: bigint[];
|
|
9653
|
-
/** Whether to use
|
|
9653
|
+
/** Whether to use streamia as collateral */
|
|
9654
9654
|
usePremiaAsCollateral: boolean;
|
|
9655
9655
|
}
|
|
9656
9656
|
/**
|
|
@@ -9750,7 +9750,7 @@ interface DispatchParams {
|
|
|
9750
9750
|
positionSizes: bigint[];
|
|
9751
9751
|
/** Tick and spread limits for each operation */
|
|
9752
9752
|
tickAndSpreadLimits: TickAndSpreadLimits[];
|
|
9753
|
-
/** Whether to use
|
|
9753
|
+
/** Whether to use streamia as collateral */
|
|
9754
9754
|
usePremiaAsCollateral?: boolean;
|
|
9755
9755
|
/** Builder code */
|
|
9756
9756
|
builderCode?: bigint;
|
|
@@ -9837,7 +9837,7 @@ interface LiquidateParams {
|
|
|
9837
9837
|
positionIdListTo: bigint[];
|
|
9838
9838
|
/** Final position ID list for the liquidatee after liquidation */
|
|
9839
9839
|
positionIdListToFinal: bigint[];
|
|
9840
|
-
/** Packed value for using
|
|
9840
|
+
/** Packed value for using streamia as collateral */
|
|
9841
9841
|
usePremiaAsCollateral?: bigint;
|
|
9842
9842
|
/** Native currency supplied to cover a negative token0 liquidation bonus */
|
|
9843
9843
|
value?: bigint;
|
|
@@ -9896,7 +9896,7 @@ interface ForceExerciseParams {
|
|
|
9896
9896
|
positionIdListTo: bigint[];
|
|
9897
9897
|
/** Final position ID list for the user after exercise */
|
|
9898
9898
|
positionIdListToFinal: bigint[];
|
|
9899
|
-
/** Packed value for using
|
|
9899
|
+
/** Packed value for using streamia as collateral */
|
|
9900
9900
|
usePremiaAsCollateral?: bigint;
|
|
9901
9901
|
/** Gas and transaction overrides */
|
|
9902
9902
|
txOverrides?: TxOverrides;
|
|
@@ -9944,13 +9944,13 @@ declare function forceExerciseAndWait(params: ForceExerciseParams): Promise<TxRe
|
|
|
9944
9944
|
* Reorder a position ID list so `tokenId` is the last element.
|
|
9945
9945
|
*
|
|
9946
9946
|
* The position list fingerprint is an XOR hash, so ordering is free to change.
|
|
9947
|
-
* The contract settles
|
|
9947
|
+
* The contract settles streamia on the last element of `positionIdListTo`.
|
|
9948
9948
|
*
|
|
9949
9949
|
* @throws PanopticError if `tokenId` is not in the list
|
|
9950
9950
|
*/
|
|
9951
9951
|
declare function orderListForSettle(positionIdList: bigint[], tokenId: bigint): bigint[];
|
|
9952
9952
|
/**
|
|
9953
|
-
* Parameters for settling another account's long
|
|
9953
|
+
* Parameters for settling another account's long streamia.
|
|
9954
9954
|
*/
|
|
9955
9955
|
interface SettlePremiumFromParams {
|
|
9956
9956
|
/** Public client */
|
|
@@ -9961,19 +9961,19 @@ interface SettlePremiumFromParams {
|
|
|
9961
9961
|
account: Address$1;
|
|
9962
9962
|
/** PanopticPool address */
|
|
9963
9963
|
poolAddress: Address$1;
|
|
9964
|
-
/** Account whose long
|
|
9964
|
+
/** Account whose long streamia is being settled */
|
|
9965
9965
|
user: Address$1;
|
|
9966
9966
|
/** Position IDs from the caller's account (full held list) */
|
|
9967
9967
|
positionIdListFrom: bigint[];
|
|
9968
9968
|
/** The target user's full held position ID list (passed as both To and ToFinal) */
|
|
9969
9969
|
positionIdList: bigint[];
|
|
9970
9970
|
/**
|
|
9971
|
-
* The target position to settle
|
|
9971
|
+
* The target position to settle streamia on. The contract settles the LAST
|
|
9972
9972
|
* element of the list; when provided, the list is reordered to end with
|
|
9973
9973
|
* this tokenId. When omitted, the last element of `positionIdList` is settled.
|
|
9974
9974
|
*/
|
|
9975
9975
|
tokenId?: bigint;
|
|
9976
|
-
/** Packed value for using
|
|
9976
|
+
/** Packed value for using streamia as collateral */
|
|
9977
9977
|
usePremiaAsCollateral?: bigint;
|
|
9978
9978
|
/** Gas and transaction overrides */
|
|
9979
9979
|
txOverrides?: TxOverrides;
|
|
@@ -9983,15 +9983,15 @@ interface SettlePremiumFromParams {
|
|
|
9983
9983
|
chainId?: bigint;
|
|
9984
9984
|
}
|
|
9985
9985
|
/**
|
|
9986
|
-
* Settle another account's accumulated long
|
|
9986
|
+
* Settle another account's accumulated long streamia.
|
|
9987
9987
|
*
|
|
9988
9988
|
* Calls `dispatchFrom` with the target's position list passed as both
|
|
9989
9989
|
* `positionIdListTo` and `positionIdListToFinal` (equal lengths select the
|
|
9990
|
-
* settle-
|
|
9991
|
-
* target account to be solvent; the settled
|
|
9990
|
+
* settle-streamia mode and cannot force-exercise or liquidate). Requires the
|
|
9991
|
+
* target account to be solvent; the settled streamia is credited to the
|
|
9992
9992
|
* sellers of the corresponding chunks.
|
|
9993
9993
|
*
|
|
9994
|
-
* @param params - Settle
|
|
9994
|
+
* @param params - Settle streamia parameters
|
|
9995
9995
|
* @returns TxResult
|
|
9996
9996
|
*
|
|
9997
9997
|
* @example
|
|
@@ -10010,7 +10010,7 @@ interface SettlePremiumFromParams {
|
|
|
10010
10010
|
*/
|
|
10011
10011
|
declare function settlePremiumFrom(params: SettlePremiumFromParams): Promise<TxResult>;
|
|
10012
10012
|
/**
|
|
10013
|
-
* Settle another account's
|
|
10013
|
+
* Settle another account's streamia and wait for confirmation.
|
|
10014
10014
|
*
|
|
10015
10015
|
* When `storage` and `chainId` are provided, automatically syncs the
|
|
10016
10016
|
* caller's positions after the transaction confirms.
|
|
@@ -10070,14 +10070,14 @@ declare function buildCreditWrappedDispatch(params: BuildCreditWrappedDispatchPa
|
|
|
10070
10070
|
//#endregion
|
|
10071
10071
|
//#region src/panoptic/v2/writes/settleSequence.d.ts
|
|
10072
10072
|
/**
|
|
10073
|
-
* One buyer whose long
|
|
10073
|
+
* One buyer whose long streamia is settled by the sequence.
|
|
10074
10074
|
*/
|
|
10075
10075
|
interface SettleSequenceTarget {
|
|
10076
|
-
/** Account whose long
|
|
10076
|
+
/** Account whose long streamia is being settled */
|
|
10077
10077
|
user: Address$1;
|
|
10078
10078
|
/** The target user's full held position ID list */
|
|
10079
10079
|
positionIdList: bigint[];
|
|
10080
|
-
/** The position to settle
|
|
10080
|
+
/** The position to settle streamia on (reordered to the end of the list) */
|
|
10081
10081
|
tokenId: bigint;
|
|
10082
10082
|
}
|
|
10083
10083
|
/**
|
|
@@ -10096,7 +10096,7 @@ interface SettleSequenceClose {
|
|
|
10096
10096
|
spreadLimit?: bigint;
|
|
10097
10097
|
/** Whether to swap at mint/burn (descending tick limits). Default false */
|
|
10098
10098
|
swapAtMint?: boolean;
|
|
10099
|
-
/** Whether to use
|
|
10099
|
+
/** Whether to use streamia as collateral for the close. Default false */
|
|
10100
10100
|
usePremiaAsCollateral?: boolean;
|
|
10101
10101
|
/** Builder code (default 0) */
|
|
10102
10102
|
builderCode?: bigint;
|
|
@@ -10116,7 +10116,7 @@ interface SettleSequenceCallsParams {
|
|
|
10116
10116
|
* or a batch dispatch). Mutually exclusive with `close`.
|
|
10117
10117
|
*/
|
|
10118
10118
|
dispatch?: DispatchIntent;
|
|
10119
|
-
/** Packed value for using
|
|
10119
|
+
/** Packed value for using streamia as collateral in the settles */
|
|
10120
10120
|
usePremiaAsCollateral?: bigint;
|
|
10121
10121
|
}
|
|
10122
10122
|
/**
|
|
@@ -10148,7 +10148,7 @@ interface ExecuteSettleSequenceParams extends SettleSequenceCallsParams {
|
|
|
10148
10148
|
chainId?: bigint;
|
|
10149
10149
|
}
|
|
10150
10150
|
/**
|
|
10151
|
-
* Execute a settle sequence: settle each target buyer's owed long
|
|
10151
|
+
* Execute a settle sequence: settle each target buyer's owed long streamia,
|
|
10152
10152
|
* then optionally close the caller's own position, in one multicall.
|
|
10153
10153
|
*
|
|
10154
10154
|
* @param params - Settle sequence parameters
|
|
@@ -10166,7 +10166,7 @@ declare function executeSettleSequenceAndWait(params: ExecuteSettleSequenceParam
|
|
|
10166
10166
|
//#endregion
|
|
10167
10167
|
//#region src/panoptic/v2/writes/protectedSettle.d.ts
|
|
10168
10168
|
interface BuildProtectedSettleDispatchParams {
|
|
10169
|
-
/** Positions whose
|
|
10169
|
+
/** Positions whose streamia should be settled. */
|
|
10170
10170
|
positionIdList: bigint[];
|
|
10171
10171
|
/** The caller's complete held list. A settlement does not change it. */
|
|
10172
10172
|
finalPositionIdList: bigint[];
|
|
@@ -10178,7 +10178,7 @@ interface BuildProtectedSettleDispatchParams {
|
|
|
10178
10178
|
interface ProtectedSettlePlan {
|
|
10179
10179
|
/** Atomic poke/settle/poke dispatch submitted after buyer settlements. */
|
|
10180
10180
|
dispatch: DispatchIntent;
|
|
10181
|
-
/** Poke-only dispatch used to verify no displayed
|
|
10181
|
+
/** Poke-only dispatch used to verify no displayed streamia remains uncollected. */
|
|
10182
10182
|
collectionDispatch?: DispatchIntent;
|
|
10183
10183
|
/** Temporary position IDs, one for each settled position containing short chunks. */
|
|
10184
10184
|
pokingTokenIds: bigint[];
|
|
@@ -10200,7 +10200,7 @@ declare function buildProtectedSettleDispatch(params: BuildProtectedSettleDispat
|
|
|
10200
10200
|
//#endregion
|
|
10201
10201
|
//#region src/panoptic/v2/writes/settle.d.ts
|
|
10202
10202
|
/**
|
|
10203
|
-
* Parameters for settling accumulated
|
|
10203
|
+
* Parameters for settling accumulated streamia.
|
|
10204
10204
|
*/
|
|
10205
10205
|
interface SettleParams {
|
|
10206
10206
|
/** Public client */
|
|
@@ -10237,7 +10237,7 @@ interface SettleParams {
|
|
|
10237
10237
|
* changes on-chain between the fallback read and inclusion of this tx (e.g.
|
|
10238
10238
|
* a size reduction from another dispatch in the intervening blocks), the
|
|
10239
10239
|
* stale positionSize will no longer match `storedSize` and dispatch will
|
|
10240
|
-
* BURN the position instead of settling
|
|
10240
|
+
* BURN the position instead of settling streamia. Callers that already hold
|
|
10241
10241
|
* the stored sizes (e.g. from a same-block snapshot) SHOULD pass them
|
|
10242
10242
|
* explicitly to eliminate that window.
|
|
10243
10243
|
*/
|
|
@@ -10252,7 +10252,7 @@ interface SettleParams {
|
|
|
10252
10252
|
skipPreflight?: boolean;
|
|
10253
10253
|
/** Allow irreducible forfeiture on positions with no available protection. */
|
|
10254
10254
|
allowForfeit?: boolean;
|
|
10255
|
-
/** Whether to use
|
|
10255
|
+
/** Whether to use streamia as collateral */
|
|
10256
10256
|
usePremiaAsCollateral?: boolean;
|
|
10257
10257
|
/** Builder code */
|
|
10258
10258
|
builderCode?: bigint;
|
|
@@ -10260,9 +10260,9 @@ interface SettleParams {
|
|
|
10260
10260
|
txOverrides?: TxOverrides;
|
|
10261
10261
|
}
|
|
10262
10262
|
/**
|
|
10263
|
-
* Settle accumulated
|
|
10263
|
+
* Settle accumulated streamia on existing positions.
|
|
10264
10264
|
*
|
|
10265
|
-
* This function triggers
|
|
10265
|
+
* This function triggers streamia collection without changing position size.
|
|
10266
10266
|
* It calls dispatch with unchanged position lists.
|
|
10267
10267
|
*
|
|
10268
10268
|
* @param params - Settlement parameters
|
|
@@ -10282,7 +10282,7 @@ interface SettleParams {
|
|
|
10282
10282
|
*/
|
|
10283
10283
|
declare function settleAccumulatedPremia(params: SettleParams): Promise<TxResult>;
|
|
10284
10284
|
/**
|
|
10285
|
-
* Settle
|
|
10285
|
+
* Settle streamia and wait for confirmation.
|
|
10286
10286
|
*/
|
|
10287
10287
|
declare function settleAccumulatedPremiaAndWait(params: SettleParams): Promise<TxReceipt>;
|
|
10288
10288
|
|
|
@@ -11290,7 +11290,7 @@ interface SimulateClosePositionParams {
|
|
|
11290
11290
|
* When false (default), tickLimits are passed in ascending order (low, high).
|
|
11291
11291
|
*/
|
|
11292
11292
|
swapAtMint?: boolean;
|
|
11293
|
-
/** Whether to use
|
|
11293
|
+
/** Whether to use streamia as collateral */
|
|
11294
11294
|
usePremiaAsCollateral?: boolean;
|
|
11295
11295
|
/** Builder code */
|
|
11296
11296
|
builderCode?: bigint;
|
|
@@ -11341,11 +11341,11 @@ interface SimulateDispatchParams {
|
|
|
11341
11341
|
positionSizes: bigint[];
|
|
11342
11342
|
/** Tick and spread limits for each operation */
|
|
11343
11343
|
tickAndSpreadLimits: TickAndSpreadLimits[];
|
|
11344
|
-
/** Whether to use
|
|
11344
|
+
/** Whether to use streamia as collateral */
|
|
11345
11345
|
usePremiaAsCollateral?: boolean;
|
|
11346
11346
|
/** Builder code */
|
|
11347
11347
|
builderCode?: bigint;
|
|
11348
|
-
/** Capture aggregate settled
|
|
11348
|
+
/** Capture aggregate settled streamia from atomic pre/post position snapshots. */
|
|
11349
11349
|
measurePremia?: boolean;
|
|
11350
11350
|
/** Optional block number for simulation */
|
|
11351
11351
|
blockNumber?: bigint;
|
|
@@ -11461,7 +11461,7 @@ interface SimulateOpenPositionParams {
|
|
|
11461
11461
|
* When false (default), tickLimits are passed in ascending order (low, high).
|
|
11462
11462
|
*/
|
|
11463
11463
|
swapAtMint?: boolean;
|
|
11464
|
-
/** Whether to use
|
|
11464
|
+
/** Whether to use streamia as collateral */
|
|
11465
11465
|
usePremiaAsCollateral?: boolean;
|
|
11466
11466
|
/** Builder code */
|
|
11467
11467
|
builderCode?: bigint;
|
|
@@ -11523,7 +11523,7 @@ interface SimulateSettleParams {
|
|
|
11523
11523
|
usePremiaAsCollateral?: boolean;
|
|
11524
11524
|
builderCode?: bigint;
|
|
11525
11525
|
/**
|
|
11526
|
-
* Allow settlement when
|
|
11526
|
+
* Allow settlement when streamia remains but no buyer settlement or chunk
|
|
11527
11527
|
* poke can collect it (for example, width-zero legs). Avoidable forfeiture
|
|
11528
11528
|
* still fails closed. Default false.
|
|
11529
11529
|
*/
|
|
@@ -11553,9 +11553,9 @@ interface SettlePremiumBatchResult {
|
|
|
11553
11553
|
settleable: SettleSequenceTarget[];
|
|
11554
11554
|
/** Number of targets that cannot be settled */
|
|
11555
11555
|
unsettleableCount: number;
|
|
11556
|
-
/** Total
|
|
11556
|
+
/** Total streamia the caller receives from the settleable targets (token 0) */
|
|
11557
11557
|
premium0: bigint;
|
|
11558
|
-
/** Total
|
|
11558
|
+
/** Total streamia the caller receives from the settleable targets (token 1) */
|
|
11559
11559
|
premium1: bigint;
|
|
11560
11560
|
/** Block metadata */
|
|
11561
11561
|
_meta: BlockMeta;
|
|
@@ -11578,14 +11578,14 @@ interface SimulateSettlePremiumBatchParams {
|
|
|
11578
11578
|
blockNumber?: bigint;
|
|
11579
11579
|
}
|
|
11580
11580
|
/**
|
|
11581
|
-
* Simulate settling each target buyer's owed long
|
|
11581
|
+
* Simulate settling each target buyer's owed long streamia, all at one block.
|
|
11582
11582
|
*
|
|
11583
11583
|
* Individual failures (insolvent buyer, stale list, …) are soft: the target
|
|
11584
11584
|
* lands in the unsettleable partition instead of failing the batch. Only
|
|
11585
11585
|
* unexpected errors reject.
|
|
11586
11586
|
*
|
|
11587
11587
|
* @param params - Simulation parameters
|
|
11588
|
-
* @returns Partitioned targets with per-target
|
|
11588
|
+
* @returns Partitioned targets with per-target streamia and totals
|
|
11589
11589
|
*/
|
|
11590
11590
|
declare function simulateSettlePremiumBatch(params: SimulateSettlePremiumBatchParams): Promise<SettlePremiumBatchResult>;
|
|
11591
11591
|
/**
|
|
@@ -11623,7 +11623,7 @@ declare function simulateSettleSequence(params: SimulateSettleSequenceParams): P
|
|
|
11623
11623
|
//#endregion
|
|
11624
11624
|
//#region src/panoptic/v2/simulations/simulateSettlePremiumFrom.d.ts
|
|
11625
11625
|
/**
|
|
11626
|
-
* Parameters for simulating settling another account's long
|
|
11626
|
+
* Parameters for simulating settling another account's long streamia.
|
|
11627
11627
|
*/
|
|
11628
11628
|
interface SimulateSettlePremiumFromParams {
|
|
11629
11629
|
/** Public client */
|
|
@@ -11632,7 +11632,7 @@ interface SimulateSettlePremiumFromParams {
|
|
|
11632
11632
|
poolAddress: Address$1;
|
|
11633
11633
|
/** Caller (settler) account address */
|
|
11634
11634
|
account: Address$1;
|
|
11635
|
-
/** Account whose long
|
|
11635
|
+
/** Account whose long streamia is being settled */
|
|
11636
11636
|
user: Address$1;
|
|
11637
11637
|
/** Position IDs from the caller's account (full held list) */
|
|
11638
11638
|
positionIdListFrom: bigint[];
|
|
@@ -11644,14 +11644,14 @@ interface SimulateSettlePremiumFromParams {
|
|
|
11644
11644
|
blockNumber?: bigint;
|
|
11645
11645
|
}
|
|
11646
11646
|
/**
|
|
11647
|
-
* Simulate settling another account's accumulated long
|
|
11647
|
+
* Simulate settling another account's accumulated long streamia via `dispatchFrom`
|
|
11648
11648
|
* (equal-length `positionIdListTo`/`positionIdListToFinal` selects the settle mode).
|
|
11649
11649
|
*
|
|
11650
|
-
* The measured token flow is the CALLER's collateral delta — i.e. the
|
|
11650
|
+
* The measured token flow is the CALLER's collateral delta — i.e. the streamia
|
|
11651
11651
|
* the caller receives from the settlement (for chunks they sold).
|
|
11652
11652
|
*
|
|
11653
11653
|
* @param params - Simulation parameters
|
|
11654
|
-
* @returns Simulation result with settled
|
|
11654
|
+
* @returns Simulation result with settled streamia data or error
|
|
11655
11655
|
*/
|
|
11656
11656
|
declare function simulateSettlePremiumFrom(params: SimulateSettlePremiumFromParams): Promise<SimulationResult<SettlePremiumFromSimulation>>;
|
|
11657
11657
|
|
|
@@ -12093,7 +12093,7 @@ interface TokenShortfallRecoveryQuote {
|
|
|
12093
12093
|
/**
|
|
12094
12094
|
* Exact amount of `tokenOut` the temporary credit sources. Covers the whole
|
|
12095
12095
|
* dispatch, not just the first charge that reverted — a batch charges
|
|
12096
|
-
* commission/
|
|
12096
|
+
* commission/streamia per operation, so the total needed is usually larger
|
|
12097
12097
|
* than the `assetsRequested - assetBalance` of the first failure.
|
|
12098
12098
|
*/
|
|
12099
12099
|
amountOut: bigint;
|
|
@@ -12782,7 +12782,7 @@ interface PoolFormatterConfig {
|
|
|
12782
12782
|
* // Now use without passing decimals each time
|
|
12783
12783
|
* const priceStr = fmt.tickToPriceScaled(position.currentTick, 4n)
|
|
12784
12784
|
* const amount0Str = fmt.formatAmount0(collateral.assets, 4n)
|
|
12785
|
-
* const amount1Str = fmt.formatAmount1(
|
|
12785
|
+
* const amount1Str = fmt.formatAmount1(streamia.token1, 2n)
|
|
12786
12786
|
*
|
|
12787
12787
|
* // Parse user input
|
|
12788
12788
|
* const rawAmount0 = fmt.parseAmount0("1.5")
|
|
@@ -16895,7 +16895,7 @@ declare const riskEngineAbi: readonly [{
|
|
|
16895
16895
|
//#region src/panoptic/v2/greeks/marketPnl.d.ts
|
|
16896
16896
|
/** Values and prices use raw token units, matching the net-liquidation-value read. */
|
|
16897
16897
|
declare function netLiquidationValueInQuote(value0: bigint, value1: bigint, tick: bigint, isAssetToken0: boolean): Decimal;
|
|
16898
|
-
/** Apply the accrued-
|
|
16898
|
+
/** Apply the accrued-streamia offset and optional asset collateral to a relative NLV curve. */
|
|
16899
16899
|
declare function marketPnlInQuote({
|
|
16900
16900
|
relativeValue,
|
|
16901
16901
|
premium,
|
|
@@ -16952,7 +16952,7 @@ declare function marketRiskFromValues({
|
|
|
16952
16952
|
|
|
16953
16953
|
//#endregion
|
|
16954
16954
|
//#region src/panoptic/v2/greeks/positionVolatility.d.ts
|
|
16955
|
-
/** The
|
|
16955
|
+
/** The streamia-free position curve, expressed in one quote token's human units. */
|
|
16956
16956
|
declare function preparePositionGamma({
|
|
16957
16957
|
tokenId,
|
|
16958
16958
|
positionSize,
|
|
@@ -17019,6 +17019,8 @@ declare function valuePositionAccrual({
|
|
|
17019
17019
|
token0: bigint;
|
|
17020
17020
|
token1: bigint;
|
|
17021
17021
|
tick: bigint;
|
|
17022
|
+
/** Exact conversion price, when available; takes precedence over tick. */
|
|
17023
|
+
sqrtPriceX96?: bigint;
|
|
17022
17024
|
}[];
|
|
17023
17025
|
quoteIsToken0: boolean;
|
|
17024
17026
|
quoteDecimals: number;
|
|
@@ -17084,7 +17086,7 @@ type PositionValueCurve = {
|
|
|
17084
17086
|
value0: bigint;
|
|
17085
17087
|
value1: bigint;
|
|
17086
17088
|
}[];
|
|
17087
|
-
/** Stable identity for a position-dependent curve;
|
|
17089
|
+
/** Stable identity for a position-dependent curve; streamia and spot are separate inputs. */
|
|
17088
17090
|
declare function positionValueKey(positions: readonly PositionValueInput[]): string;
|
|
17089
17091
|
/** All changes in the curve's active liquidity, independent of the current market tick. */
|
|
17090
17092
|
declare function positionValueTicks(positions: readonly PositionValueInput[]): bigint[];
|
|
@@ -17216,7 +17218,7 @@ declare function useMarginBuffer(poolAddress: Address$1, tokenIds: bigint[], que
|
|
|
17216
17218
|
declare function useIsLiquidatable(poolAddress: Address$1, tokenIds: bigint[], queryAddress: Address$1, account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
17217
17219
|
declare function useAccountPremia(poolAddress: Address$1, tokenIds: bigint[], account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
17218
17220
|
/**
|
|
17219
|
-
* Unsettled short
|
|
17221
|
+
* Unsettled short streamia the account would forfeit by closing `tokenIds` now
|
|
17220
17222
|
* (owed-including-pending minus available-to-collect).
|
|
17221
17223
|
*/
|
|
17222
17224
|
declare function useForfeitablePremium(poolAddress: Address$1, tokenIds: bigint[], account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
@@ -17518,9 +17520,9 @@ declare function useSimulateWithdraw(params?: OmitClient<SimulateWithdrawParams>
|
|
|
17518
17520
|
declare function useSimulateLiquidate(poolAddress: Address$1, params?: OmitClientAndPool<SimulateLiquidateParams>): QueryObserverResult<TData, TError>;
|
|
17519
17521
|
declare function useSimulateForceExercise(poolAddress: Address$1, params?: OmitClientAndPool<SimulateForceExerciseParams>): QueryObserverResult<TData, TError>;
|
|
17520
17522
|
/**
|
|
17521
|
-
* Simulate settling several buyers' owed
|
|
17523
|
+
* Simulate settling several buyers' owed streamia at one block, partitioning
|
|
17522
17524
|
* them into settleable vs unsettleable and summing the caller's unlocked
|
|
17523
|
-
*
|
|
17525
|
+
* streamia. Refetches on every call (staleTime 0) so the partition reflects
|
|
17524
17526
|
* current chain state.
|
|
17525
17527
|
*/
|
|
17526
17528
|
declare function useSimulateSettlePremiumBatch(poolAddress: Address$1, params?: OmitClientAndPool<SimulateSettlePremiumBatchParams>): QueryObserverResult<TData, TError>;
|
|
@@ -17848,7 +17850,7 @@ declare const mutationEffects: {
|
|
|
17848
17850
|
*/
|
|
17849
17851
|
readonly liquidate: (params: MutationEffectParams) => readonly (readonly string[])[];
|
|
17850
17852
|
/**
|
|
17851
|
-
* Queries to invalidate after settling accumulated
|
|
17853
|
+
* Queries to invalidate after settling accumulated streamia.
|
|
17852
17854
|
*/
|
|
17853
17855
|
readonly settleAccumulatedPremia: (params: MutationEffectParams) => readonly (readonly string[])[];
|
|
17854
17856
|
/**
|
|
@@ -18105,15 +18107,15 @@ declare const queryKeys: {
|
|
|
18105
18107
|
*/
|
|
18106
18108
|
readonly marginBuffer: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "marginBuffer", string, Address, Address];
|
|
18107
18109
|
/**
|
|
18108
|
-
* Key for account
|
|
18110
|
+
* Key for account streamia.
|
|
18109
18111
|
*/
|
|
18110
18112
|
readonly accountPremia: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "accountPremia", string, Address, Address];
|
|
18111
18113
|
/**
|
|
18112
|
-
* Key for positions with
|
|
18114
|
+
* Key for positions with streamia.
|
|
18113
18115
|
*/
|
|
18114
18116
|
readonly positionsWithPremia: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "positionsWithPremia", string, Address, Address];
|
|
18115
18117
|
/**
|
|
18116
|
-
* Key prefix for forfeitable
|
|
18118
|
+
* Key prefix for forfeitable streamia. Used both as the query key prefix (the
|
|
18117
18119
|
* hook appends the client scope and tokenIds) and for prefix invalidation
|
|
18118
18120
|
* after settle / force-exercise mutations.
|
|
18119
18121
|
*/
|