@uniswap/client-data-api 0.0.281 → 0.0.282

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.
@@ -92,6 +92,76 @@ export declare enum EarnPlanAction {
92
92
  */
93
93
  WITHDRAW = 2
94
94
  }
95
+ /**
96
+ * @generated from enum data.v1.MarginPlanAction
97
+ */
98
+ export declare enum MarginPlanAction {
99
+ /**
100
+ * @generated from enum value: MARGIN_PLAN_ACTION_UNKNOWN = 0;
101
+ */
102
+ UNKNOWN = 0,
103
+ /**
104
+ * @generated from enum value: MARGIN_PLAN_ACTION_OPEN = 1;
105
+ */
106
+ OPEN = 1,
107
+ /**
108
+ * @generated from enum value: MARGIN_PLAN_ACTION_CLOSE = 2;
109
+ */
110
+ CLOSE = 2,
111
+ /**
112
+ * @generated from enum value: MARGIN_PLAN_ACTION_INCREASE_LEVERAGE = 3;
113
+ */
114
+ INCREASE_LEVERAGE = 3,
115
+ /**
116
+ * @generated from enum value: MARGIN_PLAN_ACTION_DECREASE_LEVERAGE = 4;
117
+ */
118
+ DECREASE_LEVERAGE = 4,
119
+ /**
120
+ * @generated from enum value: MARGIN_PLAN_ACTION_ADD_EQUITY = 5;
121
+ */
122
+ ADD_EQUITY = 5,
123
+ /**
124
+ * @generated from enum value: MARGIN_PLAN_ACTION_WITHDRAW_EQUITY = 6;
125
+ */
126
+ WITHDRAW_EQUITY = 6,
127
+ /**
128
+ * @generated from enum value: MARGIN_PLAN_ACTION_ADD_EQUITY_AND_INCREASE_LEVERAGE = 7;
129
+ */
130
+ ADD_EQUITY_AND_INCREASE_LEVERAGE = 7,
131
+ /**
132
+ * @generated from enum value: MARGIN_PLAN_ACTION_ADD_EQUITY_AND_DECREASE_LEVERAGE = 8;
133
+ */
134
+ ADD_EQUITY_AND_DECREASE_LEVERAGE = 8,
135
+ /**
136
+ * @generated from enum value: MARGIN_PLAN_ACTION_WITHDRAW_EQUITY_AND_INCREASE_LEVERAGE = 9;
137
+ */
138
+ WITHDRAW_EQUITY_AND_INCREASE_LEVERAGE = 9,
139
+ /**
140
+ * @generated from enum value: MARGIN_PLAN_ACTION_WITHDRAW_EQUITY_AND_DECREASE_LEVERAGE = 10;
141
+ */
142
+ WITHDRAW_EQUITY_AND_DECREASE_LEVERAGE = 10
143
+ }
144
+ /**
145
+ * @generated from enum data.v1.MarginPlanVenue
146
+ */
147
+ export declare enum MarginPlanVenue {
148
+ /**
149
+ * @generated from enum value: MARGIN_PLAN_VENUE_UNKNOWN = 0;
150
+ */
151
+ UNKNOWN = 0,
152
+ /**
153
+ * @generated from enum value: MARGIN_PLAN_VENUE_MORPHO = 1;
154
+ */
155
+ MORPHO = 1,
156
+ /**
157
+ * @generated from enum value: MARGIN_PLAN_VENUE_AAVE_V3 = 2;
158
+ */
159
+ AAVE_V3 = 2,
160
+ /**
161
+ * @generated from enum value: MARGIN_PLAN_VENUE_AAVE_V4 = 3;
162
+ */
163
+ AAVE_V4 = 3
164
+ }
95
165
  /**
96
166
  * @generated from enum data.v1.PlanStepStatus
97
167
  */
@@ -126,6 +126,99 @@ proto3.util.setEnumType(EarnPlanAction, "data.v1.EarnPlanAction", [
126
126
  { no: 1, name: "EARN_PLAN_ACTION_DEPOSIT" },
127
127
  { no: 2, name: "EARN_PLAN_ACTION_WITHDRAW" },
128
128
  ]);
129
+ /**
130
+ * @generated from enum data.v1.MarginPlanAction
131
+ */
132
+ export var MarginPlanAction;
133
+ (function (MarginPlanAction) {
134
+ /**
135
+ * @generated from enum value: MARGIN_PLAN_ACTION_UNKNOWN = 0;
136
+ */
137
+ MarginPlanAction[MarginPlanAction["UNKNOWN"] = 0] = "UNKNOWN";
138
+ /**
139
+ * @generated from enum value: MARGIN_PLAN_ACTION_OPEN = 1;
140
+ */
141
+ MarginPlanAction[MarginPlanAction["OPEN"] = 1] = "OPEN";
142
+ /**
143
+ * @generated from enum value: MARGIN_PLAN_ACTION_CLOSE = 2;
144
+ */
145
+ MarginPlanAction[MarginPlanAction["CLOSE"] = 2] = "CLOSE";
146
+ /**
147
+ * @generated from enum value: MARGIN_PLAN_ACTION_INCREASE_LEVERAGE = 3;
148
+ */
149
+ MarginPlanAction[MarginPlanAction["INCREASE_LEVERAGE"] = 3] = "INCREASE_LEVERAGE";
150
+ /**
151
+ * @generated from enum value: MARGIN_PLAN_ACTION_DECREASE_LEVERAGE = 4;
152
+ */
153
+ MarginPlanAction[MarginPlanAction["DECREASE_LEVERAGE"] = 4] = "DECREASE_LEVERAGE";
154
+ /**
155
+ * @generated from enum value: MARGIN_PLAN_ACTION_ADD_EQUITY = 5;
156
+ */
157
+ MarginPlanAction[MarginPlanAction["ADD_EQUITY"] = 5] = "ADD_EQUITY";
158
+ /**
159
+ * @generated from enum value: MARGIN_PLAN_ACTION_WITHDRAW_EQUITY = 6;
160
+ */
161
+ MarginPlanAction[MarginPlanAction["WITHDRAW_EQUITY"] = 6] = "WITHDRAW_EQUITY";
162
+ /**
163
+ * @generated from enum value: MARGIN_PLAN_ACTION_ADD_EQUITY_AND_INCREASE_LEVERAGE = 7;
164
+ */
165
+ MarginPlanAction[MarginPlanAction["ADD_EQUITY_AND_INCREASE_LEVERAGE"] = 7] = "ADD_EQUITY_AND_INCREASE_LEVERAGE";
166
+ /**
167
+ * @generated from enum value: MARGIN_PLAN_ACTION_ADD_EQUITY_AND_DECREASE_LEVERAGE = 8;
168
+ */
169
+ MarginPlanAction[MarginPlanAction["ADD_EQUITY_AND_DECREASE_LEVERAGE"] = 8] = "ADD_EQUITY_AND_DECREASE_LEVERAGE";
170
+ /**
171
+ * @generated from enum value: MARGIN_PLAN_ACTION_WITHDRAW_EQUITY_AND_INCREASE_LEVERAGE = 9;
172
+ */
173
+ MarginPlanAction[MarginPlanAction["WITHDRAW_EQUITY_AND_INCREASE_LEVERAGE"] = 9] = "WITHDRAW_EQUITY_AND_INCREASE_LEVERAGE";
174
+ /**
175
+ * @generated from enum value: MARGIN_PLAN_ACTION_WITHDRAW_EQUITY_AND_DECREASE_LEVERAGE = 10;
176
+ */
177
+ MarginPlanAction[MarginPlanAction["WITHDRAW_EQUITY_AND_DECREASE_LEVERAGE"] = 10] = "WITHDRAW_EQUITY_AND_DECREASE_LEVERAGE";
178
+ })(MarginPlanAction || (MarginPlanAction = {}));
179
+ // Retrieve enum metadata with: proto3.getEnumType(MarginPlanAction)
180
+ proto3.util.setEnumType(MarginPlanAction, "data.v1.MarginPlanAction", [
181
+ { no: 0, name: "MARGIN_PLAN_ACTION_UNKNOWN" },
182
+ { no: 1, name: "MARGIN_PLAN_ACTION_OPEN" },
183
+ { no: 2, name: "MARGIN_PLAN_ACTION_CLOSE" },
184
+ { no: 3, name: "MARGIN_PLAN_ACTION_INCREASE_LEVERAGE" },
185
+ { no: 4, name: "MARGIN_PLAN_ACTION_DECREASE_LEVERAGE" },
186
+ { no: 5, name: "MARGIN_PLAN_ACTION_ADD_EQUITY" },
187
+ { no: 6, name: "MARGIN_PLAN_ACTION_WITHDRAW_EQUITY" },
188
+ { no: 7, name: "MARGIN_PLAN_ACTION_ADD_EQUITY_AND_INCREASE_LEVERAGE" },
189
+ { no: 8, name: "MARGIN_PLAN_ACTION_ADD_EQUITY_AND_DECREASE_LEVERAGE" },
190
+ { no: 9, name: "MARGIN_PLAN_ACTION_WITHDRAW_EQUITY_AND_INCREASE_LEVERAGE" },
191
+ { no: 10, name: "MARGIN_PLAN_ACTION_WITHDRAW_EQUITY_AND_DECREASE_LEVERAGE" },
192
+ ]);
193
+ /**
194
+ * @generated from enum data.v1.MarginPlanVenue
195
+ */
196
+ export var MarginPlanVenue;
197
+ (function (MarginPlanVenue) {
198
+ /**
199
+ * @generated from enum value: MARGIN_PLAN_VENUE_UNKNOWN = 0;
200
+ */
201
+ MarginPlanVenue[MarginPlanVenue["UNKNOWN"] = 0] = "UNKNOWN";
202
+ /**
203
+ * @generated from enum value: MARGIN_PLAN_VENUE_MORPHO = 1;
204
+ */
205
+ MarginPlanVenue[MarginPlanVenue["MORPHO"] = 1] = "MORPHO";
206
+ /**
207
+ * @generated from enum value: MARGIN_PLAN_VENUE_AAVE_V3 = 2;
208
+ */
209
+ MarginPlanVenue[MarginPlanVenue["AAVE_V3"] = 2] = "AAVE_V3";
210
+ /**
211
+ * @generated from enum value: MARGIN_PLAN_VENUE_AAVE_V4 = 3;
212
+ */
213
+ MarginPlanVenue[MarginPlanVenue["AAVE_V4"] = 3] = "AAVE_V4";
214
+ })(MarginPlanVenue || (MarginPlanVenue = {}));
215
+ // Retrieve enum metadata with: proto3.getEnumType(MarginPlanVenue)
216
+ proto3.util.setEnumType(MarginPlanVenue, "data.v1.MarginPlanVenue", [
217
+ { no: 0, name: "MARGIN_PLAN_VENUE_UNKNOWN" },
218
+ { no: 1, name: "MARGIN_PLAN_VENUE_MORPHO" },
219
+ { no: 2, name: "MARGIN_PLAN_VENUE_AAVE_V3" },
220
+ { no: 3, name: "MARGIN_PLAN_VENUE_AAVE_V4" },
221
+ ]);
129
222
  /**
130
223
  * @generated from enum data.v1.PlanStepStatus
131
224
  */
@@ -1,6 +1,6 @@
1
1
  import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
2
  import { Message, proto3 } from "@bufbuild/protobuf";
3
- import { EarnPlanAction, PlanStatus, PlanStepStatus, SwapType } from "./plan_pb.js";
3
+ import { EarnPlanAction, MarginPlanAction, MarginPlanVenue, PlanStatus, PlanStepStatus, SwapType } from "./plan_pb.js";
4
4
  /**
5
5
  * @generated from enum data.v1.TokenType
6
6
  */
@@ -1541,6 +1541,13 @@ export declare class PlanTransaction extends Message<PlanTransaction> {
1541
1541
  * @generated from field: optional data.v1.EarnPlanMetadata earn_metadata = 16;
1542
1542
  */
1543
1543
  earnMetadata?: EarnPlanMetadata;
1544
+ /**
1545
+ * Set when the plan is a margin position action. Lets clients label the
1546
+ * plan with the margin action instead of generic swap language.
1547
+ *
1548
+ * @generated from field: optional data.v1.MarginPlanMetadata margin_metadata = 17;
1549
+ */
1550
+ marginMetadata?: MarginPlanMetadata;
1544
1551
  constructor(data?: PartialMessage<PlanTransaction>);
1545
1552
  static readonly runtime: typeof proto3;
1546
1553
  static readonly typeName = "data.v1.PlanTransaction";
@@ -1550,6 +1557,43 @@ export declare class PlanTransaction extends Message<PlanTransaction> {
1550
1557
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PlanTransaction;
1551
1558
  static equals(a: PlanTransaction | PlainMessage<PlanTransaction> | undefined, b: PlanTransaction | PlainMessage<PlanTransaction> | undefined): boolean;
1552
1559
  }
1560
+ /**
1561
+ * Plan-level margin action metadata for margin position flows.
1562
+ *
1563
+ * @generated from message data.v1.MarginPlanMetadata
1564
+ */
1565
+ export declare class MarginPlanMetadata extends Message<MarginPlanMetadata> {
1566
+ /**
1567
+ * @generated from field: data.v1.MarginPlanAction action = 1;
1568
+ */
1569
+ action: MarginPlanAction;
1570
+ /**
1571
+ * `<collateral>-<debt>-<venue>`; a display key, not a parse target.
1572
+ *
1573
+ * @generated from field: string market_key = 2;
1574
+ */
1575
+ marketKey: string;
1576
+ /**
1577
+ * @generated from field: data.v1.MarginPlanVenue venue = 3;
1578
+ */
1579
+ venue: MarginPlanVenue;
1580
+ /**
1581
+ * @generated from field: string collateral_token = 4;
1582
+ */
1583
+ collateralToken: string;
1584
+ /**
1585
+ * @generated from field: string debt_token = 5;
1586
+ */
1587
+ debtToken: string;
1588
+ constructor(data?: PartialMessage<MarginPlanMetadata>);
1589
+ static readonly runtime: typeof proto3;
1590
+ static readonly typeName = "data.v1.MarginPlanMetadata";
1591
+ static readonly fields: FieldList;
1592
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MarginPlanMetadata;
1593
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MarginPlanMetadata;
1594
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginPlanMetadata;
1595
+ static equals(a: MarginPlanMetadata | PlainMessage<MarginPlanMetadata> | undefined, b: MarginPlanMetadata | PlainMessage<MarginPlanMetadata> | undefined): boolean;
1596
+ }
1553
1597
  /**
1554
1598
  * Plan-level Earn intent metadata for chained Earn vault flows.
1555
1599
  *
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
  import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
6
- import { EarnPlanAction, PlanStatus, PlanStepStatus, SwapType } from "./plan_pb.js";
6
+ import { EarnPlanAction, MarginPlanAction, MarginPlanVenue, PlanStatus, PlanStepStatus, SwapType } from "./plan_pb.js";
7
7
  /**
8
8
  * @generated from enum data.v1.TokenType
9
9
  */
@@ -1963,6 +1963,61 @@ PlanTransaction.fields = proto3.util.newFieldList(() => [
1963
1963
  { no: 14, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1964
1964
  { no: 15, name: "last_user_action_at_millis", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
1965
1965
  { no: 16, name: "earn_metadata", kind: "message", T: EarnPlanMetadata, opt: true },
1966
+ { no: 17, name: "margin_metadata", kind: "message", T: MarginPlanMetadata, opt: true },
1967
+ ]);
1968
+ /**
1969
+ * Plan-level margin action metadata for margin position flows.
1970
+ *
1971
+ * @generated from message data.v1.MarginPlanMetadata
1972
+ */
1973
+ export class MarginPlanMetadata extends Message {
1974
+ constructor(data) {
1975
+ super();
1976
+ /**
1977
+ * @generated from field: data.v1.MarginPlanAction action = 1;
1978
+ */
1979
+ this.action = MarginPlanAction.UNKNOWN;
1980
+ /**
1981
+ * `<collateral>-<debt>-<venue>`; a display key, not a parse target.
1982
+ *
1983
+ * @generated from field: string market_key = 2;
1984
+ */
1985
+ this.marketKey = "";
1986
+ /**
1987
+ * @generated from field: data.v1.MarginPlanVenue venue = 3;
1988
+ */
1989
+ this.venue = MarginPlanVenue.UNKNOWN;
1990
+ /**
1991
+ * @generated from field: string collateral_token = 4;
1992
+ */
1993
+ this.collateralToken = "";
1994
+ /**
1995
+ * @generated from field: string debt_token = 5;
1996
+ */
1997
+ this.debtToken = "";
1998
+ proto3.util.initPartial(data, this);
1999
+ }
2000
+ static fromBinary(bytes, options) {
2001
+ return new MarginPlanMetadata().fromBinary(bytes, options);
2002
+ }
2003
+ static fromJson(jsonValue, options) {
2004
+ return new MarginPlanMetadata().fromJson(jsonValue, options);
2005
+ }
2006
+ static fromJsonString(jsonString, options) {
2007
+ return new MarginPlanMetadata().fromJsonString(jsonString, options);
2008
+ }
2009
+ static equals(a, b) {
2010
+ return proto3.util.equals(MarginPlanMetadata, a, b);
2011
+ }
2012
+ }
2013
+ MarginPlanMetadata.runtime = proto3;
2014
+ MarginPlanMetadata.typeName = "data.v1.MarginPlanMetadata";
2015
+ MarginPlanMetadata.fields = proto3.util.newFieldList(() => [
2016
+ { no: 1, name: "action", kind: "enum", T: proto3.getEnumType(MarginPlanAction) },
2017
+ { no: 2, name: "market_key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2018
+ { no: 3, name: "venue", kind: "enum", T: proto3.getEnumType(MarginPlanVenue) },
2019
+ { no: 4, name: "collateral_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
2020
+ { no: 5, name: "debt_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1966
2021
  ]);
1967
2022
  /**
1968
2023
  * Plan-level Earn intent metadata for chained Earn vault flows.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-data-api",
3
- "version": "0.0.281",
3
+ "version": "0.0.282",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },