@uniswap/client-platform-service 0.0.25 → 0.0.28

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,24 @@
1
1
  import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
2
  import { Message, proto3, Timestamp, Value } from "@bufbuild/protobuf";
3
+ /**
4
+ * @generated from enum uniswap.platformservice.v1.AllowanceUnit
5
+ */
6
+ export declare enum AllowanceUnit {
7
+ /**
8
+ * @generated from enum value: ALLOWANCE_UNIT_UNSPECIFIED = 0;
9
+ */
10
+ UNSPECIFIED = 0,
11
+ /**
12
+ * @generated from enum value: ALLOWANCE_UNIT_FREE_SWAPS = 1;
13
+ */
14
+ FREE_SWAPS = 1,
15
+ /**
16
+ * US cents. Reserved; not yet populated server-side.
17
+ *
18
+ * @generated from enum value: ALLOWANCE_UNIT_USD_CENT = 2;
19
+ */
20
+ USD_CENT = 2
21
+ }
3
22
  /**
4
23
  * @generated from message uniswap.platformservice.v1.ListEligibleGasFeeSponsorshipCampaignsRequest
5
24
  */
@@ -195,6 +214,33 @@ export declare class SponsorshipCampaign extends Message<SponsorshipCampaign> {
195
214
  * @generated from field: string sponsor_logo_url = 6;
196
215
  */
197
216
  sponsorLogoUrl: string;
217
+ /**
218
+ * Human-readable headline, e.g. "Welcome to Uniswap". Distinct from `name`
219
+ * (machine id) and `description` (subheader).
220
+ *
221
+ * @generated from field: string headline = 7;
222
+ */
223
+ headline: string;
224
+ /**
225
+ * Image asset for this campaign, rendered as the UI thumbnail. Distinct from
226
+ * `sponsor_logo_url`.
227
+ *
228
+ * @generated from field: string thumbnail_url = 8;
229
+ */
230
+ thumbnailUrl: string;
231
+ /**
232
+ * Per-wallet caps + utilization, one entry per dimension (free-swap count
233
+ * and/or cost). Empty when the campaign has no per-wallet cap.
234
+ *
235
+ * @generated from field: repeated uniswap.platformservice.v1.SponsorshipAllowance allowances = 9;
236
+ */
237
+ allowances: SponsorshipAllowance[];
238
+ /**
239
+ * Chain IDs the campaign covers, for the client "eligible chains" modal.
240
+ *
241
+ * @generated from field: repeated uint32 eligible_chains = 10;
242
+ */
243
+ eligibleChains: number[];
198
244
  constructor(data?: PartialMessage<SponsorshipCampaign>);
199
245
  static readonly runtime: typeof proto3;
200
246
  static readonly typeName = "uniswap.platformservice.v1.SponsorshipCampaign";
@@ -204,6 +250,35 @@ export declare class SponsorshipCampaign extends Message<SponsorshipCampaign> {
204
250
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SponsorshipCampaign;
205
251
  static equals(a: SponsorshipCampaign | PlainMessage<SponsorshipCampaign> | undefined, b: SponsorshipCampaign | PlainMessage<SponsorshipCampaign> | undefined): boolean;
206
252
  }
253
+ /**
254
+ * Drives the client display, e.g. "5 of 5 free swaps remaining" or "$2 of $10".
255
+ *
256
+ * @generated from message uniswap.platformservice.v1.SponsorshipAllowance
257
+ */
258
+ export declare class SponsorshipAllowance extends Message<SponsorshipAllowance> {
259
+ /**
260
+ * @generated from field: uniswap.platformservice.v1.AllowanceUnit unit = 1;
261
+ */
262
+ unit: AllowanceUnit;
263
+ /**
264
+ * Integer strings (BigInt-safe); USD_CENT is in cents. used = total - remaining.
265
+ *
266
+ * @generated from field: string total = 2;
267
+ */
268
+ total: string;
269
+ /**
270
+ * @generated from field: string remaining = 3;
271
+ */
272
+ remaining: string;
273
+ constructor(data?: PartialMessage<SponsorshipAllowance>);
274
+ static readonly runtime: typeof proto3;
275
+ static readonly typeName = "uniswap.platformservice.v1.SponsorshipAllowance";
276
+ static readonly fields: FieldList;
277
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SponsorshipAllowance;
278
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SponsorshipAllowance;
279
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SponsorshipAllowance;
280
+ static equals(a: SponsorshipAllowance | PlainMessage<SponsorshipAllowance> | undefined, b: SponsorshipAllowance | PlainMessage<SponsorshipAllowance> | undefined): boolean;
281
+ }
207
282
  /**
208
283
  * @generated from message uniswap.platformservice.v1.Criterion
209
284
  */
@@ -3,6 +3,32 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
  import { Message, proto3, Timestamp, Value } from "@bufbuild/protobuf";
6
+ /**
7
+ * @generated from enum uniswap.platformservice.v1.AllowanceUnit
8
+ */
9
+ export var AllowanceUnit;
10
+ (function (AllowanceUnit) {
11
+ /**
12
+ * @generated from enum value: ALLOWANCE_UNIT_UNSPECIFIED = 0;
13
+ */
14
+ AllowanceUnit[AllowanceUnit["UNSPECIFIED"] = 0] = "UNSPECIFIED";
15
+ /**
16
+ * @generated from enum value: ALLOWANCE_UNIT_FREE_SWAPS = 1;
17
+ */
18
+ AllowanceUnit[AllowanceUnit["FREE_SWAPS"] = 1] = "FREE_SWAPS";
19
+ /**
20
+ * US cents. Reserved; not yet populated server-side.
21
+ *
22
+ * @generated from enum value: ALLOWANCE_UNIT_USD_CENT = 2;
23
+ */
24
+ AllowanceUnit[AllowanceUnit["USD_CENT"] = 2] = "USD_CENT";
25
+ })(AllowanceUnit || (AllowanceUnit = {}));
26
+ // Retrieve enum metadata with: proto3.getEnumType(AllowanceUnit)
27
+ proto3.util.setEnumType(AllowanceUnit, "uniswap.platformservice.v1.AllowanceUnit", [
28
+ { no: 0, name: "ALLOWANCE_UNIT_UNSPECIFIED" },
29
+ { no: 1, name: "ALLOWANCE_UNIT_FREE_SWAPS" },
30
+ { no: 2, name: "ALLOWANCE_UNIT_USD_CENT" },
31
+ ]);
6
32
  /**
7
33
  * @generated from message uniswap.platformservice.v1.ListEligibleGasFeeSponsorshipCampaignsRequest
8
34
  */
@@ -230,6 +256,33 @@ export class SponsorshipCampaign extends Message {
230
256
  * @generated from field: string sponsor_logo_url = 6;
231
257
  */
232
258
  this.sponsorLogoUrl = "";
259
+ /**
260
+ * Human-readable headline, e.g. "Welcome to Uniswap". Distinct from `name`
261
+ * (machine id) and `description` (subheader).
262
+ *
263
+ * @generated from field: string headline = 7;
264
+ */
265
+ this.headline = "";
266
+ /**
267
+ * Image asset for this campaign, rendered as the UI thumbnail. Distinct from
268
+ * `sponsor_logo_url`.
269
+ *
270
+ * @generated from field: string thumbnail_url = 8;
271
+ */
272
+ this.thumbnailUrl = "";
273
+ /**
274
+ * Per-wallet caps + utilization, one entry per dimension (free-swap count
275
+ * and/or cost). Empty when the campaign has no per-wallet cap.
276
+ *
277
+ * @generated from field: repeated uniswap.platformservice.v1.SponsorshipAllowance allowances = 9;
278
+ */
279
+ this.allowances = [];
280
+ /**
281
+ * Chain IDs the campaign covers, for the client "eligible chains" modal.
282
+ *
283
+ * @generated from field: repeated uint32 eligible_chains = 10;
284
+ */
285
+ this.eligibleChains = [];
233
286
  proto3.util.initPartial(data, this);
234
287
  }
235
288
  static fromBinary(bytes, options) {
@@ -254,6 +307,54 @@ SponsorshipCampaign.fields = proto3.util.newFieldList(() => [
254
307
  { no: 4, name: "alchemy_policy_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "policyId" },
255
308
  { no: 5, name: "sponsor_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
256
309
  { no: 6, name: "sponsor_logo_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
310
+ { no: 7, name: "headline", kind: "scalar", T: 9 /* ScalarType.STRING */ },
311
+ { no: 8, name: "thumbnail_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
312
+ { no: 9, name: "allowances", kind: "message", T: SponsorshipAllowance, repeated: true },
313
+ { no: 10, name: "eligible_chains", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true },
314
+ ]);
315
+ /**
316
+ * Drives the client display, e.g. "5 of 5 free swaps remaining" or "$2 of $10".
317
+ *
318
+ * @generated from message uniswap.platformservice.v1.SponsorshipAllowance
319
+ */
320
+ export class SponsorshipAllowance extends Message {
321
+ constructor(data) {
322
+ super();
323
+ /**
324
+ * @generated from field: uniswap.platformservice.v1.AllowanceUnit unit = 1;
325
+ */
326
+ this.unit = AllowanceUnit.UNSPECIFIED;
327
+ /**
328
+ * Integer strings (BigInt-safe); USD_CENT is in cents. used = total - remaining.
329
+ *
330
+ * @generated from field: string total = 2;
331
+ */
332
+ this.total = "";
333
+ /**
334
+ * @generated from field: string remaining = 3;
335
+ */
336
+ this.remaining = "";
337
+ proto3.util.initPartial(data, this);
338
+ }
339
+ static fromBinary(bytes, options) {
340
+ return new SponsorshipAllowance().fromBinary(bytes, options);
341
+ }
342
+ static fromJson(jsonValue, options) {
343
+ return new SponsorshipAllowance().fromJson(jsonValue, options);
344
+ }
345
+ static fromJsonString(jsonString, options) {
346
+ return new SponsorshipAllowance().fromJsonString(jsonString, options);
347
+ }
348
+ static equals(a, b) {
349
+ return proto3.util.equals(SponsorshipAllowance, a, b);
350
+ }
351
+ }
352
+ SponsorshipAllowance.runtime = proto3;
353
+ SponsorshipAllowance.typeName = "uniswap.platformservice.v1.SponsorshipAllowance";
354
+ SponsorshipAllowance.fields = proto3.util.newFieldList(() => [
355
+ { no: 1, name: "unit", kind: "enum", T: proto3.getEnumType(AllowanceUnit) },
356
+ { no: 2, name: "total", kind: "scalar", T: 9 /* ScalarType.STRING */ },
357
+ { no: 3, name: "remaining", kind: "scalar", T: 9 /* ScalarType.STRING */ },
257
358
  ]);
258
359
  /**
259
360
  * @generated from message uniswap.platformservice.v1.Criterion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-platform-service",
3
- "version": "0.0.25",
3
+ "version": "0.0.28",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },