@story-protocol/ipkit 0.4.0-beta.10 → 0.4.0-beta.12
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/hooks/useLicenseTokens.d.ts +1 -1
- package/dist/hooks/useLicenseTokens.d.ts.map +1 -1
- package/dist/lib/api/getLicenseTokens.d.ts +1 -1
- package/dist/lib/api/getLicenseTokens.d.ts.map +1 -1
- package/dist/lib/index.d.ts +0 -2
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/utils.d.ts +0 -8
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/providers/IpKitProvider/IpKitProvider.d.ts +1 -8
- package/dist/providers/IpKitProvider/IpKitProvider.d.ts.map +1 -1
- package/dist/providers/IpKitProvider/__docs__/Example.d.ts +0 -3
- package/dist/providers/IpKitProvider/__docs__/Example.d.ts.map +1 -1
- package/dist/providers/IpKitProvider/__docs__/IpKitProvider.stories.d.ts +0 -12
- package/dist/providers/IpKitProvider/__docs__/IpKitProvider.stories.d.ts.map +1 -1
- package/dist/server-types.d.ts +4 -17
- package/dist/server.cjs.js +1 -1
- package/dist/server.cjs.js.map +1 -1
- package/dist/server.esm.js +1 -1
- package/dist/server.esm.js.map +1 -1
- package/dist/storyprotocol-storykit.cjs.js +1 -1
- package/dist/storyprotocol-storykit.cjs.js.map +1 -1
- package/dist/storyprotocol-storykit.esm.js +1 -1
- package/dist/storyprotocol-storykit.esm.js.map +1 -1
- package/dist/types.d.ts +6 -26
- package/package.json +19 -30
- package/dist/lib/functions/convertLicenseTermObject.d.ts +0 -6
- 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 {
|
|
@@ -1208,26 +1207,19 @@ declare enum IPKIT_SUPPORTED_CHAIN {
|
|
|
1208
1207
|
}
|
|
1209
1208
|
declare const WRAPPED_IP: ERC20Token;
|
|
1210
1209
|
|
|
1211
|
-
type Mode = "light" | "dark" | undefined;
|
|
1212
|
-
type Theme = "default" | "story" | string;
|
|
1213
1210
|
interface IpKitProviderOptions {
|
|
1214
1211
|
apiKey: string;
|
|
1215
1212
|
appId?: string;
|
|
1216
1213
|
children: React.ReactNode;
|
|
1217
1214
|
isTestnet?: boolean;
|
|
1218
|
-
mode?: Mode;
|
|
1219
|
-
theme?: Theme;
|
|
1220
1215
|
}
|
|
1221
|
-
declare const IpKitProvider: ({ apiKey, appId, children, isTestnet,
|
|
1216
|
+
declare const IpKitProvider: ({ apiKey, appId, children, isTestnet, }: IpKitProviderOptions) => React.JSX.Element;
|
|
1222
1217
|
declare const useIpKit: () => {
|
|
1223
1218
|
apiBaseUrl: string;
|
|
1224
1219
|
apiClient: ApiClient;
|
|
1225
1220
|
apiKey: string;
|
|
1226
1221
|
appId: string | undefined;
|
|
1227
1222
|
chain: ChainConfig;
|
|
1228
|
-
mode: Mode;
|
|
1229
|
-
theme: Theme;
|
|
1230
|
-
themeClass: string;
|
|
1231
1223
|
};
|
|
1232
1224
|
|
|
1233
1225
|
type QueryKey = ReadonlyArray<unknown>;
|
|
@@ -1249,7 +1241,7 @@ type IPSearchResult = components["schemas"]["IPSearchResult"];
|
|
|
1249
1241
|
type Collection = components["schemas"]["EnrichedCollection"];
|
|
1250
1242
|
type CollectionMetadata = components["schemas"]["ContractMetadataByAddressResponse"];
|
|
1251
1243
|
type License = components["schemas"]["License"];
|
|
1252
|
-
type LicenseTerms
|
|
1244
|
+
type LicenseTerms = components["schemas"]["LicenseTerms"];
|
|
1253
1245
|
type LicenseToken = components["schemas"]["LicenseToken"];
|
|
1254
1246
|
type LicensingConfig = components["schemas"]["LicensingConfig"];
|
|
1255
1247
|
type NFTMetadata = components["schemas"]["NFTMetadata"];
|
|
@@ -1257,7 +1249,7 @@ type InfringementStatus = components["schemas"]["InfringementStatus"];
|
|
|
1257
1249
|
type ModerationStatus = components["schemas"]["ModerationStatus"];
|
|
1258
1250
|
type ContractMetadata = components["schemas"]["ContractMetadata"];
|
|
1259
1251
|
type Dispute = components["schemas"]["Dispute"];
|
|
1260
|
-
type PILTerms = LicenseTerms
|
|
1252
|
+
type PILTerms = LicenseTerms;
|
|
1261
1253
|
type TransactionEventType = "IPRegistered" | "LicenseTermsAttached" | "DerivativeRegistered" | "DisputeRaised" | "DisputeResolved" | "DisputeCancelled" | "DisputeJudgementSet" | "RoyaltyPaid";
|
|
1262
1254
|
|
|
1263
1255
|
declare enum PIL_FLAVOR {
|
|
@@ -1316,18 +1308,6 @@ interface IPMetadata {
|
|
|
1316
1308
|
[key: string]: any;
|
|
1317
1309
|
}
|
|
1318
1310
|
|
|
1319
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
1320
|
-
declare function shortenAddress(address: string, length?: number): string;
|
|
1321
|
-
declare function camelize(str: string): string;
|
|
1322
|
-
declare function getPilFlavorByLicenseTerms(pilTerms: PILTerms): PilFlavor;
|
|
1323
|
-
declare function getImageUrlFromIpfsUrl(ipfsUrl: string): Promise<string>;
|
|
1324
|
-
declare function convertIpfsUriToUrl(ipfsUri: string): string;
|
|
1325
|
-
declare function getMetadataFromIpfs(ipfsUrl: string): Promise<any>;
|
|
1326
|
-
declare function fetchLicenseOffChainData(uri: string): Promise<any>;
|
|
1327
|
-
|
|
1328
|
-
type LicenseTerms = Partial<PILTerms>;
|
|
1329
|
-
declare function convertLicenseTermObject(licenseTerms: Trait[]): LicenseTerms;
|
|
1330
|
-
|
|
1331
1311
|
type CollectionsResponse = paths["/collections"]["post"]["responses"][200]["content"]["application/json"];
|
|
1332
1312
|
type CollectionsOptions = Partial<paths["/collections"]["post"]["requestBody"]["content"]["application/json"]>;
|
|
1333
1313
|
type GetCollectionsOptions = {
|
|
@@ -3085,7 +3065,7 @@ type LicenseTokensResponse = paths["/licenses/tokens"]["post"]["responses"][200]
|
|
|
3085
3065
|
type LicenseTokensOptions = Partial<paths["/licenses/tokens"]["post"]["requestBody"]["content"]["application/json"]>;
|
|
3086
3066
|
type GetLicenseTokensOptions = {
|
|
3087
3067
|
apiClient: ApiClient;
|
|
3088
|
-
ownerAddress
|
|
3068
|
+
ownerAddress?: Address;
|
|
3089
3069
|
licensorIpId?: Address;
|
|
3090
3070
|
options?: LicenseTokensOptions;
|
|
3091
3071
|
apiKey: string;
|
|
@@ -3971,7 +3951,7 @@ type UseIpAssetsByOwnerOptions = {
|
|
|
3971
3951
|
declare function useIpAssetsByOwner({ ownerAddress, includeLicenses, moderated, options, queryOptions, }?: UseIpAssetsByOwnerOptions): UseQueryResult<IpAssetsResponse>;
|
|
3972
3952
|
|
|
3973
3953
|
type UseLicenseTokensOptions = {
|
|
3974
|
-
ownerAddress
|
|
3954
|
+
ownerAddress?: Address;
|
|
3975
3955
|
licensorIpId?: Address;
|
|
3976
3956
|
options?: LicenseTokensOptions;
|
|
3977
3957
|
queryOptions?: IpQueryOptions;
|
|
@@ -4001,4 +3981,4 @@ type UseTransactionsOptions = {
|
|
|
4001
3981
|
};
|
|
4002
3982
|
declare function useTransactions({ txHashes, ipIds, initiators, eventTypes, options, queryOptions, }?: UseTransactionsOptions): UseQueryResult<TransactionsResponse>;
|
|
4003
3983
|
|
|
4004
|
-
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
|
|
3984
|
+
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 };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@story-protocol/ipkit",
|
|
3
3
|
"author": "storyprotocol engineering <eng@storyprotocol.xyz>",
|
|
4
|
-
"version": "0.4.0-beta.
|
|
4
|
+
"version": "0.4.0-beta.12",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -35,35 +35,22 @@
|
|
|
35
35
|
},
|
|
36
36
|
"prettier": "@ipkit/prettier-config",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@emotion/is-prop-valid": "^1.2.2",
|
|
39
|
-
"@emotion/react": "^11.11.4",
|
|
40
|
-
"@headlessui/react": "^1.7.18",
|
|
41
|
-
"@radix-ui/react-accordion": "^1.1.2",
|
|
42
|
-
"@radix-ui/react-checkbox": "^1.1.2",
|
|
43
|
-
"@radix-ui/react-popover": "^1.1.2",
|
|
44
|
-
"@radix-ui/react-radio-group": "^1.2.1",
|
|
45
|
-
"@radix-ui/react-slot": "^1.1.0",
|
|
46
38
|
"@story-protocol/core-sdk": "1.1.0-stable",
|
|
47
|
-
"class-variance-authority": "^0.7.0",
|
|
48
|
-
"clsx": "^2.1.0",
|
|
49
|
-
"lucide-react": "^0.364.0",
|
|
50
39
|
"openapi-fetch": "^0.13.5",
|
|
51
40
|
"openapi-typescript": "^7.6.1",
|
|
52
41
|
"openapi-typescript-helpers": "^0.0.15",
|
|
53
|
-
"postcss-easy-import": "^4.0.0",
|
|
54
|
-
"react-day-picker": "^8.10.1",
|
|
55
|
-
"react-icons": "^5.0.1",
|
|
56
|
-
"tailwind-merge": "^2.2.2",
|
|
57
|
-
"tailwindcss": "^3.4.1",
|
|
58
|
-
"tailwindcss-animate": "^1.0.7",
|
|
59
|
-
"three": "^0.167.1",
|
|
60
|
-
"tslib": "^2.8.1",
|
|
61
|
-
"tsx": "^4.20.5",
|
|
62
42
|
"viem": "^2.7.19"
|
|
63
43
|
},
|
|
64
44
|
"devDependencies": {
|
|
65
45
|
"@chromatic-com/storybook": "^1.2.25",
|
|
46
|
+
"@emotion/is-prop-valid": "^1.2.2",
|
|
47
|
+
"@emotion/react": "^11.11.4",
|
|
66
48
|
"@playwright/test": "^1.44.1",
|
|
49
|
+
"@radix-ui/react-accordion": "^1.1.2",
|
|
50
|
+
"@radix-ui/react-checkbox": "^1.1.2",
|
|
51
|
+
"@radix-ui/react-popover": "^1.1.2",
|
|
52
|
+
"@radix-ui/react-radio-group": "^1.2.1",
|
|
53
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
67
54
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
68
55
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
69
56
|
"@rollup/plugin-terser": "^0.4.4",
|
|
@@ -96,37 +83,39 @@
|
|
|
96
83
|
"@types/node": "^20.11.24",
|
|
97
84
|
"@types/react": "^18.2.61",
|
|
98
85
|
"@types/react-dom": "^18.2.19",
|
|
99
|
-
"
|
|
86
|
+
"class-variance-authority": "^0.7.0",
|
|
87
|
+
"clsx": "^2.1.0",
|
|
100
88
|
"eslint": "^8.57.0",
|
|
101
89
|
"eslint-config-prettier": "^9.1.0",
|
|
102
90
|
"eslint-plugin-prettier": "^5.1.3",
|
|
103
91
|
"eslint-plugin-react": "^7.34.1",
|
|
104
92
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
105
93
|
"eslint-plugin-storybook": "^0.8.0",
|
|
94
|
+
"lucide-react": "^0.364.0",
|
|
106
95
|
"postcss": "^8.4.38",
|
|
96
|
+
"postcss-easy-import": "^4.0.0",
|
|
107
97
|
"postcss-nesting": "^12.1.2",
|
|
108
98
|
"prettier": "^3.2.5",
|
|
109
|
-
"prop-types": "^15.8.1",
|
|
110
99
|
"react": "^18.2.0",
|
|
111
|
-
"react-
|
|
100
|
+
"react-day-picker": "^8.10.1",
|
|
112
101
|
"react-dom": "^18.2.0",
|
|
113
|
-
"react-force-graph-2d": "^1.25.4",
|
|
114
|
-
"react-force-graph-3d": "^1.24.3",
|
|
115
102
|
"react-scripts": "5.0.1",
|
|
116
103
|
"rollup": "^4.13.1",
|
|
117
104
|
"rollup-plugin-dts": "^6.1.0",
|
|
118
105
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
119
106
|
"rollup-plugin-postcss": "^4.0.2",
|
|
120
107
|
"storybook": "^8.0.4",
|
|
121
|
-
"
|
|
122
|
-
"
|
|
108
|
+
"tailwind-merge": "^2.2.2",
|
|
109
|
+
"tailwindcss": "^3.4.1",
|
|
110
|
+
"tailwindcss-animate": "^1.0.7",
|
|
111
|
+
"tslib": "^2.8.1",
|
|
112
|
+
"tsx": "^4.20.5",
|
|
113
|
+
"typescript": "^5.3.3"
|
|
123
114
|
},
|
|
124
115
|
"peerDependencies": {
|
|
125
116
|
"@tanstack/react-query": "^5.25.0",
|
|
126
117
|
"react": ">=18.2.0",
|
|
127
|
-
"react-apexcharts": "^1.4.1",
|
|
128
118
|
"react-dom": ">=18.2.0",
|
|
129
|
-
"react-force-graph-2d": "^1.25.4",
|
|
130
119
|
"typescript": "^5.4.3"
|
|
131
120
|
}
|
|
132
121
|
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Trait } from "@/types/assets";
|
|
2
|
-
import { PILTerms } from "@/types/openapi";
|
|
3
|
-
type LicenseTerms = Partial<PILTerms>;
|
|
4
|
-
export declare function convertLicenseTermObject(licenseTerms: Trait[]): LicenseTerms;
|
|
5
|
-
export {};
|
|
6
|
-
//# sourceMappingURL=convertLicenseTermObject.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convertLicenseTermObject.d.ts","sourceRoot":"","sources":["../../../src/lib/functions/convertLicenseTermObject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAI1C,KAAK,YAAY,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;AAErC,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,KAAK,EAAE,GAAG,YAAY,CAM5E"}
|