@story-protocol/ipkit 0.4.0-beta.9 → 0.4.1-beta.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.
Files changed (43) hide show
  1. package/README.md +183 -0
  2. package/dist/hooks/index.d.ts +1 -0
  3. package/dist/hooks/index.d.ts.map +1 -1
  4. package/dist/hooks/stories/useLicenseTokens.stories.d.ts +38 -0
  5. package/dist/hooks/stories/useLicenseTokens.stories.d.ts.map +1 -0
  6. package/dist/hooks/useLicenseTokens.d.ts +12 -0
  7. package/dist/hooks/useLicenseTokens.d.ts.map +1 -0
  8. package/dist/lib/api/getCollections.d.ts +8 -8
  9. package/dist/lib/api/getIpAssetEdges.d.ts +3 -3
  10. package/dist/lib/api/getIpAssets.d.ts +6 -6
  11. package/dist/lib/api/getLicenseTokens.d.ts +273 -0
  12. package/dist/lib/api/getLicenseTokens.d.ts.map +1 -0
  13. package/dist/lib/api/getSearch.d.ts +3 -3
  14. package/dist/lib/api/getTransactions.d.ts +3 -3
  15. package/dist/lib/api/index.d.ts +1 -0
  16. package/dist/lib/api/index.d.ts.map +1 -1
  17. package/dist/lib/index.d.ts +0 -2
  18. package/dist/lib/index.d.ts.map +1 -1
  19. package/dist/lib/utils.d.ts +0 -8
  20. package/dist/lib/utils.d.ts.map +1 -1
  21. package/dist/providers/IpKitProvider/IpKitProvider.d.ts +1 -8
  22. package/dist/providers/IpKitProvider/IpKitProvider.d.ts.map +1 -1
  23. package/dist/providers/IpKitProvider/__docs__/Example.d.ts +0 -3
  24. package/dist/providers/IpKitProvider/__docs__/Example.d.ts.map +1 -1
  25. package/dist/providers/IpKitProvider/__docs__/IpKitProvider.stories.d.ts +0 -12
  26. package/dist/providers/IpKitProvider/__docs__/IpKitProvider.stories.d.ts.map +1 -1
  27. package/dist/server-types.d.ts +420 -45
  28. package/dist/server.cjs.js +1 -1
  29. package/dist/server.cjs.js.map +1 -1
  30. package/dist/server.esm.js +1 -1
  31. package/dist/server.esm.js.map +1 -1
  32. package/dist/storyprotocol-storykit.cjs.js +1 -1
  33. package/dist/storyprotocol-storykit.cjs.js.map +1 -1
  34. package/dist/storyprotocol-storykit.esm.js +1 -1
  35. package/dist/storyprotocol-storykit.esm.js.map +1 -1
  36. package/dist/types/openapi.d.ts +1 -0
  37. package/dist/types/openapi.d.ts.map +1 -1
  38. package/dist/types/schema.d.ts +123 -6
  39. package/dist/types/schema.d.ts.map +1 -1
  40. package/dist/types.d.ts +429 -53
  41. package/package.json +20 -31
  42. package/dist/lib/functions/convertLicenseTermObject.d.ts +0 -6
  43. package/dist/lib/functions/convertLicenseTermObject.d.ts.map +0 -1
package/dist/types.d.ts CHANGED
@@ -2,7 +2,6 @@ import * as openapi_fetch from 'openapi-fetch';
2
2
  import { Client } from 'openapi-fetch';
3
3
  import { Address } from 'viem';
4
4
  import React from 'react';
5
- import { ClassValue } from 'clsx';
6
5
  import { UseQueryResult } from '@tanstack/react-query';
7
6
 
8
7
  interface paths {
@@ -57,7 +56,7 @@ interface paths {
57
56
  put?: never;
58
57
  /**
59
58
  * List Collections
60
- * @description Retrieve a list of collections with pagination and filtering options. Collections are ordered by most recent or least recent updated time only. Collections are automatically enriched with metadata. The 'where' field is optional and should only be provided when filtering by specific collection addresses or asset counts. This endpoint can also be used to fetch a single collection by passing its address in the collectionAddresses filter. Collections that don't exist in Alchemy or encounter errors will return with empty metadata instead of failing the entire request.
59
+ * @description Retrieve a list of collections with pagination and filtering options. Collections can be ordered by updatedAt, assetCount, or licensesCount (asc/desc). Collections are automatically enriched with metadata. The 'where' field is optional and should only be provided when filtering by specific collection addresses or asset counts. This endpoint can also be used to fetch a single collection by passing its address in the collectionAddresses filter. Collections that don't exist in Alchemy or encounter errors will return with empty metadata instead of failing the entire request.
61
60
  */
62
61
  post: operations["listCollectionsV4"];
63
62
  delete?: never;
@@ -119,6 +118,26 @@ interface paths {
119
118
  patch?: never;
120
119
  trace?: never;
121
120
  };
121
+ "/licenses/tokens": {
122
+ parameters: {
123
+ query?: never;
124
+ header?: never;
125
+ path?: never;
126
+ cookie?: never;
127
+ };
128
+ get?: never;
129
+ put?: never;
130
+ /**
131
+ * Get License Tokens
132
+ * @description Retrieve license tokens with optional filtering. If no filters are provided, returns all license tokens. Supports filtering by owner wallet address and/or licensor IP ID. Results are paginated and can be ordered by 'blockNumber' (default: descending).
133
+ */
134
+ post: operations["getLicenseTokensV4"];
135
+ delete?: never;
136
+ options?: never;
137
+ head?: never;
138
+ patch?: never;
139
+ trace?: never;
140
+ };
122
141
  "/search": {
123
142
  parameters: {
124
143
  query?: never;
@@ -169,11 +188,11 @@ interface components {
169
188
  */
170
189
  readonly $schema?: string;
171
190
  /**
172
- * @description Field to order results by (only updatedAt is supported)
191
+ * @description Field to order results by: updatedAt, assetCount, or licensesCount
173
192
  * @default updatedAt
174
193
  * @enum {string}
175
194
  */
176
- orderBy: "updatedAt";
195
+ orderBy: "updatedAt" | "assetCount" | "licensesCount";
177
196
  /**
178
197
  * @description Order direction: asc for least recent, desc for most recent
179
198
  * @default desc
@@ -629,6 +648,71 @@ interface components {
629
648
  transferable: boolean;
630
649
  uri: string;
631
650
  };
651
+ LicenseToken: {
652
+ blockNumber: string;
653
+ blockTime: string;
654
+ burntAt: string;
655
+ id: string;
656
+ licenseTemplate: string;
657
+ licenseTermsId: string;
658
+ licensorIpId: string;
659
+ owner: string;
660
+ transferable: string;
661
+ };
662
+ LicenseTokenPaginationOptionsHuma: {
663
+ /**
664
+ * Format: int64
665
+ * @description Number of items to return
666
+ * @default 100
667
+ */
668
+ limit: number;
669
+ /**
670
+ * Format: int64
671
+ * @description Number of items to skip
672
+ * @default 0
673
+ */
674
+ offset: number;
675
+ };
676
+ LicenseTokensRequestBodyHuma: {
677
+ /**
678
+ * Format: uri
679
+ * @description A URL to the JSON Schema for this object.
680
+ */
681
+ readonly $schema?: string;
682
+ /**
683
+ * @description Field to order results by (only 'blockNumber' is supported)
684
+ * @default blockNumber
685
+ * @enum {string}
686
+ */
687
+ orderBy: "blockNumber";
688
+ /**
689
+ * @description Order direction for results ('asc' for ascending, 'desc' for descending)
690
+ * @default desc
691
+ * @enum {string}
692
+ */
693
+ orderDirection: "asc" | "desc";
694
+ /** @description Pagination configuration (optional, defaults: limit=100, offset=0) */
695
+ pagination?: components["schemas"]["LicenseTokenPaginationOptionsHuma"];
696
+ /** @description Optional filter options for license tokens */
697
+ where?: components["schemas"]["LicenseTokensWhereOptionsHuma"];
698
+ };
699
+ LicenseTokensResponseHumaBody: {
700
+ /**
701
+ * Format: uri
702
+ * @description A URL to the JSON Schema for this object.
703
+ */
704
+ readonly $schema?: string;
705
+ /** @description List of license tokens matching the filter criteria */
706
+ data: components["schemas"]["LicenseToken"][] | null;
707
+ /** @description Pagination metadata including total count and hasMore flag */
708
+ pagination?: components["schemas"]["PaginationMetadataHuma"];
709
+ };
710
+ LicenseTokensWhereOptionsHuma: {
711
+ /** @description Optional licensor IP ID to filter license tokens */
712
+ licensorIpId?: string;
713
+ /** @description Optional owner wallet address to filter license tokens */
714
+ ownerAddress?: string;
715
+ };
632
716
  LicensingConfig: {
633
717
  /** Format: int64 */
634
718
  commercialRevShare: number;
@@ -639,8 +723,7 @@ interface components {
639
723
  hookData: string;
640
724
  isSet: boolean;
641
725
  licensingHook: string;
642
- /** Format: int64 */
643
- mintingFee: number;
726
+ mintingFee: string;
644
727
  };
645
728
  ListDisputesResponseHumaBody: {
646
729
  /**
@@ -723,7 +806,7 @@ interface components {
723
806
  * Format: int64
724
807
  * @description Total count of items
725
808
  */
726
- total?: number;
809
+ total: number;
727
810
  };
728
811
  PaginationOptionsHuma: {
729
812
  /**
@@ -1000,6 +1083,39 @@ interface operations {
1000
1083
  };
1001
1084
  };
1002
1085
  };
1086
+ getLicenseTokensV4: {
1087
+ parameters: {
1088
+ query?: never;
1089
+ header?: never;
1090
+ path?: never;
1091
+ cookie?: never;
1092
+ };
1093
+ requestBody: {
1094
+ content: {
1095
+ "application/json": components["schemas"]["LicenseTokensRequestBodyHuma"];
1096
+ };
1097
+ };
1098
+ responses: {
1099
+ /** @description OK */
1100
+ 200: {
1101
+ headers: {
1102
+ [name: string]: unknown;
1103
+ };
1104
+ content: {
1105
+ "application/json": components["schemas"]["LicenseTokensResponseHumaBody"];
1106
+ };
1107
+ };
1108
+ /** @description Error */
1109
+ default: {
1110
+ headers: {
1111
+ [name: string]: unknown;
1112
+ };
1113
+ content: {
1114
+ "application/problem+json": components["schemas"]["ErrorModel"];
1115
+ };
1116
+ };
1117
+ };
1118
+ };
1003
1119
  searchV4: {
1004
1120
  parameters: {
1005
1121
  query?: never;
@@ -1105,26 +1221,19 @@ declare enum IPKIT_SUPPORTED_CHAIN {
1105
1221
  }
1106
1222
  declare const WRAPPED_IP: ERC20Token;
1107
1223
 
1108
- type Mode = "light" | "dark" | undefined;
1109
- type Theme = "default" | "story" | string;
1110
1224
  interface IpKitProviderOptions {
1111
1225
  apiKey: string;
1112
1226
  appId?: string;
1113
1227
  children: React.ReactNode;
1114
1228
  isTestnet?: boolean;
1115
- mode?: Mode;
1116
- theme?: Theme;
1117
1229
  }
1118
- declare const IpKitProvider: ({ apiKey, appId, children, isTestnet, mode, theme, }: IpKitProviderOptions) => React.JSX.Element;
1230
+ declare const IpKitProvider: ({ apiKey, appId, children, isTestnet, }: IpKitProviderOptions) => React.JSX.Element;
1119
1231
  declare const useIpKit: () => {
1120
1232
  apiBaseUrl: string;
1121
1233
  apiClient: ApiClient;
1122
1234
  apiKey: string;
1123
1235
  appId: string | undefined;
1124
1236
  chain: ChainConfig;
1125
- mode: Mode;
1126
- theme: Theme;
1127
- themeClass: string;
1128
1237
  };
1129
1238
 
1130
1239
  type QueryKey = ReadonlyArray<unknown>;
@@ -1146,14 +1255,15 @@ type IPSearchResult = components["schemas"]["IPSearchResult"];
1146
1255
  type Collection = components["schemas"]["EnrichedCollection"];
1147
1256
  type CollectionMetadata = components["schemas"]["ContractMetadataByAddressResponse"];
1148
1257
  type License = components["schemas"]["License"];
1149
- type LicenseTerms$1 = components["schemas"]["LicenseTerms"];
1258
+ type LicenseTerms = components["schemas"]["LicenseTerms"];
1259
+ type LicenseToken = components["schemas"]["LicenseToken"];
1150
1260
  type LicensingConfig = components["schemas"]["LicensingConfig"];
1151
1261
  type NFTMetadata = components["schemas"]["NFTMetadata"];
1152
1262
  type InfringementStatus = components["schemas"]["InfringementStatus"];
1153
1263
  type ModerationStatus = components["schemas"]["ModerationStatus"];
1154
1264
  type ContractMetadata = components["schemas"]["ContractMetadata"];
1155
1265
  type Dispute = components["schemas"]["Dispute"];
1156
- type PILTerms = LicenseTerms$1;
1266
+ type PILTerms = LicenseTerms;
1157
1267
  type TransactionEventType = "IPRegistered" | "LicenseTermsAttached" | "DerivativeRegistered" | "DisputeRaised" | "DisputeResolved" | "DisputeCancelled" | "DisputeJudgementSet" | "RoyaltyPaid";
1158
1268
 
1159
1269
  declare enum PIL_FLAVOR {
@@ -1212,18 +1322,6 @@ interface IPMetadata {
1212
1322
  [key: string]: any;
1213
1323
  }
1214
1324
 
1215
- declare function cn(...inputs: ClassValue[]): string;
1216
- declare function shortenAddress(address: string, length?: number): string;
1217
- declare function camelize(str: string): string;
1218
- declare function getPilFlavorByLicenseTerms(pilTerms: PILTerms): PilFlavor;
1219
- declare function getImageUrlFromIpfsUrl(ipfsUrl: string): Promise<string>;
1220
- declare function convertIpfsUriToUrl(ipfsUri: string): string;
1221
- declare function getMetadataFromIpfs(ipfsUrl: string): Promise<any>;
1222
- declare function fetchLicenseOffChainData(uri: string): Promise<any>;
1223
-
1224
- type LicenseTerms = Partial<PILTerms>;
1225
- declare function convertLicenseTermObject(licenseTerms: Trait[]): LicenseTerms;
1226
-
1227
1325
  type CollectionsResponse = paths["/collections"]["post"]["responses"][200]["content"]["application/json"];
1228
1326
  type CollectionsOptions = Partial<paths["/collections"]["post"]["requestBody"]["content"]["application/json"]>;
1229
1327
  type GetCollectionsOptions = {
@@ -1243,7 +1341,7 @@ declare function getCollections({ collectionAddresses, apiClient, options, apiKe
1243
1341
  content: {
1244
1342
  "application/json": {
1245
1343
  readonly $schema?: string | undefined;
1246
- orderBy: "updatedAt";
1344
+ orderBy: "updatedAt" | "assetCount" | "licensesCount";
1247
1345
  orderDirection: "asc" | "desc";
1248
1346
  pagination?: {
1249
1347
  limit: number;
@@ -1303,7 +1401,7 @@ declare function getCollections({ collectionAddresses, apiClient, options, apiKe
1303
1401
  hasMore: boolean;
1304
1402
  limit: number;
1305
1403
  offset: number;
1306
- total?: number | undefined;
1404
+ total: number;
1307
1405
  } | undefined;
1308
1406
  };
1309
1407
  };
@@ -1339,7 +1437,7 @@ declare function getCollections({ collectionAddresses, apiClient, options, apiKe
1339
1437
  } & {
1340
1438
  body: {
1341
1439
  readonly $schema?: string | undefined;
1342
- orderBy: "updatedAt";
1440
+ orderBy: "updatedAt" | "assetCount" | "licensesCount";
1343
1441
  orderDirection: "asc" | "desc";
1344
1442
  pagination?: {
1345
1443
  limit: number;
@@ -1364,7 +1462,7 @@ declare function getCollections({ collectionAddresses, apiClient, options, apiKe
1364
1462
  content: {
1365
1463
  "application/json": {
1366
1464
  readonly $schema?: string | undefined;
1367
- orderBy: "updatedAt";
1465
+ orderBy: "updatedAt" | "assetCount" | "licensesCount";
1368
1466
  orderDirection: "asc" | "desc";
1369
1467
  pagination?: {
1370
1468
  limit: number;
@@ -1424,7 +1522,7 @@ declare function getCollections({ collectionAddresses, apiClient, options, apiKe
1424
1522
  hasMore: boolean;
1425
1523
  limit: number;
1426
1524
  offset: number;
1427
- total?: number | undefined;
1525
+ total: number;
1428
1526
  } | undefined;
1429
1527
  };
1430
1528
  };
@@ -1462,7 +1560,7 @@ declare function getCollections({ collectionAddresses, apiClient, options, apiKe
1462
1560
  content: {
1463
1561
  "application/json": {
1464
1562
  readonly $schema?: string | undefined;
1465
- orderBy: "updatedAt";
1563
+ orderBy: "updatedAt" | "assetCount" | "licensesCount";
1466
1564
  orderDirection: "asc" | "desc";
1467
1565
  pagination?: {
1468
1566
  limit: number;
@@ -1522,7 +1620,7 @@ declare function getCollections({ collectionAddresses, apiClient, options, apiKe
1522
1620
  hasMore: boolean;
1523
1621
  limit: number;
1524
1622
  offset: number;
1525
- total?: number | undefined;
1623
+ total: number;
1526
1624
  } | undefined;
1527
1625
  };
1528
1626
  };
@@ -1554,7 +1652,7 @@ declare function getCollections({ collectionAddresses, apiClient, options, apiKe
1554
1652
  headers?: openapi_fetch.HeadersOptions | undefined;
1555
1653
  } & Omit<RequestInit, "headers" | "body"> & {
1556
1654
  readonly $schema?: string | undefined;
1557
- orderBy: "updatedAt";
1655
+ orderBy: "updatedAt" | "assetCount" | "licensesCount";
1558
1656
  orderDirection: "asc" | "desc";
1559
1657
  pagination?: {
1560
1658
  limit: number;
@@ -2077,7 +2175,7 @@ declare function getIpAssetEdges({ apiClient, ipId, parentIpId, options, apiKey
2077
2175
  hasMore: boolean;
2078
2176
  limit: number;
2079
2177
  offset: number;
2080
- total?: number | undefined;
2178
+ total: number;
2081
2179
  } | undefined;
2082
2180
  };
2083
2181
  };
@@ -2180,7 +2278,7 @@ declare function getIpAssetEdges({ apiClient, ipId, parentIpId, options, apiKey
2180
2278
  hasMore: boolean;
2181
2279
  limit: number;
2182
2280
  offset: number;
2183
- total?: number | undefined;
2281
+ total: number;
2184
2282
  } | undefined;
2185
2283
  };
2186
2284
  };
@@ -2259,7 +2357,7 @@ declare function getIpAssetEdges({ apiClient, ipId, parentIpId, options, apiKey
2259
2357
  hasMore: boolean;
2260
2358
  limit: number;
2261
2359
  offset: number;
2262
- total?: number | undefined;
2360
+ total: number;
2263
2361
  } | undefined;
2264
2362
  };
2265
2363
  };
@@ -2387,7 +2485,7 @@ declare function getIpAssets({ apiClient, ownerAddress, tokenContract, includeLi
2387
2485
  hookData: string;
2388
2486
  isSet: boolean;
2389
2487
  licensingHook: string;
2390
- mintingFee: number;
2488
+ mintingFee: string;
2391
2489
  };
2392
2490
  templateMetadataUri: string;
2393
2491
  templateName: string;
@@ -2495,7 +2593,7 @@ declare function getIpAssets({ apiClient, ownerAddress, tokenContract, includeLi
2495
2593
  hasMore: boolean;
2496
2594
  limit: number;
2497
2595
  offset: number;
2498
- total?: number | undefined;
2596
+ total: number;
2499
2597
  } | undefined;
2500
2598
  };
2501
2599
  };
@@ -2617,7 +2715,7 @@ declare function getIpAssets({ apiClient, ownerAddress, tokenContract, includeLi
2617
2715
  hookData: string;
2618
2716
  isSet: boolean;
2619
2717
  licensingHook: string;
2620
- mintingFee: number;
2718
+ mintingFee: string;
2621
2719
  };
2622
2720
  templateMetadataUri: string;
2623
2721
  templateName: string;
@@ -2725,7 +2823,7 @@ declare function getIpAssets({ apiClient, ownerAddress, tokenContract, includeLi
2725
2823
  hasMore: boolean;
2726
2824
  limit: number;
2727
2825
  offset: number;
2728
- total?: number | undefined;
2826
+ total: number;
2729
2827
  } | undefined;
2730
2828
  };
2731
2829
  };
@@ -2822,7 +2920,7 @@ declare function getIpAssets({ apiClient, ownerAddress, tokenContract, includeLi
2822
2920
  hookData: string;
2823
2921
  isSet: boolean;
2824
2922
  licensingHook: string;
2825
- mintingFee: number;
2923
+ mintingFee: string;
2826
2924
  };
2827
2925
  templateMetadataUri: string;
2828
2926
  templateName: string;
@@ -2930,7 +3028,7 @@ declare function getIpAssets({ apiClient, ownerAddress, tokenContract, includeLi
2930
3028
  hasMore: boolean;
2931
3029
  limit: number;
2932
3030
  offset: number;
2933
- total?: number | undefined;
3031
+ total: number;
2934
3032
  } | undefined;
2935
3033
  };
2936
3034
  };
@@ -2977,6 +3075,276 @@ declare function getIpAssets({ apiClient, ownerAddress, tokenContract, includeLi
2977
3075
  } | undefined;
2978
3076
  }, `${string}/${string}`>>;
2979
3077
 
3078
+ type LicenseTokensResponse = paths["/licenses/tokens"]["post"]["responses"][200]["content"]["application/json"];
3079
+ type LicenseTokensOptions = Partial<paths["/licenses/tokens"]["post"]["requestBody"]["content"]["application/json"]>;
3080
+ type GetLicenseTokensOptions = {
3081
+ apiClient: ApiClient;
3082
+ ownerAddress?: Address;
3083
+ licensorIpId?: Address;
3084
+ options?: LicenseTokensOptions;
3085
+ apiKey: string;
3086
+ };
3087
+ declare function getLicenseTokens({ apiClient, ownerAddress, licensorIpId, options, apiKey }: GetLicenseTokensOptions): Promise<openapi_fetch.FetchResponse<{
3088
+ parameters: {
3089
+ query?: undefined;
3090
+ header?: undefined;
3091
+ path?: undefined;
3092
+ cookie?: undefined;
3093
+ };
3094
+ requestBody: {
3095
+ content: {
3096
+ "application/json": {
3097
+ readonly $schema?: string | undefined;
3098
+ orderBy: "blockNumber";
3099
+ orderDirection: "asc" | "desc";
3100
+ pagination?: {
3101
+ limit: number;
3102
+ offset: number;
3103
+ } | undefined;
3104
+ where?: {
3105
+ licensorIpId?: string | undefined;
3106
+ ownerAddress?: string | undefined;
3107
+ } | undefined;
3108
+ };
3109
+ };
3110
+ };
3111
+ responses: {
3112
+ 200: {
3113
+ headers: {
3114
+ [name: string]: unknown;
3115
+ };
3116
+ content: {
3117
+ "application/json": {
3118
+ readonly $schema?: string | undefined;
3119
+ data: {
3120
+ blockNumber: string;
3121
+ blockTime: string;
3122
+ burntAt: string;
3123
+ id: string;
3124
+ licenseTemplate: string;
3125
+ licenseTermsId: string;
3126
+ licensorIpId: string;
3127
+ owner: string;
3128
+ transferable: string;
3129
+ }[] | null;
3130
+ pagination?: {
3131
+ hasMore: boolean;
3132
+ limit: number;
3133
+ offset: number;
3134
+ total: number;
3135
+ } | undefined;
3136
+ };
3137
+ };
3138
+ };
3139
+ default: {
3140
+ headers: {
3141
+ [name: string]: unknown;
3142
+ };
3143
+ content: {
3144
+ "application/problem+json": {
3145
+ readonly $schema?: string | undefined;
3146
+ detail?: string | undefined;
3147
+ errors?: {
3148
+ location?: string | undefined;
3149
+ message?: string | undefined;
3150
+ value?: unknown;
3151
+ }[] | null | undefined;
3152
+ instance?: string | undefined;
3153
+ status?: number | undefined;
3154
+ title?: string | undefined;
3155
+ type: string;
3156
+ };
3157
+ };
3158
+ };
3159
+ };
3160
+ }, {
3161
+ params?: {
3162
+ query?: undefined;
3163
+ header?: undefined;
3164
+ path?: undefined;
3165
+ cookie?: undefined;
3166
+ } | undefined;
3167
+ } & {
3168
+ body: {
3169
+ readonly $schema?: string | undefined;
3170
+ orderBy: "blockNumber";
3171
+ orderDirection: "asc" | "desc";
3172
+ pagination?: {
3173
+ limit: number;
3174
+ offset: number;
3175
+ } | undefined;
3176
+ where?: {
3177
+ licensorIpId?: string | undefined;
3178
+ ownerAddress?: string | undefined;
3179
+ } | undefined;
3180
+ };
3181
+ } & {
3182
+ baseUrl?: string | undefined;
3183
+ querySerializer?: openapi_fetch.QuerySerializerOptions | openapi_fetch.QuerySerializer<{
3184
+ parameters: {
3185
+ query?: undefined;
3186
+ header?: undefined;
3187
+ path?: undefined;
3188
+ cookie?: undefined;
3189
+ };
3190
+ requestBody: {
3191
+ content: {
3192
+ "application/json": {
3193
+ readonly $schema?: string | undefined;
3194
+ orderBy: "blockNumber";
3195
+ orderDirection: "asc" | "desc";
3196
+ pagination?: {
3197
+ limit: number;
3198
+ offset: number;
3199
+ } | undefined;
3200
+ where?: {
3201
+ licensorIpId?: string | undefined;
3202
+ ownerAddress?: string | undefined;
3203
+ } | undefined;
3204
+ };
3205
+ };
3206
+ };
3207
+ responses: {
3208
+ 200: {
3209
+ headers: {
3210
+ [name: string]: unknown;
3211
+ };
3212
+ content: {
3213
+ "application/json": {
3214
+ readonly $schema?: string | undefined;
3215
+ data: {
3216
+ blockNumber: string;
3217
+ blockTime: string;
3218
+ burntAt: string;
3219
+ id: string;
3220
+ licenseTemplate: string;
3221
+ licenseTermsId: string;
3222
+ licensorIpId: string;
3223
+ owner: string;
3224
+ transferable: string;
3225
+ }[] | null;
3226
+ pagination?: {
3227
+ hasMore: boolean;
3228
+ limit: number;
3229
+ offset: number;
3230
+ total: number;
3231
+ } | undefined;
3232
+ };
3233
+ };
3234
+ };
3235
+ default: {
3236
+ headers: {
3237
+ [name: string]: unknown;
3238
+ };
3239
+ content: {
3240
+ "application/problem+json": {
3241
+ readonly $schema?: string | undefined;
3242
+ detail?: string | undefined;
3243
+ errors?: {
3244
+ location?: string | undefined;
3245
+ message?: string | undefined;
3246
+ value?: unknown;
3247
+ }[] | null | undefined;
3248
+ instance?: string | undefined;
3249
+ status?: number | undefined;
3250
+ title?: string | undefined;
3251
+ type: string;
3252
+ };
3253
+ };
3254
+ };
3255
+ };
3256
+ }> | undefined;
3257
+ bodySerializer?: openapi_fetch.BodySerializer<{
3258
+ parameters: {
3259
+ query?: undefined;
3260
+ header?: undefined;
3261
+ path?: undefined;
3262
+ cookie?: undefined;
3263
+ };
3264
+ requestBody: {
3265
+ content: {
3266
+ "application/json": {
3267
+ readonly $schema?: string | undefined;
3268
+ orderBy: "blockNumber";
3269
+ orderDirection: "asc" | "desc";
3270
+ pagination?: {
3271
+ limit: number;
3272
+ offset: number;
3273
+ } | undefined;
3274
+ where?: {
3275
+ licensorIpId?: string | undefined;
3276
+ ownerAddress?: string | undefined;
3277
+ } | undefined;
3278
+ };
3279
+ };
3280
+ };
3281
+ responses: {
3282
+ 200: {
3283
+ headers: {
3284
+ [name: string]: unknown;
3285
+ };
3286
+ content: {
3287
+ "application/json": {
3288
+ readonly $schema?: string | undefined;
3289
+ data: {
3290
+ blockNumber: string;
3291
+ blockTime: string;
3292
+ burntAt: string;
3293
+ id: string;
3294
+ licenseTemplate: string;
3295
+ licenseTermsId: string;
3296
+ licensorIpId: string;
3297
+ owner: string;
3298
+ transferable: string;
3299
+ }[] | null;
3300
+ pagination?: {
3301
+ hasMore: boolean;
3302
+ limit: number;
3303
+ offset: number;
3304
+ total: number;
3305
+ } | undefined;
3306
+ };
3307
+ };
3308
+ };
3309
+ default: {
3310
+ headers: {
3311
+ [name: string]: unknown;
3312
+ };
3313
+ content: {
3314
+ "application/problem+json": {
3315
+ readonly $schema?: string | undefined;
3316
+ detail?: string | undefined;
3317
+ errors?: {
3318
+ location?: string | undefined;
3319
+ message?: string | undefined;
3320
+ value?: unknown;
3321
+ }[] | null | undefined;
3322
+ instance?: string | undefined;
3323
+ status?: number | undefined;
3324
+ title?: string | undefined;
3325
+ type: string;
3326
+ };
3327
+ };
3328
+ };
3329
+ };
3330
+ }> | undefined;
3331
+ parseAs?: keyof openapi_fetch.BodyType<unknown> | undefined;
3332
+ fetch?: ((input: Request) => Promise<Response>) | undefined;
3333
+ headers?: openapi_fetch.HeadersOptions | undefined;
3334
+ } & Omit<RequestInit, "headers" | "body"> & {
3335
+ readonly $schema?: string | undefined;
3336
+ orderBy: "blockNumber";
3337
+ orderDirection: "asc" | "desc";
3338
+ pagination?: {
3339
+ limit: number;
3340
+ offset: number;
3341
+ } | undefined;
3342
+ where?: {
3343
+ licensorIpId?: string | undefined;
3344
+ ownerAddress?: string | undefined;
3345
+ } | undefined;
3346
+ }, `${string}/${string}`>>;
3347
+
2980
3348
  type SearchResponse = paths["/search"]["post"]["responses"][200]["content"]["application/json"];
2981
3349
  type SearchOptions = Partial<paths["/search"]["post"]["requestBody"]["content"]["application/json"]>;
2982
3350
  type GetSearchOptions = {
@@ -3026,7 +3394,7 @@ declare function getSearch({ apiClient, query, mediaType, options, apiKey }: Get
3026
3394
  hasMore: boolean;
3027
3395
  limit: number;
3028
3396
  offset: number;
3029
- total?: number | undefined;
3397
+ total: number;
3030
3398
  } | undefined;
3031
3399
  total: number;
3032
3400
  };
@@ -3112,7 +3480,7 @@ declare function getSearch({ apiClient, query, mediaType, options, apiKey }: Get
3112
3480
  hasMore: boolean;
3113
3481
  limit: number;
3114
3482
  offset: number;
3115
- total?: number | undefined;
3483
+ total: number;
3116
3484
  } | undefined;
3117
3485
  total: number;
3118
3486
  };
@@ -3180,7 +3548,7 @@ declare function getSearch({ apiClient, query, mediaType, options, apiKey }: Get
3180
3548
  hasMore: boolean;
3181
3549
  limit: number;
3182
3550
  offset: number;
3183
- total?: number | undefined;
3551
+ total: number;
3184
3552
  } | undefined;
3185
3553
  total: number;
3186
3554
  };
@@ -3282,7 +3650,7 @@ declare function getTransactions({ apiClient, txHashes, ipIds, initiators, event
3282
3650
  hasMore: boolean;
3283
3651
  limit: number;
3284
3652
  offset: number;
3285
- total?: number | undefined;
3653
+ total: number;
3286
3654
  } | undefined;
3287
3655
  };
3288
3656
  };
@@ -3385,7 +3753,7 @@ declare function getTransactions({ apiClient, txHashes, ipIds, initiators, event
3385
3753
  hasMore: boolean;
3386
3754
  limit: number;
3387
3755
  offset: number;
3388
- total?: number | undefined;
3756
+ total: number;
3389
3757
  } | undefined;
3390
3758
  };
3391
3759
  };
@@ -3462,7 +3830,7 @@ declare function getTransactions({ apiClient, txHashes, ipIds, initiators, event
3462
3830
  hasMore: boolean;
3463
3831
  limit: number;
3464
3832
  offset: number;
3465
- total?: number | undefined;
3833
+ total: number;
3466
3834
  } | undefined;
3467
3835
  };
3468
3836
  };
@@ -3596,6 +3964,14 @@ type UseIpAssetsByOwnerOptions = {
3596
3964
  };
3597
3965
  declare function useIpAssetsByOwner({ ownerAddress, includeLicenses, moderated, options, queryOptions, }?: UseIpAssetsByOwnerOptions): UseQueryResult<IpAssetsResponse>;
3598
3966
 
3967
+ type UseLicenseTokensOptions = {
3968
+ ownerAddress?: Address;
3969
+ licensorIpId?: Address;
3970
+ options?: LicenseTokensOptions;
3971
+ queryOptions?: IpQueryOptions;
3972
+ };
3973
+ declare function useLicenseTokens({ ownerAddress, licensorIpId, options, queryOptions, }: UseLicenseTokensOptions): UseQueryResult<LicenseTokensResponse>;
3974
+
3599
3975
  type UseSearchOptions = {
3600
3976
  query: string;
3601
3977
  mediaType?: "audio" | "video" | "image";
@@ -3619,4 +3995,4 @@ type UseTransactionsOptions = {
3619
3995
  };
3620
3996
  declare function useTransactions({ txHashes, ipIds, initiators, eventTypes, options, queryOptions, }?: UseTransactionsOptions): UseQueryResult<TransactionsResponse>;
3621
3997
 
3622
- export { API_URL, type ApiClient, CHAINID_TO_CHAINNAME, CHAINS, type ChainConfig, type Collection, type CollectionMetadata, type CollectionsOptions, type CollectionsResponse, type ContractMetadata, type Creator, type Dispute, type DisputeResponse, type DisputesOptions, type DisputesResponse, type ERC20Token, type GetCollectionsOptions, type GetDisputeOptions, type GetDisputesOptions, type GetIpAssetEdgesOptions, type GetIpAssetsOptions, type GetSearchOptions, type GetTransactionsOptions, type IPAsset, type IPAssetEdge, IPKIT_SUPPORTED_CHAIN, type IPMetadata, type IPSearchResult, type IPTransaction, type InfringementStatus, type IpAssetEdgesOptions, type IpAssetEdgesResponse, type IpAssetsOptions, type IpAssetsResponse, IpKitProvider, type IpKitProviderOptions, type IpQueryOptions, type License, type LicenseOffChainData, type LicenseTerms$1 as LicenseTerms, type LicenseTermsWithOffChainData, type LicenseWithOffChainData, type LicensingConfig, type Mode, type ModerationStatus, type NFTMetadata, type PILTerms, type PILTermsWithOffChainData, PIL_FLAVOR, type PilFlavor, STORY_AENEID, STORY_MAINNET, type SearchOptions, type SearchResponse, type SocialMedia, type SupportedChainConfig, type Theme, type Trait, type TransactionEventType, type TransactionsOptions, type TransactionsResponse, type UseCollectionOptions, type UseCollectionsOptions, type UseDisputeOptions, type UseDisputesOptions, type UseIpAssetChildrenOptions, type UseIpAssetEdgesOptions, type UseIpAssetLicensesOptions, type UseIpAssetOptions, type UseIpAssetParentsOptions, type UseIpAssetsByOwnerOptions, type UseIpAssetsOptions, type UseSearchOptions, type UseTransactionOptions, type UseTransactionsOptions, WRAPPED_IP, camelize, cn, type components, convertIpfsUriToUrl, convertLicenseTermObject, createApiClient, fetchLicenseOffChainData, getCollections, getDispute, getDisputes, getImageUrlFromIpfsUrl, getIpAssetEdges, getIpAssets, getMetadataFromIpfs, getPilFlavorByLicenseTerms, getSearch, getTransactions, type operations, type paths, prodClient, shortenAddress, stagingClient, useCollection, useCollections, useDispute, useDisputes, useIpAsset, useIpAssetChildren, useIpAssetEdges, useIpAssetLicenses, useIpAssetParents, useIpAssets, useIpAssetsByOwner, useIpKit, useSearch, useTransaction, useTransactions };
3998
+ export { API_URL, type ApiClient, CHAINID_TO_CHAINNAME, CHAINS, type ChainConfig, type Collection, type CollectionMetadata, type CollectionsOptions, type CollectionsResponse, type ContractMetadata, type Creator, type Dispute, type DisputeResponse, type DisputesOptions, type DisputesResponse, type ERC20Token, type GetCollectionsOptions, type GetDisputeOptions, type GetDisputesOptions, type GetIpAssetEdgesOptions, type GetIpAssetsOptions, type GetLicenseTokensOptions, type GetSearchOptions, type GetTransactionsOptions, type IPAsset, type IPAssetEdge, IPKIT_SUPPORTED_CHAIN, type IPMetadata, type IPSearchResult, type IPTransaction, type InfringementStatus, type IpAssetEdgesOptions, type IpAssetEdgesResponse, type IpAssetsOptions, type IpAssetsResponse, IpKitProvider, type IpKitProviderOptions, type IpQueryOptions, type License, type LicenseOffChainData, type LicenseTerms, type LicenseTermsWithOffChainData, type LicenseToken, type LicenseTokensOptions, type LicenseTokensResponse, type LicenseWithOffChainData, type LicensingConfig, type ModerationStatus, type NFTMetadata, type PILTerms, type PILTermsWithOffChainData, PIL_FLAVOR, type PilFlavor, STORY_AENEID, STORY_MAINNET, type SearchOptions, type SearchResponse, type SocialMedia, type SupportedChainConfig, type Trait, type TransactionEventType, type TransactionsOptions, type TransactionsResponse, type UseCollectionOptions, type UseCollectionsOptions, type UseDisputeOptions, type UseDisputesOptions, type UseIpAssetChildrenOptions, type UseIpAssetEdgesOptions, type UseIpAssetLicensesOptions, type UseIpAssetOptions, type UseIpAssetParentsOptions, type UseIpAssetsByOwnerOptions, type UseIpAssetsOptions, type UseLicenseTokensOptions, type UseSearchOptions, type UseTransactionOptions, type UseTransactionsOptions, WRAPPED_IP, type components, createApiClient, getCollections, getDispute, getDisputes, getIpAssetEdges, getIpAssets, getLicenseTokens, getSearch, getTransactions, type operations, type paths, prodClient, stagingClient, useCollection, useCollections, useDispute, useDisputes, useIpAsset, useIpAssetChildren, useIpAssetEdges, useIpAssetLicenses, useIpAssetParents, useIpAssets, useIpAssetsByOwner, useIpKit, useLicenseTokens, useSearch, useTransaction, useTransactions };