├── .eslintrc.js ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ └── feature_request.yml └── workflows │ └── publish-package.yml ├── .gitignore ├── .husky └── pre-commit ├── .nvmrc ├── .prettierignore ├── .vscode └── settings.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── examples ├── custom-theme │ ├── .eslintrc.js │ ├── .gitignore │ ├── README.md │ ├── app │ │ ├── IpHeader.tsx │ │ ├── Providers.tsx │ │ ├── base.css │ │ ├── fonts.css │ │ ├── layout.tsx │ │ └── page.tsx │ ├── next.config.mjs │ ├── package.json │ ├── postcss.config.js │ ├── tailwind.config.js │ └── tsconfig.json ├── license-selector │ ├── .eslintrc.js │ ├── .gitignore │ ├── README.md │ ├── app │ │ ├── Providers.tsx │ │ ├── base.css │ │ ├── layout.tsx │ │ └── page.tsx │ ├── components │ │ ├── PilFlavorForm.tsx │ │ └── ui │ │ │ ├── form.tsx │ │ │ └── label.tsx │ ├── lib │ │ └── utils.ts │ ├── next.config.mjs │ ├── package.json │ ├── postcss.config.js │ ├── tailwind.config.js │ └── tsconfig.json └── simple-setup │ ├── .eslintrc.js │ ├── .gitignore │ ├── README.md │ ├── app │ ├── IpHeader.tsx │ ├── Providers.tsx │ ├── base.css │ ├── layout.tsx │ └── page.tsx │ ├── next.config.mjs │ ├── package.json │ ├── postcss.config.js │ ├── tailwind.config.js │ └── tsconfig.json ├── package.json ├── packages ├── api-schema │ ├── openapi │ │ └── schema.json │ ├── package.json │ ├── scripts │ │ └── generate-types.ts │ ├── tsconfig.json │ └── types │ │ └── index.ts ├── config-eslint │ ├── README.md │ ├── library.js │ ├── next.js │ ├── package.json │ └── react-internal.js ├── config-prettier │ ├── index.json │ └── package.json ├── config-typescript │ ├── base.json │ ├── nextjs.json │ ├── package.json │ └── react-library.json └── storykit │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── .storybook │ ├── assets │ │ └── story-logo.png │ ├── directors │ │ └── StoryProvider.tsx │ ├── global.css │ ├── main.ts │ ├── manager-head.html │ ├── manager.ts │ ├── preview.tsx │ └── theme.ts │ ├── package.json │ ├── postcss.config.cjs │ ├── rollup.config.js │ ├── scripts │ ├── generate-types.ts │ └── schema.json │ ├── src │ ├── components │ │ ├── Accordion │ │ │ ├── Accordion.tsx │ │ │ ├── __docs__ │ │ │ │ └── Accordion.stories.tsx │ │ │ └── index.ts │ │ ├── Button │ │ │ ├── Button.tsx │ │ │ ├── __docs__ │ │ │ │ └── Button.stories.tsx │ │ │ └── index.ts │ │ ├── Calendar │ │ │ ├── Calendar.tsx │ │ │ └── index.ts │ │ ├── Checkbox │ │ │ ├── Checkbox.tsx │ │ │ ├── __docs__ │ │ │ │ └── Checkbox.stories.tsx │ │ │ └── index.ts │ │ ├── CollectionGraph │ │ │ ├── CollectionGraph.tsx │ │ │ ├── __docs__ │ │ │ │ ├── CollectionGraph.mdx │ │ │ │ ├── CollectionGraph.stories.tsx │ │ │ │ └── Example.tsx │ │ │ ├── index.ts │ │ │ └── styles.css │ │ ├── DateInputPicker │ │ │ ├── DateInputPicker.tsx │ │ │ ├── __docs__ │ │ │ │ └── DateInputPicker.stories.tsx │ │ │ ├── dateUtils.ts │ │ │ └── index.ts │ │ ├── Input │ │ │ ├── Input.tsx │ │ │ ├── __docs__ │ │ │ │ └── Input.stories.tsx │ │ │ └── index.ts │ │ ├── IpGraph │ │ │ ├── IpGraph.tsx │ │ │ ├── __docs__ │ │ │ │ ├── Example.tsx │ │ │ │ ├── IpGraph.mdx │ │ │ │ └── IpGraph.stories.tsx │ │ │ ├── index.ts │ │ │ └── styles.css │ │ ├── IpLicenseAccordion │ │ │ ├── IpLicenseAccordion.tsx │ │ │ ├── __docs__ │ │ │ │ ├── Example.tsx │ │ │ │ ├── IpLicenseAccordion.mdx │ │ │ │ └── IpLicenseAccordion.stories.tsx │ │ │ └── index.tsx │ │ ├── IpWidget │ │ │ ├── IpWidget.tsx │ │ │ ├── __docs__ │ │ │ │ ├── Example.tsx │ │ │ │ ├── IpWidget.mdx │ │ │ │ └── IpWidget.stories.tsx │ │ │ ├── __tests__ │ │ │ │ └── IPAssetWidget.test.tsx │ │ │ ├── index.ts │ │ │ └── styles.css │ │ ├── LicenseFlavorSelector │ │ │ ├── LicenseFlavorSelector.tsx │ │ │ ├── __docs__ │ │ │ │ ├── Example.tsx │ │ │ │ ├── LicenseFlavorSelector.mdx │ │ │ │ └── LicenseFlavorSelector.stories.tsx │ │ │ └── index.ts │ │ ├── LicenseTermsList │ │ │ ├── LicenseTermsList.tsx │ │ │ ├── __docs__ │ │ │ │ ├── Example.tsx │ │ │ │ ├── LicenseTermsList.mdx │ │ │ │ └── LicenseTermsList.stories.tsx │ │ │ └── index.tsx │ │ ├── Popover │ │ │ ├── Popover.tsx │ │ │ ├── __docs__ │ │ │ │ └── Popover.stories.tsx │ │ │ └── index.ts │ │ ├── RadioGroup │ │ │ ├── RadioGroup.tsx │ │ │ ├── __docs__ │ │ │ │ └── RadioGroup.stories.tsx │ │ │ └── index.ts │ │ ├── RoyaltyGraph │ │ │ ├── RoyaltyGraph.tsx │ │ │ ├── __docs__ │ │ │ │ ├── Example.tsx │ │ │ │ ├── RoyaltyGraph.mdx │ │ │ │ └── RoyaltyGraph.stories.tsx │ │ │ ├── index.ts │ │ │ └── styles.css │ │ ├── index.ts │ │ └── utility │ │ │ ├── If.tsx │ │ │ └── context.tsx │ ├── constants │ │ ├── api.ts │ │ ├── chains.ts │ │ ├── index.ts │ │ └── pil-flavors.ts │ ├── declarations.d.ts │ ├── global.css │ ├── hooks │ │ ├── index.ts │ │ ├── stories │ │ │ ├── (components) │ │ │ │ ├── CopyText.tsx │ │ │ │ └── DataTable.tsx │ │ │ ├── useCollection.stories.tsx │ │ │ ├── useCollectionByAddress.stories.tsx │ │ │ ├── useCollections.stories.tsx │ │ │ ├── useDetailedIpLicenseTerms.stories.tsx │ │ │ ├── useDispute.stories.tsx │ │ │ ├── useDisputes.stories.tsx │ │ │ ├── useIpAsset.stories.tsx │ │ │ ├── useIpAssetEdges.stories.tsx │ │ │ ├── useIpAssetMetadata.stories.tsx │ │ │ ├── useIpAssetTerms.stories.tsx │ │ │ ├── useIpAssets.stories.tsx │ │ │ ├── useIpAssetsTerms.stories.tsx │ │ │ ├── useIpGroupEdges.stories.tsx │ │ │ ├── useIpGroups.stories.tsx │ │ │ ├── useLatestTransactions.stories.tsx │ │ │ ├── useLicenseMintingFee.stories.tsx │ │ │ ├── useLicenseMintingFees.stories.tsx │ │ │ ├── useLicenseTemplate.stories.tsx │ │ │ ├── useLicenseTemplates.stories.tsx │ │ │ ├── useLicenseTerms.stories.tsx │ │ │ ├── useLicenseToken.stories.tsx │ │ │ ├── useLicenseTokens.stories.tsx │ │ │ ├── useLicensesTerms.stories.tsx │ │ │ ├── useModule.stories.tsx │ │ │ ├── useModules.stories.tsx │ │ │ ├── useNFTByTokenId.stories.tsx │ │ │ ├── useNFTByTokenIds.stories.tsx │ │ │ ├── useNFTByWallet.stories.tsx │ │ │ ├── useOwnersByTokenId.stories.tsx │ │ │ ├── usePermission.stories.tsx │ │ │ ├── usePermissions.stories.tsx │ │ │ ├── useRoyaltyPayment.stories.tsx │ │ │ ├── useRoyaltyPayments.stories.tsx │ │ │ ├── useTransaction.stories.tsx │ │ │ └── useTransactions.stories.tsx │ │ ├── useCollection.ts │ │ ├── useCollectionByAddress.ts │ │ ├── useCollections.ts │ │ ├── useDetailedIpLicenseTerms.ts │ │ ├── useDispute.ts │ │ ├── useDisputes.ts │ │ ├── useIpAsset.ts │ │ ├── useIpAssetEdges.ts │ │ ├── useIpAssetMetadata.ts │ │ ├── useIpAssetTerms.ts │ │ ├── useIpAssets.ts │ │ ├── useIpAssetsTerms.ts │ │ ├── useIpGroupEdges.ts │ │ ├── useIpGroups.ts │ │ ├── useLatestTransactions.ts │ │ ├── useLicenseMintingFee.ts │ │ ├── useLicenseMintingFees.ts │ │ ├── useLicenseTemplate.ts │ │ ├── useLicenseTemplates.ts │ │ ├── useLicenseTerms.ts │ │ ├── useLicenseToken.ts │ │ ├── useLicenseTokens.ts │ │ ├── useLicensesTerms.ts │ │ ├── useModule.ts │ │ ├── useModules.ts │ │ ├── useNFTByTokenId.ts │ │ ├── useNFTByTokenIds.ts │ │ ├── useNFTByWallet.ts │ │ ├── useOwnersByTokenId.ts │ │ ├── usePermission.ts │ │ ├── usePermissions.ts │ │ ├── useRoyaltyPayment.ts │ │ ├── useRoyaltyPayments.ts │ │ ├── useTransaction.ts │ │ └── useTransactions.ts │ ├── index.ts │ ├── lib │ │ ├── alchemy.ts │ │ ├── api │ │ │ ├── apiClient.ts │ │ │ ├── getCollection.ts │ │ │ ├── getCollections.ts │ │ │ ├── getDetailedIpLicenseTerms.ts │ │ │ ├── getDispute.ts │ │ │ ├── getDisputes.ts │ │ │ ├── getIpAsset.ts │ │ │ ├── getIpAssetEdges.ts │ │ │ ├── getIpAssetMetadata.ts │ │ │ ├── getIpAssetTerms.ts │ │ │ ├── getIpAssets.ts │ │ │ ├── getIpAssetsTerms.ts │ │ │ ├── getIpGroupEdges.ts │ │ │ ├── getIpGroups.ts │ │ │ ├── getLatestTransactions.ts │ │ │ ├── getLicenseMintingFee.ts │ │ │ ├── getLicenseMintingFees.ts │ │ │ ├── getLicenseTemplate.ts │ │ │ ├── getLicenseTemplates.ts │ │ │ ├── getLicenseTerms.ts │ │ │ ├── getLicenseToken.ts │ │ │ ├── getLicenseTokens.ts │ │ │ ├── getLicensesTerms.ts │ │ │ ├── getModule.ts │ │ │ ├── getModules.ts │ │ │ ├── getPermission.ts │ │ │ ├── getPermissions.ts │ │ │ ├── getQuery.ts │ │ │ ├── getRoyaltyPayment.ts │ │ │ ├── getRoyaltyPayments.ts │ │ │ ├── getTransaction.ts │ │ │ ├── getTransactions.ts │ │ │ ├── index.ts │ │ │ └── listQuery.ts │ │ ├── functions │ │ │ └── convertLicenseTermObject.ts │ │ ├── graph.ts │ │ ├── index.ts │ │ ├── royalty-graph.ts │ │ └── utils.ts │ ├── providers │ │ ├── IpProvider │ │ │ ├── IpProvider.tsx │ │ │ ├── __docs__ │ │ │ │ ├── Example.tsx │ │ │ │ ├── IpProvider.mdx │ │ │ │ └── IpProvider.stories.tsx │ │ │ └── index.tsx │ │ ├── IpRegistrationProvider │ │ │ ├── IpRegistrationProvider.tsx │ │ │ ├── __docs__ │ │ │ │ ├── Example.tsx │ │ │ │ ├── IpRegistrationProvider.mdx │ │ │ │ └── IpRegistrationProvider.stories.tsx │ │ │ └── index.tsx │ │ ├── RoyaltyGraphProvider │ │ │ ├── RoyaltyGraphProvider.tsx │ │ │ └── index.tsx │ │ ├── StoryKitProvider │ │ │ ├── StoryKitProvider.tsx │ │ │ ├── __docs__ │ │ │ │ ├── Example.tsx │ │ │ │ ├── StoryKitProvider.mdx │ │ │ │ └── StoryKitProvider.stories.tsx │ │ │ └── index.tsx │ │ └── index.ts │ ├── stories │ │ ├── Introduction.mdx │ │ └── data │ │ │ └── index.ts │ ├── styles │ │ ├── fonts.css │ │ └── themes.css │ ├── tests │ │ └── data │ │ │ ├── 0x195A5B433bbFb6481490cA12d1C95e5594Fb54C4-ipapolicy.json │ │ │ ├── 0x195A5B433bbFb6481490cA12d1C95e5594Fb54C4-policy.json │ │ │ ├── 0x5FCeDadBbDF710Ac3C528F6Aac9D1bD9ac18D9a8-license.json │ │ │ ├── 0x6510c5487312cfEd3e1b9939C6Cad33b5F47358F-royalty.json │ │ │ ├── 0x7907Cec258B28638FCA15d533800B2A13bd1f140-asset.json │ │ │ └── 0x7907Cec258B28638FCA15d533800B2A13bd1f140-nft.json │ └── types │ │ ├── alchemy.ts │ │ ├── assets.ts │ │ ├── chains.ts │ │ ├── index.ts │ │ ├── openapi.ts │ │ ├── royalty-graph.ts │ │ └── schema.ts │ ├── tailwind.config.js │ └── tsconfig.json ├── pnpm-lock.yaml ├── pnpm-workspace.yaml └── turbo.json /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // This configuration only applies to the package manager root. 2 | /** @type {import("eslint").Linter.Config} */ 3 | module.exports = { 4 | root: true, 5 | extends: ["@storykit/eslint-config/library.js"], 6 | ignorePattern: ["apps/**", "packages/**"], 7 | }; 8 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @LeoHChen @samfairbairn @allenchuang @tea-x-random @SoYoung210 @DonFungible 2 | -------------------------------------------------------------------------------- /.github/workflows/publish-package.yml: -------------------------------------------------------------------------------- 1 | name: publish on github 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - beta 8 | 9 | jobs: 10 | publish-gpr: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | 15 | - uses: pnpm/action-setup@v2.0.1 16 | with: 17 | version: 9.15.4 18 | 19 | - uses: actions/setup-node@v1 20 | with: 21 | node-version: 20.0.0 22 | cache: pnpm 23 | registry-url: https://npm.pkg.github.com/ 24 | scope: "@storyprotocol" 25 | 26 | - name: Install dependencies 27 | run: pnpm install 28 | 29 | - name: Build 30 | run: pnpm build 31 | 32 | - name: Publish to npm 33 | run: | 34 | cd packages/storykit 35 | if [[ "${{ github.ref }}" == "refs/heads/beta" ]]; then 36 | npm publish --tag beta 37 | elif [[ "${{ github.ref }}" == "refs/heads/main" ]]; then 38 | npm publish --tag latest 39 | fi 40 | env: 41 | NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # Dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # Local env files 9 | .env 10 | .env.local 11 | .env.development.local 12 | .env.test.local 13 | .env.production.local 14 | 15 | # Testing 16 | coverage 17 | 18 | # Turbo 19 | .turbo 20 | 21 | # Vercel 22 | .vercel 23 | 24 | # Build Outputs 25 | .next/ 26 | out/ 27 | build 28 | dist 29 | 30 | 31 | # Debug 32 | npm-debug.log* 33 | yarn-debug.log* 34 | yarn-error.log* 35 | 36 | # Misc 37 | .DS_Store 38 | *.pem 39 | 40 | .yalc 41 | yalc.lock 42 | 43 | __archive 44 | 45 | # anima 46 | .anima 47 | 48 | .npmrc 49 | .env*.local 50 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | pnpm exec lint-staged -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 20 -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | coverage 4 | examples 5 | .next 6 | *.hbs -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true, 3 | "editor.defaultFormatter": "esbenp.prettier-vscode", 4 | "editor.codeActionsOnSave": { 5 | "source.fixAll": "explicit" 6 | }, 7 | "[javascript]": { 8 | "editor.defaultFormatter": "esbenp.prettier-vscode" 9 | }, 10 | "[typescript]": { 11 | "editor.defaultFormatter": "esbenp.prettier-vscode" 12 | }, 13 | "[json]": { 14 | "editor.defaultFormatter": "esbenp.prettier-vscode" 15 | }, 16 | "[jsonc]": { 17 | "editor.defaultFormatter": "esbenp.prettier-vscode" 18 | } 19 | } -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Story Protocol Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /examples/custom-theme/.eslintrc.js: -------------------------------------------------------------------------------- 1 | /** @type {import("eslint").Linter.Config} */ 2 | module.exports = { 3 | root: true, 4 | extends: ["@storykit/eslint-config/next.js"], 5 | parser: "@typescript-eslint/parser", 6 | // parserOptions: { 7 | // project: true, 8 | // }, 9 | } 10 | -------------------------------------------------------------------------------- /examples/custom-theme/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /examples/custom-theme/README.md: -------------------------------------------------------------------------------- 1 | # Custom Theme Example 2 | 3 | The same simple setup as the [simple-setup example](../simple-setup/README.md), but with a custom theme called `my-theme` defined in [`app/base.css`](./app/base.css), and passed to the `StoryKitProvider` in [`app/Providers.tsx`](./app/Providers.tsx). 4 | 5 | ## Getting Started 6 | 7 | First, run the development server: 8 | 9 | ```bash 10 | npm run dev 11 | # or 12 | yarn dev 13 | # or 14 | pnpm dev 15 | # or 16 | bun dev 17 | ``` 18 | 19 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 20 | -------------------------------------------------------------------------------- /examples/custom-theme/app/IpHeader.tsx: -------------------------------------------------------------------------------- 1 | import { useIpContext } from "@storyprotocol/storykit" 2 | 3 | export default function IpHeader() { 4 | const { nftData, ownersData } = useIpContext() 5 | return ( 6 |
19 | {field} 20 | | 21 | ))} 22 |
30 | {item[field] ? (
31 | typeof item[field] === "string" && item[field].length > 0 && item[field].startsWith("0x") ? (
32 | |
40 | ))}
41 |
> = {
11 | apiClient: ApiClient
12 | path: P
13 | chainName: string
14 | apiKey: string
15 | pathParams: Params<"get", P>["params"]["path"]
16 | additionalHeaders?: Record >({
20 | apiClient,
21 | path,
22 | chainName,
23 | apiKey,
24 | pathParams,
25 | additionalHeaders,
26 | }: GetQueryParams ) {
27 | const requestParams = {
28 | params: {
29 | path: pathParams,
30 | header: {
31 | "X-Chain": chainName,
32 | "X-Api-Key": apiKey,
33 | ...additionalHeaders,
34 | },
35 | },
36 | } as Params<"get", P>
37 |
38 | return apiClient.GET(path, requestParams)
39 | }
40 |
--------------------------------------------------------------------------------
/packages/storykit/src/lib/api/getRoyaltyPayment.ts:
--------------------------------------------------------------------------------
1 | import { paths } from "@/types/schema"
2 | import { FetchResponse } from "openapi-fetch"
3 | import { Address } from "viem"
4 |
5 | import { ApiClient } from "./apiClient"
6 | import { getQuery } from "./getQuery"
7 |
8 | export type RoyaltyPaymentResponse =
9 | paths["/api/v3/royalties/payments/{royaltyPayId}"]["get"]["responses"][200]["content"]["application/json"]
10 |
11 | export type GetRoyaltyPaymentOptions = {
12 | apiClient: ApiClient
13 | royaltyPayId: Address
14 | chainName: string
15 | apiKey: string
16 | }
17 |
18 | export function getRoyaltyPayment({ apiClient, royaltyPayId, chainName, apiKey }: GetRoyaltyPaymentOptions) {
19 | return getQuery({
20 | apiClient,
21 | path: "/api/v3/royalties/payments/{royaltyPayId}",
22 | pathParams: { royaltyPayId },
23 | chainName,
24 | apiKey,
25 | }) as Promise > = {
11 | apiClient: ApiClient
12 | path: P
13 | chainName: string
14 | apiKey: string
15 | body?: Params<"post", P>["body"]
16 | additionalHeaders?: Record >({
20 | apiClient,
21 | path,
22 | chainName,
23 | apiKey,
24 | body,
25 | additionalHeaders,
26 | }: ListQueryParams ) {
27 | const requestParams = {
28 | params: {
29 | header: {
30 | "X-Chain": chainName,
31 | "X-Api-Key": apiKey,
32 | ...additionalHeaders,
33 | },
34 | },
35 | } as Params<"post", P>
36 |
37 | const requestBody = {
38 | body: body || {},
39 | } as Params<"post", P>["body"]
40 |
41 | return apiClient.POST(path, { ...requestParams, ...requestBody })
42 | }
43 |
--------------------------------------------------------------------------------
/packages/storykit/src/lib/functions/convertLicenseTermObject.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable @typescript-eslint/no-explicit-any */
2 | import { Trait } from "@/types/assets"
3 | import { PILTerms } from "@/types/openapi"
4 |
5 | import { camelize } from "../utils"
6 |
7 | type LicenseTerms = Partial : null}>
14 | }
15 |
16 | export default Example
17 |
--------------------------------------------------------------------------------
/packages/storykit/src/providers/IpRegistrationProvider/__docs__/IpRegistrationProvider.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryObj } from "@storybook/react"
2 |
3 | import Example from "./Example"
4 |
5 | const meta = {
6 | title: "WIP/IpRegistrationProvider",
7 | component: Example,
8 | parameters: {
9 | layout: "centered",
10 | },
11 | } satisfies Meta