@pear-protocol/types 2.4.0 → 2.5.0
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.
|
@@ -523,8 +523,14 @@ export declare const VaultOpenPosition: z.ZodObject<{
|
|
|
523
523
|
}, z.core.$strip>;
|
|
524
524
|
export type VaultOpenPosition = z.output<typeof VaultOpenPosition>;
|
|
525
525
|
/**
|
|
526
|
-
* The public, vault-scoped view of one closed leg: entry, exit and PnL,
|
|
527
|
-
* and
|
|
526
|
+
* The public, vault-scoped view of one closed leg: entry, exit, committed cash and PnL,
|
|
527
|
+
* with fees and funding withheld. Same allowlist rule as `VaultOpenPositionLeg`.
|
|
528
|
+
* `entryNotional` is this leg's peak committed cash, not an additive share of the position.
|
|
529
|
+
* For basket ratios, divide each leg's value by the sum of all leg entry notionals.
|
|
530
|
+
* "0" means committed cash is unknowable after an unpriced synthetic entry; clients
|
|
531
|
+
* must leave the basket quote unknown rather than treat that leg as weightless.
|
|
532
|
+
* Either VWAP is absent on a leg the ledger never priced, and absence binds the same
|
|
533
|
+
* way: quote the side that priced, and leave the side that did not unknown.
|
|
528
534
|
*/
|
|
529
535
|
export declare const VaultClosedPositionLeg: z.ZodObject<{
|
|
530
536
|
side: z.ZodEnum<{
|
|
@@ -534,14 +540,15 @@ export declare const VaultClosedPositionLeg: z.ZodObject<{
|
|
|
534
540
|
asset: z.ZodString;
|
|
535
541
|
grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
536
542
|
netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
543
|
+
entryNotional: z.ZodString;
|
|
537
544
|
entryVwap: z.ZodOptional<z.ZodString>;
|
|
538
545
|
exitVwap: z.ZodOptional<z.ZodString>;
|
|
539
546
|
}, z.core.$strip>;
|
|
540
547
|
export type VaultClosedPositionLeg = z.output<typeof VaultClosedPositionLeg>;
|
|
541
548
|
/**
|
|
542
|
-
* The public, vault-scoped view of one closed position: lifecycle, position-level PnL
|
|
543
|
-
*
|
|
544
|
-
* `netPnl` never folds it in
|
|
549
|
+
* The public, vault-scoped view of one closed position: lifecycle, position-level PnL,
|
|
550
|
+
* and reduced legs with the inputs needed to quote the basket. Funding is withheld for
|
|
551
|
+
* the same reason as on `VaultOpenPosition`; `netPnl` never folds it in.
|
|
545
552
|
*/
|
|
546
553
|
export declare const VaultClosedPosition: z.ZodObject<{
|
|
547
554
|
status: z.ZodLiteral<"CLOSED">;
|
|
@@ -571,6 +578,7 @@ export declare const VaultClosedPosition: z.ZodObject<{
|
|
|
571
578
|
asset: z.ZodString;
|
|
572
579
|
grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
573
580
|
netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
581
|
+
entryNotional: z.ZodString;
|
|
574
582
|
entryVwap: z.ZodOptional<z.ZodString>;
|
|
575
583
|
exitVwap: z.ZodOptional<z.ZodString>;
|
|
576
584
|
}, z.core.$strip>>;
|
|
@@ -379,6 +379,7 @@ export declare const VaultClosedPositionListResponse: z.ZodObject<{
|
|
|
379
379
|
asset: z.ZodString;
|
|
380
380
|
grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
381
381
|
netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
382
|
+
entryNotional: z.ZodString;
|
|
382
383
|
entryVwap: z.ZodOptional<z.ZodString>;
|
|
383
384
|
exitVwap: z.ZodOptional<z.ZodString>;
|
|
384
385
|
}, z.core.$strip>>;
|