@uniswap/client-trading 0.5.5 → 0.5.8
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.
- package/dist/trading/v1/api_pb.d.ts +78 -0
- package/dist/trading/v1/api_pb.js +83 -0
- package/package.json +1 -1
|
@@ -530,6 +530,23 @@ export declare enum OrderType {
|
|
|
530
530
|
*/
|
|
531
531
|
OrderType_DUTCH_V3 = 4
|
|
532
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* @generated from enum trading.v1.AllowanceUnit
|
|
535
|
+
*/
|
|
536
|
+
export declare enum AllowanceUnit {
|
|
537
|
+
/**
|
|
538
|
+
* @generated from enum value: ALLOWANCE_UNIT_UNSPECIFIED = 0;
|
|
539
|
+
*/
|
|
540
|
+
UNSPECIFIED = 0,
|
|
541
|
+
/**
|
|
542
|
+
* @generated from enum value: ALLOWANCE_UNIT_FREE_SWAPS = 1;
|
|
543
|
+
*/
|
|
544
|
+
FREE_SWAPS = 1,
|
|
545
|
+
/**
|
|
546
|
+
* @generated from enum value: ALLOWANCE_UNIT_USD_CENT = 2;
|
|
547
|
+
*/
|
|
548
|
+
USD_CENT = 2
|
|
549
|
+
}
|
|
533
550
|
/**
|
|
534
551
|
* @generated from message trading.v1.Encode7702Request
|
|
535
552
|
*/
|
|
@@ -1856,6 +1873,16 @@ export declare class QuoteResponse extends Message<QuoteResponse> {
|
|
|
1856
1873
|
* @generated from field: optional trading.v1.SponsorshipInfo sponsorship_info = 21;
|
|
1857
1874
|
*/
|
|
1858
1875
|
sponsorshipInfo?: SponsorshipInfo;
|
|
1876
|
+
/**
|
|
1877
|
+
* Whether an ERC-20 token approval is applicable to this swap's input — i.e.
|
|
1878
|
+
* the routing pulls the input token via an allowance (ERC-20 -> Permit2 /
|
|
1879
|
+
* Across) rather than attaching it as native value or wrapping/unwrapping.
|
|
1880
|
+
* Reflects the routing mechanism, not the swapper's current allowance. When
|
|
1881
|
+
* unset, treat as applicable (approval may be required).
|
|
1882
|
+
*
|
|
1883
|
+
* @generated from field: optional bool is_token_approval_applicable = 22;
|
|
1884
|
+
*/
|
|
1885
|
+
isTokenApprovalApplicable?: boolean;
|
|
1859
1886
|
constructor(data?: PartialMessage<QuoteResponse>);
|
|
1860
1887
|
static readonly runtime: typeof proto3;
|
|
1861
1888
|
static readonly typeName = "trading.v1.QuoteResponse";
|
|
@@ -6915,6 +6942,30 @@ export declare class CampaignDetails extends Message<CampaignDetails> {
|
|
|
6915
6942
|
* @generated from field: optional string description = 2;
|
|
6916
6943
|
*/
|
|
6917
6944
|
description?: string;
|
|
6945
|
+
/**
|
|
6946
|
+
* Human-readable headline; `description` is the subheader.
|
|
6947
|
+
*
|
|
6948
|
+
* @generated from field: optional string headline = 3;
|
|
6949
|
+
*/
|
|
6950
|
+
headline?: string;
|
|
6951
|
+
/**
|
|
6952
|
+
* Campaign image asset for the UI thumbnail.
|
|
6953
|
+
*
|
|
6954
|
+
* @generated from field: optional string thumbnail_url = 4;
|
|
6955
|
+
*/
|
|
6956
|
+
thumbnailUrl?: string;
|
|
6957
|
+
/**
|
|
6958
|
+
* Per-wallet caps + utilization, one entry per dimension; empty when no cap.
|
|
6959
|
+
*
|
|
6960
|
+
* @generated from field: repeated trading.v1.CampaignAllowance allowances = 5;
|
|
6961
|
+
*/
|
|
6962
|
+
allowances: CampaignAllowance[];
|
|
6963
|
+
/**
|
|
6964
|
+
* Chains the campaign covers, for the "eligible chains" modal.
|
|
6965
|
+
*
|
|
6966
|
+
* @generated from field: repeated trading.v1.ChainId eligible_chains = 6;
|
|
6967
|
+
*/
|
|
6968
|
+
eligibleChains: ChainId[];
|
|
6918
6969
|
constructor(data?: PartialMessage<CampaignDetails>);
|
|
6919
6970
|
static readonly runtime: typeof proto3;
|
|
6920
6971
|
static readonly typeName = "trading.v1.CampaignDetails";
|
|
@@ -6924,6 +6975,33 @@ export declare class CampaignDetails extends Message<CampaignDetails> {
|
|
|
6924
6975
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CampaignDetails;
|
|
6925
6976
|
static equals(a: CampaignDetails | PlainMessage<CampaignDetails> | undefined, b: CampaignDetails | PlainMessage<CampaignDetails> | undefined): boolean;
|
|
6926
6977
|
}
|
|
6978
|
+
/**
|
|
6979
|
+
* Drives the allowance line, e.g. "5 of 5 free swaps remaining" or "$2 of $10".
|
|
6980
|
+
*
|
|
6981
|
+
* @generated from message trading.v1.CampaignAllowance
|
|
6982
|
+
*/
|
|
6983
|
+
export declare class CampaignAllowance extends Message<CampaignAllowance> {
|
|
6984
|
+
/**
|
|
6985
|
+
* @generated from field: trading.v1.AllowanceUnit unit = 1;
|
|
6986
|
+
*/
|
|
6987
|
+
unit: AllowanceUnit;
|
|
6988
|
+
/**
|
|
6989
|
+
* @generated from field: string total = 2;
|
|
6990
|
+
*/
|
|
6991
|
+
total: string;
|
|
6992
|
+
/**
|
|
6993
|
+
* @generated from field: string remaining = 3;
|
|
6994
|
+
*/
|
|
6995
|
+
remaining: string;
|
|
6996
|
+
constructor(data?: PartialMessage<CampaignAllowance>);
|
|
6997
|
+
static readonly runtime: typeof proto3;
|
|
6998
|
+
static readonly typeName = "trading.v1.CampaignAllowance";
|
|
6999
|
+
static readonly fields: FieldList;
|
|
7000
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CampaignAllowance;
|
|
7001
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CampaignAllowance;
|
|
7002
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CampaignAllowance;
|
|
7003
|
+
static equals(a: CampaignAllowance | PlainMessage<CampaignAllowance> | undefined, b: CampaignAllowance | PlainMessage<CampaignAllowance> | undefined): boolean;
|
|
7004
|
+
}
|
|
6927
7005
|
/**
|
|
6928
7006
|
* @generated from message trading.v1.SponsorshipInfo
|
|
6929
7007
|
*/
|
|
@@ -720,6 +720,30 @@ proto3.util.setEnumType(OrderType, "trading.v1.OrderType", [
|
|
|
720
720
|
{ no: 3, name: "OrderType_PRIORITY" },
|
|
721
721
|
{ no: 4, name: "OrderType_DUTCH_V3" },
|
|
722
722
|
]);
|
|
723
|
+
/**
|
|
724
|
+
* @generated from enum trading.v1.AllowanceUnit
|
|
725
|
+
*/
|
|
726
|
+
export var AllowanceUnit;
|
|
727
|
+
(function (AllowanceUnit) {
|
|
728
|
+
/**
|
|
729
|
+
* @generated from enum value: ALLOWANCE_UNIT_UNSPECIFIED = 0;
|
|
730
|
+
*/
|
|
731
|
+
AllowanceUnit[AllowanceUnit["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
732
|
+
/**
|
|
733
|
+
* @generated from enum value: ALLOWANCE_UNIT_FREE_SWAPS = 1;
|
|
734
|
+
*/
|
|
735
|
+
AllowanceUnit[AllowanceUnit["FREE_SWAPS"] = 1] = "FREE_SWAPS";
|
|
736
|
+
/**
|
|
737
|
+
* @generated from enum value: ALLOWANCE_UNIT_USD_CENT = 2;
|
|
738
|
+
*/
|
|
739
|
+
AllowanceUnit[AllowanceUnit["USD_CENT"] = 2] = "USD_CENT";
|
|
740
|
+
})(AllowanceUnit || (AllowanceUnit = {}));
|
|
741
|
+
// Retrieve enum metadata with: proto3.getEnumType(AllowanceUnit)
|
|
742
|
+
proto3.util.setEnumType(AllowanceUnit, "trading.v1.AllowanceUnit", [
|
|
743
|
+
{ no: 0, name: "ALLOWANCE_UNIT_UNSPECIFIED" },
|
|
744
|
+
{ no: 1, name: "ALLOWANCE_UNIT_FREE_SWAPS" },
|
|
745
|
+
{ no: 2, name: "ALLOWANCE_UNIT_USD_CENT" },
|
|
746
|
+
]);
|
|
723
747
|
/**
|
|
724
748
|
* @generated from message trading.v1.Encode7702Request
|
|
725
749
|
*/
|
|
@@ -2175,6 +2199,7 @@ QuoteResponse.fields = proto3.util.newFieldList(() => [
|
|
|
2175
2199
|
{ no: 19, name: "permit_transaction", kind: "message", T: TransactionRequest, opt: true },
|
|
2176
2200
|
{ no: 20, name: "permit_gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
2177
2201
|
{ no: 21, name: "sponsorship_info", kind: "message", T: SponsorshipInfo, opt: true },
|
|
2202
|
+
{ no: 22, name: "is_token_approval_applicable", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
2178
2203
|
]);
|
|
2179
2204
|
/**
|
|
2180
2205
|
* @generated from message trading.v1.QuoteInput
|
|
@@ -8094,6 +8119,18 @@ SponsorMetadata.fields = proto3.util.newFieldList(() => [
|
|
|
8094
8119
|
export class CampaignDetails extends Message {
|
|
8095
8120
|
constructor(data) {
|
|
8096
8121
|
super();
|
|
8122
|
+
/**
|
|
8123
|
+
* Per-wallet caps + utilization, one entry per dimension; empty when no cap.
|
|
8124
|
+
*
|
|
8125
|
+
* @generated from field: repeated trading.v1.CampaignAllowance allowances = 5;
|
|
8126
|
+
*/
|
|
8127
|
+
this.allowances = [];
|
|
8128
|
+
/**
|
|
8129
|
+
* Chains the campaign covers, for the "eligible chains" modal.
|
|
8130
|
+
*
|
|
8131
|
+
* @generated from field: repeated trading.v1.ChainId eligible_chains = 6;
|
|
8132
|
+
*/
|
|
8133
|
+
this.eligibleChains = [];
|
|
8097
8134
|
proto3.util.initPartial(data, this);
|
|
8098
8135
|
}
|
|
8099
8136
|
static fromBinary(bytes, options) {
|
|
@@ -8114,6 +8151,52 @@ CampaignDetails.typeName = "trading.v1.CampaignDetails";
|
|
|
8114
8151
|
CampaignDetails.fields = proto3.util.newFieldList(() => [
|
|
8115
8152
|
{ no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
8116
8153
|
{ no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
8154
|
+
{ no: 3, name: "headline", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
8155
|
+
{ no: 4, name: "thumbnail_url", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
8156
|
+
{ no: 5, name: "allowances", kind: "message", T: CampaignAllowance, repeated: true },
|
|
8157
|
+
{ no: 6, name: "eligible_chains", kind: "enum", T: proto3.getEnumType(ChainId), repeated: true },
|
|
8158
|
+
]);
|
|
8159
|
+
/**
|
|
8160
|
+
* Drives the allowance line, e.g. "5 of 5 free swaps remaining" or "$2 of $10".
|
|
8161
|
+
*
|
|
8162
|
+
* @generated from message trading.v1.CampaignAllowance
|
|
8163
|
+
*/
|
|
8164
|
+
export class CampaignAllowance extends Message {
|
|
8165
|
+
constructor(data) {
|
|
8166
|
+
super();
|
|
8167
|
+
/**
|
|
8168
|
+
* @generated from field: trading.v1.AllowanceUnit unit = 1;
|
|
8169
|
+
*/
|
|
8170
|
+
this.unit = AllowanceUnit.UNSPECIFIED;
|
|
8171
|
+
/**
|
|
8172
|
+
* @generated from field: string total = 2;
|
|
8173
|
+
*/
|
|
8174
|
+
this.total = "";
|
|
8175
|
+
/**
|
|
8176
|
+
* @generated from field: string remaining = 3;
|
|
8177
|
+
*/
|
|
8178
|
+
this.remaining = "";
|
|
8179
|
+
proto3.util.initPartial(data, this);
|
|
8180
|
+
}
|
|
8181
|
+
static fromBinary(bytes, options) {
|
|
8182
|
+
return new CampaignAllowance().fromBinary(bytes, options);
|
|
8183
|
+
}
|
|
8184
|
+
static fromJson(jsonValue, options) {
|
|
8185
|
+
return new CampaignAllowance().fromJson(jsonValue, options);
|
|
8186
|
+
}
|
|
8187
|
+
static fromJsonString(jsonString, options) {
|
|
8188
|
+
return new CampaignAllowance().fromJsonString(jsonString, options);
|
|
8189
|
+
}
|
|
8190
|
+
static equals(a, b) {
|
|
8191
|
+
return proto3.util.equals(CampaignAllowance, a, b);
|
|
8192
|
+
}
|
|
8193
|
+
}
|
|
8194
|
+
CampaignAllowance.runtime = proto3;
|
|
8195
|
+
CampaignAllowance.typeName = "trading.v1.CampaignAllowance";
|
|
8196
|
+
CampaignAllowance.fields = proto3.util.newFieldList(() => [
|
|
8197
|
+
{ no: 1, name: "unit", kind: "enum", T: proto3.getEnumType(AllowanceUnit) },
|
|
8198
|
+
{ no: 2, name: "total", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
8199
|
+
{ no: 3, name: "remaining", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
8117
8200
|
]);
|
|
8118
8201
|
/**
|
|
8119
8202
|
* @generated from message trading.v1.SponsorshipInfo
|