@uniswap/client-trading 0.11.2 → 0.11.4

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.
@@ -501,6 +501,37 @@ export declare enum AggregatedOutputFee {
501
501
  */
502
502
  INTEGRATOR = 1
503
503
  }
504
+ /**
505
+ * @generated from enum trading.v1.RouteGraphProtocol
506
+ */
507
+ export declare enum RouteGraphProtocol {
508
+ /**
509
+ * @generated from enum value: ROUTE_GRAPH_PROTOCOL_UNSPECIFIED = 0;
510
+ */
511
+ UNSPECIFIED = 0,
512
+ /**
513
+ * @generated from enum value: ROUTE_GRAPH_PROTOCOL_V2 = 1;
514
+ */
515
+ V2 = 1,
516
+ /**
517
+ * @generated from enum value: ROUTE_GRAPH_PROTOCOL_V3 = 2;
518
+ */
519
+ V3 = 2,
520
+ /**
521
+ * @generated from enum value: ROUTE_GRAPH_PROTOCOL_V4 = 3;
522
+ */
523
+ V4 = 3,
524
+ /**
525
+ * Native <-> wrapped-native conversion step.
526
+ *
527
+ * @generated from enum value: ROUTE_GRAPH_PROTOCOL_WRAP = 4;
528
+ */
529
+ WRAP = 4,
530
+ /**
531
+ * @generated from enum value: ROUTE_GRAPH_PROTOCOL_OTHER = 5;
532
+ */
533
+ OTHER = 5
534
+ }
504
535
  /**
505
536
  * @generated from enum trading.v1.PoolType
506
537
  */
@@ -812,6 +843,25 @@ export declare enum MarginPositionStatus {
812
843
  */
813
844
  PARTIALLY_LIQUIDATED = 3
814
845
  }
846
+ /**
847
+ * Bridge vendor serving a bridge route.
848
+ *
849
+ * @generated from enum trading.v1.BridgeProvider
850
+ */
851
+ export declare enum BridgeProvider {
852
+ /**
853
+ * @generated from enum value: BRIDGE_PROVIDER_UNSPECIFIED = 0;
854
+ */
855
+ UNSPECIFIED = 0,
856
+ /**
857
+ * @generated from enum value: BRIDGE_PROVIDER_ACROSS = 1;
858
+ */
859
+ ACROSS = 1,
860
+ /**
861
+ * @generated from enum value: BRIDGE_PROVIDER_RELAY = 2;
862
+ */
863
+ RELAY = 2
864
+ }
815
865
  /**
816
866
  * @generated from message trading.v1.Encode7702Request
817
867
  */
@@ -3084,6 +3134,13 @@ export declare class ClassicQuote extends Message<ClassicQuote> {
3084
3134
  * @generated from field: optional double price_difference = 28;
3085
3135
  */
3086
3136
  priceDifference?: number;
3137
+ /**
3138
+ * Pool-level graph of the quoted route: one entry per pool hop, in swap
3139
+ * direction. Omitted whenever it cannot be built completely.
3140
+ *
3141
+ * @generated from field: optional trading.v1.RouteGraph route_graph = 29;
3142
+ */
3143
+ routeGraph?: RouteGraph;
3087
3144
  constructor(data?: PartialMessage<ClassicQuote>);
3088
3145
  static readonly runtime: typeof proto3;
3089
3146
  static readonly typeName = "trading.v1.ClassicQuote";
@@ -3093,6 +3150,110 @@ export declare class ClassicQuote extends Message<ClassicQuote> {
3093
3150
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ClassicQuote;
3094
3151
  static equals(a: ClassicQuote | PlainMessage<ClassicQuote> | undefined, b: ClassicQuote | PlainMessage<ClassicQuote> | undefined): boolean;
3095
3152
  }
3153
+ /**
3154
+ * One pool hop of the quoted route, oriented in swap direction (input ->
3155
+ * output) regardless of trade type. The same pool traversed in both
3156
+ * directions appears twice.
3157
+ *
3158
+ * @generated from message trading.v1.RouteGraphPool
3159
+ */
3160
+ export declare class RouteGraphPool extends Message<RouteGraphPool> {
3161
+ /**
3162
+ * @generated from field: trading.v1.RouteGraphProtocol protocol = 1;
3163
+ */
3164
+ protocol: RouteGraphProtocol;
3165
+ /**
3166
+ * V2/V3 pool address, V4 pool id (bytes32); unset for WRAP.
3167
+ *
3168
+ * @generated from field: optional string address = 2;
3169
+ */
3170
+ address?: string;
3171
+ /**
3172
+ * V4 hook contract; unset when the pool has no hook.
3173
+ *
3174
+ * @generated from field: optional string hooks = 3;
3175
+ */
3176
+ hooks?: string;
3177
+ /**
3178
+ * Same units as V3PoolInRoute.fee (hundredths of a bip); unset for WRAP
3179
+ * and for dynamic-fee pools.
3180
+ *
3181
+ * @generated from field: optional string fee = 4;
3182
+ */
3183
+ fee?: string;
3184
+ /**
3185
+ * @generated from field: optional bool is_dynamic_fee = 5;
3186
+ */
3187
+ isDynamicFee?: boolean;
3188
+ /**
3189
+ * Native currency is the zero address, as in V4 routes. decimals is set
3190
+ * only for the native currency and its wrapped token; do not do amount
3191
+ * math on it.
3192
+ *
3193
+ * @generated from field: trading.v1.TokenInRoute token_in = 6;
3194
+ */
3195
+ tokenIn?: TokenInRoute;
3196
+ /**
3197
+ * @generated from field: trading.v1.TokenInRoute token_out = 7;
3198
+ */
3199
+ tokenOut?: TokenInRoute;
3200
+ /**
3201
+ * Share of the trade's total input VALUE routed through this pool, in bps
3202
+ * (0-10000). Downstream pools trade a different token, so this is a value
3203
+ * share, not an amount share.
3204
+ *
3205
+ * @generated from field: uint32 share_of_input_bps = 8;
3206
+ */
3207
+ shareOfInputBps: number;
3208
+ /**
3209
+ * USD value entering/leaving the pool as decimal strings; unset when no
3210
+ * USD valuation is available.
3211
+ *
3212
+ * @generated from field: optional string usd_in = 9;
3213
+ */
3214
+ usdIn?: string;
3215
+ /**
3216
+ * @generated from field: optional string usd_out = 10;
3217
+ */
3218
+ usdOut?: string;
3219
+ /**
3220
+ * Disambiguates repeated visits of the same token within the graph; unset
3221
+ * means the first visit. Two pools share a node only when token and visit
3222
+ * both match.
3223
+ *
3224
+ * @generated from field: optional uint32 token_in_visit = 11;
3225
+ */
3226
+ tokenInVisit?: number;
3227
+ /**
3228
+ * @generated from field: optional uint32 token_out_visit = 12;
3229
+ */
3230
+ tokenOutVisit?: number;
3231
+ constructor(data?: PartialMessage<RouteGraphPool>);
3232
+ static readonly runtime: typeof proto3;
3233
+ static readonly typeName = "trading.v1.RouteGraphPool";
3234
+ static readonly fields: FieldList;
3235
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RouteGraphPool;
3236
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RouteGraphPool;
3237
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RouteGraphPool;
3238
+ static equals(a: RouteGraphPool | PlainMessage<RouteGraphPool> | undefined, b: RouteGraphPool | PlainMessage<RouteGraphPool> | undefined): boolean;
3239
+ }
3240
+ /**
3241
+ * @generated from message trading.v1.RouteGraph
3242
+ */
3243
+ export declare class RouteGraph extends Message<RouteGraph> {
3244
+ /**
3245
+ * @generated from field: repeated trading.v1.RouteGraphPool pools = 1;
3246
+ */
3247
+ pools: RouteGraphPool[];
3248
+ constructor(data?: PartialMessage<RouteGraph>);
3249
+ static readonly runtime: typeof proto3;
3250
+ static readonly typeName = "trading.v1.RouteGraph";
3251
+ static readonly fields: FieldList;
3252
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RouteGraph;
3253
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RouteGraph;
3254
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RouteGraph;
3255
+ static equals(a: RouteGraph | PlainMessage<RouteGraph> | undefined, b: RouteGraph | PlainMessage<RouteGraph> | undefined): boolean;
3256
+ }
3096
3257
  /**
3097
3258
  * A quoted route candidate with its whole-route (not per-hop) amounts.
3098
3259
  * quote_amount is the output amount for EXACT_INPUT and the required input
@@ -5571,6 +5732,23 @@ export declare class BridgeQuote extends Message<BridgeQuote> {
5571
5732
  * @generated from field: optional double price_difference = 21;
5572
5733
  */
5573
5734
  priceDifference?: number;
5735
+ /**
5736
+ * @generated from field: optional trading.v1.BridgeProvider provider = 22;
5737
+ */
5738
+ provider?: BridgeProvider;
5739
+ /**
5740
+ * Deposit built by the provider (Relay); absent for Across, whose
5741
+ * deposit /swap encodes. /swap returns it byte-exact.
5742
+ *
5743
+ * @generated from field: optional trading.v1.TransactionRequest transaction_request = 23;
5744
+ */
5745
+ transactionRequest?: TransactionRequest;
5746
+ /**
5747
+ * ERC-20 spender this quote needs approved; absent for native input.
5748
+ *
5749
+ * @generated from field: optional string approval_spender = 24;
5750
+ */
5751
+ approvalSpender?: string;
5574
5752
  constructor(data?: PartialMessage<BridgeQuote>);
5575
5753
  static readonly runtime: typeof proto3;
5576
5754
  static readonly typeName = "trading.v1.BridgeQuote";
@@ -673,6 +673,47 @@ proto3.util.setEnumType(AggregatedOutputFee, "trading.v1.AggregatedOutputFee", [
673
673
  { no: 0, name: "AGGREGATED_OUTPUT_FEE_UNSPECIFIED" },
674
674
  { no: 1, name: "INTEGRATOR" },
675
675
  ]);
676
+ /**
677
+ * @generated from enum trading.v1.RouteGraphProtocol
678
+ */
679
+ export var RouteGraphProtocol;
680
+ (function (RouteGraphProtocol) {
681
+ /**
682
+ * @generated from enum value: ROUTE_GRAPH_PROTOCOL_UNSPECIFIED = 0;
683
+ */
684
+ RouteGraphProtocol[RouteGraphProtocol["UNSPECIFIED"] = 0] = "UNSPECIFIED";
685
+ /**
686
+ * @generated from enum value: ROUTE_GRAPH_PROTOCOL_V2 = 1;
687
+ */
688
+ RouteGraphProtocol[RouteGraphProtocol["V2"] = 1] = "V2";
689
+ /**
690
+ * @generated from enum value: ROUTE_GRAPH_PROTOCOL_V3 = 2;
691
+ */
692
+ RouteGraphProtocol[RouteGraphProtocol["V3"] = 2] = "V3";
693
+ /**
694
+ * @generated from enum value: ROUTE_GRAPH_PROTOCOL_V4 = 3;
695
+ */
696
+ RouteGraphProtocol[RouteGraphProtocol["V4"] = 3] = "V4";
697
+ /**
698
+ * Native <-> wrapped-native conversion step.
699
+ *
700
+ * @generated from enum value: ROUTE_GRAPH_PROTOCOL_WRAP = 4;
701
+ */
702
+ RouteGraphProtocol[RouteGraphProtocol["WRAP"] = 4] = "WRAP";
703
+ /**
704
+ * @generated from enum value: ROUTE_GRAPH_PROTOCOL_OTHER = 5;
705
+ */
706
+ RouteGraphProtocol[RouteGraphProtocol["OTHER"] = 5] = "OTHER";
707
+ })(RouteGraphProtocol || (RouteGraphProtocol = {}));
708
+ // Retrieve enum metadata with: proto3.getEnumType(RouteGraphProtocol)
709
+ proto3.util.setEnumType(RouteGraphProtocol, "trading.v1.RouteGraphProtocol", [
710
+ { no: 0, name: "ROUTE_GRAPH_PROTOCOL_UNSPECIFIED" },
711
+ { no: 1, name: "ROUTE_GRAPH_PROTOCOL_V2" },
712
+ { no: 2, name: "ROUTE_GRAPH_PROTOCOL_V3" },
713
+ { no: 3, name: "ROUTE_GRAPH_PROTOCOL_V4" },
714
+ { no: 4, name: "ROUTE_GRAPH_PROTOCOL_WRAP" },
715
+ { no: 5, name: "ROUTE_GRAPH_PROTOCOL_OTHER" },
716
+ ]);
676
717
  /**
677
718
  * @generated from enum trading.v1.PoolType
678
719
  */
@@ -1097,6 +1138,32 @@ proto3.util.setEnumType(MarginPositionStatus, "trading.v1.MarginPositionStatus",
1097
1138
  { no: 2, name: "LIQUIDATED" },
1098
1139
  { no: 3, name: "PARTIALLY_LIQUIDATED" },
1099
1140
  ]);
1141
+ /**
1142
+ * Bridge vendor serving a bridge route.
1143
+ *
1144
+ * @generated from enum trading.v1.BridgeProvider
1145
+ */
1146
+ export var BridgeProvider;
1147
+ (function (BridgeProvider) {
1148
+ /**
1149
+ * @generated from enum value: BRIDGE_PROVIDER_UNSPECIFIED = 0;
1150
+ */
1151
+ BridgeProvider[BridgeProvider["UNSPECIFIED"] = 0] = "UNSPECIFIED";
1152
+ /**
1153
+ * @generated from enum value: BRIDGE_PROVIDER_ACROSS = 1;
1154
+ */
1155
+ BridgeProvider[BridgeProvider["ACROSS"] = 1] = "ACROSS";
1156
+ /**
1157
+ * @generated from enum value: BRIDGE_PROVIDER_RELAY = 2;
1158
+ */
1159
+ BridgeProvider[BridgeProvider["RELAY"] = 2] = "RELAY";
1160
+ })(BridgeProvider || (BridgeProvider = {}));
1161
+ // Retrieve enum metadata with: proto3.getEnumType(BridgeProvider)
1162
+ proto3.util.setEnumType(BridgeProvider, "trading.v1.BridgeProvider", [
1163
+ { no: 0, name: "BRIDGE_PROVIDER_UNSPECIFIED" },
1164
+ { no: 1, name: "BRIDGE_PROVIDER_ACROSS" },
1165
+ { no: 2, name: "BRIDGE_PROVIDER_RELAY" },
1166
+ ]);
1100
1167
  /**
1101
1168
  * @generated from message trading.v1.Encode7702Request
1102
1169
  */
@@ -3641,6 +3708,90 @@ ClassicQuote.fields = proto3.util.newFieldList(() => [
3641
3708
  { no: 26, name: "swap_steps", kind: "message", T: SwapStep, repeated: true },
3642
3709
  { no: 27, name: "route_candidates", kind: "message", T: RouteCandidate, repeated: true },
3643
3710
  { no: 28, name: "price_difference", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
3711
+ { no: 29, name: "route_graph", kind: "message", T: RouteGraph, opt: true },
3712
+ ]);
3713
+ /**
3714
+ * One pool hop of the quoted route, oriented in swap direction (input ->
3715
+ * output) regardless of trade type. The same pool traversed in both
3716
+ * directions appears twice.
3717
+ *
3718
+ * @generated from message trading.v1.RouteGraphPool
3719
+ */
3720
+ export class RouteGraphPool extends Message {
3721
+ constructor(data) {
3722
+ super();
3723
+ /**
3724
+ * @generated from field: trading.v1.RouteGraphProtocol protocol = 1;
3725
+ */
3726
+ this.protocol = RouteGraphProtocol.UNSPECIFIED;
3727
+ /**
3728
+ * Share of the trade's total input VALUE routed through this pool, in bps
3729
+ * (0-10000). Downstream pools trade a different token, so this is a value
3730
+ * share, not an amount share.
3731
+ *
3732
+ * @generated from field: uint32 share_of_input_bps = 8;
3733
+ */
3734
+ this.shareOfInputBps = 0;
3735
+ proto3.util.initPartial(data, this);
3736
+ }
3737
+ static fromBinary(bytes, options) {
3738
+ return new RouteGraphPool().fromBinary(bytes, options);
3739
+ }
3740
+ static fromJson(jsonValue, options) {
3741
+ return new RouteGraphPool().fromJson(jsonValue, options);
3742
+ }
3743
+ static fromJsonString(jsonString, options) {
3744
+ return new RouteGraphPool().fromJsonString(jsonString, options);
3745
+ }
3746
+ static equals(a, b) {
3747
+ return proto3.util.equals(RouteGraphPool, a, b);
3748
+ }
3749
+ }
3750
+ RouteGraphPool.runtime = proto3;
3751
+ RouteGraphPool.typeName = "trading.v1.RouteGraphPool";
3752
+ RouteGraphPool.fields = proto3.util.newFieldList(() => [
3753
+ { no: 1, name: "protocol", kind: "enum", T: proto3.getEnumType(RouteGraphProtocol) },
3754
+ { no: 2, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
3755
+ { no: 3, name: "hooks", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
3756
+ { no: 4, name: "fee", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
3757
+ { no: 5, name: "is_dynamic_fee", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
3758
+ { no: 6, name: "token_in", kind: "message", T: TokenInRoute },
3759
+ { no: 7, name: "token_out", kind: "message", T: TokenInRoute },
3760
+ { no: 8, name: "share_of_input_bps", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
3761
+ { no: 9, name: "usd_in", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
3762
+ { no: 10, name: "usd_out", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
3763
+ { no: 11, name: "token_in_visit", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
3764
+ { no: 12, name: "token_out_visit", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
3765
+ ]);
3766
+ /**
3767
+ * @generated from message trading.v1.RouteGraph
3768
+ */
3769
+ export class RouteGraph extends Message {
3770
+ constructor(data) {
3771
+ super();
3772
+ /**
3773
+ * @generated from field: repeated trading.v1.RouteGraphPool pools = 1;
3774
+ */
3775
+ this.pools = [];
3776
+ proto3.util.initPartial(data, this);
3777
+ }
3778
+ static fromBinary(bytes, options) {
3779
+ return new RouteGraph().fromBinary(bytes, options);
3780
+ }
3781
+ static fromJson(jsonValue, options) {
3782
+ return new RouteGraph().fromJson(jsonValue, options);
3783
+ }
3784
+ static fromJsonString(jsonString, options) {
3785
+ return new RouteGraph().fromJsonString(jsonString, options);
3786
+ }
3787
+ static equals(a, b) {
3788
+ return proto3.util.equals(RouteGraph, a, b);
3789
+ }
3790
+ }
3791
+ RouteGraph.runtime = proto3;
3792
+ RouteGraph.typeName = "trading.v1.RouteGraph";
3793
+ RouteGraph.fields = proto3.util.newFieldList(() => [
3794
+ { no: 1, name: "pools", kind: "message", T: RouteGraphPool, repeated: true },
3644
3795
  ]);
3645
3796
  /**
3646
3797
  * A quoted route candidate with its whole-route (not per-hop) amounts.
@@ -6583,6 +6734,9 @@ BridgeQuote.fields = proto3.util.newFieldList(() => [
6583
6734
  { no: 18, name: "gas_fee_usd", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
6584
6735
  { no: 19, name: "gas_estimates", kind: "message", T: GasEstimate, repeated: true },
6585
6736
  { no: 21, name: "price_difference", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
6737
+ { no: 22, name: "provider", kind: "enum", T: proto3.getEnumType(BridgeProvider), opt: true },
6738
+ { no: 23, name: "transaction_request", kind: "message", T: TransactionRequest, opt: true },
6739
+ { no: 24, name: "approval_spender", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
6586
6740
  ]);
6587
6741
  /**
6588
6742
  * @generated from message trading.v1.DutchLimitOrderInfo
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-trading",
3
- "version": "0.11.2",
3
+ "version": "0.11.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },