From 95eeb15d4bce82478b95b8bea1c1df7016956678 Mon Sep 17 00:00:00 2001 From: Boris Polania Date: Thu, 29 Aug 2024 16:37:41 -0700 Subject: [PATCH 1/2] Bp/sdk pr 4 (#245) --- packages/core-sdk/package.json | 2 +- packages/core-sdk/src/utils/getLicenseTermsByType.ts | 1 + packages/core-sdk/test/unit/utils/getLicenseTermsByType.test.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core-sdk/package.json b/packages/core-sdk/package.json index da88d3fa..b6a8f143 100644 --- a/packages/core-sdk/package.json +++ b/packages/core-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@story-protocol/core-sdk", - "version": "1.0.0-rc.20", + "version": "1.0.0-rc.21", "description": "Story Protocol Core SDK", "main": "dist/story-protocol-core-sdk.cjs.js", "module": "dist/story-protocol-core-sdk.esm.js", diff --git a/packages/core-sdk/src/utils/getLicenseTermsByType.ts b/packages/core-sdk/src/utils/getLicenseTermsByType.ts index eaeabf8d..58546f49 100644 --- a/packages/core-sdk/src/utils/getLicenseTermsByType.ts +++ b/packages/core-sdk/src/utils/getLicenseTermsByType.ts @@ -31,6 +31,7 @@ export function getLicenseTermByType( uri: "", }; if (type === PIL_TYPE.NON_COMMERCIAL_REMIX) { + licenseTerms.commercializerCheckerData = "0x"; return licenseTerms; } else if (type === PIL_TYPE.COMMERCIAL_USE) { if (!term || term.defaultMintingFee === undefined || term.currency === undefined) { diff --git a/packages/core-sdk/test/unit/utils/getLicenseTermsByType.test.ts b/packages/core-sdk/test/unit/utils/getLicenseTermsByType.test.ts index cc24004e..948c9475 100644 --- a/packages/core-sdk/test/unit/utils/getLicenseTermsByType.test.ts +++ b/packages/core-sdk/test/unit/utils/getLicenseTermsByType.test.ts @@ -13,7 +13,7 @@ describe("Get License Terms By Type", () => { commercialRevShare: 0, commercialUse: false, commercializerChecker: "0x0000000000000000000000000000000000000000", - commercializerCheckerData: "0x0000000000000000000000000000000000000000", + commercializerCheckerData: "0x", currency: "0x0000000000000000000000000000000000000000", derivativeRevCeiling: 0n, derivativesAllowed: true, From 972539a48d944a0eb5b6d0ad8cf34473ebeb3ea9 Mon Sep 17 00:00:00 2001 From: Bonnie57 <146059114+bonnie57@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:50:06 +0800 Subject: [PATCH 2/2] Remove useless code for nftMetadata (#247) * Remove useless code for nftMetadata * Export IpCreator, IpMetadata --- packages/core-sdk/src/index.ts | 2 ++ packages/core-sdk/src/types/resources/ipAsset.ts | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core-sdk/src/index.ts b/packages/core-sdk/src/index.ts index 2e6fb0eb..c759f5ac 100644 --- a/packages/core-sdk/src/index.ts +++ b/packages/core-sdk/src/index.ts @@ -25,6 +25,8 @@ export type { RegisterIpAndAttachPilTermsRequest, RegisterIpAndAttachPilTermsResponse, MintAndRegisterIpAndMakeDerivativeRequest, + IpCreator, + IpMetadata, } from "./types/resources/ipAsset"; export type { diff --git a/packages/core-sdk/src/types/resources/ipAsset.ts b/packages/core-sdk/src/types/resources/ipAsset.ts index dfc51f25..6b54f695 100644 --- a/packages/core-sdk/src/types/resources/ipAsset.ts +++ b/packages/core-sdk/src/types/resources/ipAsset.ts @@ -58,7 +58,6 @@ export type CreateIpAssetWithPilTermsRequest = { mintingFee?: string | number | bigint; recipient?: Address; commercialRevShare?: number; - nftMetadata?: string; } & IpMetadataAndTxOption; export type CreateIpAssetWithPilTermsResponse = { @@ -110,7 +109,6 @@ export type MintAndRegisterIpAndMakeDerivativeRequest = { licenseTermsIds: string[] | bigint[] | number[]; licenseTemplate?: Address; }; - nftMetadata?: string; recipient?: Address; } & IpMetadataAndTxOption;