@uniswap/client-trading 0.8.0 → 0.8.5

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.
@@ -7249,7 +7249,7 @@ export declare class CreatePlanRequest extends Message<CreatePlanRequest> {
7249
7249
  */
7250
7250
  routing: SwapType;
7251
7251
  /**
7252
- * @generated from field: trading.v1.ChainedQuote quote = 2;
7252
+ * @generated from field: optional trading.v1.ChainedQuote quote = 2;
7253
7253
  */
7254
7254
  quote?: ChainedQuote;
7255
7255
  /**
@@ -7264,6 +7264,15 @@ export declare class CreatePlanRequest extends Message<CreatePlanRequest> {
7264
7264
  * @generated from field: optional trading.v1.EarnIntent earn_intent = 5;
7265
7265
  */
7266
7266
  earnIntent?: EarnIntent;
7267
+ /**
7268
+ * The margin quote, echoed back. Exactly one of `quote` and `margin_quote`
7269
+ * is accepted. Every bound and the pool are re-derived from the venue here
7270
+ * rather than trusted, so this names the shape of the position -- market,
7271
+ * venue, sub-account, operation -- and never the numbers it executes on.
7272
+ *
7273
+ * @generated from field: optional trading.v1.MarginQuoteResponse margin_quote = 6;
7274
+ */
7275
+ marginQuote?: MarginQuoteResponse;
7267
7276
  constructor(data?: PartialMessage<CreatePlanRequest>);
7268
7277
  static readonly runtime: typeof proto3;
7269
7278
  static readonly typeName = "trading.v1.CreatePlanRequest";
@@ -7294,6 +7303,50 @@ export declare class GetPlanRequest extends Message<GetPlanRequest> {
7294
7303
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetPlanRequest;
7295
7304
  static equals(a: GetPlanRequest | PlainMessage<GetPlanRequest> | undefined, b: GetPlanRequest | PlainMessage<GetPlanRequest> | undefined): boolean;
7296
7305
  }
7306
+ /**
7307
+ * What the plan is doing to which position. The step type stays
7308
+ * MARGIN_EXECUTE for every action key, so `intent` is where a client reads
7309
+ * which of the ten it is.
7310
+ *
7311
+ * @generated from message trading.v1.MarginPlanIntent
7312
+ */
7313
+ export declare class MarginPlanIntent extends Message<MarginPlanIntent> {
7314
+ /**
7315
+ * @generated from field: trading.v1.MarginIntent intent = 1;
7316
+ */
7317
+ intent: MarginIntent;
7318
+ /**
7319
+ * `<collateral>-<debt>-<venue>`. A display key: resolve a market by tokens
7320
+ * and venue, never by parsing this.
7321
+ *
7322
+ * @generated from field: string market_key = 2;
7323
+ */
7324
+ marketKey: string;
7325
+ /**
7326
+ * @generated from field: trading.v1.MarginVenue venue = 3;
7327
+ */
7328
+ venue: MarginVenue;
7329
+ /**
7330
+ * @generated from field: string collateral_token = 4;
7331
+ */
7332
+ collateralToken: string;
7333
+ /**
7334
+ * @generated from field: string debt_token = 5;
7335
+ */
7336
+ debtToken: string;
7337
+ /**
7338
+ * @generated from field: string sub_id = 6;
7339
+ */
7340
+ subId: string;
7341
+ constructor(data?: PartialMessage<MarginPlanIntent>);
7342
+ static readonly runtime: typeof proto3;
7343
+ static readonly typeName = "trading.v1.MarginPlanIntent";
7344
+ static readonly fields: FieldList;
7345
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MarginPlanIntent;
7346
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MarginPlanIntent;
7347
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginPlanIntent;
7348
+ static equals(a: MarginPlanIntent | PlainMessage<MarginPlanIntent> | undefined, b: MarginPlanIntent | PlainMessage<MarginPlanIntent> | undefined): boolean;
7349
+ }
7297
7350
  /**
7298
7351
  * @generated from message trading.v1.PlanResponse
7299
7352
  */
@@ -7386,6 +7439,13 @@ export declare class PlanResponse extends Message<PlanResponse> {
7386
7439
  * @generated from field: optional trading.v1.EarnQuoteIntent earn_intent = 22;
7387
7440
  */
7388
7441
  earnIntent?: EarnQuoteIntent;
7442
+ /**
7443
+ * Present iff this plan carries a margin action. Its absence is how a client
7444
+ * tells a margin plan from any other, so it is the whole block or nothing.
7445
+ *
7446
+ * @generated from field: optional trading.v1.MarginPlanIntent margin_intent = 23;
7447
+ */
7448
+ marginIntent?: MarginPlanIntent;
7389
7449
  constructor(data?: PartialMessage<PlanResponse>);
7390
7450
  static readonly runtime: typeof proto3;
7391
7451
  static readonly typeName = "trading.v1.PlanResponse";
@@ -8200,6 +8260,10 @@ export declare class MarginSwapConfig extends Message<MarginSwapConfig> {
8200
8260
  * @generated from field: repeated trading.v1.Protocols protocols = 3;
8201
8261
  */
8202
8262
  protocols: Protocols[];
8263
+ /**
8264
+ * @generated from field: optional trading.v1.RoutingPreference routing_preference = 4;
8265
+ */
8266
+ routingPreference?: RoutingPreference;
8203
8267
  constructor(data?: PartialMessage<MarginSwapConfig>);
8204
8268
  static readonly runtime: typeof proto3;
8205
8269
  static readonly typeName = "trading.v1.MarginSwapConfig";
@@ -8546,10 +8546,11 @@ CreatePlanRequest.runtime = proto3;
8546
8546
  CreatePlanRequest.typeName = "trading.v1.CreatePlanRequest";
8547
8547
  CreatePlanRequest.fields = proto3.util.newFieldList(() => [
8548
8548
  { no: 1, name: "routing", kind: "enum", T: proto3.getEnumType(SwapType) },
8549
- { no: 2, name: "quote", kind: "message", T: ChainedQuote },
8549
+ { no: 2, name: "quote", kind: "message", T: ChainedQuote, opt: true },
8550
8550
  { no: 3, name: "wallet_execution_context", kind: "message", T: WalletExecutionContext, opt: true },
8551
8551
  { no: 4, name: "urgency_overrides", kind: "message", T: UrgencyWithOverrides, opt: true },
8552
8552
  { no: 5, name: "earn_intent", kind: "message", T: EarnIntent, opt: true },
8553
+ { no: 6, name: "margin_quote", kind: "message", T: MarginQuoteResponse, opt: true },
8553
8554
  ]);
8554
8555
  /**
8555
8556
  * @generated from message trading.v1.GetPlanRequest
@@ -8586,6 +8587,68 @@ GetPlanRequest.fields = proto3.util.newFieldList(() => [
8586
8587
  { no: 1, name: "plan_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
8587
8588
  { no: 2, name: "force_refresh", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
8588
8589
  ]);
8590
+ /**
8591
+ * What the plan is doing to which position. The step type stays
8592
+ * MARGIN_EXECUTE for every action key, so `intent` is where a client reads
8593
+ * which of the ten it is.
8594
+ *
8595
+ * @generated from message trading.v1.MarginPlanIntent
8596
+ */
8597
+ export class MarginPlanIntent extends Message {
8598
+ constructor(data) {
8599
+ super();
8600
+ /**
8601
+ * @generated from field: trading.v1.MarginIntent intent = 1;
8602
+ */
8603
+ this.intent = MarginIntent.OPEN;
8604
+ /**
8605
+ * `<collateral>-<debt>-<venue>`. A display key: resolve a market by tokens
8606
+ * and venue, never by parsing this.
8607
+ *
8608
+ * @generated from field: string market_key = 2;
8609
+ */
8610
+ this.marketKey = "";
8611
+ /**
8612
+ * @generated from field: trading.v1.MarginVenue venue = 3;
8613
+ */
8614
+ this.venue = MarginVenue.MORPHO;
8615
+ /**
8616
+ * @generated from field: string collateral_token = 4;
8617
+ */
8618
+ this.collateralToken = "";
8619
+ /**
8620
+ * @generated from field: string debt_token = 5;
8621
+ */
8622
+ this.debtToken = "";
8623
+ /**
8624
+ * @generated from field: string sub_id = 6;
8625
+ */
8626
+ this.subId = "";
8627
+ proto3.util.initPartial(data, this);
8628
+ }
8629
+ static fromBinary(bytes, options) {
8630
+ return new MarginPlanIntent().fromBinary(bytes, options);
8631
+ }
8632
+ static fromJson(jsonValue, options) {
8633
+ return new MarginPlanIntent().fromJson(jsonValue, options);
8634
+ }
8635
+ static fromJsonString(jsonString, options) {
8636
+ return new MarginPlanIntent().fromJsonString(jsonString, options);
8637
+ }
8638
+ static equals(a, b) {
8639
+ return proto3.util.equals(MarginPlanIntent, a, b);
8640
+ }
8641
+ }
8642
+ MarginPlanIntent.runtime = proto3;
8643
+ MarginPlanIntent.typeName = "trading.v1.MarginPlanIntent";
8644
+ MarginPlanIntent.fields = proto3.util.newFieldList(() => [
8645
+ { no: 1, name: "intent", kind: "enum", T: proto3.getEnumType(MarginIntent) },
8646
+ { no: 2, name: "market_key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
8647
+ { no: 3, name: "venue", kind: "enum", T: proto3.getEnumType(MarginVenue) },
8648
+ { no: 4, name: "collateral_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
8649
+ { no: 5, name: "debt_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
8650
+ { no: 6, name: "sub_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
8651
+ ]);
8589
8652
  /**
8590
8653
  * @generated from message trading.v1.PlanResponse
8591
8654
  */
@@ -8676,6 +8739,7 @@ PlanResponse.fields = proto3.util.newFieldList(() => [
8676
8739
  { no: 20, name: "auto_slippage", kind: "enum", T: proto3.getEnumType(AutoSlippage), opt: true },
8677
8740
  { no: 21, name: "last_user_action_at", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
8678
8741
  { no: 22, name: "earn_intent", kind: "message", T: EarnQuoteIntent, opt: true },
8742
+ { no: 23, name: "margin_intent", kind: "message", T: MarginPlanIntent, opt: true },
8679
8743
  ]);
8680
8744
  /**
8681
8745
  * @generated from enum trading.v1.PlanResponse.PlanStatus
@@ -9703,6 +9767,7 @@ MarginSwapConfig.fields = proto3.util.newFieldList(() => [
9703
9767
  { no: 1, name: "slippage_tolerance", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
9704
9768
  { no: 2, name: "auto_slippage", kind: "enum", T: proto3.getEnumType(AutoSlippage), opt: true },
9705
9769
  { no: 3, name: "protocols", kind: "enum", T: proto3.getEnumType(Protocols), repeated: true },
9770
+ { no: 4, name: "routing_preference", kind: "enum", T: proto3.getEnumType(RoutingPreference), opt: true },
9706
9771
  ]);
9707
9772
  /**
9708
9773
  * @generated from message trading.v1.MarginQuoteRequest
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-trading",
3
- "version": "0.8.0",
3
+ "version": "0.8.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },