@uniswap/client-trading 0.4.0 → 0.4.1

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.
@@ -1,5 +1,5 @@
1
1
  import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf";
2
- import { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PlanResponse, QuoteRequest, QuoteResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
2
+ import { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
3
3
  /**
4
4
  * @generated from rpc trading.v1.tradingService.Quote
5
5
  */
@@ -56,6 +56,20 @@ export declare const checkApproval: {
56
56
  readonly typeName: "trading.v1.tradingService";
57
57
  };
58
58
  };
59
+ /**
60
+ * @generated from rpc trading.v1.tradingService.Permissions
61
+ */
62
+ export declare const permissions: {
63
+ readonly localName: "permissions";
64
+ readonly name: "Permissions";
65
+ readonly kind: MethodKind.Unary;
66
+ readonly I: typeof PermissionsRequest;
67
+ readonly O: typeof PermissionsResponse;
68
+ readonly idempotency: MethodIdempotency.NoSideEffects;
69
+ readonly service: {
70
+ readonly typeName: "trading.v1.tradingService";
71
+ };
72
+ };
59
73
  /**
60
74
  * @generated from rpc trading.v1.tradingService.GetSwaps
61
75
  */
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
  import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf";
6
- import { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PlanResponse, QuoteRequest, QuoteResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
6
+ import { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
7
7
  /**
8
8
  * @generated from rpc trading.v1.tradingService.Quote
9
9
  */
@@ -60,6 +60,20 @@ export const checkApproval = {
60
60
  typeName: "trading.v1.tradingService"
61
61
  }
62
62
  };
63
+ /**
64
+ * @generated from rpc trading.v1.tradingService.Permissions
65
+ */
66
+ export const permissions = {
67
+ localName: "permissions",
68
+ name: "Permissions",
69
+ kind: MethodKind.Unary,
70
+ I: PermissionsRequest,
71
+ O: PermissionsResponse,
72
+ idempotency: MethodIdempotency.NoSideEffects,
73
+ service: {
74
+ typeName: "trading.v1.tradingService"
75
+ }
76
+ };
63
77
  /**
64
78
  * @generated from rpc trading.v1.tradingService.GetSwaps
65
79
  */
@@ -1,4 +1,4 @@
1
- import { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PlanResponse, QuoteRequest, QuoteResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
1
+ import { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
2
2
  import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf";
3
3
  /**
4
4
  * @generated from service trading.v1.tradingService
@@ -46,6 +46,16 @@ export declare const tradingService: {
46
46
  readonly kind: MethodKind.Unary;
47
47
  readonly idempotency: MethodIdempotency.NoSideEffects;
48
48
  };
49
+ /**
50
+ * @generated from rpc trading.v1.tradingService.Permissions
51
+ */
52
+ readonly permissions: {
53
+ readonly name: "Permissions";
54
+ readonly I: typeof PermissionsRequest;
55
+ readonly O: typeof PermissionsResponse;
56
+ readonly kind: MethodKind.Unary;
57
+ readonly idempotency: MethodIdempotency.NoSideEffects;
58
+ };
49
59
  /**
50
60
  * @generated from rpc trading.v1.tradingService.GetSwaps
51
61
  */
@@ -2,7 +2,7 @@
2
2
  // @generated from file trading/v1/api.proto (package trading.v1, syntax proto3)
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
- import { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PlanResponse, QuoteRequest, QuoteResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
5
+ import { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
6
6
  import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf";
7
7
  /**
8
8
  * @generated from service trading.v1.tradingService
@@ -50,6 +50,16 @@ export const tradingService = {
50
50
  kind: MethodKind.Unary,
51
51
  idempotency: MethodIdempotency.NoSideEffects,
52
52
  },
53
+ /**
54
+ * @generated from rpc trading.v1.tradingService.Permissions
55
+ */
56
+ permissions: {
57
+ name: "Permissions",
58
+ I: PermissionsRequest,
59
+ O: PermissionsResponse,
60
+ kind: MethodKind.Unary,
61
+ idempotency: MethodIdempotency.NoSideEffects,
62
+ },
53
63
  /**
54
64
  * @generated from rpc trading.v1.tradingService.GetSwaps
55
65
  */
@@ -162,7 +162,11 @@ export declare enum Protocols {
162
162
  /**
163
163
  * @generated from enum value: UNISWAPX_V3 = 5;
164
164
  */
165
- UNISWAPX_V3 = 5
165
+ UNISWAPX_V3 = 5,
166
+ /**
167
+ * @generated from enum value: UNISWAPX_LATEST = 6;
168
+ */
169
+ UNISWAPX_LATEST = 6
166
170
  }
167
171
  /**
168
172
  * @generated from enum trading.v1.RoutingPreference
@@ -5087,6 +5091,85 @@ export declare class CheckApprovalResponse extends Message<CheckApprovalResponse
5087
5091
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CheckApprovalResponse;
5088
5092
  static equals(a: CheckApprovalResponse | PlainMessage<CheckApprovalResponse> | undefined, b: CheckApprovalResponse | PlainMessage<CheckApprovalResponse> | undefined): boolean;
5089
5093
  }
5094
+ /**
5095
+ * @generated from message trading.v1.PermissionsRequest
5096
+ */
5097
+ export declare class PermissionsRequest extends Message<PermissionsRequest> {
5098
+ /**
5099
+ * @generated from field: string wallet_address = 1;
5100
+ */
5101
+ walletAddress: string;
5102
+ /**
5103
+ * @generated from field: repeated string tokens = 2;
5104
+ */
5105
+ tokens: string[];
5106
+ /**
5107
+ * @generated from field: trading.v1.ChainId chain_id = 3;
5108
+ */
5109
+ chainId: ChainId;
5110
+ constructor(data?: PartialMessage<PermissionsRequest>);
5111
+ static readonly runtime: typeof proto3;
5112
+ static readonly typeName = "trading.v1.PermissionsRequest";
5113
+ static readonly fields: FieldList;
5114
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PermissionsRequest;
5115
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PermissionsRequest;
5116
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PermissionsRequest;
5117
+ static equals(a: PermissionsRequest | PlainMessage<PermissionsRequest> | undefined, b: PermissionsRequest | PlainMessage<PermissionsRequest> | undefined): boolean;
5118
+ }
5119
+ /**
5120
+ * @generated from message trading.v1.PermissionsResponse
5121
+ */
5122
+ export declare class PermissionsResponse extends Message<PermissionsResponse> {
5123
+ /**
5124
+ * @generated from field: string request_id = 1;
5125
+ */
5126
+ requestId: string;
5127
+ /**
5128
+ * @generated from field: repeated trading.v1.PermissionsResult results = 2;
5129
+ */
5130
+ results: PermissionsResult[];
5131
+ constructor(data?: PartialMessage<PermissionsResponse>);
5132
+ static readonly runtime: typeof proto3;
5133
+ static readonly typeName = "trading.v1.PermissionsResponse";
5134
+ static readonly fields: FieldList;
5135
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PermissionsResponse;
5136
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PermissionsResponse;
5137
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PermissionsResponse;
5138
+ static equals(a: PermissionsResponse | PlainMessage<PermissionsResponse> | undefined, b: PermissionsResponse | PlainMessage<PermissionsResponse> | undefined): boolean;
5139
+ }
5140
+ /**
5141
+ * @generated from message trading.v1.PermissionsResult
5142
+ */
5143
+ export declare class PermissionsResult extends Message<PermissionsResult> {
5144
+ /**
5145
+ * @generated from field: string token = 1;
5146
+ */
5147
+ token: string;
5148
+ /**
5149
+ * @generated from field: bool is_permissioned = 2;
5150
+ */
5151
+ isPermissioned: boolean;
5152
+ /**
5153
+ * @generated from field: optional bool is_allowlisted = 3;
5154
+ */
5155
+ isAllowlisted?: boolean;
5156
+ /**
5157
+ * @generated from field: optional string adapter_token_address = 4;
5158
+ */
5159
+ adapterTokenAddress?: string;
5160
+ /**
5161
+ * @generated from field: optional string kyc_url = 5;
5162
+ */
5163
+ kycUrl?: string;
5164
+ constructor(data?: PartialMessage<PermissionsResult>);
5165
+ static readonly runtime: typeof proto3;
5166
+ static readonly typeName = "trading.v1.PermissionsResult";
5167
+ static readonly fields: FieldList;
5168
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PermissionsResult;
5169
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PermissionsResult;
5170
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PermissionsResult;
5171
+ static equals(a: PermissionsResult | PlainMessage<PermissionsResult> | undefined, b: PermissionsResult | PlainMessage<PermissionsResult> | undefined): boolean;
5172
+ }
5090
5173
  /**
5091
5174
  * @generated from message trading.v1.PriorityOrderInfo
5092
5175
  */
@@ -210,6 +210,10 @@ export var Protocols;
210
210
  * @generated from enum value: UNISWAPX_V3 = 5;
211
211
  */
212
212
  Protocols[Protocols["UNISWAPX_V3"] = 5] = "UNISWAPX_V3";
213
+ /**
214
+ * @generated from enum value: UNISWAPX_LATEST = 6;
215
+ */
216
+ Protocols[Protocols["UNISWAPX_LATEST"] = 6] = "UNISWAPX_LATEST";
213
217
  })(Protocols || (Protocols = {}));
214
218
  // Retrieve enum metadata with: proto3.getEnumType(Protocols)
215
219
  proto3.util.setEnumType(Protocols, "trading.v1.Protocols", [
@@ -218,6 +222,7 @@ proto3.util.setEnumType(Protocols, "trading.v1.Protocols", [
218
222
  { no: 2, name: "V4" },
219
223
  { no: 4, name: "UNISWAPX_V2" },
220
224
  { no: 5, name: "UNISWAPX_V3" },
225
+ { no: 6, name: "UNISWAPX_LATEST" },
221
226
  ]);
222
227
  /**
223
228
  * @generated from enum trading.v1.RoutingPreference
@@ -5981,6 +5986,119 @@ CheckApprovalResponse.fields = proto3.util.newFieldList(() => [
5981
5986
  { no: 5, name: "cancel_gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
5982
5987
  { no: 6, name: "gas_estimates", kind: "message", T: GasEstimate, repeated: true },
5983
5988
  ]);
5989
+ /**
5990
+ * @generated from message trading.v1.PermissionsRequest
5991
+ */
5992
+ export class PermissionsRequest extends Message {
5993
+ constructor(data) {
5994
+ super();
5995
+ /**
5996
+ * @generated from field: string wallet_address = 1;
5997
+ */
5998
+ this.walletAddress = "";
5999
+ /**
6000
+ * @generated from field: repeated string tokens = 2;
6001
+ */
6002
+ this.tokens = [];
6003
+ /**
6004
+ * @generated from field: trading.v1.ChainId chain_id = 3;
6005
+ */
6006
+ this.chainId = ChainId.CHAIN_ID_UNSPECIFIED;
6007
+ proto3.util.initPartial(data, this);
6008
+ }
6009
+ static fromBinary(bytes, options) {
6010
+ return new PermissionsRequest().fromBinary(bytes, options);
6011
+ }
6012
+ static fromJson(jsonValue, options) {
6013
+ return new PermissionsRequest().fromJson(jsonValue, options);
6014
+ }
6015
+ static fromJsonString(jsonString, options) {
6016
+ return new PermissionsRequest().fromJsonString(jsonString, options);
6017
+ }
6018
+ static equals(a, b) {
6019
+ return proto3.util.equals(PermissionsRequest, a, b);
6020
+ }
6021
+ }
6022
+ PermissionsRequest.runtime = proto3;
6023
+ PermissionsRequest.typeName = "trading.v1.PermissionsRequest";
6024
+ PermissionsRequest.fields = proto3.util.newFieldList(() => [
6025
+ { no: 1, name: "wallet_address", kind: "scalar", T: 9 /* ScalarType.STRING */ },
6026
+ { no: 2, name: "tokens", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
6027
+ { no: 3, name: "chain_id", kind: "enum", T: proto3.getEnumType(ChainId) },
6028
+ ]);
6029
+ /**
6030
+ * @generated from message trading.v1.PermissionsResponse
6031
+ */
6032
+ export class PermissionsResponse extends Message {
6033
+ constructor(data) {
6034
+ super();
6035
+ /**
6036
+ * @generated from field: string request_id = 1;
6037
+ */
6038
+ this.requestId = "";
6039
+ /**
6040
+ * @generated from field: repeated trading.v1.PermissionsResult results = 2;
6041
+ */
6042
+ this.results = [];
6043
+ proto3.util.initPartial(data, this);
6044
+ }
6045
+ static fromBinary(bytes, options) {
6046
+ return new PermissionsResponse().fromBinary(bytes, options);
6047
+ }
6048
+ static fromJson(jsonValue, options) {
6049
+ return new PermissionsResponse().fromJson(jsonValue, options);
6050
+ }
6051
+ static fromJsonString(jsonString, options) {
6052
+ return new PermissionsResponse().fromJsonString(jsonString, options);
6053
+ }
6054
+ static equals(a, b) {
6055
+ return proto3.util.equals(PermissionsResponse, a, b);
6056
+ }
6057
+ }
6058
+ PermissionsResponse.runtime = proto3;
6059
+ PermissionsResponse.typeName = "trading.v1.PermissionsResponse";
6060
+ PermissionsResponse.fields = proto3.util.newFieldList(() => [
6061
+ { no: 1, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
6062
+ { no: 2, name: "results", kind: "message", T: PermissionsResult, repeated: true },
6063
+ ]);
6064
+ /**
6065
+ * @generated from message trading.v1.PermissionsResult
6066
+ */
6067
+ export class PermissionsResult extends Message {
6068
+ constructor(data) {
6069
+ super();
6070
+ /**
6071
+ * @generated from field: string token = 1;
6072
+ */
6073
+ this.token = "";
6074
+ /**
6075
+ * @generated from field: bool is_permissioned = 2;
6076
+ */
6077
+ this.isPermissioned = false;
6078
+ proto3.util.initPartial(data, this);
6079
+ }
6080
+ static fromBinary(bytes, options) {
6081
+ return new PermissionsResult().fromBinary(bytes, options);
6082
+ }
6083
+ static fromJson(jsonValue, options) {
6084
+ return new PermissionsResult().fromJson(jsonValue, options);
6085
+ }
6086
+ static fromJsonString(jsonString, options) {
6087
+ return new PermissionsResult().fromJsonString(jsonString, options);
6088
+ }
6089
+ static equals(a, b) {
6090
+ return proto3.util.equals(PermissionsResult, a, b);
6091
+ }
6092
+ }
6093
+ PermissionsResult.runtime = proto3;
6094
+ PermissionsResult.typeName = "trading.v1.PermissionsResult";
6095
+ PermissionsResult.fields = proto3.util.newFieldList(() => [
6096
+ { no: 1, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
6097
+ { no: 2, name: "is_permissioned", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
6098
+ { no: 3, name: "is_allowlisted", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
6099
+ { no: 4, name: "adapter_token_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
6100
+ { no: 5, name: "kyc_url", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
6101
+ ]);
5984
6102
  /**
5985
6103
  * @generated from message trading.v1.PriorityOrderInfo
5986
6104
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-trading",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },