@uniswap/client-trading 0.11.20 → 0.11.22

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.
@@ -8935,15 +8935,15 @@ export declare class MarginExecutionLeg extends Message<MarginExecutionLeg> {
8935
8935
  static equals(a: MarginExecutionLeg | PlainMessage<MarginExecutionLeg> | undefined, b: MarginExecutionLeg | PlainMessage<MarginExecutionLeg> | undefined): boolean;
8936
8936
  }
8937
8937
  /**
8938
- * The wallet-side swap as priced, in the same shape /quote uses for an ordinary
8939
- * swap, so the funding leg reads natively rather than inventing a fourth
8940
- * swap-quote vocabulary.
8938
+ * The wallet-side funding as priced, in the same shape /quote uses for an
8939
+ * ordinary swap, so the funding leg reads natively rather than inventing a
8940
+ * fourth swap-quote vocabulary.
8941
8941
  *
8942
- * Present IFF a swap was actually priced, so its presence is the signal that
8943
- * one happened. Absent when the action moves no equity, and absent when the
8944
- * caller already holds the collateral: paying in the collateral itself needs no
8945
- * funding swap, and a block whose input and output name the same token and the
8946
- * same amount describes no trade.
8942
+ * Present IFF funding was actually priced: a swap on the position's chain, or a
8943
+ * route from another chain. Absent when the action moves no equity, and absent
8944
+ * when the caller already holds the collateral on the position's chain: paying
8945
+ * in the collateral itself needs no funding, and a block whose input and output
8946
+ * name the same token and the same amount describes no trade.
8947
8947
  *
8948
8948
  * 7 was auto_slippage: a request-side mode, never an answer. What a caller
8949
8949
  * needs back is the percent it RESOLVED to, which slippage_tolerance already
@@ -8989,6 +8989,28 @@ export declare class MarginFunding extends Message<MarginFunding> {
8989
8989
  * @generated from field: optional double price_impact = 10;
8990
8990
  */
8991
8991
  priceImpact?: number;
8992
+ /**
8993
+ * The funding's steps in order, as /quote reports a chained route's: the
8994
+ * approvals the swapper still needs, then the route. Present whenever this
8995
+ * block is.
8996
+ *
8997
+ * @generated from field: repeated trading.v1.TruncatedPlanStep steps = 11;
8998
+ */
8999
+ steps: TruncatedPlanStep[];
9000
+ /**
9001
+ * Cross-chain pay-in only: estimated milliseconds to complete the funding
9002
+ * steps.
9003
+ *
9004
+ * @generated from field: optional int32 time_estimate_ms = 12;
9005
+ */
9006
+ timeEstimateMs?: number;
9007
+ /**
9008
+ * Cross-chain pay-in only: decimal USD, the gas of every funding step on both
9009
+ * chains.
9010
+ *
9011
+ * @generated from field: optional string gas_fee_usd = 13;
9012
+ */
9013
+ gasFeeUsd?: string;
8992
9014
  constructor(data?: PartialMessage<MarginFunding>);
8993
9015
  static readonly runtime: typeof proto3;
8994
9016
  static readonly typeName = "trading.v1.MarginFunding";
@@ -9262,8 +9284,14 @@ export declare class MarginPositionRow extends Message<MarginPositionRow> {
9262
9284
  */
9263
9285
  roe?: string;
9264
9286
  /**
9265
- * ACTIVE only. Read on chain per request, never cached: a stale health factor
9266
- * is the one number a caller must not act on.
9287
+ * ACTIVE only. Balances, `oracle_price` and the risk fields below it are read
9288
+ * on chain per request, never cached: a stale health factor is the one number
9289
+ * a caller must not act on. `equity`, `leverage`, `unrealized_pnl`, `roe` and
9290
+ * `unrealized_pnl_in_debt` are valued at `current_price`, or at
9291
+ * `oracle_price` when it is absent. `leverage` is absent when `equity` is
9292
+ * zero at that price, or when `equity` is absent and the LTV is at or above
9293
+ * 1; `health_factor` can still be above 1e18 then, as the venue liquidates
9294
+ * at `oracle_price`.
9267
9295
  *
9268
9296
  * @generated from field: optional string equity = 12;
9269
9297
  */
@@ -9276,6 +9304,15 @@ export declare class MarginPositionRow extends Message<MarginPositionRow> {
9276
9304
  * @generated from field: optional string oracle_price = 14;
9277
9305
  */
9278
9306
  oraclePrice?: string;
9307
+ /**
9308
+ * ACTIVE only. The market price the position is marked at, which can differ
9309
+ * from `oracle_price`. Counter per exposure, 1e18-scaled, in the same trader
9310
+ * terms as `oracle_price`. Unlike the risk fields it can be served from a
9311
+ * short-lived cache. Absent when none was read.
9312
+ *
9313
+ * @generated from field: optional string current_price = 38;
9314
+ */
9315
+ currentPrice?: string;
9279
9316
  /**
9280
9317
  * In TRADER terms, so a short's mark and liquidation price are both
9281
9318
  * reciprocated; see `displayRiskPrices`.
@@ -10298,15 +10298,15 @@ MarginExecutionLeg.fields = proto3.util.newFieldList(() => [
10298
10298
  { no: 3, name: "operations", kind: "message", T: MarginOperation, repeated: true },
10299
10299
  ]);
10300
10300
  /**
10301
- * The wallet-side swap as priced, in the same shape /quote uses for an ordinary
10302
- * swap, so the funding leg reads natively rather than inventing a fourth
10303
- * swap-quote vocabulary.
10301
+ * The wallet-side funding as priced, in the same shape /quote uses for an
10302
+ * ordinary swap, so the funding leg reads natively rather than inventing a
10303
+ * fourth swap-quote vocabulary.
10304
10304
  *
10305
- * Present IFF a swap was actually priced, so its presence is the signal that
10306
- * one happened. Absent when the action moves no equity, and absent when the
10307
- * caller already holds the collateral: paying in the collateral itself needs no
10308
- * funding swap, and a block whose input and output name the same token and the
10309
- * same amount describes no trade.
10305
+ * Present IFF funding was actually priced: a swap on the position's chain, or a
10306
+ * route from another chain. Absent when the action moves no equity, and absent
10307
+ * when the caller already holds the collateral on the position's chain: paying
10308
+ * in the collateral itself needs no funding, and a block whose input and output
10309
+ * name the same token and the same amount describes no trade.
10310
10310
  *
10311
10311
  * 7 was auto_slippage: a request-side mode, never an answer. What a caller
10312
10312
  * needs back is the percent it RESOLVED to, which slippage_tolerance already
@@ -10324,6 +10324,14 @@ export class MarginFunding extends Message {
10324
10324
  * @generated from field: int32 token_in_chain_id = 1;
10325
10325
  */
10326
10326
  this.tokenInChainId = 0;
10327
+ /**
10328
+ * The funding's steps in order, as /quote reports a chained route's: the
10329
+ * approvals the swapper still needs, then the route. Present whenever this
10330
+ * block is.
10331
+ *
10332
+ * @generated from field: repeated trading.v1.TruncatedPlanStep steps = 11;
10333
+ */
10334
+ this.steps = [];
10327
10335
  proto3.util.initPartial(data, this);
10328
10336
  }
10329
10337
  static fromBinary(bytes, options) {
@@ -10348,6 +10356,9 @@ MarginFunding.fields = proto3.util.newFieldList(() => [
10348
10356
  { no: 6, name: "slippage_tolerance", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
10349
10357
  { no: 9, name: "min_bridge_out", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10350
10358
  { no: 10, name: "price_impact", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
10359
+ { no: 11, name: "steps", kind: "message", T: TruncatedPlanStep, repeated: true },
10360
+ { no: 12, name: "time_estimate_ms", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
10361
+ { no: 13, name: "gas_fee_usd", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10351
10362
  ]);
10352
10363
  /**
10353
10364
  * Everything POST /plan needs, and nothing it does not. This subtree is what a
@@ -10561,6 +10572,7 @@ MarginPositionRow.fields = proto3.util.newFieldList(() => [
10561
10572
  { no: 12, name: "equity", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10562
10573
  { no: 13, name: "leverage", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10563
10574
  { no: 14, name: "oracle_price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10575
+ { no: 38, name: "current_price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10564
10576
  { no: 15, name: "liquidation_price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10565
10577
  { no: 16, name: "buffer", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10566
10578
  { no: 17, name: "health_factor", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-trading",
3
- "version": "0.11.20",
3
+ "version": "0.11.22",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },