@zoralabs/coins-sdk 0.5.0 → 0.5.2

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 { Address } from "viem";
2
- import { Uploader, UploadResult } from "../types";
2
+ import { Uploader, UploadOptions, UploadResult } from "../types";
3
3
  /**
4
4
  * Zora IPFS uploader implementation
5
5
  */
@@ -8,8 +8,11 @@ export declare class ZoraUploader implements Uploader {
8
8
  private creatorAddress;
9
9
  private jwtApiKey;
10
10
  private jwtApiKeyExpiresAt;
11
- getJWTApiKey(): Promise<string>;
12
- upload(file: File): Promise<UploadResult>;
11
+ private invalidateJwt;
12
+ private getJWTApiKey;
13
+ private buildUploadSignal;
14
+ private doUpload;
15
+ upload(file: File, options?: UploadOptions): Promise<UploadResult>;
13
16
  }
14
17
  /**
15
18
  * Create a new Zora IPFS uploader
@@ -1 +1 @@
1
- {"version":3,"file":"zora.d.ts","sourceRoot":"","sources":["../../../src/uploader/providers/zora.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIlD;;GAEG;AACH,qBAAa,YAAa,YAAW,QAAQ;gBAC/B,cAAc,EAAE,OAAO;IAOnC,OAAO,CAAC,cAAc,CAAU;IAChC,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,kBAAkB,CAAqB;IAEzC,YAAY;IAsBZ,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;CAkChD;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,cAAc,EAAE,OAAO,GACtB,QAAQ,CAEV"}
1
+ {"version":3,"file":"zora.d.ts","sourceRoot":"","sources":["../../../src/uploader/providers/zora.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAOjE;;GAEG;AACH,qBAAa,YAAa,YAAW,QAAQ;gBAC/B,cAAc,EAAE,OAAO;IAOnC,OAAO,CAAC,cAAc,CAAU;IAChC,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,kBAAkB,CAAqB;IAE/C,OAAO,CAAC,aAAa;YAKP,YAAY;IA8B1B,OAAO,CAAC,iBAAiB;YAWX,QAAQ;IAmBhB,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;CA8BzE;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,cAAc,EAAE,OAAO,GACtB,QAAQ,CAEV"}
@@ -7,11 +7,20 @@ export type UploadResult = {
7
7
  size: number | undefined;
8
8
  mimeType: string | undefined;
9
9
  };
10
+ /**
11
+ * Options for file upload operations
12
+ */
13
+ export type UploadOptions = {
14
+ /** AbortSignal to cancel the upload */
15
+ signal?: AbortSignal;
16
+ /** Timeout in milliseconds for the upload request (no default) */
17
+ timeout?: number;
18
+ };
10
19
  /**
11
20
  * Interface for file uploaders (IPFS, Arweave, etc.)
12
21
  */
13
22
  export interface Uploader {
14
- upload(file: File): Promise<UploadResult>;
23
+ upload(file: File, options?: UploadOptions): Promise<UploadResult>;
15
24
  }
16
25
  export type CreateMetadataParameters = {
17
26
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/uploader/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GACxB,UAAU,MAAM,EAAE,GAClB,QAAQ,MAAM,EAAE,GAChB,QAAQ,MAAM,EAAE,GAChB,WAAW,MAAM,EAAE,CAAC;AAExB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,gBAAgB,CAAC;IACtB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CAC3C;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE;QACR,IAAI,EAAE,SAAS,CAAC;QAChB,GAAG,EAAE,gBAAgB,CAAC;KACvB,CAAC;CACH,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/uploader/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GACxB,UAAU,MAAM,EAAE,GAClB,QAAQ,MAAM,EAAE,GAChB,QAAQ,MAAM,EAAE,GAChB,WAAW,MAAM,EAAE,CAAC;AAExB;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,gBAAgB,CAAC;IACtB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,uCAAuC;IACvC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACpE;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE;QACR,IAAI,EAAE,SAAS,CAAC;QAChB,GAAG,EAAE,gBAAgB,CAAC;KACvB,CAAC;CACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zoralabs/coins-sdk",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "repository": "https://github.com/ourzora/zora-protocol",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -46,7 +46,7 @@
46
46
  "@zoralabs/tsconfig": "^0.0.1"
47
47
  },
48
48
  "engines": {
49
- "node": ">=22"
49
+ "node": ">=20"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "pnpm tsup",
@@ -247,7 +247,14 @@ export async function createTradeCall(
247
247
 
248
248
  if (!quote.data) {
249
249
  console.error(quote);
250
- throw new Error("Quote failed");
250
+ const errorBody = quote.error as
251
+ | { error?: string; errorType?: string }
252
+ | undefined;
253
+ const errorMessage = errorBody?.error || "Quote failed";
254
+ const err = new Error(errorMessage);
255
+ (err as any).errorType = errorBody?.errorType;
256
+ (err as any).errorBody = errorBody;
257
+ throw err;
251
258
  }
252
259
 
253
260
  return quote.data;
@@ -1,4 +1,5 @@
1
1
  import { client } from "../client/client.gen";
2
+ import { createConfig } from "@hey-api/client-fetch";
2
3
  import { getApiKeyMeta } from "./api-key";
3
4
 
4
5
  export const apiGet = (path: string, data?: Record<string, unknown>) =>
@@ -6,3 +7,7 @@ export const apiGet = (path: string, data?: Record<string, unknown>) =>
6
7
 
7
8
  export const apiPost = (path: string, data?: Record<string, unknown>) =>
8
9
  client.post({ url: path, body: data, ...getApiKeyMeta() });
10
+
11
+ export const setApiBaseUrl = (baseUrl: string) => {
12
+ client.setConfig(createConfig({ baseUrl }));
13
+ };
@@ -27,6 +27,8 @@ import {
27
27
  GetContentCoinPoolConfigResponse,
28
28
  GetCreatorCoinPoolConfigData,
29
29
  GetCreatorCoinPoolConfigResponse,
30
+ GetCreatorLivestreamCommentsData,
31
+ GetCreatorLivestreamCommentsResponse,
30
32
  } from "../client/types.gen";
31
33
  import {
32
34
  getCoin as getCoinSDK,
@@ -43,6 +45,7 @@ import {
43
45
  getTraderLeaderboard as getTraderLeaderboardSDK,
44
46
  getContentCoinPoolConfig as getContentCoinPoolConfigSDK,
45
47
  getCreatorCoinPoolConfig as getCreatorCoinPoolConfigSDK,
48
+ getCreatorLivestreamComments as getCreatorLivestreamCommentsSDK,
46
49
  } from "../client/sdk.gen";
47
50
  import { getApiKeyMeta } from "./api-key";
48
51
  import { RequestOptionsType } from "./query-types";
@@ -263,3 +266,22 @@ export const getCreatorCoinPoolConfig = async (
263
266
  ...options,
264
267
  });
265
268
  };
269
+
270
+ type GetCreatorLivestreamCommentsQuery =
271
+ GetCreatorLivestreamCommentsData["query"];
272
+ export type {
273
+ GetCreatorLivestreamCommentsQuery,
274
+ GetCreatorLivestreamCommentsData,
275
+ };
276
+ export type { GetCreatorLivestreamCommentsResponse } from "../client/types.gen";
277
+
278
+ export const getCreatorLivestreamComments = async (
279
+ query: GetCreatorLivestreamCommentsQuery,
280
+ options?: RequestOptionsType<GetCreatorLivestreamCommentsData>,
281
+ ): Promise<RequestResult<GetCreatorLivestreamCommentsResponse>> => {
282
+ return await getCreatorLivestreamCommentsSDK({
283
+ query,
284
+ ...getApiKeyMeta(),
285
+ ...options,
286
+ });
287
+ };
@@ -14,6 +14,8 @@ import type {
14
14
  GetCoinCommentsResponse,
15
15
  GetCoinHoldersData,
16
16
  GetCoinHoldersResponse,
17
+ GetCoinPriceHistoryData,
18
+ GetCoinPriceHistoryResponse,
17
19
  GetCoinSwapsData,
18
20
  GetCoinSwapsResponse,
19
21
  GetCoinsData,
@@ -26,6 +28,8 @@ import type {
26
28
  SetCreateUploadJwtResponse,
27
29
  GetCreatorCoinPoolConfigData,
28
30
  GetCreatorCoinPoolConfigResponse,
31
+ GetCreatorLivestreamCommentsData,
32
+ GetCreatorLivestreamCommentsResponse,
29
33
  GetExploreData,
30
34
  GetExploreResponse,
31
35
  GetFeaturedCreatorsData,
@@ -164,6 +168,28 @@ export const getCoinHolders = <ThrowOnError extends boolean = false>(
164
168
  });
165
169
  };
166
170
 
171
+ /**
172
+ * zoraSDK_coinPriceHistory query
173
+ */
174
+ export const getCoinPriceHistory = <ThrowOnError extends boolean = false>(
175
+ options: Options<GetCoinPriceHistoryData, ThrowOnError>,
176
+ ) => {
177
+ return (options.client ?? _heyApiClient).get<
178
+ GetCoinPriceHistoryResponse,
179
+ unknown,
180
+ ThrowOnError
181
+ >({
182
+ security: [
183
+ {
184
+ name: "api-key",
185
+ type: "apiKey",
186
+ },
187
+ ],
188
+ url: "/coinPriceHistory",
189
+ ...options,
190
+ });
191
+ };
192
+
167
193
  /**
168
194
  * zoraSDK_coinSwaps query
169
195
  */
@@ -300,6 +326,30 @@ export const getCreatorCoinPoolConfig = <ThrowOnError extends boolean = false>(
300
326
  });
301
327
  };
302
328
 
329
+ /**
330
+ * zoraSDK_creatorLivestreamComments query
331
+ */
332
+ export const getCreatorLivestreamComments = <
333
+ ThrowOnError extends boolean = false,
334
+ >(
335
+ options: Options<GetCreatorLivestreamCommentsData, ThrowOnError>,
336
+ ) => {
337
+ return (options.client ?? _heyApiClient).get<
338
+ GetCreatorLivestreamCommentsResponse,
339
+ unknown,
340
+ ThrowOnError
341
+ >({
342
+ security: [
343
+ {
344
+ name: "api-key",
345
+ type: "apiKey",
346
+ },
347
+ ],
348
+ url: "/creatorLivestreamComments",
349
+ ...options,
350
+ });
351
+ };
352
+
303
353
  /**
304
354
  * zoraSDK_explore query
305
355
  */
@@ -653,6 +653,90 @@ export type GetCoinHoldersResponses = {
653
653
  export type GetCoinHoldersResponse =
654
654
  GetCoinHoldersResponses[keyof GetCoinHoldersResponses];
655
655
 
656
+ export type GetCoinPriceHistoryData = {
657
+ body?: never;
658
+ path?: never;
659
+ query: {
660
+ address: string;
661
+ chain?: number;
662
+ };
663
+ url: "/coinPriceHistory";
664
+ };
665
+
666
+ export type GetCoinPriceHistoryErrors = {
667
+ /**
668
+ * Bad request
669
+ */
670
+ 400: unknown;
671
+ /**
672
+ * Internal server error
673
+ */
674
+ 500: unknown;
675
+ };
676
+
677
+ export type GetCoinPriceHistoryResponses = {
678
+ /**
679
+ * Successful operation
680
+ */
681
+ 200: {
682
+ zora20Token?: {
683
+ oneHour: Array<{
684
+ /**
685
+ * Date with time (isoformat)
686
+ */
687
+ timestamp: string;
688
+ /**
689
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
690
+ */
691
+ closePrice: string;
692
+ }>;
693
+ oneDay: Array<{
694
+ /**
695
+ * Date with time (isoformat)
696
+ */
697
+ timestamp: string;
698
+ /**
699
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
700
+ */
701
+ closePrice: string;
702
+ }>;
703
+ oneWeek: Array<{
704
+ /**
705
+ * Date with time (isoformat)
706
+ */
707
+ timestamp: string;
708
+ /**
709
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
710
+ */
711
+ closePrice: string;
712
+ }>;
713
+ oneMonth: Array<{
714
+ /**
715
+ * Date with time (isoformat)
716
+ */
717
+ timestamp: string;
718
+ /**
719
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
720
+ */
721
+ closePrice: string;
722
+ }>;
723
+ all: Array<{
724
+ /**
725
+ * Date with time (isoformat)
726
+ */
727
+ timestamp: string;
728
+ /**
729
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
730
+ */
731
+ closePrice: string;
732
+ }>;
733
+ };
734
+ };
735
+ };
736
+
737
+ export type GetCoinPriceHistoryResponse =
738
+ GetCoinPriceHistoryResponses[keyof GetCoinPriceHistoryResponses];
739
+
656
740
  export type GetCoinSwapsData = {
657
741
  body?: never;
658
742
  path?: never;
@@ -1356,6 +1440,193 @@ export type GetCreatorCoinPoolConfigResponses = {
1356
1440
  export type GetCreatorCoinPoolConfigResponse =
1357
1441
  GetCreatorCoinPoolConfigResponses[keyof GetCreatorCoinPoolConfigResponses];
1358
1442
 
1443
+ export type GetCreatorLivestreamCommentsData = {
1444
+ body?: never;
1445
+ path?: never;
1446
+ query: {
1447
+ address: string;
1448
+ chain?: number;
1449
+ after?: string;
1450
+ count?: number;
1451
+ };
1452
+ url: "/creatorLivestreamComments";
1453
+ };
1454
+
1455
+ export type GetCreatorLivestreamCommentsErrors = {
1456
+ /**
1457
+ * Bad request
1458
+ */
1459
+ 400: unknown;
1460
+ /**
1461
+ * Internal server error
1462
+ */
1463
+ 500: unknown;
1464
+ };
1465
+
1466
+ export type GetCreatorLivestreamCommentsResponses = {
1467
+ /**
1468
+ * Successful operation
1469
+ */
1470
+ 200: {
1471
+ zora20Token?: {
1472
+ creatorProfile?: {
1473
+ liveStream?: {
1474
+ comments: {
1475
+ pageInfo: {
1476
+ /**
1477
+ * When paginating forwards, the cursor to continue.
1478
+ */
1479
+ endCursor?: string;
1480
+ /**
1481
+ * When paginating forwards, are there more items?
1482
+ */
1483
+ hasNextPage: boolean;
1484
+ };
1485
+ /**
1486
+ * The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
1487
+ */
1488
+ count: number;
1489
+ edges: Array<{
1490
+ /**
1491
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1492
+ */
1493
+ cursor: string;
1494
+ node: {
1495
+ /**
1496
+ * The Globally Unique ID of this object
1497
+ */
1498
+ id: string;
1499
+ /**
1500
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1501
+ */
1502
+ commentId: string;
1503
+ /**
1504
+ * Date with time (isoformat)
1505
+ */
1506
+ commentedAt: string;
1507
+ /**
1508
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1509
+ */
1510
+ comment: string;
1511
+ profile?: {
1512
+ /**
1513
+ * The Globally Unique ID of this object
1514
+ */
1515
+ id: string;
1516
+ /**
1517
+ * Manually set username, or truncated wallet address if the profile isn't a GraphQLAccountProfile. For full wallet address, use the profile_id field instead.
1518
+ */
1519
+ handle: string;
1520
+ /**
1521
+ * The `Boolean` scalar type represents `true` or `false`.
1522
+ */
1523
+ platformBlocked: boolean;
1524
+ avatar?: {
1525
+ previewImage: {
1526
+ /**
1527
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1528
+ */
1529
+ blurhash?: string;
1530
+ /**
1531
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1532
+ */
1533
+ medium: string;
1534
+ /**
1535
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1536
+ */
1537
+ small: string;
1538
+ };
1539
+ };
1540
+ socialAccounts: {
1541
+ instagram?: {
1542
+ /**
1543
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1544
+ */
1545
+ username?: string;
1546
+ /**
1547
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1548
+ */
1549
+ displayName?: string;
1550
+ /**
1551
+ * The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
1552
+ */
1553
+ followerCount?: number;
1554
+ /**
1555
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1556
+ */
1557
+ id?: string;
1558
+ };
1559
+ tiktok?: {
1560
+ /**
1561
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1562
+ */
1563
+ username?: string;
1564
+ /**
1565
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1566
+ */
1567
+ displayName?: string;
1568
+ /**
1569
+ * The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
1570
+ */
1571
+ followerCount?: number;
1572
+ /**
1573
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1574
+ */
1575
+ id?: string;
1576
+ };
1577
+ twitter?: {
1578
+ /**
1579
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1580
+ */
1581
+ username?: string;
1582
+ /**
1583
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1584
+ */
1585
+ displayName?: string;
1586
+ /**
1587
+ * The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
1588
+ */
1589
+ followerCount?: number;
1590
+ /**
1591
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1592
+ */
1593
+ id?: string;
1594
+ };
1595
+ farcaster?: {
1596
+ /**
1597
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1598
+ */
1599
+ username?: string;
1600
+ /**
1601
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1602
+ */
1603
+ displayName?: string;
1604
+ /**
1605
+ * The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
1606
+ */
1607
+ followerCount?: number;
1608
+ /**
1609
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
1610
+ */
1611
+ id?: string;
1612
+ };
1613
+ };
1614
+ creatorCoin?: {
1615
+ address: string;
1616
+ };
1617
+ };
1618
+ };
1619
+ }>;
1620
+ };
1621
+ };
1622
+ };
1623
+ };
1624
+ };
1625
+ };
1626
+
1627
+ export type GetCreatorLivestreamCommentsResponse =
1628
+ GetCreatorLivestreamCommentsResponses[keyof GetCreatorLivestreamCommentsResponses];
1629
+
1359
1630
  export type GetExploreData = {
1360
1631
  body?: never;
1361
1632
  path?: never;
@@ -2241,10 +2512,52 @@ export type GetProfileBalancesResponses = {
2241
2512
  * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
2242
2513
  */
2243
2514
  balance: string;
2515
+ /**
2516
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
2517
+ */
2518
+ walletBalance: string;
2244
2519
  /**
2245
2520
  * The Globally Unique ID of this object
2246
2521
  */
2247
2522
  id: string;
2523
+ valuation?: {
2524
+ /**
2525
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
2526
+ */
2527
+ marketValueUsd?: string;
2528
+ /**
2529
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
2530
+ */
2531
+ faceValueUsd?: string;
2532
+ /**
2533
+ * The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
2534
+ */
2535
+ blockNumber?: number;
2536
+ maxSwappable?: {
2537
+ /**
2538
+ * Raw amount of the currency, in wei. Not formatted with decimals
2539
+ */
2540
+ amountRaw: string;
2541
+ /**
2542
+ * Amount of the currency, in float format accounting for currency decimals
2543
+ */
2544
+ amountDecimal: number;
2545
+ };
2546
+ currencyAmount: {
2547
+ /**
2548
+ * Raw amount of the currency, in wei. Not formatted with decimals
2549
+ */
2550
+ amountRaw: string;
2551
+ /**
2552
+ * Amount of the currency, in float format accounting for currency decimals
2553
+ */
2554
+ amountDecimal: number;
2555
+ };
2556
+ /**
2557
+ * The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
2558
+ */
2559
+ error?: string;
2560
+ };
2248
2561
  coin?: {
2249
2562
  /**
2250
2563
  * The Globally Unique ID of this object
@@ -3819,6 +4132,10 @@ export type GetTrendsByNameResponses = {
3819
4132
  200: {
3820
4133
  trendsByName: {
3821
4134
  pageInfo: {
4135
+ /**
4136
+ * When paginating forwards, are there more items?
4137
+ */
4138
+ hasNextPage: boolean;
3822
4139
  /**
3823
4140
  * When paginating backwards, the cursor to continue.
3824
4141
  */
@@ -4127,10 +4444,26 @@ export type PostQuoteData = {
4127
4444
 
4128
4445
  export type PostQuoteErrors = {
4129
4446
  /**
4130
- * Error
4447
+ * Liquidity error — not enough pool liquidity for the requested trade
4448
+ */
4449
+ 422: {
4450
+ success: "false";
4451
+ error: string;
4452
+ /**
4453
+ * The type of error. LIQUIDITY indicates insufficient pool liquidity for the requested trade.
4454
+ */
4455
+ errorType: "LIQUIDITY" | "UNKNOWN";
4456
+ };
4457
+ /**
4458
+ * Server error
4131
4459
  */
4132
4460
  500: {
4133
- error?: string;
4461
+ success: "false";
4462
+ error: string;
4463
+ /**
4464
+ * The type of error. LIQUIDITY indicates insufficient pool liquidity for the requested trade.
4465
+ */
4466
+ errorType: "LIQUIDITY" | "UNKNOWN";
4134
4467
  };
4135
4468
  };
4136
4469
 
package/src/index.ts CHANGED
@@ -36,7 +36,7 @@ export type * from "./api/explore";
36
36
  export { setApiKey } from "./api/api-key";
37
37
 
38
38
  // Raw API helpers
39
- export { apiGet, apiPost } from "./api/api-raw";
39
+ export { apiGet, apiPost, setApiBaseUrl } from "./api/api-raw";
40
40
 
41
41
  // Metadata Validation Utils
42
42
  export * from "./metadata";